Add a setting to disable version checks.

This commit is contained in:
Paul Chote
2017-12-28 17:53:44 +00:00
committed by abcdefg30
parent 0208d0cc10
commit 3effa5cec4
5 changed files with 37 additions and 15 deletions

View File

@@ -95,6 +95,9 @@ namespace OpenRA
public bool StrictActivityChecking = false; 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.")] [Desc("Allow the collection of anonymous data such as Operating System, .NET runtime, OpenGL version and language settings.")]
public bool SendSystemInformation = true; public bool SendSystemInformation = true;

View File

@@ -239,7 +239,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
// Check for updates in the background // Check for updates in the background
var webServices = modData.Manifest.Get<WebServices>(); var webServices = modData.Manifest.Get<WebServices>();
webServices.CheckModVersion(); if (Game.Settings.Debug.CheckVersion)
webServices.CheckModVersion();
// System information opt-out prompt // System information opt-out prompt
var sysInfoPrompt = widget.Get("SYSTEM_INFO_PROMPT"); var sysInfoPrompt = widget.Get("SYSTEM_INFO_PROMPT");

View File

@@ -489,6 +489,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
BindCheckboxPref(panel, "FETCH_NEWS_CHECKBOX", gs, "FetchNews"); BindCheckboxPref(panel, "FETCH_NEWS_CHECKBOX", gs, "FetchNews");
BindCheckboxPref(panel, "LUADEBUG_CHECKBOX", ds, "LuaDebug"); BindCheckboxPref(panel, "LUADEBUG_CHECKBOX", ds, "LuaDebug");
BindCheckboxPref(panel, "SENDSYSINFO_CHECKBOX", ds, "SendSystemInformation"); BindCheckboxPref(panel, "SENDSYSINFO_CHECKBOX", ds, "SendSystemInformation");
BindCheckboxPref(panel, "CHECK_VERSION_CHECKBOX", ds, "CheckVersion");
BindCheckboxPref(panel, "REPLAY_COMMANDS_CHECKBOX", ds, "EnableDebugCommandsInReplays"); BindCheckboxPref(panel, "REPLAY_COMMANDS_CHECKBOX", ds, "EnableDebugCommandsInReplays");
return () => { }; return () => { };
@@ -509,6 +510,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic
ds.SanityCheckUnsyncedCode = dds.SanityCheckUnsyncedCode; ds.SanityCheckUnsyncedCode = dds.SanityCheckUnsyncedCode;
ds.BotDebug = dds.BotDebug; ds.BotDebug = dds.BotDebug;
ds.LuaDebug = dds.LuaDebug; ds.LuaDebug = dds.LuaDebug;
ds.SendSystemInformation = dds.SendSystemInformation;
ds.CheckVersion = dds.CheckVersion;
ds.EnableDebugCommandsInReplays = dds.EnableDebugCommandsInReplays;
}; };
} }

View File

