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

lockable_storage

##lockable_storage Adds a UI to the object that triggers when you use it in hand (if item) or attack (everything else). The UI is a lock that, when unlocked, allows you to access the contents inside of it. When using this, make sure you have icons for on_update_icon_state.

Vars

can_hack_openBoolean on whether the storage can be hacked open with a multitool.
lock_codeThe code that will open this safe, set by usually players. Importantly, can be null if there's no password.
numeric_inputThe number currently sitting in the briefcase's panel.
panel_openBoolean on whether the panel has been hacked open with a screwdriver.

Procs

hack_openDoes a do_after to hack the storage open, takes a long time cause idk.
on_examineCalled when examining the storage item.
on_interactCalled when interacted with in-hand or on attack, opens the UI.
on_multitool_actCalled when a multitool is used on the parent, if it's hackable. Checks if we can start hacking and, if so, will begin the hacking process.
on_requesting_context_from_itemAdds context screentips to the locked item. Arguments:
on_screwdriver_actCalled when a screwdriver is used on the parent, if it's hackable.
on_update_icon_stateUpdates the icon state depending on if we're locked or not.

Var Details

can_hack_open

Boolean on whether the storage can be hacked open with a multitool.

lock_code

The code that will open this safe, set by usually players. Importantly, can be null if there's no password.

numeric_input

The number currently sitting in the briefcase's panel.

panel_open

Boolean on whether the panel has been hacked open with a screwdriver.

Proc Details

hack_open

Does a do_after to hack the storage open, takes a long time cause idk.

on_examine

Called when examining the storage item.

on_interact

Called when interacted with in-hand or on attack, opens the UI.

on_multitool_act

Called when a multitool is used on the parent, if it's hackable. Checks if we can start hacking and, if so, will begin the hacking process.

on_requesting_context_from_item

Adds context screentips to the locked item. Arguments:

on_screwdriver_act

Called when a screwdriver is used on the parent, if it's hackable.

on_update_icon_state

Updates the icon state depending on if we're locked or not.