mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-08-15 14:43:32 -07:00
Rename the formation field to formationController
This patch renames the `unitAI.formation` field in entity states to `unitAI.formationController` for clarity (there's `unitAI.formations` as well, which was confusing)
This commit is contained in:
parent
072ad01816
commit
60970320e3
3 changed files with 7 additions and 7 deletions
|
|
@ -35,9 +35,9 @@ function _setMotionOverlay(ents, enabled, motionDebugOverlay, force = false)
|
|||
{
|
||||
resultSet.add(ent);
|
||||
const entState = GetEntityState(ent);
|
||||
if (entState?.unitAI?.formation)
|
||||
if (entState?.unitAI?.formationController)
|
||||
{
|
||||
resultSet.add(entState.unitAI.formation);
|
||||
resultSet.add(entState.unitAI.formationController);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -519,8 +519,8 @@ EntitySelection.prototype.addFormationMembers = function(entities)
|
|||
for (const entity of entities)
|
||||
{
|
||||
const entState = GetEntityState(+entity);
|
||||
if (entState?.unitAI?.formation)
|
||||
for (const member of GetEntityState(+entState.unitAI.formation).formation.members)
|
||||
if (entState?.unitAI?.formationController)
|
||||
for (const member of GetEntityState(+entState.unitAI.formationController).formation.members)
|
||||
result.add(member);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -599,7 +599,7 @@ const expectedDynamicStates = {
|
|||
"hasWorkOrders": true,
|
||||
"isGuarding": false,
|
||||
"isIdle": true,
|
||||
"formation": FORMATION_CONTROLLER_ENT_ID
|
||||
"formationController": FORMATION_CONTROLLER_ENT_ID
|
||||
},
|
||||
"visibility": "visible"
|
||||
},
|
||||
|
|
@ -622,7 +622,7 @@ const expectedDynamicStates = {
|
|||
"hasWorkOrders": true,
|
||||
"isGuarding": false,
|
||||
"isIdle": true,
|
||||
"formation": FORMATION_CONTROLLER_ENT_ID
|
||||
"formationController": FORMATION_CONTROLLER_ENT_ID
|
||||
},
|
||||
"visibility": "visible"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -318,7 +318,7 @@ class EntityStateRetriever
|
|||
"hasWorkOrders": cmpUnitAI.HasWorkOrders(),
|
||||
"isGuarding": cmpUnitAI.IsGuardOf(),
|
||||
"isIdle": cmpUnitAI.IsIdle(),
|
||||
"formation": cmpUnitAI.GetFormationController()
|
||||
"formationController": cmpUnitAI.GetFormationController()
|
||||
};
|
||||
|
||||
const cmpUpgrade = Engine.QueryInterface(ent, IID_Upgrade);
|
||||
|
|
|
|||
Loading…
Reference in a new issue