Rename Stances to ValidStances.
This commit is contained in:
@@ -47,7 +47,7 @@ namespace OpenRA.Mods.Common.Traits.Render
|
|||||||
public readonly int ZOffset = 1;
|
public readonly int ZOffset = 1;
|
||||||
|
|
||||||
[Desc("Player stances who can view the decoration.")]
|
[Desc("Player stances who can view the decoration.")]
|
||||||
public readonly Stance Stances = Stance.Ally;
|
public readonly Stance ValidStances = Stance.Ally;
|
||||||
|
|
||||||
[Desc("Should this be visible only when selected?")]
|
[Desc("Should this be visible only when selected?")]
|
||||||
public readonly bool RequiresSelection = false;
|
public readonly bool RequiresSelection = false;
|
||||||
@@ -91,7 +91,7 @@ namespace OpenRA.Mods.Common.Traits.Render
|
|||||||
if (self.World.RenderPlayer != null)
|
if (self.World.RenderPlayer != null)
|
||||||
{
|
{
|
||||||
var stance = self.Owner.Stances[self.World.RenderPlayer];
|
var stance = self.Owner.Stances[self.World.RenderPlayer];
|
||||||
if (!Info.Stances.HasStance(stance))
|
if (!Info.ValidStances.HasStance(stance))
|
||||||
return Enumerable.Empty<IRenderable>();
|
return Enumerable.Empty<IRenderable>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ namespace OpenRA.Mods.Common.Traits.Render
|
|||||||
public readonly int ZOffset = 1;
|
public readonly int ZOffset = 1;
|
||||||
|
|
||||||
[Desc("Player stances who can view the decoration.")]
|
[Desc("Player stances who can view the decoration.")]
|
||||||
public readonly Stance Stances = Stance.Ally;
|
public readonly Stance ValidStances = Stance.Ally;
|
||||||
|
|
||||||
[Desc("Should this be visible only when selected?")]
|
[Desc("Should this be visible only when selected?")]
|
||||||
public readonly bool RequiresSelection = false;
|
public readonly bool RequiresSelection = false;
|
||||||
@@ -86,7 +86,7 @@ namespace OpenRA.Mods.Common.Traits.Render
|
|||||||
if (self.World.RenderPlayer != null)
|
if (self.World.RenderPlayer != null)
|
||||||
{
|
{
|
||||||
var stance = self.Owner.Stances[self.World.RenderPlayer];
|
var stance = self.Owner.Stances[self.World.RenderPlayer];
|
||||||
if (!Info.Stances.HasStance(stance))
|
if (!Info.ValidStances.HasStance(stance))
|
||||||
return Enumerable.Empty<IRenderable>();
|
return Enumerable.Empty<IRenderable>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -212,6 +212,16 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (engineVersion < 20160703)
|
||||||
|
{
|
||||||
|
if (node.Key.StartsWith("WithDecoration") || node.Key.StartsWith("WithRankDecoration") || node.Key.StartsWith("WithDecorationCarryable"))
|
||||||
|
{
|
||||||
|
var stancesNode = node.Value.Nodes.FirstOrDefault(n => n.Key == "Stances");
|
||||||
|
if (stancesNode != null)
|
||||||
|
stancesNode.Key = "ValidStances";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
UpgradeActorRules(modData, engineVersion, ref node.Value.Nodes, node, depth + 1);
|
UpgradeActorRules(modData, engineVersion, ref node.Value.Nodes, node, depth + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user