Unstable 1.2.1.0
This commit is contained in:
@@ -122,6 +122,9 @@ namespace Barotrauma
|
||||
|
||||
public OutpostModuleInfo OutpostModuleInfo { get; set; }
|
||||
public BeaconStationInfo BeaconStationInfo { get; set; }
|
||||
public WreckInfo WreckInfo { get; set; }
|
||||
|
||||
public ExtraSubmarineInfo GetExtraSubmarineInfo => BeaconStationInfo ?? WreckInfo as ExtraSubmarineInfo;
|
||||
|
||||
public bool IsOutpost => Type == SubmarineType.Outpost || Type == SubmarineType.OutpostModule;
|
||||
|
||||
@@ -320,10 +323,14 @@ namespace Barotrauma
|
||||
{
|
||||
OutpostModuleInfo = new OutpostModuleInfo(original.OutpostModuleInfo);
|
||||
}
|
||||
if (original.BeaconStationInfo != null)
|
||||
else if (original.BeaconStationInfo != null)
|
||||
{
|
||||
BeaconStationInfo = new BeaconStationInfo(original.BeaconStationInfo);
|
||||
}
|
||||
else if (original.WreckInfo != null)
|
||||
{
|
||||
WreckInfo = new WreckInfo(original.WreckInfo);
|
||||
}
|
||||
#if CLIENT
|
||||
PreviewImage = original.PreviewImage != null ? new Sprite(original.PreviewImage) : null;
|
||||
#endif
|
||||
@@ -410,6 +417,10 @@ namespace Barotrauma
|
||||
{
|
||||
BeaconStationInfo = new BeaconStationInfo(this, SubmarineElement);
|
||||
}
|
||||
else if (Type == SubmarineType.Wreck)
|
||||
{
|
||||
WreckInfo = new WreckInfo(this, SubmarineElement);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -589,6 +600,11 @@ namespace Barotrauma
|
||||
BeaconStationInfo.Save(newElement);
|
||||
BeaconStationInfo = new BeaconStationInfo(this, newElement);
|
||||
}
|
||||
else if (Type == SubmarineType.Wreck)
|
||||
{
|
||||
WreckInfo.Save(newElement);
|
||||
WreckInfo = new WreckInfo(this, newElement);
|
||||
}
|
||||
XDocument doc = new XDocument(newElement);
|
||||
|
||||
doc.Root.Add(new XAttribute("name", Name));
|
||||
|
||||
Reference in New Issue
Block a user