Use GoldWrench cursor for engineer repair

This commit is contained in:
Paul Chote
2010-07-23 00:29:46 +12:00
parent 1061f1138f
commit 93e629584b
2 changed files with 8 additions and 3 deletions

View File

@@ -34,19 +34,22 @@ namespace OpenRA.Mods.RA
var isCapture = underCursor.Health <= self.Info.Traits.Get<EngineerCaptureInfo>().EngineerDamage && var isCapture = underCursor.Health <= self.Info.Traits.Get<EngineerCaptureInfo>().EngineerDamage &&
self.Owner.Stances[underCursor.Owner] != Stance.Ally; self.Owner.Stances[underCursor.Owner] != Stance.Ally;
return new Order(isCapture ? "Capture" : "Infiltrate", var isHeal = self.Owner.Stances[underCursor.Owner] == Stance.Ally;
return new Order(isCapture ? "Capture" :
isHeal ? "Repair" : "Infiltrate",
self, underCursor); self, underCursor);
} }
public string CursorForOrderString(string s, Actor a, int2 location) public string CursorForOrderString(string s, Actor a, int2 location)
{ {
return (s == "Infiltrate") ? "enter" : return (s == "Infiltrate") ? "enter" :
(s == "Capture") ? "capture" : null; (s == "Repair") ? "goldwrench" :
(s == "Capture") ? "capture" : null;
} }
public void ResolveOrder(Actor self, Order order) public void ResolveOrder(Actor self, Order order)
{ {
if (order.OrderString == "Infiltrate" || order.OrderString == "Capture") if (order.OrderString == "Infiltrate" || order.OrderString == "Capture" || order.OrderString == "Repair")
{ {
self.CancelActivity(); self.CancelActivity();
self.QueueActivity(new Move(order.TargetActor, 1)); self.QueueActivity(new Move(order.TargetActor, 1));

View File

@@ -47,6 +47,8 @@
<sequence name="heal-minimap" start="1" length="1" x="12" y="12" /> <sequence name="heal-minimap" start="1" length="1" x="12" y="12" />
<sequence name="capture" start="119" length="3" x="12" y="12" /> <sequence name="capture" start="119" length="3" x="12" y="12" />
<sequence name="capture-minimap" start="148" length="3" x="12" y="12" /> <sequence name="capture-minimap" start="148" length="3" x="12" y="12" />
<sequence name="goldwrench" start="29" length="24" x="12" y="12" />
<sequence name="goldwrench-blocked" start="126" length="1" x="12" y="12" />
</cursor> </cursor>
<unit name="120mm"> <unit name="120mm">
<sequence name="idle" start="0" length="1" /> <sequence name="idle" start="0" length="1" />