Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/Cost.js
Show All 38 Lines | |||||
Cost.prototype.GetPopBonus = function() | Cost.prototype.GetPopBonus = function() | ||||
{ | { | ||||
return this.populationBonus; | return this.populationBonus; | ||||
}; | }; | ||||
Cost.prototype.GetBuildTime = function() | Cost.prototype.GetBuildTime = function() | ||||
{ | { | ||||
var cmpPlayer = QueryOwnerInterface(this.entity); | return ApplyValueModificationsToEntity("Cost/BuildTime", +this.template.BuildTime, this.entity); | ||||
var buildTime = (+this.template.BuildTime) * cmpPlayer.GetTimeMultiplier(); | |||||
return ApplyValueModificationsToEntity("Cost/BuildTime", buildTime, this.entity); | |||||
}; | }; | ||||
Cost.prototype.GetResourceCosts = function(owner) | Cost.prototype.GetResourceCosts = function(owner) | ||||
{ | { | ||||
if (!owner) | if (!owner) | ||||
{ | { | ||||
let cmpOwnership = Engine.QueryInterface(this.entity, IID_Ownership); | let cmpOwnership = Engine.QueryInterface(this.entity, IID_Ownership); | ||||
if (!cmpOwnership) | if (!cmpOwnership) | ||||
▲ Show 20 Lines • Show All 62 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator