From 4055d8178d5ba4a13f3d34f3eadb626a4fbee83b Mon Sep 17 00:00:00 2001 From: UberWaffe Date: Mon, 4 Aug 2014 16:13:21 +0200 Subject: [PATCH] Bridge can now define DemolishWeapon. Defaults to previous "Demolish". --- OpenRA.Mods.RA/Bridge.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.RA/Bridge.cs b/OpenRA.Mods.RA/Bridge.cs index 5a066bc9cc..c4a1ec1292 100644 --- a/OpenRA.Mods.RA/Bridge.cs +++ b/OpenRA.Mods.RA/Bridge.cs @@ -37,6 +37,9 @@ namespace OpenRA.Mods.RA public readonly string[] ShorePieces = {"br1", "br2"}; public readonly int[] NorthOffset = null; public readonly int[] SouthOffset = null; + + [Desc("The name of the weapon to use when demolishing the bridge")] + public readonly string DemolishWeapon = "Demolish"; public object Create(ActorInitializer init) { return new Bridge(init.self, this); } @@ -295,7 +298,7 @@ namespace OpenRA.Mods.RA var initialDamage = Health.DamageState; self.World.AddFrameEndTask(w => { - var weapon = saboteur.World.Map.Rules.Weapons["demolish"]; + var weapon = saboteur.World.Map.Rules.Weapons[Info.DemolishWeapon.ToLowerInvariant()]; weapon.Impact(self.CenterPosition, saboteur, 1f); self.World.WorldActor.Trait().AddEffect(15, self.CenterPosition, 6); self.Kill(saboteur);