diff --git a/code/game/objects/items/devices/radio/electropack.dm b/code/game/objects/items/devices/radio/electropack.dm index 2c4d0dd76a..513ffb8d2b 100644 --- a/code/game/objects/items/devices/radio/electropack.dm +++ b/code/game/objects/items/devices/radio/electropack.dm @@ -157,6 +157,7 @@ Code: strip_delay = 60 equip_delay_other = 60 materials = list(MAT_METAL=5000, MAT_GLASS=2000) + var/tagname = null /obj/item/device/electropack/shockcollar/attack_hand(mob/user) if(loc == user) @@ -190,26 +191,34 @@ Code: return /obj/item/device/electropack/shockcollar/attack_self(mob/user) //Turns out can't fully source this from the parent item, spritepath gets confused if power toggled. Will come back to this when I know how to code better and readd powertoggle.. + var/option = "Change Name" + option = input(user, "What do you want to do?", "[src]", option) as null|anything in list("Change Name", "Change Frequency") + switch(option) + if("Change Name") + var/t = input(user, "Would you like to change the name on the tag?", "Name your new pet", tagname ? tagname : "Spot") as null|text + if(t) + tagname = copytext(sanitize(t), 1, MAX_NAME_LEN) + name = "[initial(name)] - [tagname]" + if("Change Frequency") + if(!ishuman(user)) + return + user.set_machine(src) + var/dat = {"
+ Frequency/Code for shock collar:
+ Frequency: + - + - [format_frequency(frequency)] + + + +
- if(!ishuman(user)) - return - user.set_machine(src) - var/dat = {"
-Frequency/Code for shock collar:
-Frequency: -- -- [format_frequency(frequency)] -+ -+
+ Code: + - + - [code] + + + +
+
"} -Code: -- -- [code] -+ -+
-
"} - - user << browse(dat, "window=radio") - onclose(user, "radio") - return + user << browse(dat, "window=radio") + onclose(user, "radio") + return