@@ -542,51 +542,58 @@ Container@SETTINGS_PANEL:
Height: 20 Height: 20
Font: Regular Font: Regular
Text: Fetch Community News Text: Fetch Community News
Checkbox@SENDSYSINFO_CHECKBOX: Checkbox@CHECK_VERSION_CHECKBOX:
X: 310 X: 310
Y: 70 Y: 70
Width: 300 Width: 300
Height: 20 Height: 20
Font: Regular Font: Regular
Text: Check for Updates
Checkbox@SENDSYSINFO_CHECKBOX:
X: 310
Y: 100
Width: 300
Height: 20
Font: Regular
Text: Send System Information Text: Send System Information
Label@SENDSYSINFO_DESC: Label@SENDSYSINFO_DESC:
X: 310 X: 310
Y: 85 Y: 115
Width: 250 Width: 250
Height: 30 Height: 30
Font: Tiny Font: Tiny
WordWrap: True WordWrap: True
Text: Your Operating System, OpenGL and .NET runtime versions, and language settings will be sent along with an anonymous ID to help prioritize future development. Text: Your Operating System, OpenGL and .NET runtime versions, and language settings will be sent along with an anonymous ID to help prioritize future development.
Label@DEBUG_TITLE: Label@DEBUG_TITLE:
Y: 170 Y: 200
Width: PARENT_RIGHT Width: PARENT_RIGHT
Font: Bold Font: Bold
Text: Debug Text: Debug
Align: Center Align: Center
Checkbox@BOTDEBUG_CHECKBOX: Checkbox@BOTDEBUG_CHECKBOX:
X: 15 X: 15
Y: 190 Y: 220
Width: 300 Width: 300
Height: 20 Height: 20
Font: Regular Font: Regular
Text: Show Bot Debug Messages Text: Show Bot Debug Messages
Checkbox@CHECKUNSYNCED_CHECKBOX: Checkbox@CHECKUNSYNCED_CHECKBOX:
X: 15 X: 15
Y: 220 Y: 250
Width: 300 Width: 300
Height: 20 Height: 20
Font: Regular Font: Regular
Text: Check Sync around Unsynced Code Text: Check Sync around Unsynced Code
Checkbox@LUADEBUG_CHECKBOX: Checkbox@LUADEBUG_CHECKBOX:
X: 310 X: 310
Y: 190 Y: 220
Width: 300 Width: 300
Height: 20 Height: 20
Font: Regular Font: Regular
Text: Show Map Debug Messages Text: Show Map Debug Messages
Checkbox@REPLAY_COMMANDS_CHECKBOX: Checkbox@REPLAY_COMMANDS_CHECKBOX:
X: 310 X: 310
Y: 220 Y: 250
Width: 300 Width: 300
Height: 20 Height: 20
Font: Regular Font: Regular

View File

@@ -553,51 +553,58 @@ Background@SETTINGS_PANEL:
Height: 20 Height: 20
Font: Regular Font: Regular
Text: Fetch Community News Text: Fetch Community News
Checkbox@SENDSYSINFO_CHECKBOX: Checkbox@CHECK_VERSION_CHECKBOX:
X: 310 X: 310
Y: 70 Y: 70
Width: 300 Width: 300
Height: 20 Height: 20
Font: Regular Font: Regular
Text: Check for Updates
Checkbox@SENDSYSINFO_CHECKBOX:
X: 310
Y: 100
Width: 300
Height: 20
Font: Regular
Text: Send System Information Text: Send System Information
Label@SENDSYSINFO_DESC: Label@SENDSYSINFO_DESC:
X: 310 X: 310
Y: 85 Y: 115
Width: 250 Width: 250
Height: 30 Height: 30
Font: Tiny Font: Tiny
WordWrap: True WordWrap: True
Text: Your Operating System, OpenGL and .NET runtime versions, and language settings will be sent along with an anonymous ID to help prioritize future development. Text: Your Operating System, OpenGL and .NET runtime versions, and language settings will be sent along with an anonymous ID to help prioritize future development.
Label@DEBUG_TITLE: Label@DEBUG_TITLE:
Y: 170 Y: 200
Width: PARENT_RIGHT Width: PARENT_RIGHT
Font: Bold Font: Bold
Text: Debug Text: Debug
Align: Center Align: Center
Checkbox@BOTDEBUG_CHECKBOX: Checkbox@BOTDEBUG_CHECKBOX:
X: 15 X: 15
Y: 190 Y: 220
Width: 300 Width: 300
Height: 20 Height: 20
Font: Regular Font: Regular
Text: Show Bot Debug Messages Text: Show Bot Debug Messages
Checkbox@CHECKUNSYNCED_CHECKBOX: Checkbox@CHECKUNSYNCED_CHECKBOX:
X: 15 X: 15
Y: 220 Y: 250
Width: 300 Width: 300
Height: 20 Height: 20
Font: Regular Font: Regular
Text: Check Sync around Unsynced Code Text: Check Sync around Unsynced Code
Checkbox@LUADEBUG_CHECKBOX: Checkbox@LUADEBUG_CHECKBOX:
X: 310 X: 310
Y: 190 Y: 220
Width: 300 Width: 300
Height: 20 Height: 20
Font: Regular Font: Regular
Text: Show Map Debug Messages Text: Show Map Debug Messages
Checkbox@REPLAY_COMMANDS_CHECKBOX: Checkbox@REPLAY_COMMANDS_CHECKBOX:
X: 310 X: 310
Y: 220 Y: 250
Width: 300 Width: 300
Height: 20 Height: 20
Font: Regular Font: Regular