benilla-re systems structs docs

Script::UnitIsCivilian

function · ui · orchestration

Address
0x519de0 · 104 bytes, up to 0x519e47
Signature
int __fastcall (lua_State *L)
Meaning
Pushes 1 when the unit is a civilian, else nil
Confidence
verified, proof one
Name from
the community database (idb)
Finding
ui/unitinfo#flag-predicates

Finding: Flag predicates in ui: unit presence, flags, classification and type

Four predicates read one word of the unit's fields and push 1 or nil. They take no Usage: check and answer nil for a unit that does not resolve to a held unit object.

functiontest
UnitPlayerControlledUNIT_FIELD_FLAGS (+0xa0) bit 3
UnitIsPlusMobUNIT_FIELD_FLAGS bit 6
UnitIsCharmedUNIT_FIELD_CHARMEDBY (+0x10, +0x14) nonzero
UnitIsCivilian0x612550 (below)

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 7

Calls and jumps by a bare address, from tables/calls.tsv.