Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/simulation/ai/common-api/entity.js
Show First 20 Lines • Show All 386 Lines • ▼ Show 20 Lines | "getResourceType": function() { | ||||
let [type, subtype] = this.get("ResourceSupply/Type").split('.'); | let [type, subtype] = this.get("ResourceSupply/Type").split('.'); | ||||
if (type == "treasure") | if (type == "treasure") | ||||
return subtype; | return subtype; | ||||
return type; | return type; | ||||
}, | }, | ||||
"getDiminishingReturns": function() { return +(this.get("ResourceSupply/DiminishingReturns") || 1); }, | "getDiminishingReturns": function() { return +(this.get("ResourceSupply/DiminishingReturns") || 1); }, | ||||
"resourceSupplyMax": function() { return +this.get("ResourceSupply/Amount"); }, | "resourceSupplyMax": function() { return +this.get("ResourceSupply/Max"); }, | ||||
"maxGatherers": function() { return +(this.get("ResourceSupply/MaxGatherers") || 0); }, | "maxGatherers": function() { return +(this.get("ResourceSupply/MaxGatherers") || 0); }, | ||||
"resourceGatherRates": function() { | "resourceGatherRates": function() { | ||||
if (!this.get("ResourceGatherer")) | if (!this.get("ResourceGatherer")) | ||||
return undefined; | return undefined; | ||||
let ret = {}; | let ret = {}; | ||||
let baseSpeed = +this.get("ResourceGatherer/BaseSpeed"); | let baseSpeed = +this.get("ResourceGatherer/BaseSpeed"); | ||||
▲ Show 20 Lines • Show All 601 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator