Unstable 1.2.1.0
This commit is contained in:
+47
-17
@@ -3,13 +3,11 @@ using System.Xml.Linq;
|
||||
|
||||
namespace Barotrauma
|
||||
{
|
||||
class BeaconStationInfo : ISerializableEntity
|
||||
abstract class ExtraSubmarineInfo : ISerializableEntity
|
||||
{
|
||||
[Serialize(true, IsPropertySaveable.Yes), Editable]
|
||||
public bool AllowDamagedWalls { get; set; }
|
||||
public string Name { get; protected set; }
|
||||
|
||||
[Serialize(true, IsPropertySaveable.Yes), Editable]
|
||||
public bool AllowDisconnectedWires { get; set; }
|
||||
public Dictionary<Identifier, SerializableProperty> SerializableProperties { get; protected set; }
|
||||
|
||||
[Serialize(0.0f, IsPropertySaveable.Yes), Editable]
|
||||
public float MinLevelDifficulty { get; set; }
|
||||
@@ -17,26 +15,19 @@ namespace Barotrauma
|
||||
[Serialize(100.0f, IsPropertySaveable.Yes), Editable]
|
||||
public float MaxLevelDifficulty { get; set; }
|
||||
|
||||
[Serialize(Level.PlacementType.Bottom, IsPropertySaveable.Yes), Editable]
|
||||
public Level.PlacementType Placement { get; set; }
|
||||
|
||||
public string Name { get; private set; }
|
||||
|
||||
public Dictionary<Identifier, SerializableProperty> SerializableProperties { get; private set; }
|
||||
|
||||
public BeaconStationInfo(SubmarineInfo submarineInfo, XElement element)
|
||||
public ExtraSubmarineInfo(SubmarineInfo submarineInfo, XElement element)
|
||||
{
|
||||
Name = $"BeaconStationInfo ({submarineInfo.Name})";
|
||||
Name = $"{nameof(ExtraSubmarineInfo)} ({submarineInfo.Name})";
|
||||
SerializableProperties = SerializableProperty.DeserializeProperties(this, element);
|
||||
}
|
||||
|
||||
public BeaconStationInfo(SubmarineInfo submarineInfo)
|
||||
public ExtraSubmarineInfo(SubmarineInfo submarineInfo)
|
||||
{
|
||||
Name = $"BeaconStationInfo ({submarineInfo.Name})";
|
||||
Name = $"{nameof(ExtraSubmarineInfo)} ({submarineInfo.Name})";
|
||||
SerializableProperties = SerializableProperty.DeserializeProperties(this);
|
||||
}
|
||||
|
||||
public BeaconStationInfo(BeaconStationInfo original)
|
||||
public ExtraSubmarineInfo(ExtraSubmarineInfo original)
|
||||
{
|
||||
Name = original.Name;
|
||||
SerializableProperties = new Dictionary<Identifier, SerializableProperty>();
|
||||
@@ -55,4 +46,43 @@ namespace Barotrauma
|
||||
SerializableProperty.SerializeProperties(this, element);
|
||||
}
|
||||
}
|
||||
|
||||
class BeaconStationInfo : ExtraSubmarineInfo
|
||||
{
|
||||
[Serialize(true, IsPropertySaveable.Yes), Editable]
|
||||
public bool AllowDamagedWalls { get; set; }
|
||||
|
||||
[Serialize(true, IsPropertySaveable.Yes), Editable]
|
||||
public bool AllowDisconnectedWires { get; set; }
|
||||
|
||||
[Serialize(Level.PlacementType.Bottom, IsPropertySaveable.Yes), Editable]
|
||||
public Level.PlacementType Placement { get; set; }
|
||||
|
||||
public BeaconStationInfo(SubmarineInfo submarineInfo, XElement element) : base(submarineInfo, element)
|
||||
{
|
||||
Name = $"{nameof(BeaconStationInfo)} ({submarineInfo.Name})";
|
||||
}
|
||||
|
||||
public BeaconStationInfo(SubmarineInfo submarineInfo) : base(submarineInfo)
|
||||
{
|
||||
Name = $"{nameof(BeaconStationInfo)} ({submarineInfo.Name})";
|
||||
}
|
||||
|
||||
public BeaconStationInfo(BeaconStationInfo original) : base(original) { }
|
||||
}
|
||||
|
||||
class WreckInfo : ExtraSubmarineInfo
|
||||
{
|
||||
public WreckInfo(SubmarineInfo submarineInfo, XElement element) : base(submarineInfo, element)
|
||||
{
|
||||
Name = $"{nameof(WreckInfo)} ({submarineInfo.Name})";
|
||||
}
|
||||
|
||||
public WreckInfo(SubmarineInfo submarineInfo) : base(submarineInfo)
|
||||
{
|
||||
Name = $"{nameof(WreckInfo)} ({submarineInfo.Name})";
|
||||
}
|
||||
|
||||
public WreckInfo(WreckInfo original) : base(original) { }
|
||||
}
|
||||
}
|
||||
@@ -249,7 +249,7 @@ namespace Barotrauma
|
||||
}
|
||||
else
|
||||
{
|
||||
DebugConsole.ThrowError($"Error in outpost generation parameters \"{Identifier}\". \"{levelTypeStr}\" is not a valid level type.");
|
||||
DebugConsole.ThrowError($"Error in outpost generation parameters \"{Identifier}\". \"{levelTypeStr}\" is not a valid level type.", contentPackage: element.ContentPackage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user