mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-23 12:48:27 +00:00
Add a wrong indentation to avoid "unchanged" lines in D1240, #4014
Suggested By: elexis This was SVN commit r21421.
This commit is contained in:
@@ -823,151 +823,151 @@ var g_PlayerDropdowns = {
|
|||||||
* Contains the logic of all boolean gamesettings.
|
* Contains the logic of all boolean gamesettings.
|
||||||
*/
|
*/
|
||||||
var g_Checkboxes = {
|
var g_Checkboxes = {
|
||||||
"regicideGarrison": {
|
"regicideGarrison": {
|
||||||
"title": () => translate("Hero Garrison"),
|
"title": () => translate("Hero Garrison"),
|
||||||
"tooltip": () => translate("Toggle whether heroes can be garrisoned."),
|
"tooltip": () => translate("Toggle whether heroes can be garrisoned."),
|
||||||
"default": () => false,
|
"default": () => false,
|
||||||
"defined": () => g_GameAttributes.settings.RegicideGarrison !== undefined,
|
"defined": () => g_GameAttributes.settings.RegicideGarrison !== undefined,
|
||||||
"get": () => g_GameAttributes.settings.RegicideGarrison,
|
"get": () => g_GameAttributes.settings.RegicideGarrison,
|
||||||
"set": checked => {
|
"set": checked => {
|
||||||
g_GameAttributes.settings.RegicideGarrison = checked;
|
g_GameAttributes.settings.RegicideGarrison = checked;
|
||||||
|
},
|
||||||
|
"hidden": () => g_GameAttributes.settings.GameType != "regicide",
|
||||||
|
"enabled": () => g_GameAttributes.mapType != "scenario",
|
||||||
|
"initOrder": 1000
|
||||||
},
|
},
|
||||||
"hidden": () => g_GameAttributes.settings.GameType != "regicide",
|
"nomad": {
|
||||||
"enabled": () => g_GameAttributes.mapType != "scenario",
|
"title": () => translate("Nomad"),
|
||||||
"initOrder": 1000
|
"tooltip": () => translate("In Nomad mode, players start with only few units and have to find a suitable place to build their city. Ceasefire is recommended."),
|
||||||
},
|
"default": () => false,
|
||||||
"nomad": {
|
"defined": () => g_GameAttributes.settings.Nomad !== undefined,
|
||||||
"title": () => translate("Nomad"),
|
"get": () => g_GameAttributes.settings.Nomad,
|
||||||
"tooltip": () => translate("In Nomad mode, players start with only few units and have to find a suitable place to build their city. Ceasefire is recommended."),
|
"set": checked => {
|
||||||
"default": () => false,
|
g_GameAttributes.settings.Nomad = checked;
|
||||||
"defined": () => g_GameAttributes.settings.Nomad !== undefined,
|
},
|
||||||
"get": () => g_GameAttributes.settings.Nomad,
|
"hidden": () => g_GameAttributes.mapType != "random",
|
||||||
"set": checked => {
|
"initOrder": 1000
|
||||||
g_GameAttributes.settings.Nomad = checked;
|
|
||||||
},
|
},
|
||||||
"hidden": () => g_GameAttributes.mapType != "random",
|
"revealMap": {
|
||||||
"initOrder": 1000
|
"title": () =>
|
||||||
},
|
// Translation: Make sure to differentiate between the revealed map and explored map settings!
|
||||||
"revealMap": {
|
translate("Revealed Map"),
|
||||||
"title": () =>
|
"tooltip":
|
||||||
// Translation: Make sure to differentiate between the revealed map and explored map settings!
|
// Translation: Make sure to differentiate between the revealed map and explored map settings!
|
||||||
translate("Revealed Map"),
|
() => translate("Toggle revealed map (see everything)."),
|
||||||
"tooltip":
|
"default": () => false,
|
||||||
// Translation: Make sure to differentiate between the revealed map and explored map settings!
|
"defined": () => g_GameAttributes.settings.RevealMap !== undefined,
|
||||||
() => translate("Toggle revealed map (see everything)."),
|
"get": () => g_GameAttributes.settings.RevealMap,
|
||||||
"default": () => false,
|
"set": checked => {
|
||||||
"defined": () => g_GameAttributes.settings.RevealMap !== undefined,
|
g_GameAttributes.settings.RevealMap = checked;
|
||||||
"get": () => g_GameAttributes.settings.RevealMap,
|
|
||||||
"set": checked => {
|
|
||||||
g_GameAttributes.settings.RevealMap = checked;
|
|
||||||
|
|
||||||
if (checked)
|
if (checked)
|
||||||
g_Checkboxes.exploreMap.set(true);
|
g_Checkboxes.exploreMap.set(true);
|
||||||
|
},
|
||||||
|
"enabled": () => g_GameAttributes.mapType != "scenario",
|
||||||
|
"initOrder": 1000
|
||||||
},
|
},
|
||||||
"enabled": () => g_GameAttributes.mapType != "scenario",
|
"exploreMap": {
|
||||||
"initOrder": 1000
|
"title":
|
||||||
},
|
// Translation: Make sure to differentiate between the revealed map and explored map settings!
|
||||||
"exploreMap": {
|
() => translate("Explored Map"),
|
||||||
"title":
|
"tooltip":
|
||||||
// Translation: Make sure to differentiate between the revealed map and explored map settings!
|
// Translation: Make sure to differentiate between the revealed map and explored map settings!
|
||||||
() => translate("Explored Map"),
|
() => translate("Toggle explored map (see initial map)."),
|
||||||
"tooltip":
|
"default": () => false,
|
||||||
// Translation: Make sure to differentiate between the revealed map and explored map settings!
|
"defined": () => g_GameAttributes.settings.ExploreMap !== undefined,
|
||||||
() => translate("Toggle explored map (see initial map)."),
|
"get": () => g_GameAttributes.settings.ExploreMap,
|
||||||
"default": () => false,
|
"set": checked => {
|
||||||
"defined": () => g_GameAttributes.settings.ExploreMap !== undefined,
|
g_GameAttributes.settings.ExploreMap = checked;
|
||||||
"get": () => g_GameAttributes.settings.ExploreMap,
|
},
|
||||||
"set": checked => {
|
"enabled": () => g_GameAttributes.mapType != "scenario" && !g_GameAttributes.settings.RevealMap,
|
||||||
g_GameAttributes.settings.ExploreMap = checked;
|
"initOrder": 1000
|
||||||
},
|
},
|
||||||
"enabled": () => g_GameAttributes.mapType != "scenario" && !g_GameAttributes.settings.RevealMap,
|
"disableTreasures": {
|
||||||
"initOrder": 1000
|
"title": () => translate("Disable Treasures"),
|
||||||
},
|
"tooltip": () => translate("Disable all treasures on the map."),
|
||||||
"disableTreasures": {
|
"default": () => false,
|
||||||
"title": () => translate("Disable Treasures"),
|
"defined": () => g_GameAttributes.settings.DisableTreasures !== undefined,
|
||||||
"tooltip": () => translate("Disable all treasures on the map."),
|
"get": () => g_GameAttributes.settings.DisableTreasures,
|
||||||
"default": () => false,
|
"set": checked => {
|
||||||
"defined": () => g_GameAttributes.settings.DisableTreasures !== undefined,
|
g_GameAttributes.settings.DisableTreasures = checked;
|
||||||
"get": () => g_GameAttributes.settings.DisableTreasures,
|
},
|
||||||
"set": checked => {
|
"enabled": () => g_GameAttributes.mapType != "scenario",
|
||||||
g_GameAttributes.settings.DisableTreasures = checked;
|
"initOrder": 1000
|
||||||
},
|
},
|
||||||
"enabled": () => g_GameAttributes.mapType != "scenario",
|
"disableSpies": {
|
||||||
"initOrder": 1000
|
"title": () => translate("Disable Spies"),
|
||||||
},
|
"tooltip": () => translate("Disable spies during the game."),
|
||||||
"disableSpies": {
|
"default": () => false,
|
||||||
"title": () => translate("Disable Spies"),
|
"defined": () => g_GameAttributes.settings.DisableSpies !== undefined,
|
||||||
"tooltip": () => translate("Disable spies during the game."),
|
"get": () => g_GameAttributes.settings.DisableSpies,
|
||||||
"default": () => false,
|
"set": checked => {
|
||||||
"defined": () => g_GameAttributes.settings.DisableSpies !== undefined,
|
g_GameAttributes.settings.DisableSpies = checked;
|
||||||
"get": () => g_GameAttributes.settings.DisableSpies,
|
},
|
||||||
"set": checked => {
|
"enabled": () => g_GameAttributes.mapType != "scenario",
|
||||||
g_GameAttributes.settings.DisableSpies = checked;
|
"initOrder": 1000
|
||||||
},
|
},
|
||||||
"enabled": () => g_GameAttributes.mapType != "scenario",
|
"lockTeams": {
|
||||||
"initOrder": 1000
|
"title": () => translate("Teams Locked"),
|
||||||
},
|
"tooltip": () => translate("Toggle locked teams."),
|
||||||
"lockTeams": {
|
"default": () => Engine.HasXmppClient(),
|
||||||
"title": () => translate("Teams Locked"),
|
"defined": () => g_GameAttributes.settings.LockTeams !== undefined,
|
||||||
"tooltip": () => translate("Toggle locked teams."),
|
"get": () => g_GameAttributes.settings.LockTeams,
|
||||||
"default": () => Engine.HasXmppClient(),
|
"set": checked => {
|
||||||
"defined": () => g_GameAttributes.settings.LockTeams !== undefined,
|
g_GameAttributes.settings.LockTeams = checked;
|
||||||
"get": () => g_GameAttributes.settings.LockTeams,
|
g_GameAttributes.settings.LastManStanding = false;
|
||||||
"set": checked => {
|
},
|
||||||
g_GameAttributes.settings.LockTeams = checked;
|
"enabled": () =>
|
||||||
g_GameAttributes.settings.LastManStanding = false;
|
g_GameAttributes.mapType != "scenario" &&
|
||||||
|
!g_GameAttributes.settings.RatingEnabled,
|
||||||
|
"initOrder": 1000
|
||||||
},
|
},
|
||||||
"enabled": () =>
|
"lastManStanding": {
|
||||||
g_GameAttributes.mapType != "scenario" &&
|
"title": () => translate("Last Man Standing"),
|
||||||
!g_GameAttributes.settings.RatingEnabled,
|
"tooltip": () => translate("Toggle whether the last remaining player or the last remaining set of allies wins."),
|
||||||
"initOrder": 1000
|
"default": () => false,
|
||||||
},
|
"defined": () => g_GameAttributes.settings.LastManStanding !== undefined,
|
||||||
"lastManStanding": {
|
"get": () => g_GameAttributes.settings.LastManStanding,
|
||||||
"title": () => translate("Last Man Standing"),
|
"set": checked => {
|
||||||
"tooltip": () => translate("Toggle whether the last remaining player or the last remaining set of allies wins."),
|
g_GameAttributes.settings.LastManStanding = checked;
|
||||||
"default": () => false,
|
},
|
||||||
"defined": () => g_GameAttributes.settings.LastManStanding !== undefined,
|
"enabled": () =>
|
||||||
"get": () => g_GameAttributes.settings.LastManStanding,
|
g_GameAttributes.mapType != "scenario" &&
|
||||||
"set": checked => {
|
!g_GameAttributes.settings.LockTeams,
|
||||||
g_GameAttributes.settings.LastManStanding = checked;
|
"initOrder": 1000
|
||||||
},
|
},
|
||||||
"enabled": () =>
|
"enableCheats": {
|
||||||
g_GameAttributes.mapType != "scenario" &&
|
"title": () => translate("Cheats"),
|
||||||
!g_GameAttributes.settings.LockTeams,
|
"tooltip": () => translate("Toggle the usability of cheats."),
|
||||||
"initOrder": 1000
|
"default": () => !g_IsNetworked,
|
||||||
},
|
"hidden": () => !g_IsNetworked,
|
||||||
"enableCheats": {
|
"defined": () => g_GameAttributes.settings.CheatsEnabled !== undefined,
|
||||||
"title": () => translate("Cheats"),
|
"get": () => g_GameAttributes.settings.CheatsEnabled,
|
||||||
"tooltip": () => translate("Toggle the usability of cheats."),
|
"set": checked => {
|
||||||
"default": () => !g_IsNetworked,
|
g_GameAttributes.settings.CheatsEnabled = !g_IsNetworked ||
|
||||||
"hidden": () => !g_IsNetworked,
|
checked && !g_GameAttributes.settings.RatingEnabled;
|
||||||
"defined": () => g_GameAttributes.settings.CheatsEnabled !== undefined,
|
},
|
||||||
"get": () => g_GameAttributes.settings.CheatsEnabled,
|
"enabled": () => !g_GameAttributes.settings.RatingEnabled,
|
||||||
"set": checked => {
|
"initOrder": 1000
|
||||||
g_GameAttributes.settings.CheatsEnabled = !g_IsNetworked ||
|
|
||||||
checked && !g_GameAttributes.settings.RatingEnabled;
|
|
||||||
},
|
},
|
||||||
"enabled": () => !g_GameAttributes.settings.RatingEnabled,
|
"enableRating": {
|
||||||
"initOrder": 1000
|
"title": () => translate("Rated Game"),
|
||||||
},
|
"tooltip": () => translate("Toggle if this game will be rated for the leaderboard."),
|
||||||
"enableRating": {
|
"default": () => Engine.HasXmppClient(),
|
||||||
"title": () => translate("Rated Game"),
|
"hidden": () => !Engine.HasXmppClient(),
|
||||||
"tooltip": () => translate("Toggle if this game will be rated for the leaderboard."),
|
"defined": () => g_GameAttributes.settings.RatingEnabled !== undefined,
|
||||||
"default": () => Engine.HasXmppClient(),
|
"get": () => !!g_GameAttributes.settings.RatingEnabled,
|
||||||
"hidden": () => !Engine.HasXmppClient(),
|
"set": checked => {
|
||||||
"defined": () => g_GameAttributes.settings.RatingEnabled !== undefined,
|
g_GameAttributes.settings.RatingEnabled = Engine.HasXmppClient() ? checked : undefined;
|
||||||
"get": () => !!g_GameAttributes.settings.RatingEnabled,
|
Engine.SetRankedGame(!!g_GameAttributes.settings.RatingEnabled);
|
||||||
"set": checked => {
|
if (checked)
|
||||||
g_GameAttributes.settings.RatingEnabled = Engine.HasXmppClient() ? checked : undefined;
|
{
|
||||||
Engine.SetRankedGame(!!g_GameAttributes.settings.RatingEnabled);
|
g_Checkboxes.lockTeams.set(true);
|
||||||
if (checked)
|
g_Checkboxes.enableCheats.set(false);
|
||||||
{
|
}
|
||||||
g_Checkboxes.lockTeams.set(true);
|
},
|
||||||
g_Checkboxes.enableCheats.set(false);
|
"initOrder": 1000
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"initOrder": 1000
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user