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!
-
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".
-
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.
-
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 | |
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 |
Procs | |
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. |
tgui_act_modal | Called in tgui_act() to process modal actions |
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. |
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:
- user - who performs the validation.
- value - checked value.
- target - target value to check with.
tgui_act_modal
Called in tgui_act() to process modal actions
Arguments:
- action - The action passed by tgui
- params - The params passed by tgui
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.