/tg/ Station 13 - Modules - TypesVar Details - Proc Details

Action system

A simple base for an modular behavior attached to atom or datum.

Vars

background_icon_stateThis is the icon state state for the BACKGROUND icon of the button
button_iconThis is the file for the BACKGROUND icon of the button
button_icon_stateThis is the icon state for the icon that appears OVER the button background
buttontooltipstyleThe style the button's tooltips appear to be
check_flagsFlags that will determine of the owner / user of the action can... use the action
default_button_positionWhere any buttons we create should be by default. Accepts screen_loc and location defines
descThe description of what the action does
icon_iconThis is the file for the icon that appears OVER the button background
nameThe name of the action
ownerThis 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()
owner_has_controlIf False, the owner of this action does not get a hud and cannot activate it on their own
targetThe 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_unavailableWhether the button becomes transparent when it can't be used or just reddened
viewersList of all mobs that are viewing our action button -> A unique movable for them to view.

Procs

ApplyIconApplies our button icon over top the background icon of the action
CreateButtonCreates an action button movable for the passed mob, and returns it.
GiveActionGives our action to the passed viewer. Puts our action in their actions list and shows them the button.
GrantGrants the action to the passed mob, making it the owner
HideFromRemoves our action from the passed viewer.
IsAvailableWhether our action is currently available to use or not
RemoveRemove the passed mob from being owner of our action
ShowToAdds our action button to the screen of the passed viewer.
TriggerActually triggers the effects of the action. Called when the on-screen button is clicked, for example.
clear_refSignal 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
link_toLinks the passed target to our action, registering any relevant signals
on_target_mind_swappedSignal proc for COMSIG_MIND_TRANSFERRED - for minds, transfers our action to our new mob on mind transfer
update_icon_on_signalA general use signal proc that reacts to an event and updates our button icon in accordance

Var Details

background_icon_state

This is the icon state state for the BACKGROUND icon of the button

button_icon

This is the file for the BACKGROUND icon of the button

button_icon_state

This is the icon state for the icon that appears OVER the button background

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

icon_icon

This is the file for the icon that appears OVER the button background

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()

owner_has_control

If False, the owner of this action does not get a hud and cannot activate it on their own

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.

Proc Details

ApplyIcon

Applies our button icon over top the background icon of the action

CreateButton

Creates an action button movable for the passed mob, and returns it.

GiveAction

Gives our action to the passed viewer. Puts our action in their actions list and shows them the button.

Grant

Grants the action to the passed mob, making it the owner

HideFrom

Removes our action from the passed viewer.

IsAvailable

Whether our action is currently available to use or not

Remove

Remove the passed mob from being owner of our action

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

Links the passed target to our action, registering any relevant signals

on_target_mind_swapped

Signal proc for COMSIG_MIND_TRANSFERRED - for minds, transfers our action to our new mob on mind transfer

update_icon_on_signal

A general use signal proc that reacts to an event and updates our button icon in accordance