Loadout item datum
Singleton that holds all the information about each loadout items, and how to equip them.
Vars | |
abstract_type | The abstract parent of this loadout item, to determine which items to not instantiate |
---|---|
additional_displayed_text | Lazylist of additional "information" text to display about this item. |
cached_reskin_options | Reskin options of this item if it can be reskinned. |
can_be_greyscale | Whether this item has greyscale support. Only works if the item is compatible with the GAGS system of coloring. Set automatically to TRUE for all items that have the flag IS_PLAYER_COLORABLE_1. If you really want it to not be colorable set this to DONT_GREYSCALE |
can_be_named | Whether this item can be renamed. I recommend you apply this sparingly becuase it certainly can go wrong (or get reset / overridden easily) |
can_be_reskinned | Whether this item can be reskinned. Only works if the item has a "unique reskin" list set. |
category | The category of the loadout item. Set automatically in New |
item_path | The actual item path of the loadout item. |
name | Displayed name of the loadout item. Defaults to the item's name if unset. |
ui_icon | Icon file (DMI) for the UI to use for preview icons. Set automatically if null |
ui_icon_state | Icon state for the UI to use for preview icons. Set automatically if null |
Procs | |
get_item_information | Returns a list of information to display about this item in the loadout UI. |
get_reskin_options | Returns a list of options this item can be reskinned into. |
get_ui_buttons | Returns a list of buttons that are shown in the loadout UI for customizing this item. |
handle_loadout_action | Takes in an action from a loadout manager and applies it |
insert_path_into_outfit | Place our [item_path] into the passed [outfit]. |
on_equip_item | Called When the item is equipped on [equipper]. |
set_item_color | Opens up the GAGS editing menu. |
set_name | Sets the name of the item. |
set_skin | Used for reskinning an item to an alt skin. |
set_slot_greyscale | Callback for GAGS menu to set this item's color. |
to_ui_data | Returns a formatted list of data for this loadout item. |
Var Details
abstract_type
The abstract parent of this loadout item, to determine which items to not instantiate
additional_displayed_text
Lazylist of additional "information" text to display about this item.
cached_reskin_options
Reskin options of this item if it can be reskinned.
can_be_greyscale
Whether this item has greyscale support. Only works if the item is compatible with the GAGS system of coloring. Set automatically to TRUE for all items that have the flag IS_PLAYER_COLORABLE_1. If you really want it to not be colorable set this to DONT_GREYSCALE
can_be_named
Whether this item can be renamed. I recommend you apply this sparingly becuase it certainly can go wrong (or get reset / overridden easily)
can_be_reskinned
Whether this item can be reskinned. Only works if the item has a "unique reskin" list set.
category
The category of the loadout item. Set automatically in New
item_path
The actual item path of the loadout item.
name
Displayed name of the loadout item. Defaults to the item's name if unset.
ui_icon
Icon file (DMI) for the UI to use for preview icons. Set automatically if null
ui_icon_state
Icon state for the UI to use for preview icons. Set automatically if null
Proc Details
get_item_information
Returns a list of information to display about this item in the loadout UI.
These should be short strings, sub 14 characters generally.
get_reskin_options
Returns a list of options this item can be reskinned into.
get_ui_buttons
Returns a list of buttons that are shown in the loadout UI for customizing this item.
Buttons contain
- 'L'abel: The text displayed beside the button
- act_key: The key that is sent to the loadout manager when the button is clicked, for use in handle_loadout_action
- button_icon: The FontAwesome icon to display on the button
- active_key: In the loadout UI, this key is checked in the user's loadout list for this item to determine if the button is 'active' (green) or not (blue).
- active_text: Optional, if provided, the button appears to be a checkbox and this text is shown when 'active'
- inactive_text: Optional, if provided, the button appears to be a checkbox and this text is shown when not 'active'
handle_loadout_action
Takes in an action from a loadout manager and applies it
Useful for subtypes of loadout items with unique actions
Return TRUE to force an update to the UI / character preview
insert_path_into_outfit
Place our [item_path] into the passed [outfit].
By default, just adds the item into the outfit's backpack contents, if non-visual.
Arguments:
- outfit - The outfit we're equipping our items into.
- equipper - If we're equipping out outfit onto a mob at the time, this is the mob it is equipped on. Can be null.
- visual - If TRUE, then our outfit is only for visual use (for example, a preview).
on_equip_item
Called When the item is equipped on [equipper].
At this point the item is in the mob's contents
Arguments:
- preference_source - the datum/preferences our loadout item originated from - cannot be null
- equipper - the mob we're equipping this item onto - cannot be null
- visuals_only - whether or not this is only concerned with visual things (not backpack, not renaming, etc)
- preference_list - what the raw loadout list looks like in the preferences
Return a bitflag of slot flags to update
set_item_color
Opens up the GAGS editing menu.
set_name
Sets the name of the item.
set_skin
Used for reskinning an item to an alt skin.
set_slot_greyscale
Callback for GAGS menu to set this item's color.
to_ui_data
Returns a formatted list of data for this loadout item.