diff --git a/OpenRa.Game/OpenRa.Game.csproj b/OpenRa.Game/OpenRa.Game.csproj index bae8b5e563..04bd69d3ed 100644 --- a/OpenRa.Game/OpenRa.Game.csproj +++ b/OpenRa.Game/OpenRa.Game.csproj @@ -1,4 +1,4 @@ - + Debug AnyCPU @@ -109,6 +109,7 @@ + @@ -176,6 +177,7 @@ + @@ -267,4 +269,4 @@ --> - + \ No newline at end of file diff --git a/OpenRa.Game/Traits/Activities/Demolish.cs b/OpenRa.Game/Traits/Activities/Demolish.cs new file mode 100644 index 0000000000..ef6cdedeb8 --- /dev/null +++ b/OpenRa.Game/Traits/Activities/Demolish.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace OpenRa.Game.Traits.Activities +{ + class Demolish : IActivity + { + Actor target; + public IActivity NextActivity { get; set; } + + public Demolish( Actor target ) + { + this.target = target; + } + + public IActivity Tick(Actor self) + { + if (target == null || target.IsDead) return NextActivity; + + // 1. run to adj tile + // 2. spawn timed demolition (for +3/4s) + // 3. run away --- where? + return this; + } + + public void Cancel(Actor self) { target = null; NextActivity = null; } + } +} diff --git a/OpenRa.Game/Traits/C4Demolition.cs b/OpenRa.Game/Traits/C4Demolition.cs new file mode 100644 index 0000000000..db3fa2bced --- /dev/null +++ b/OpenRa.Game/Traits/C4Demolition.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using OpenRa.Game.Traits.Activities; + +namespace OpenRa.Game.Traits +{ + class C4Demolition : IOrder + { + public Order IssueOrder(Actor self, int2 xy, MouseInput mi, Actor underCursor) + { + if (underCursor == null) return null; + if (underCursor.Owner == self.Owner && !mi.Modifiers.HasModifier(Modifiers.Ctrl)) return null; + if (!underCursor.traits.Contains()) return null; + + return new Order("C4", self, underCursor, int2.Zero, null); + } + + public void ResolveOrder(Actor self, Order order) + { + if (order.OrderString == "C4") + { + self.CancelActivity(); + self.QueueActivity(new Demolish(order.TargetActor)); + } + } + } +} diff --git a/doc/progress.txt b/doc/progress.txt index fa8cf9e94e..c38a818d43 100644 --- a/doc/progress.txt +++ b/doc/progress.txt @@ -8,7 +8,7 @@ E3 Works E4 Flamer origin is wrong E6 Capture action missing, repair action missing E7 C4 action missing -MEDI Heal targeting is wrong +MEDI Works SPY Infiltrate action missing THF Steal action missing C1,C2,Einstein,Kosygin Not implemented @@ -47,7 +47,7 @@ MIG Weapons don't work Ships CA Works SS Works -DD AA weapon doesn't work, depth charges don't work +DD depth charges don't work PT depth charges don't work LST Cargo doesn't work