Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/GuiInterface.js
Show First 20 Lines • Show All 423 Lines • ▼ Show 20 Lines | |||||
* Get additionnal entity info, rarely used in the gui | * Get additionnal entity info, rarely used in the gui | ||||
*/ | */ | ||||
GuiInterface.prototype.GetExtendedEntityState = function(player, ent) | GuiInterface.prototype.GetExtendedEntityState = function(player, ent) | ||||
{ | { | ||||
let ret = { | let ret = { | ||||
"armour": null, | "armour": null, | ||||
"attack": null, | "attack": null, | ||||
"buildingAI": null, | "buildingAI": null, | ||||
"deathDamage": null, | |||||
"heal": null, | "heal": null, | ||||
"isBarterMarket": null, | "isBarterMarket": null, | ||||
"loot": null, | "loot": null, | ||||
"obstruction": null, | "obstruction": null, | ||||
"turretParent":null, | "turretParent":null, | ||||
"promotion": null, | "promotion": null, | ||||
"repairRate": null, | "repairRate": null, | ||||
"buildRate": null, | "buildRate": null, | ||||
▲ Show 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | if (cmpBuildingAI) | ||||
ret.buildingAI = { | ret.buildingAI = { | ||||
"defaultArrowCount": cmpBuildingAI.GetDefaultArrowCount(), | "defaultArrowCount": cmpBuildingAI.GetDefaultArrowCount(), | ||||
"maxArrowCount": cmpBuildingAI.GetMaxArrowCount(), | "maxArrowCount": cmpBuildingAI.GetMaxArrowCount(), | ||||
"garrisonArrowMultiplier": cmpBuildingAI.GetGarrisonArrowMultiplier(), | "garrisonArrowMultiplier": cmpBuildingAI.GetGarrisonArrowMultiplier(), | ||||
"garrisonArrowClasses": cmpBuildingAI.GetGarrisonArrowClasses(), | "garrisonArrowClasses": cmpBuildingAI.GetGarrisonArrowClasses(), | ||||
"arrowCount": cmpBuildingAI.GetArrowCount() | "arrowCount": cmpBuildingAI.GetArrowCount() | ||||
}; | }; | ||||
let cmpDeathDamage = Engine.QueryInterface(ent, IID_DeathDamage); | |||||
if (cmpDeathDamage) | |||||
ret.deathDeath = { | |||||
"hack": GetDeathDamageStrengths("hack"), | |||||
"pierce": GetDeathDamageStrengths("pierce"), | |||||
"crush": GetDeathDamageStrengths("crush") | |||||
}; | |||||
let cmpObstruction = Engine.QueryInterface(ent, IID_Obstruction); | let cmpObstruction = Engine.QueryInterface(ent, IID_Obstruction); | ||||
if (cmpObstruction) | if (cmpObstruction) | ||||
ret.obstruction = { | ret.obstruction = { | ||||
"controlGroup": cmpObstruction.GetControlGroup(), | "controlGroup": cmpObstruction.GetControlGroup(), | ||||
"controlGroup2": cmpObstruction.GetControlGroup2(), | "controlGroup2": cmpObstruction.GetControlGroup2(), | ||||
}; | }; | ||||
let cmpPosition = Engine.QueryInterface(ent, IID_Position); | let cmpPosition = Engine.QueryInterface(ent, IID_Position); | ||||
▲ Show 20 Lines • Show All 1,495 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator