Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/Foundation.js
Show All 17 Lines | Foundation.prototype.Init = function() | ||||
this.totalBuilderRate = 0; // Total amount of work the builders do each second | this.totalBuilderRate = 0; // Total amount of work the builders do each second | ||||
this.buildMultiplier = 1; // Multiplier for the amount of work builders do | this.buildMultiplier = 1; // Multiplier for the amount of work builders do | ||||
this.buildTimeModifier = +this.template.BuildTimeModifier; | this.buildTimeModifier = +this.template.BuildTimeModifier; | ||||
this.previewEntity = INVALID_ENTITY; | this.previewEntity = INVALID_ENTITY; | ||||
}; | }; | ||||
Foundation.prototype.Update = function(newTemplate) | |||||
{ | |||||
// TODO | |||||
warn("Foundation component doesn't support template updates yet"); | |||||
} | |||||
Foundation.prototype.Serialize = function() | Foundation.prototype.Serialize = function() | ||||
{ | { | ||||
let ret = Object.assign({}, this); | let ret = Object.assign({}, this); | ||||
ret.previewEntity = INVALID_ENTITY; | ret.previewEntity = INVALID_ENTITY; | ||||
return ret; | return ret; | ||||
}; | }; | ||||
Foundation.prototype.Deserialize = function(data) | Foundation.prototype.Deserialize = function(data) | ||||
▲ Show 20 Lines • Show All 420 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator