Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/ai/common-api/entity.js
Show First 20 Lines • Show All 737 Lines • ▼ Show 20 Lines | if (this.unitAIOrderData().length && | ||||
rate *= +this.get("ResourceGatherer/Rates/" +tstring); | rate *= +this.get("ResourceGatherer/Rates/" +tstring); | ||||
if (rate) | if (rate) | ||||
return rate; | return rate; | ||||
return 0; | return 0; | ||||
} | } | ||||
return undefined; | return undefined; | ||||
}, | }, | ||||
"garrisonHolder": function() { | |||||
if (this._entity.garrisonHolder == INVALID_ENTITY) | |||||
return undefined; | |||||
return this._entity.garrisonHolder; | |||||
}, | |||||
"garrisoned": function() { return this._entity.garrisoned; }, | "garrisoned": function() { return this._entity.garrisoned; }, | ||||
"garrisonedSlots": function() { | "garrisonedSlots": function() { | ||||
let count = 0; | let count = 0; | ||||
if (this._entity.garrisoned) | if (this._entity.garrisoned) | ||||
for (let ent of this._entity.garrisoned) | for (let ent of this._entity.garrisoned) | ||||
count += +this._ai._entities.get(ent).garrisonSize(); | count += +this._ai._entities.get(ent).garrisonSize(); | ||||
▲ Show 20 Lines • Show All 270 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator