Add Checkbox/Dropdown to lobby options yaml fields.

This commit is contained in:
Paul Chote
2017-12-09 21:02:56 +00:00
committed by reaperrr
parent ea32c758eb
commit 36fccbc453
28 changed files with 333 additions and 226 deletions

View File

@@ -78,7 +78,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
// Can't use DeveloperMode.Enabled because there is a hardcoded hack to *always*
// enable developer mode for singleplayer games, but we only want to show the button
// if it has been explicitly enabled
var def = world.Map.Rules.Actors["player"].TraitInfo<DeveloperModeInfo>().Enabled;
var def = world.Map.Rules.Actors["player"].TraitInfo<DeveloperModeInfo>().CheckboxEnabled;
var developerEnabled = world.LobbyInfo.GlobalSettings.OptionOrDefault("cheats", def);
if (lp != null && developerEnabled)
{