Space Station 13 - Modules - TypesVar Details - Proc Details

hidden

HIDDEN UPLINK - Can be stored in anything but the host item has to have a trigger for it. How to create an uplink in 3 easy steps!

  1. All obj/item 's have a hidden_uplink var. By default it's null. Give the item one with "new(src)", it must be in it's contents. Feel free to add "uses".

  2. Code in the triggers. Use check_trigger for this, I recommend closing the item's menu with "usr << browse(null, "window=windowname") if it returns true. The var/value is the value that will be compared with the var/target. If they are equal it will activate the menu.

  3. If you want the menu to stay until the users locks his uplink, add an active_uplink_check(mob/user) in your interact/attack_hand proc. Then check if it's true, if true return. This will stop the normal menu appearing and will instead show the uplink menu.

Vars

activeWhether uplink is currently open.
cached_cartA cached version of shopping_cart containing all the data for the tgui side
lucky_numbersA list of 3 categories and item indexes in uplink_cats, to show as recommendedations
shopping_cartAn assoc list of references (the variable called reference on an uplink item) and its value being how many of the item

Procs

check_triggerChecks to see if the value meets the target. Like a frequency being a traitor_frequency, in order to unlock a headset. If true, it accesses trigger() and returns TRUE. If it fails, it returns FALSE. Use this to see if you need to close the current item's menu.
tgui_act_modalCalled in tgui_act() to process modal actions
toggleToggles the uplink on and off. Normally this will bypass the item's normal functions and go to the uplink menu, if activated.
triggerDirectly trigger the uplink. Turn on if it isn't already.

Var Details

active

Whether uplink is currently open.

cached_cart

A cached version of shopping_cart containing all the data for the tgui side

lucky_numbers

A list of 3 categories and item indexes in uplink_cats, to show as recommendedations

shopping_cart

An assoc list of references (the variable called reference on an uplink item) and its value being how many of the item

Proc Details

check_trigger

Checks to see if the value meets the target. Like a frequency being a traitor_frequency, in order to unlock a headset. If true, it accesses trigger() and returns TRUE. If it fails, it returns FALSE. Use this to see if you need to close the current item's menu.

Arguments:

tgui_act_modal

Called in tgui_act() to process modal actions

Arguments:

toggle

Toggles the uplink on and off. Normally this will bypass the item's normal functions and go to the uplink menu, if activated.

trigger

Directly trigger the uplink. Turn on if it isn't already.