1
0
forked from mirrors/0ad

Fixes warnings printed by the new SpiderMonkey.

Sets SelectableInGameSetup to true in all civ json files that didn't
have it set.
Having this value set to undefined (not set) was interpreted as true,
which is quite arbitrary.
With the new SpiderMonkey a warning will be printed if the value is
undefined.
This avoids ambiguity but makes the setting mandatory.

Refs #2372

This was SVN commit r14802.
This commit is contained in:
Yves
2014-03-03 21:58:15 +00:00
parent df43e32a59
commit 7cba43c9db
11 changed files with 22 additions and 12 deletions
+2 -1
View File
@@ -161,5 +161,6 @@
"Thrasybulus",
"Iphicrates",
"Demosthenes"
]
],
"SelectableInGameSetup": true
}
+2 -1
View File
@@ -137,5 +137,6 @@
"Adminius",
"Dubnovellaunus",
"Vosenius"
]
],
"SelectableInGameSetup": true
}
+2 -1
View File
@@ -164,5 +164,6 @@
"Xanthippus",
"Himilco Phameas",
"Hasdrubal the Boetharch"
]
],
"SelectableInGameSetup": true
}
+2 -1
View File
@@ -131,5 +131,6 @@
"Cassivellaunus",
"Liscus",
"Valetiacos"
]
],
"SelectableInGameSetup": true
}
+2 -1
View File
@@ -129,5 +129,6 @@
"Ditalcus",
"Minurus",
"Tautalus"
]
],
"SelectableInGameSetup": true
}
+2 -1
View File
@@ -165,5 +165,6 @@
"Perseus",
"Craterus",
"Meleager"
]
],
"SelectableInGameSetup": true
}
+2 -1
View File
@@ -146,5 +146,6 @@
"Devavarman Maurya",
"Satadhanvan Maurya",
"Brihadratha Maurya"
]
],
"SelectableInGameSetup": true
}
+2 -1
View File
@@ -152,5 +152,6 @@
"Artaxshacha III",
"Haxamanish",
"Xsayarsa II"
]
],
"SelectableInGameSetup": true
}
+2 -1
View File
@@ -140,5 +140,6 @@
"Marcus Cornelius Cethegus",
"Quintus Caecilius Metellus Pius",
"Marcus Licinius Crassus"
]
],
"SelectableInGameSetup": true
}
+2 -1
View File
@@ -154,5 +154,6 @@
"Eurycrates",
"Eucleidas",
"Agesipolis"
]
],
"SelectableInGameSetup": true
}
@@ -831,13 +831,13 @@ function launchGame()
// (this is synchronized because we're the host)
var cultures = [];
for each (var civ in g_CivData)
if (civ.Culture !== undefined && cultures.indexOf(civ.Culture) < 0 && (civ.SelectableInGameSetup === undefined || civ.SelectableInGameSetup))
if (civ.Culture !== undefined && cultures.indexOf(civ.Culture) < 0 && civ.SelectableInGameSetup)
cultures.push(civ.Culture);
var allcivs = new Array(cultures.length);
for (var i = 0; i < allcivs.length; ++i)
allcivs[i] = [];
for each (var civ in g_CivData)
if (civ.Culture !== undefined && (civ.SelectableInGameSetup === undefined || civ.SelectableInGameSetup))
if (civ.Culture !== undefined && civ.SelectableInGameSetup)
allcivs[cultures.indexOf(civ.Culture)].push(civ.Code);
const romanNumbers = [undefined, "I", "II", "III", "IV", "V", "VI", "VII", "VIII"];