From 436b261abf3169b24eca67cf1f5bccb04c346fb8 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Mon, 28 Dec 2009 19:03:48 +1300 Subject: [PATCH] stable, incomplete c4 action --- OpenRa.Game/Controller.cs | 1 + OpenRa.Game/Cursor.cs | 1 + OpenRa.Game/Traits/C4Demolition.cs | 2 ++ units.ini | 2 +- 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/OpenRa.Game/Controller.cs b/OpenRa.Game/Controller.cs index 18394e168d..1cbd4d06e7 100644 --- a/OpenRa.Game/Controller.cs +++ b/OpenRa.Game/Controller.cs @@ -138,6 +138,7 @@ namespace OpenRa.Game switch( s ) { case "Attack": return Cursor.Attack; + case "C4": return Cursor.C4; case "Move": if (movement.CanEnterCell(location)) return Cursor.Move; diff --git a/OpenRa.Game/Cursor.cs b/OpenRa.Game/Cursor.cs index a54fd00508..8585ca9eb4 100644 --- a/OpenRa.Game/Cursor.cs +++ b/OpenRa.Game/Cursor.cs @@ -23,5 +23,6 @@ namespace OpenRa.Game public static Cursor Enter { get { return new Cursor("enter"); } } public static Cursor DeployBlocked { get { return new Cursor("deploy-blocked"); } } public static Cursor Chronoshift { get { return new Cursor("chrono"); } } + public static Cursor C4 { get { return new Cursor("c4"); } } } } diff --git a/OpenRa.Game/Traits/C4Demolition.cs b/OpenRa.Game/Traits/C4Demolition.cs index db3fa2bced..23c469f6f1 100644 --- a/OpenRa.Game/Traits/C4Demolition.cs +++ b/OpenRa.Game/Traits/C4Demolition.cs @@ -8,6 +8,8 @@ namespace OpenRa.Game.Traits { class C4Demolition : IOrder { + public C4Demolition(Actor self) { } + public Order IssueOrder(Actor self, int2 xy, MouseInput mi, Actor underCursor) { if (underCursor == null) return null; diff --git a/units.ini b/units.ini index ac5535c250..222b0667ea 100755 --- a/units.ini +++ b/units.ini @@ -580,7 +580,7 @@ LongDesc=Infiltrates enemy refineries & \nsilos, and steals money stored there.\ [E7] Description=Tanya Voice=TanyaVoice -Traits=Unit, Mobile, RenderInfantry, AttackBase, TakeCover, SquishByTank, AutoTarget +Traits=Unit, Mobile, RenderInfantry, C4Demolition, AttackBase, TakeCover, SquishByTank, AutoTarget LongDesc=Elite commando infantry, armed with \ndual pistols and C4.\n Strong vs Infantry, Buildings\n Weak vs Vehicles\n Special Ability: Destroy Building with C4 [MEDI] Description=Medic