From 9cd8ab6a76dde547a64c754f201363e7caa7881a Mon Sep 17 00:00:00 2001 From: Alli Date: Sat, 2 Jan 2010 14:23:49 +1300 Subject: [PATCH] removed old code --- OpenRa.Game/RepairBuilding.cs | 60 ----------------------------------- 1 file changed, 60 deletions(-) delete mode 100644 OpenRa.Game/RepairBuilding.cs diff --git a/OpenRa.Game/RepairBuilding.cs b/OpenRa.Game/RepairBuilding.cs deleted file mode 100644 index 06088e3fb2..0000000000 --- a/OpenRa.Game/RepairBuilding.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System.Collections.Generic; -using OpenRa.Game.GameRules; -using OpenRa.Game.Traits; - -namespace OpenRa.Game -{ - class RepairBuilding : IOrderGenerator - { - readonly Actor Producer; - readonly BuildingInfo Building; - - public RepairBuilding(Actor producer, string name) - { - Producer = producer; - Building = (BuildingInfo)Rules.UnitInfo[name]; - } - - public IEnumerable Order(int2 xy, MouseInput mi) - { - if (mi.Button == MouseButton.Left) - { - var actorBuilding = Game.FindUnits(xy.ToFloat2(), xy.ToFloat2()) - .FirstOrDefault(a => a.traits.Contains()); - - yield return new Order("RepairBuilding", Producer.Owner.PlayerActor, null, xy, Building.Name); - } - else // rmb - { - Game.world.AddFrameEndTask(_ => { Game.controller.orderGenerator = null; }); - } - } - - public void Tick() - { - //var producing = Producer.traits.Get().CurrentItem(Rules.UnitCategory[Building.Name]); - //if (producing == null || producing.Item != Building.Name || producing.RemainingTime != 0) - //Game.world.AddFrameEndTask(_ => { Game.controller.orderGenerator = null; }); - - - //const int ticksPerPoint = 15; - //const int hpPerPoint = 8; - //int remainingTicks = ticksPerPoint; - - // if (--remainingTicks == 0) - // { - // self.Health += hpPerPoint; - - // if (self.Health >= self.Info.Strength) - // { - // self.Health = self.Info.Strength; - // return NextActivity; - // } - } - - public void Render() - { - //Game.worldRenderer.uiOverlay.DrawBuildingGrid(Building); - } - } -}