mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
Fixed issue 645.
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
This commit is contained in:
@@ -39,34 +39,6 @@
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/implant/uplink
|
||||
name = "uplink"
|
||||
desc = "Summon things."
|
||||
var/activation_emote = "chuckle"
|
||||
var/obj/item/device/uplink/radio/uplink = null
|
||||
|
||||
|
||||
New()
|
||||
activation_emote = pick("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
|
||||
uplink = new /obj/item/device/uplink/radio/implanted(src)
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
implanted(mob/source)
|
||||
activation_emote = input("Choose activation emote:") in list("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
|
||||
source.mind.store_memory("Uplink implant can be activated by using the [src.activation_emote] emote, <B>say *[src.activation_emote]</B> to attempt to activate.", 0, 0)
|
||||
source << "The implanted uplink implant can be activated by using the [src.activation_emote] emote, <B>say *[src.activation_emote]</B> to attempt to activate."
|
||||
return 1
|
||||
|
||||
|
||||
trigger(emote, mob/source as mob)
|
||||
if(emote == activation_emote)
|
||||
uplink.attack_self(source)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/implant/tracking
|
||||
name = "tracking"
|
||||
desc = "Track with this."
|
||||
|
||||
Reference in New Issue
Block a user