diff --git a/code/game/objects/items/devices/radio/electropack.dm b/code/game/objects/items/devices/radio/electropack.dm index 8b27659ada..513ffb8d2b 100644 --- a/code/game/objects/items/devices/radio/electropack.dm +++ b/code/game/objects/items/devices/radio/electropack.dm @@ -143,4 +143,82 @@ Code: "} user << browse(dat, "window=radio") onclose(user, "radio") - return \ No newline at end of file + return + +/obj/item/device/electropack/shockcollar + name = "shock collar" + desc = "A reinforced metal collar. It seems to have some form of wiring near the front. Strange.." + icon = 'icons/obj/clothing/neck.dmi' + icon_state = "shockcollar" + item_state = "shockcollar" + body_parts_covered = NECK + slot_flags = SLOT_NECK + w_class = WEIGHT_CLASS_SMALL + 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) + if(slot_flags == SLOT_NECK) + to_chat(user, "The collar is fastened tight! You'll need help taking this off!") + return + ..() + +/obj/item/device/electropack/shockcollar/receive_signal(datum/signal/signal) + if(!signal || signal.encryption != code) + return + + if(isliving(loc) && on) + if(shock_cooldown != 0) + return + shock_cooldown = 1 + spawn(100) + shock_cooldown = 0 + var/mob/living/L = loc + step(L, pick(GLOB.cardinals)) + + to_chat(L, "You feel a sharp shock from the collar!") + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread + s.set_up(3, 1, L) + s.start() + + L.Knockdown(100) + + if(master) + master.receive_signal() + 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)] + + + +
+ + Code: + - + - [code] + + + +
+
"} + + user << browse(dat, "window=radio") + onclose(user, "radio") + return + diff --git a/code/modules/research/designs/autolathe_designs.dm b/code/modules/research/designs/autolathe_designs.dm index 5d089739d1..946ec70d38 100644 --- a/code/modules/research/designs/autolathe_designs.dm +++ b/code/modules/research/designs/autolathe_designs.dm @@ -608,6 +608,14 @@ build_path = /obj/item/device/electropack category = list("hacked", "Tools") +/datum/design/shock_collar + name = "Shock Collar" + id = "shock_collar" + build_type = AUTOLATHE + materials = list(MAT_METAL = 5000, MAT_GLASS = 2000) + build_path = /obj/item/device/electropack/shockcollar + category = list("hacked", "Security") + /datum/design/large_welding_tool name = "Industrial Welding Tool" id = "large_welding_tool" diff --git a/icons/mob/neck.dmi b/icons/mob/neck.dmi index fb43ae85ec..17f9d3ade4 100644 Binary files a/icons/mob/neck.dmi and b/icons/mob/neck.dmi differ diff --git a/icons/obj/clothing/neck.dmi b/icons/obj/clothing/neck.dmi index 40c4aa03bc..c41db68326 100644 Binary files a/icons/obj/clothing/neck.dmi and b/icons/obj/clothing/neck.dmi differ