From 061c0ccb3f8f16909b57df26ed3fd70b1d2982d9 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Mon, 28 Dec 2009 16:57:58 +1300 Subject: [PATCH] UIM for those --- OpenRa.Game/Traits/APMine.cs | 5 ++++- OpenRa.Game/Traits/ATMine.cs | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/OpenRa.Game/Traits/APMine.cs b/OpenRa.Game/Traits/APMine.cs index 7dfbbfa7cb..deebaf87f1 100644 --- a/OpenRa.Game/Traits/APMine.cs +++ b/OpenRa.Game/Traits/APMine.cs @@ -5,12 +5,13 @@ using OpenRa.Game.GameRules; using OpenRa.Game.Effects; namespace OpenRa.Game.Traits { - class APMine : ICrushable + class APMine : ICrushable, IOccupySpace { readonly Actor self; public APMine(Actor self) { this.self = self; + Game.UnitInfluence.Add(self, this); } public void OnCrush(Actor crusher) @@ -37,5 +38,7 @@ namespace OpenRa.Game.Traits default: return false; } } + + public IEnumerable OccupiedCells() { yield return self.Location; } } } diff --git a/OpenRa.Game/Traits/ATMine.cs b/OpenRa.Game/Traits/ATMine.cs index e81dc51d34..5dcff3c452 100644 --- a/OpenRa.Game/Traits/ATMine.cs +++ b/OpenRa.Game/Traits/ATMine.cs @@ -6,12 +6,13 @@ using OpenRa.Game.Effects; namespace OpenRa.Game.Traits { - class ATMine : ICrushable + class ATMine : ICrushable, IOccupySpace { readonly Actor self; public ATMine(Actor self) { this.self = self; + Game.UnitInfluence.Add(self, this); } public void OnCrush(Actor crusher) @@ -39,5 +40,7 @@ namespace OpenRa.Game.Traits default: return false; } } + + public IEnumerable OccupiedCells() { yield return self.Location; } } }