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.
This commit is contained in:
Verkister
2018-04-05 15:48:03 +03:00
parent c9882ff37c
commit 5d8b6cd1a6

View File

@@ -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,"<span class='notice'>[name]'s tag set to be blank.</span>")
name = initial(name)
desc = initial(desc)
else
to_chat(usr,"<span class='notice'>You set the [name]'s tag to '[str]'.</span>")
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 << "<span class='danger'>You feel a sharp shock!</span>"
to_chat(M,"<span class='danger'>You feel a sharp shock!</span>")
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 @@
<A href='byond://?src=\ref[src];code=-1'>-</A> [code]
<A href='byond://?src=\ref[src];code=1'>+</A>
<A href='byond://?src=\ref[src];code=5'>+</A><BR>
Tag:
<A href='?src=\ref[src];tag=1'>Set tag</A><BR>
</TT>"}
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 << "<span class='notice'>[name]'s interface is projected onto your hand.</span>"
to_chat(user,"<span class='notice'>[name]'s interface is projected onto your hand.</span>")
var/str = copytext(reject_bad_text(input(user,"Tag text?","Set tag","")),1,MAX_NAME_LEN)
if(!str || !length(str))
user << "<span class='notice'>[name]'s tag set to be blank.</span>"
to_chat(user,"<span class='notice'>[name]'s tag set to be blank.</span>")
name = initial(name)
desc = initial(desc)
else
user << "<span class='notice'>You set the [name]'s tag to '[str]'.</span>"
to_chat(user,"<span class='notice'>You set the [name]'s tag to '[str]'.</span>")
name = initial(name) + " ([str])"
desc = initial(desc) + " The tag says \"[str]\"."