mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 11:13:16 +00:00
I changed how uplinks worked. Instead of there being a duplicate item which would switch out when it activates, there's an item called "obj/item/device/uplink/hidden". It is a hidden uplink which you can place in any obj/item. In "hidden" is where it will generate menus, check for triggers to show the menu and etc.. No need to switch out with duplicate items or add the menu onto the PDA's notes. How to create a new uplink item 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/remove "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 as mob) 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. I've given the recharge station's verbs a category so they don't create their own tab. I've added a mob/proc called put_in_any_hand_if_possible. Name speaks for itself. Returns true if successful, false otherwise. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4450 316c924e-a436-60f5-8080-3fe189b3f50e