Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/helpers/Setup.js
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | function LoadMapSettings(settings) | ||||
} | } | ||||
let cmpEndGameManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_EndGameManager); | let cmpEndGameManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_EndGameManager); | ||||
let gameTypeSettings = {}; | let gameTypeSettings = {}; | ||||
if (settings.RelicCount) | if (settings.RelicCount) | ||||
gameTypeSettings.relicCount = settings.RelicCount; | gameTypeSettings.relicCount = settings.RelicCount; | ||||
if (settings.VictoryDuration) | if (settings.VictoryDuration) | ||||
gameTypeSettings.victoryDuration = settings.VictoryDuration * 60 * 1000; | gameTypeSettings.victoryDuration = settings.VictoryDuration * 60 * 1000; | ||||
if (settings.RegicideGarrison) | |||||
Sandarac: There has to be a check for `settings.GameType` otherwise warnings get thrown in Atlas. | |||||
gameTypeSettings.regicideGarrison = settings.RegicideGarrison; | |||||
if (settings.GameType) | if (settings.GameType) | ||||
cmpEndGameManager.SetGameType(settings.GameType, gameTypeSettings); | cmpEndGameManager.SetGameType(settings.GameType, gameTypeSettings); | ||||
cmpEndGameManager.SetAlliedVictory(settings.LockTeams || !settings.LastManStanding); | cmpEndGameManager.SetAlliedVictory(settings.LockTeams || !settings.LastManStanding); | ||||
if (settings.LockTeams && settings.LastManStanding) | if (settings.LockTeams && settings.LastManStanding) | ||||
warn("Last man standing is only available in games with unlocked teams!"); | warn("Last man standing is only available in games with unlocked teams!"); | ||||
if (settings.Garrison) | if (settings.Garrison) | ||||
Show All 15 Lines |
Wildfire Games · Phabricator
There has to be a check for settings.GameType otherwise warnings get thrown in Atlas.