From 2abd1b53503c83794884709e2718504170756722 Mon Sep 17 00:00:00 2001 From: deniz1a Date: Sat, 11 Jul 2015 00:53:00 +0300 Subject: [PATCH] Renames "Disable Shroud & Fog" debug option to "Disable visibility checks". --- OpenRA.Game/Traits/Player/DeveloperMode.cs | 2 +- OpenRA.Mods.Common/Commands/DevCommands.cs | 4 ++-- .../Widgets/Logic/Ingame/DebugMenuLogic.cs | 10 ++++------ mods/cnc/chrome/ingame-debug.yaml | 4 ++-- mods/ra/chrome/ingame-debug.yaml | 4 ++-- 5 files changed, 11 insertions(+), 13 deletions(-) diff --git a/OpenRA.Game/Traits/Player/DeveloperMode.cs b/OpenRA.Game/Traits/Player/DeveloperMode.cs index d4ba4b849c..f28e8a4862 100644 --- a/OpenRA.Game/Traits/Player/DeveloperMode.cs +++ b/OpenRA.Game/Traits/Player/DeveloperMode.cs @@ -123,7 +123,7 @@ namespace OpenRA.Traits break; } - case "DevShroudDisable": + case "DevVisibility": { DisableShroud ^= true; self.Owner.Shroud.Disabled = DisableShroud; diff --git a/OpenRA.Mods.Common/Commands/DevCommands.cs b/OpenRA.Mods.Common/Commands/DevCommands.cs index cec6255daf..549b1b32b7 100644 --- a/OpenRA.Mods.Common/Commands/DevCommands.cs +++ b/OpenRA.Mods.Common/Commands/DevCommands.cs @@ -36,7 +36,7 @@ namespace OpenRA.Mods.Common.Commands help.RegisterHelp(name, helpText); }; - register("disableshroud", "toggles shroud and minimap."); + register("visibility", "toggles visibility checks and minimap."); register("givecash", "gives the default or specified amount of money."); register("givecashall", "gives the default or specified amount of money to all players and ai."); register("instantbuild", "toggles instant building."); @@ -86,7 +86,7 @@ namespace OpenRA.Mods.Common.Commands break; - case "disableshroud": IssueDevCommand(world, "DevShroudDisable"); break; + case "visibility": IssueDevCommand(world, "DevVisibility"); break; case "instantbuild": IssueDevCommand(world, "DevFastBuild"); break; case "buildanywhere": IssueDevCommand(world, "DevBuildAnywhere"); break; case "unlimitedpower": IssueDevCommand(world, "DevUnlimitedPower"); break; diff --git a/OpenRA.Mods.Common/Widgets/Logic/Ingame/DebugMenuLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Ingame/DebugMenuLogic.cs index 267ba36ca0..66dca231cf 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Ingame/DebugMenuLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Ingame/DebugMenuLogic.cs @@ -8,9 +8,7 @@ */ #endregion -using System; using OpenRA.Mods.Common.Traits; -using OpenRA.Support; using OpenRA.Traits; using OpenRA.Widgets; @@ -23,11 +21,11 @@ namespace OpenRA.Mods.Common.Widgets.Logic { var devTrait = world.LocalPlayer.PlayerActor.Trait(); - var shroudCheckbox = widget.GetOrNull("DISABLE_SHROUD"); - if (shroudCheckbox != null) + var visibilityCheckbox = widget.GetOrNull("DISABLE_VISIBILITY_CHECKS"); + if (visibilityCheckbox != null) { - shroudCheckbox.IsChecked = () => devTrait.DisableShroud; - shroudCheckbox.OnClick = () => Order(world, "DevShroudDisable"); + visibilityCheckbox.IsChecked = () => devTrait.DisableShroud; + visibilityCheckbox.OnClick = () => Order(world, "DevVisibility"); } var pathCheckbox = widget.GetOrNull("SHOW_UNIT_PATHS"); diff --git a/mods/cnc/chrome/ingame-debug.yaml b/mods/cnc/chrome/ingame-debug.yaml index 9e1dc992bc..2d7e82815f 100644 --- a/mods/cnc/chrome/ingame-debug.yaml +++ b/mods/cnc/chrome/ingame-debug.yaml @@ -44,13 +44,13 @@ Container@DEBUG_PANEL: Height: 20 Font: Regular Text: Instant Charge Time - Checkbox@DISABLE_SHROUD: + Checkbox@DISABLE_VISIBILITY_CHECKS: X: 290 Y: 105 Height: 20 Width: 200 Font: Regular - Text: Disable Shroud & Fog + Text: Disable visibility checks Button@GIVE_CASH: X: 90 Y: 145 diff --git a/mods/ra/chrome/ingame-debug.yaml b/mods/ra/chrome/ingame-debug.yaml index e6cf64c0ae..316ccb20c6 100644 --- a/mods/ra/chrome/ingame-debug.yaml +++ b/mods/ra/chrome/ingame-debug.yaml @@ -45,13 +45,13 @@ Container@DEBUG_PANEL: Height: 20 Font: Regular Text: Instant Charge Time - Checkbox@DISABLE_SHROUD: + Checkbox@DISABLE_VISIBILITY_CHECKS: X: 290 Y: 105 Height: 20 Width: 200 Font: Regular - Text: Disable Shroud & Fog + Text: Disable visibility checks Button@GIVE_CASH: X: 90 Y: 150