DisableShroud cheat now properly disables after disabling the all-cheat

Smaller code base

Added newline

Added newline between assignment and statement

fixed spacing

fixed spacing

fixed spacing
This commit is contained in:
pevers
2015-02-22 17:43:57 +01:00
parent 3f1db45ea6
commit 6d716d301a

View File

@@ -68,34 +68,25 @@ namespace OpenRA.Traits
{
case "DevAll":
{
if (!EnableAll)
EnableAll ^= true;
AllTech = FastCharge = FastBuild = DisableShroud = UnlimitedPower = BuildAnywhere = EnableAll;
if (EnableAll)
{
AllTech = true;
FastCharge = true;
FastBuild = true;
DisableShroud = true;
self.Owner.Shroud.ExploreAll(self.World);
UnlimitedPower = true;
BuildAnywhere = true;
var amount = order.ExtraData != 0 ? (int)order.ExtraData : info.Cash;
self.Trait<PlayerResources>().GiveCash(amount);
EnableAll = true;
}
else
{
AllTech = false;
FastCharge = false;
FastBuild = false;
DisableShroud = false;
self.Owner.Shroud.ResetExploration();
UnlimitedPower = false;
BuildAnywhere = false;
EnableAll = false;
}
self.Owner.Shroud.Disabled = DisableShroud;
if (self.World.LocalPlayer == self.Owner)
self.World.RenderPlayer = DisableShroud ? null : self.Owner;
break;
}