status
Returns a fresh structured snapshot of an autopilot.
Function
Synopsis
local status = btech.autopilot.status( autopilot )
Arguments
DbRef|Object autopilot- A registered BattleTech autopilot.
Returns
BtechAutopilotStatus- A new table containing optional
Objectfieldscontainer_unit,associated_unit, andmap;association(none,ready,associated, orconflict);engaged;speed_percent;order_count;order_capacity(always 100); a dense typedordersarray; andmodes.
The modes are autogun_enabled, autogun_suspended, piloting_suspended,
roaming, manual_sensors, chasing_target, chase_resume_pending,
swarm_charging, and assigned_target, all booleans.
Raises
mux.object.invalidif the object is not a registered autopilot or a stored object relationship is corrupt.mux.object.unavailableif its runtime state is unavailable.btech.operation.failedwith reasoninvalid_order_queueif stored orders cannot be decoded safely.
Notes
Each call returns new tables. Object relationships are native Object handles,
not numeric database references; absent relationships are nil.
Order name, direction, and mode fields are typed constants from the
corresponding btech.autopilot namespaces. They compare and stringify like the
input constants and can be passed back to add_order without conversion.