(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:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user