babylon.engine.actions.move
MOVE verb resolver (verb-dispatch engine).
Relocate an organization’s spatial presence (ActionType.MOVE). Validates
the target is an existing territory node, then rewrites the acting org’s
territory_ids (a round-trip Organization model field):
relocate(default):territory_ids = [target]andheadquarters_id = target(keeps theheadquarters_id in territory_idsinvariant).expand: append the target to the existingterritory_ids.
An invalid target fails loud (success=False).
Functions
|
Resolve a player MOVE action: relocate or expand org presence. |
- babylon.engine.actions.move.resolve_move(action, org_attrs, graph, services)[source]
Resolve a player MOVE action: relocate or expand org presence.
- Parameters:
action (
Action) – The MOVE action (action_type == ActionType.MOVE).org_attrs (
dict[str,Any]) – Acting organization’s node attributes.graph (
BabylonGraph) – World graph (mutated in place on the acting org node).services (
ServicesProtocol) – ServicesProtocol (unused; no MoveDefines exist yet).
- Return type:
ActionResult- Returns:
ActionResult;success=Falsewhen the target is missing / not a territory, or the acting org node is absent.