From 5fdba51536599363595d70e6ae6ecb8e65885100 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Mon, 4 Jan 2010 21:12:35 +1300 Subject: [PATCH] Clarify method name --- OpenRa.Game/Traits/AttackTurreted.cs | 4 ++-- OpenRa.Game/Traits/Building.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/OpenRa.Game/Traits/AttackTurreted.cs b/OpenRa.Game/Traits/AttackTurreted.cs index 5ccfbdaeb5..1d0007e223 100755 --- a/OpenRa.Game/Traits/AttackTurreted.cs +++ b/OpenRa.Game/Traits/AttackTurreted.cs @@ -26,8 +26,8 @@ namespace OpenRa.Game.Traits protected override void QueueAttack( Actor self, Order order ) { - var bi = self.traits.Get(); - if (bi != null && !bi.IsActive()) + var b = self.traits.Get(); + if (b != null && b.InsuffientPower()) return; const int RangeTolerance = 1; /* how far inside our maximum range we should try to sit */ diff --git a/OpenRa.Game/Traits/Building.cs b/OpenRa.Game/Traits/Building.cs index ffdc657b17..e1c6215a88 100644 --- a/OpenRa.Game/Traits/Building.cs +++ b/OpenRa.Game/Traits/Building.cs @@ -23,9 +23,9 @@ namespace OpenRa.Game.Traits * ((float2)self.Location + .5f * (float2)unitInfo.Dimensions); } - public bool IsActive() + public bool InsuffientPower() { - return !(isPoweredDown || (unitInfo.Powered && self.Owner.GetPowerState() != PowerState.Normal)); + return (isPoweredDown || (unitInfo.Powered && self.Owner.GetPowerState() != PowerState.Normal)); } public int GetPowerUsage()