From 5d8b6cd1a600e0376bf6d4dded55efc010cbb02c Mon Sep 17 00:00:00 2001 From: Verkister Date: Thu, 5 Apr 2018 15:48:03 +0300 Subject: [PATCH] Small Shock/Holo collar tweaks. -Updates their old >> dialogue. -Makes shock collars taggable. Was gonna fix them showing up in forced lowercase on people but that turned out to be a separate polaris issue that I just opened a fix for up there. --- .../under/accessories/accessory_vr.dm | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/code/modules/clothing/under/accessories/accessory_vr.dm b/code/modules/clothing/under/accessories/accessory_vr.dm index 4a975f6bf7..ba1a4f3b17 100644 --- a/code/modules/clothing/under/accessories/accessory_vr.dm +++ b/code/modules/clothing/under/accessories/accessory_vr.dm @@ -61,6 +61,16 @@ if(href_list["freq"]) var/new_frequency = sanitize_frequency(frequency + text2num(href_list["freq"])) set_frequency(new_frequency) + if(href_list["tag"]) + var/str = copytext(reject_bad_text(input(usr,"Tag text?","Set tag","")),1,MAX_NAME_LEN) + if(!str || !length(str)) + to_chat(usr,"[name]'s tag set to be blank.") + name = initial(name) + desc = initial(desc) + else + to_chat(usr,"You set the [name]'s tag to '[str]'.") + name = initial(name) + " ([str])" + desc = initial(desc) + " The tag says \"[str]\"." else if(href_list["code"]) code += text2num(href_list["code"]) @@ -100,7 +110,7 @@ M = loc if(ismob(loc.loc)) M = loc.loc // This is about as terse as I can make my solution to the whole 'collar won't work when attached as accessory' thing. - M << "You feel a sharp shock!" + to_chat(M,"You feel a sharp shock!") var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread s.set_up(3, 1, M) s.start() @@ -125,6 +135,9 @@ - [code] + +
+ + Tag: + Set tag
"} user << browse(dat, "window=radio") onclose(user, "radio") @@ -152,15 +165,15 @@ overlay_state = "collar_holo_overlay" /obj/item/clothing/accessory/collar/holo/attack_self(mob/user as mob) - user << "[name]'s interface is projected onto your hand." + to_chat(user,"[name]'s interface is projected onto your hand.") var/str = copytext(reject_bad_text(input(user,"Tag text?","Set tag","")),1,MAX_NAME_LEN) if(!str || !length(str)) - user << "[name]'s tag set to be blank." + to_chat(user,"[name]'s tag set to be blank.") name = initial(name) desc = initial(desc) else - user << "You set the [name]'s tag to '[str]'." + to_chat(user,"You set the [name]'s tag to '[str]'.") name = initial(name) + " ([str])" desc = initial(desc) + " The tag says \"[str]\"."