Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/GuiInterface.js
Show First 20 Lines • Show All 235 Lines • ▼ Show 20 Lines | if (!template) | ||||
return null; | return null; | ||||
let ret = { | let ret = { | ||||
"id": ent, | "id": ent, | ||||
"template": template, | "template": template, | ||||
"alertRaiser": null, | "alertRaiser": null, | ||||
"builder": null, | "builder": null, | ||||
"canGarrison": null, | |||||
"identity": null, | "identity": null, | ||||
"fogging": null, | "fogging": null, | ||||
"foundation": null, | "foundation": null, | ||||
"garrisonHolder": null, | "garrisonHolder": null, | ||||
"gate": null, | "gate": null, | ||||
"guard": null, | "guard": null, | ||||
"market": null, | "market": null, | ||||
"mirage": null, | "mirage": null, | ||||
▲ Show 20 Lines • Show All 118 Lines • ▼ Show 20 Lines | if (cmpGarrisonHolder) | ||||
ret.garrisonHolder = { | ret.garrisonHolder = { | ||||
"entities": cmpGarrisonHolder.GetEntities(), | "entities": cmpGarrisonHolder.GetEntities(), | ||||
"buffHeal": cmpGarrisonHolder.GetHealRate(), | "buffHeal": cmpGarrisonHolder.GetHealRate(), | ||||
"allowedClasses": cmpGarrisonHolder.GetAllowedClasses(), | "allowedClasses": cmpGarrisonHolder.GetAllowedClasses(), | ||||
"capacity": cmpGarrisonHolder.GetCapacity(), | "capacity": cmpGarrisonHolder.GetCapacity(), | ||||
"garrisonedEntitiesCount": cmpGarrisonHolder.GetGarrisonedEntitiesCount() | "garrisonedEntitiesCount": cmpGarrisonHolder.GetGarrisonedEntitiesCount() | ||||
}; | }; | ||||
ret.canGarrison = !!Engine.QueryInterface(ent, IID_Garrisonable); | |||||
let cmpUnitAI = Engine.QueryInterface(ent, IID_UnitAI); | let cmpUnitAI = Engine.QueryInterface(ent, IID_UnitAI); | ||||
if (cmpUnitAI) | if (cmpUnitAI) | ||||
ret.unitAI = { | ret.unitAI = { | ||||
"state": cmpUnitAI.GetCurrentState(), | "state": cmpUnitAI.GetCurrentState(), | ||||
"orders": cmpUnitAI.GetOrders(), | "orders": cmpUnitAI.GetOrders(), | ||||
"hasWorkOrders": cmpUnitAI.HasWorkOrders(), | "hasWorkOrders": cmpUnitAI.HasWorkOrders(), | ||||
"canGuard": cmpUnitAI.CanGuard(), | "canGuard": cmpUnitAI.CanGuard(), | ||||
"isGuarding": cmpUnitAI.IsGuardOf(), | "isGuarding": cmpUnitAI.IsGuardOf(), | ||||
▲ Show 20 Lines • Show All 1,634 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator