Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/ai/petra/entityExtend.js
var PETRA = function(m) | (function(m) | ||||
{ | { | ||||
/** returns true if this unit should be considered as a siege unit */ | /** returns true if this unit should be considered as a siege unit */ | ||||
Context not available. | |||||
m.getHolder = function(gameState, ent) | m.getHolder = function(gameState, ent) | ||||
{ | { | ||||
for (let holder of gameState.getEntities().values()) | for (let holder of gameState.getEntities().values()) | ||||
{ | |||||
if (holder.isGarrisonHolder() && holder.garrisoned().indexOf(ent.id()) !== -1) | if (holder.isGarrisonHolder() && holder.garrisoned().indexOf(ent.id()) !== -1) | ||||
return holder; | return holder; | ||||
} | |||||
return undefined; | return undefined; | ||||
}; | }; | ||||
Context not available. | |||||
" PartOfArmy " + ent.getMetadata(PlayerID, "PartOfArmy")); | " PartOfArmy " + ent.getMetadata(PlayerID, "PartOfArmy")); | ||||
}; | }; | ||||
return m; | }(PETRA)); | ||||
}(PETRA); | |||||
Context not available. |
Wildfire Games · Phabricator