element

A holder for simple behaviour that can be attached to many different types
Only one element of each type is instanced during game init. Otherwise acts basically like a lightweight component.
Vars | |
argument_hash_start_idx | The index of the first attach argument to consider for duplicate elements |
---|---|
element_flags | Option flags for element behaviour |
Procs | |
Attach | Activates the functionality defined by the element on the given target datum |
Detach | Deactivates the functionality defines by the element on the given datum |
on_client_change | Triggered when a client enters/gets admin-dragged into a mob. Necesarry since keybindings are done using individual client preferences. |
on_keybinding_change | Checks all actions on the mob to see if they match the keybind_signal and updates the trigger key. |
Var Details
argument_hash_start_idx

The index of the first attach argument to consider for duplicate elements
All arguments from this index onwards (1 based) are hashed into the key to determine if this is a new unique element or one already exists
Is only used when flags contains ELEMENT_BESPOKE
This is infinity so you must explicitly set this
element_flags

Option flags for element behaviour
Proc Details
Attach
Activates the functionality defined by the element on the given target datum
Detach
Deactivates the functionality defines by the element on the given datum
on_client_change
Triggered when a client enters/gets admin-dragged into a mob. Necesarry since keybindings are done using individual client preferences.
on_keybinding_change
Checks all actions on the mob to see if they match the keybind_signal and updates the trigger key.