forked from 0ad/0ad
Revert 2b7ba4ff0b
by adding a way to specify globally disabled templates.
Refs #3174 This was SVN commit r16632.
This commit is contained in:
parent
8e44687ae3
commit
3aad4d8e30
@ -3,13 +3,13 @@
|
||||
"Name" : "Belgian Uplands",
|
||||
"Script" : "belgian_uplands.js",
|
||||
"Description" : "An experimental map with its heightmap generated by erosion to look more natural. Not all seeds will be fair though! Tiny maps with 8 players may take a while to generate.",
|
||||
"DisabledTemplates": [
|
||||
"structures/ptol_lighthouse"
|
||||
],
|
||||
"CircularMap" : false,
|
||||
"BaseTerrain" : ["temp_grass", "temp_grass_b", "temp_grass_c", "temp_grass_d", "temp_grass_long_b", "temp_grass_clovers_2", "temp_grass_mossy", "temp_grass_plants"],
|
||||
"BaseHeight" : 0,
|
||||
"Preview" : "belgian_uplands.png",
|
||||
"TriggerScripts": [
|
||||
"scripts/disable_ptol_lighthouse.js"
|
||||
],
|
||||
"XXXXXX" : "Optionally define other things here, like we would for a scenario"
|
||||
}
|
||||
}
|
||||
|
BIN
binaries/data/mods/public/maps/scenarios/Belgian_Bog_night.xml
(Stored with Git LFS)
BIN
binaries/data/mods/public/maps/scenarios/Belgian_Bog_night.xml
(Stored with Git LFS)
Binary file not shown.
@ -1,8 +0,0 @@
|
||||
let cmpPlayerManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_PlayerManager);
|
||||
|
||||
for (let i = 1; i < cmpPlayerManager.GetNumPlayers(); ++i)
|
||||
{
|
||||
let cmpPlayer = Engine.QueryInterface(cmpPlayerManager.GetPlayerByID(i), IID_Player);
|
||||
if (cmpPlayer)
|
||||
cmpPlayer.AddDisabledTemplate("structures/ptol_lighthouse");
|
||||
}
|
BIN
binaries/data/mods/public/maps/skirmishes/Belgian Bog (2).xml
(Stored with Git LFS)
BIN
binaries/data/mods/public/maps/skirmishes/Belgian Bog (2).xml
(Stored with Git LFS)
Binary file not shown.
@ -115,8 +115,13 @@ function LoadPlayerSettings(settings, newPlayers)
|
||||
if (getSetting(playerData, playerDefaults, i, "DisabledTechnologies") !== undefined)
|
||||
cmpPlayer.SetDisabledTechnologies(getSetting(playerData, playerDefaults, i, "DisabledTechnologies"));
|
||||
|
||||
let disabledTemplates = [];
|
||||
if (settings.DisabledTemplates !== undefined)
|
||||
disabledTemplates = settings.DisabledTemplates;
|
||||
if (getSetting(playerData, playerDefaults, i, "DisabledTemplates") !== undefined)
|
||||
cmpPlayer.SetDisabledTemplates(getSetting(playerData, playerDefaults, i, "DisabledTemplates"));
|
||||
disabledTemplates = disabledTemplates.concat(getSetting(playerData, playerDefaults, i, "DisabledTemplates"));
|
||||
if (disabledTemplates.length)
|
||||
cmpPlayer.SetDisabledTemplates(disabledTemplates);
|
||||
|
||||
// If diplomacy explicitly defined, use that; otherwise use teams
|
||||
if (getSetting(playerData, playerDefaults, i, "Diplomacy") !== undefined)
|
||||
|
Loading…
Reference in New Issue
Block a user