Fix WithHarvesterOffset.LocalOffset name.

This commit is contained in:
Paul Chote
2017-05-07 12:41:37 +00:00
parent 74437ed56c
commit 5dcb840f9f
3 changed files with 7 additions and 3 deletions

View File

@@ -22,7 +22,7 @@ namespace OpenRA.Mods.Common.Traits.Render
[SequenceReference] public readonly string Sequence = "harvest"; [SequenceReference] public readonly string Sequence = "harvest";
[Desc("Position relative to body")] [Desc("Position relative to body")]
public readonly WVec Offset = WVec.Zero; public readonly WVec LocalOffset = WVec.Zero;
[PaletteReference] public readonly string Palette = "effect"; [PaletteReference] public readonly string Palette = "effect";
@@ -45,7 +45,7 @@ namespace OpenRA.Mods.Common.Traits.Render
anim.IsDecoration = true; anim.IsDecoration = true;
anim.Play(info.Sequence); anim.Play(info.Sequence);
rs.Add(new AnimationWithOffset(anim, rs.Add(new AnimationWithOffset(anim,
() => body.LocalToWorld(info.Offset.Rotate(body.QuantizeOrientation(self, self.Orientation))), () => body.LocalToWorld(info.LocalOffset.Rotate(body.QuantizeOrientation(self, self.Orientation))),
() => !visible, () => !visible,
p => ZOffsetFromCenter(self, p, 0)), info.Palette); p => ZOffsetFromCenter(self, p, 0)), info.Palette);
} }

View File

@@ -635,6 +635,10 @@ namespace OpenRA.Mods.Common.UtilityCommands
} }
} }
if (engineVersion < 20170507)
if (node.Key == "Offset" && parent.Key.StartsWith("WithHarvestOverlay", StringComparison.Ordinal))
RenameNodeKey(node, "LocalOffset");
UpgradeActorRules(modData, engineVersion, ref node.Value.Nodes, node, depth + 1); UpgradeActorRules(modData, engineVersion, ref node.Value.Nodes, node, depth + 1);
} }

View File

@@ -95,7 +95,7 @@ HARV:
Explodes: Explodes:
Weapon: TiberiumExplosion Weapon: TiberiumExplosion
WithHarvestOverlay: WithHarvestOverlay:
Offset: 384,0,0 LocalOffset: 384,0,0
Palette: effect Palette: effect
SelectionDecorations: SelectionDecorations:
VisualBounds: 36,36 VisualBounds: 36,36