diff --git a/OpenRA.Game/Settings.cs b/OpenRA.Game/Settings.cs index ee8b3593ef..c5a25e8391 100644 --- a/OpenRA.Game/Settings.cs +++ b/OpenRA.Game/Settings.cs @@ -87,31 +87,50 @@ namespace OpenRA public class DebugSettings { - public bool DisplayDeveloperSettings = false; - - public bool BotDebug = false; - public bool LuaDebug = false; + [Desc("Display average FPS and tick/render times")] public bool PerfText = false; + + [Desc("Display a graph with various profiling traces")] public bool PerfGraph = false; - [Desc("Amount of time required for triggering perf.log output.")] - public float LongTickThresholdMs = 1; - - public bool SyncCheckUnsyncedCode = false; - public bool SyncCheckBotModuleCode = false; + [Desc("Numer of samples to average over when calculating tick and render times.")] public int Samples = 25; - public bool StrictActivityChecking = false; - [Desc("Check whether a newer version is available online.")] public bool CheckVersion = true; [Desc("Allow the collection of anonymous data such as Operating System, .NET runtime, OpenGL version and language settings.")] public bool SendSystemInformation = true; + [Desc("Version of sysinfo that the player last opted in or out of.")] public int SystemInformationVersionPrompt = 0; - public string UUID = System.Guid.NewGuid().ToString(); + + [Desc("Sysinfo anonymous user identifier.")] + public string UUID = Guid.NewGuid().ToString(); + + [Desc("Enable hidden developer settings in the Advanced settings tab.")] + public bool DisplayDeveloperSettings = false; + + [Desc("Display bot debug messages in the game chat.")] + public bool BotDebug = false; + + [Desc("Display Lua debug messages in the game chat.")] + public bool LuaDebug = false; + + [Desc("Enable the chat field during replays to allow use of console commands.")] public bool EnableDebugCommandsInReplays = false; + + [Desc("Amount of time required for triggering perf.log output.")] + public float LongTickThresholdMs = 1; + + [Desc("Throw an exception if the world sync hash changes while evaluating user input.")] + public bool SyncCheckUnsyncedCode = false; + + [Desc("Throw an exception if the world sync hash changes while evaluating BotModules.")] + public bool SyncCheckBotModuleCode = false; + + [Desc("Throw an exception if an actor activity is ticked after it has been marked as completed.")] + public bool StrictActivityChecking = false; } public class GraphicSettings diff --git a/OpenRA.Mods.Common/Widgets/Logic/SettingsLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/SettingsLogic.cs index 3bef1e2b90..79ba9b99d9 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/SettingsLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/SettingsLogic.cs @@ -480,21 +480,24 @@ namespace OpenRA.Mods.Common.Widgets.Logic var ss = Game.Settings.Server; var gs = Game.Settings.Game; + // Advanced BindCheckboxPref(panel, "NAT_DISCOVERY", ss, "DiscoverNatDevices"); BindCheckboxPref(panel, "PERFTEXT_CHECKBOX", ds, "PerfText"); BindCheckboxPref(panel, "PERFGRAPH_CHECKBOX", ds, "PerfGraph"); - BindCheckboxPref(panel, "CHECKUNSYNCED_CHECKBOX", ds, "SyncCheckUnsyncedCode"); - BindCheckboxPref(panel, "CHECKBOTSYNC_CHECKBOX", ds, "SyncCheckBotModuleCode"); - BindCheckboxPref(panel, "BOTDEBUG_CHECKBOX", ds, "BotDebug"); BindCheckboxPref(panel, "FETCH_NEWS_CHECKBOX", gs, "FetchNews"); - BindCheckboxPref(panel, "LUADEBUG_CHECKBOX", ds, "LuaDebug"); BindCheckboxPref(panel, "SENDSYSINFO_CHECKBOX", ds, "SendSystemInformation"); BindCheckboxPref(panel, "CHECK_VERSION_CHECKBOX", ds, "CheckVersion"); - BindCheckboxPref(panel, "REPLAY_COMMANDS_CHECKBOX", ds, "EnableDebugCommandsInReplays"); var ssi = panel.Get("SENDSYSINFO_CHECKBOX"); ssi.IsDisabled = () => !gs.FetchNews; + // Developer + BindCheckboxPref(panel, "BOTDEBUG_CHECKBOX", ds, "BotDebug"); + BindCheckboxPref(panel, "LUADEBUG_CHECKBOX", ds, "LuaDebug"); + BindCheckboxPref(panel, "REPLAY_COMMANDS_CHECKBOX", ds, "EnableDebugCommandsInReplays"); + BindCheckboxPref(panel, "CHECKUNSYNCED_CHECKBOX", ds, "SyncCheckUnsyncedCode"); + BindCheckboxPref(panel, "CHECKBOTSYNC_CHECKBOX", ds, "SyncCheckBotModuleCode"); + panel.Get("DEBUG_OPTIONS").IsVisible = () => ds.DisplayDeveloperSettings; panel.Get("DEBUG_HIDDEN_LABEL").IsVisible = () => !ds.DisplayDeveloperSettings;