Rename UseOccupiedCellsOffsets to UseTargetableCellsOffsets
With the introduction of the new 'u' BlockingUntargetable cell type, the old property name became inaccurate.
This commit is contained in:
@@ -23,7 +23,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public readonly WVec[] TargetableOffsets = { WVec.Zero };
|
||||
|
||||
[Desc("Create a targetable position at the center of each occupied cell. Stacks with TargetableOffsets.")]
|
||||
public readonly bool UseOccupiedCellsOffsets = false;
|
||||
public readonly bool UseTargetableCellsOffsets = false;
|
||||
|
||||
[FieldLoader.LoadUsing("LoadShape")]
|
||||
public readonly IHitShape Type;
|
||||
@@ -78,7 +78,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
if (IsTraitDisabled)
|
||||
yield break;
|
||||
|
||||
if (Info.UseOccupiedCellsOffsets && targetableCells != null)
|
||||
if (Info.UseTargetableCellsOffsets && targetableCells != null)
|
||||
foreach (var c in targetableCells.TargetableCells())
|
||||
yield return self.World.Map.CenterOfCell(c.First);
|
||||
|
||||
|
||||
@@ -821,6 +821,14 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
}
|
||||
}
|
||||
|
||||
// We now differentiate between "occupied and provides offset" and "occupied but provides no offset",
|
||||
// so the old property name was no longer correct.
|
||||
if (engineVersion < 20170705)
|
||||
{
|
||||
if (node.Key == "UseOccupiedCellsOffsets")
|
||||
node.Key = "UseTargetableCellsOffsets";
|
||||
}
|
||||
|
||||
UpgradeActorRules(modData, engineVersion, ref node.Value.Nodes, node, depth + 1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user