Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/gamesettings/attributes/SeaLevelRise.js
GameSettings.prototype.Attributes.SeaLevelRise = class SeaLevelRise extends GameSetting | GameSettings.prototype.Attributes.SeaLevelRise = class SeaLevelRise extends GameSetting | ||||
{ | { | ||||
init() | init() | ||||
{ | { | ||||
this.min = undefined; | this.min = undefined; | ||||
this.max = undefined; | this.max = undefined; | ||||
this.value = undefined; | this.value = undefined; | ||||
this.settings.map.watch(() => this.onMapChange(), ["map"]); | this.settings.map.watch(() => this.onMapChange(), ["map"]); | ||||
} | } | ||||
toInitAttributes(attribs) | toInitAttributes(attribs) | ||||
{ | { | ||||
if (this.value) | if (this.value !== undefined) | ||||
attribs.settings.SeaLevelRiseTime = this.value; | attribs.settings.SeaLevelRiseTime = this.value; | ||||
} | } | ||||
fromInitAttributes(attribs) | fromInitAttributes(attribs) | ||||
{ | { | ||||
if (!!this.getLegacySetting(attribs, "SeaLevelRiseTime")) | if (!!this.getLegacySetting(attribs, "SeaLevelRiseTime")) | ||||
this.setValue(this.getLegacySetting(attribs, "SeaLevelRiseTime")); | this.setValue(this.getLegacySetting(attribs, "SeaLevelRiseTime")); | ||||
} | } | ||||
Show All 22 Lines |
Wildfire Games · Phabricator