Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/helpers/Setup.js
Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | if (settings.CircularMap) | ||||
if (cmpObstructionManager) | if (cmpObstructionManager) | ||||
cmpObstructionManager.SetPassabilityCircular(true); | cmpObstructionManager.SetPassabilityCircular(true); | ||||
} | } | ||||
let cmpEndGameManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_EndGameManager); | let cmpEndGameManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_EndGameManager); | ||||
let gameTypeSettings = {}; | let gameTypeSettings = {}; | ||||
if (settings.WonderDuration) | if (settings.WonderDuration) | ||||
gameTypeSettings.wonderDuration = settings.WonderDuration * 60 * 1000; | gameTypeSettings.wonderDuration = settings.WonderDuration * 60 * 1000; | ||||
if (settings.CaptureTheFlagDuration) | |||||
gameTypeSettings.captureTheFlagDuration = settings.CaptureTheFlagDuration * 60 * 1000; | |||||
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