action ![code/datums/action.dm 7](git.png)
Vars | |
background_icon_state | This is the icon state state for the BACKGROUND underlay icon of the button (If set to ACTION_BUTTON_DEFAULT_BACKGROUND, uses the hud's default background) |
---|---|
button_icon | This is the file for the BACKGROUND underlay icon of the button |
button_icon_state | This is the icon state for the icon that appears on the button |
buttontooltipstyle | The style the button's tooltips appear to be |
check_flags | Flags that will determine of the owner / user of the action can... use the action |
default_button_position | Where any buttons we create should be by default. Accepts screen_loc and location defines |
desc | The description of what the action does, shown in button tooltips |
full_key | full key we are bound to |
icon_icon | This is the file for the icon that appears on the button |
name | The name of the action |
owner | This is who currently owns the action, and most often, this is who is using the action if it is triggered This can be the same as "target" but is not ALWAYS the same - this is set and unset with Grant() and Remove() |
target | The target the action is attached to. If the target datum is deleted, the action is as well. Set in New() via the proc link_to(). PLEASE set a target if you're making an action |
transparent_when_unavailable | Whether the button becomes transparent when it can't be used, or just reddened |
viewers | List of all mobs that are viewing our action button -> A unique movable for them to view. |
Procs | |
GiveAction | Gives our action to the passed viewer. Puts our action in their actions list and shows them the button. |
HideFrom | Removes our action from the passed viewer. |
IsAvailable | Whether our action is currently available to use or not |
ShowTo | Adds our action button to the screen of the passed viewer. |
Trigger | Actually triggers the effects of the action. Called when the on-screen button is clicked, for example. |
clear_ref | Signal proc that clears any references based on the owner or target deleting If the owner's deleted, we will simply remove from them, but if the target's deleted, we will self-delete |
keydown | datum/action/item_action/advanced/ninja datum/action/item_action/advanced/ninja/New(Target) datum/action/item_action/advanced/ninja/IsAvailable(show_message = FALSE, ignore_ready = FALSE) datum/action/item_action/advanced/ninja/apply_unavailable_effect() datum/action/item_action/advanced/ninja/toggle_button_on_off() |
update_status_on_signal | A general use signal proc that reacts to an event and updates JUST our button's status |
Var Details
background_icon_state ![code/datums/action.dm 40](git.png)
This is the icon state state for the BACKGROUND underlay icon of the button (If set to ACTION_BUTTON_DEFAULT_BACKGROUND, uses the hud's default background)
button_icon ![code/datums/action.dm 37](git.png)
This is the file for the BACKGROUND underlay icon of the button
button_icon_state ![code/datums/action.dm 45](git.png)
This is the icon state for the icon that appears on the button
buttontooltipstyle ![code/datums/action.dm 34](git.png)
The style the button's tooltips appear to be
check_flags ![code/datums/action.dm 21](git.png)
Flags that will determine of the owner / user of the action can... use the action
default_button_position ![code/datums/action.dm 16](git.png)
Where any buttons we create should be by default. Accepts screen_loc and location defines
desc ![code/datums/action.dm 11](git.png)
The description of what the action does, shown in button tooltips
full_key ![code/datums/action.dm 30](git.png)
full key we are bound to
icon_icon ![code/datums/action.dm 43](git.png)
This is the file for the icon that appears on the button
name ![code/datums/action.dm 9](git.png)
The name of the action
owner ![code/datums/action.dm 19](git.png)
This is who currently owns the action, and most often, this is who is using the action if it is triggered This can be the same as "target" but is not ALWAYS the same - this is set and unset with Grant() and Remove()
target ![code/datums/action.dm 14](git.png)
The target the action is attached to. If the target datum is deleted, the action is as well. Set in New() via the proc link_to(). PLEASE set a target if you're making an action
transparent_when_unavailable ![code/datums/action.dm 25](git.png)
Whether the button becomes transparent when it can't be used, or just reddened
viewers ![code/datums/action.dm 27](git.png)
List of all mobs that are viewing our action button -> A unique movable for them to view.
Proc Details
GiveAction
Gives our action to the passed viewer. Puts our action in their actions list and shows them the button.
HideFrom
Removes our action from the passed viewer.
IsAvailable
Whether our action is currently available to use or not
- silent - If false this is being called to check if we have any messages to show to the owner
ShowTo
Adds our action button to the screen of the passed viewer.
Trigger
Actually triggers the effects of the action. Called when the on-screen button is clicked, for example.
clear_ref
Signal proc that clears any references based on the owner or target deleting If the owner's deleted, we will simply remove from them, but if the target's deleted, we will self-delete
keydown
datum/action/item_action/advanced/ninja datum/action/item_action/advanced/ninja/New(Target) datum/action/item_action/advanced/ninja/IsAvailable(show_message = FALSE, ignore_ready = FALSE) datum/action/item_action/advanced/ninja/apply_unavailable_effect() datum/action/item_action/advanced/ninja/toggle_button_on_off()
update_status_on_signal
A general use signal proc that reacts to an event and updates JUST our button's status