allow building repair always

This commit is contained in:
Chris Forbes
2011-11-24 15:23:08 +13:00
parent 6040b55d17
commit 45c41b6696
6 changed files with 2 additions and 22 deletions

View File

@@ -42,18 +42,7 @@ namespace OpenRA.Mods.RA.Orders
}
}
public void Tick(World world)
{
if (!PlayerIsAllowedToRepair(world))
world.CancelInputMode();
}
public static bool PlayerIsAllowedToRepair(World world)
{
return world.ActorsWithTrait<AllowsBuildingRepair>()
.Any(a => a.Actor.Owner == world.LocalPlayer);
}
public void Tick(World world) { }
public void RenderAfterWorld(WorldRenderer wr, World world) { }
public void RenderBeforeWorld(WorldRenderer wr, World world) { }