Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/gui/session/AutoFormation.js
Show All 32 Lines | class AutoFormation | ||||
* TODO: would be good to validate, particularly since some formations aren't | * TODO: would be good to validate, particularly since some formations aren't | ||||
* usable with any arbitrary unit type, we may want to warn then. | * usable with any arbitrary unit type, we may want to warn then. | ||||
*/ | */ | ||||
setDefault(formation) | setDefault(formation) | ||||
{ | { | ||||
this.defaultFormation = formation; | this.defaultFormation = formation; | ||||
if (formation !== NULL_FORMATION) | if (formation !== NULL_FORMATION) | ||||
this.lastDefault = this.defaultFormation; | this.lastDefault = this.defaultFormation; | ||||
Engine.ConfigDB_ConfigDB_CreateAndSaveValue("user", "gui.session.defaultformation", this.defaultFormation); | Engine.ConfigDB_CreateAndSaveValue("user", "gui.session.defaultformation", this.defaultFormation); | ||||
return true; | return true; | ||||
} | } | ||||
isDefault(formation) | isDefault(formation) | ||||
{ | { | ||||
return formation == this.defaultFormation; | return formation == this.defaultFormation; | ||||
} | } | ||||
Show All 18 Lines |
Wildfire Games · Phabricator