Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gamesettings/attributes/Wonder.js
Show All 14 Lines | GameSettings.prototype.Attributes.Wonder = class Wonder extends GameSetting | ||||
} | } | ||||
fromInitAttributes(attribs) | fromInitAttributes(attribs) | ||||
{ | { | ||||
if (this.getLegacySetting(attribs, "WonderDuration") !== undefined) | if (this.getLegacySetting(attribs, "WonderDuration") !== undefined) | ||||
this.setDuration(+this.getLegacySetting(attribs, "WonderDuration")); | this.setDuration(+this.getLegacySetting(attribs, "WonderDuration")); | ||||
} | } | ||||
fromCmdLineArgs(cmdLineArgs) | |||||
{ | |||||
this.setDuration(+cmdLineArgs['autostart-wonderduration'] || 10); | |||||
} | |||||
onMapChange() | onMapChange() | ||||
{ | { | ||||
if (this.settings.map.type != "scenario") | if (this.settings.map.type != "scenario") | ||||
return; | return; | ||||
this.setDuration(+this.getMapSetting("WonderDuration") || 0); | this.setDuration(+this.getMapSetting("WonderDuration") || 0); | ||||
} | } | ||||
setDuration(duration) | setDuration(duration) | ||||
Show All 10 Lines |
Wildfire Games · Phabricator