(dfb5c5dec) Option to determine the orientation of a wall in xml (if omitted, the orientation is determined automatically based on the dimensions of the wall instance, just like before).

This commit is contained in:
Joonas Rikkonen
2019-05-18 17:37:21 +03:00
parent 5bd1bc4ae3
commit c86225fd82
4 changed files with 83 additions and 1 deletions
@@ -86,6 +86,15 @@ namespace Barotrauma
private set;
}
/// <summary>
/// If null, the orientation is determined automatically based on the dimensions of the structure instances
/// </summary>
public bool? IsHorizontal
{
get;
private set;
}
[Serialize(Direction.None, false)]
public Direction StairDirection
{
@@ -168,6 +177,11 @@ namespace Barotrauma
sp.Tags.Add(tag.Trim().ToLowerInvariant());
}
if (element.Attribute("ishorizontal") != null)
{
sp.IsHorizontal = element.GetAttributeBool("ishorizontal", false);
}
foreach (XElement subElement in element.Elements())
{
switch (subElement.Name.ToString())