From 3f1db45ea6facd76a3535afda6b6edebc889e96a Mon Sep 17 00:00:00 2001 From: pevers Date: Fri, 20 Feb 2015 01:30:06 +0100 Subject: [PATCH] changed all cheat to really enable everything on call added givecash to the all cheat fixed spacing fixed spacing --- OpenRA.Game/Traits/Player/DeveloperMode.cs | 34 ++++++++++++++++++++++ OpenRA.Mods.Common/Commands/DevCommands.cs | 9 +----- 2 files changed, 35 insertions(+), 8 deletions(-) diff --git a/OpenRA.Game/Traits/Player/DeveloperMode.cs b/OpenRA.Game/Traits/Player/DeveloperMode.cs index 518f5b194e..b215c50613 100644 --- a/OpenRA.Game/Traits/Player/DeveloperMode.cs +++ b/OpenRA.Game/Traits/Player/DeveloperMode.cs @@ -43,6 +43,7 @@ namespace OpenRA.Traits public bool ShowCombatGeometry; public bool ShowDebugGeometry; public bool ShowTerrainGeometry; + public bool EnableAll; public DeveloperMode(DeveloperModeInfo info) { @@ -65,6 +66,39 @@ namespace OpenRA.Traits switch (order.OrderString) { + case "DevAll": + { + 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().GiveCash(amount); + + EnableAll = true; + } + else + { + AllTech = false; + FastCharge = false; + FastBuild = false; + DisableShroud = false; + self.Owner.Shroud.ResetExploration(); + UnlimitedPower = false; + BuildAnywhere = false; + + EnableAll = false; + } + + break; + } + case "DevEnableTech": { AllTech ^= true; diff --git a/OpenRA.Mods.Common/Commands/DevCommands.cs b/OpenRA.Mods.Common/Commands/DevCommands.cs index 0fb17ee5eb..62a8619475 100644 --- a/OpenRA.Mods.Common/Commands/DevCommands.cs +++ b/OpenRA.Mods.Common/Commands/DevCommands.cs @@ -80,14 +80,7 @@ namespace OpenRA.Mods.Common.Commands case "instantcharge": IssueDevCommand(world, "DevFastCharge"); break; case "all": - IssueDevCommand(world, "DevShroudDisable"); - IssueDevCommand(world, "DevFastBuild"); - IssueDevCommand(world, "DevBuildAnywhere"); - IssueDevCommand(world, "DevUnlimitedPower"); - IssueDevCommand(world, "DevEnableTech"); - IssueDevCommand(world, "DevFastCharge"); - IssueDevCommand(world, "DevGiveCash"); - IssueDevCommand(world, "DevLevelUp"); + IssueDevCommand(world, "DevAll"); break; case "crash":