UngarrisonUnit¶
Request unloading one specified occupant from its current container.
UngarrisonUnit(container, occupant) ·
UngarrisonUnitTracked(container, occupant)
Inputs: container is an owned, live building or transport. occupant is
an owned, live Object currently inside it.
Output: UngarrisonUnit returns true for queue admission, otherwise false.
UngarrisonUnitTracked returns accepted, receipt. Check live garrison state later
to confirm that the occupant emerged.
Errors: Wrong Lua argument types raise an argument error. A changed or unavailable container, invalid ownership, or missing native layout rejects a valid request; the tracked receipt gives the reason.
Example:
local accepted = UngarrisonUnit(container, occupant)
if not accepted then LogWarn("Unload request was not queued") end
The validation notes below explain later failure cases. Use UngarrisonTo to
request a group destination.
Validation and timing:
UngarrisonUnit(container, occupant) requests native unloading of one specified
occupant. Both objects must be owned and live, and the occupant must currently
be inside the supplied container. Other occupants are not targeted.
UngarrisonUnitTracked(container, occupant) returns accepted, receipt.
The command captures both IDs and checks ownership, liveness and the occupant's
container again before dispatch. A changed or unavailable parent reports
guard-container-changed or guard-container-unavailable; a different supplied
container reports guard-container-not-listed. Missing native layout evidence
reports packet-layout-unavailable. Receipt submission does not prove the unit
has emerged; query its garrison state in a later update.
These single-occupant calls use the native default unload destination.
Use UngarrisonTo for the separate group destination action. The optional occupants in the older group ungarrison
binding remain validation guards and do not select which units unload.