/obj/structure/bed/chair/e_chair name = "electric chair" desc = "Looks absolutely SHOCKING!" icon_state = "echair0" var/on = 0 var/obj/item/assembly/shock_kit/part = null var/last_time = 0 /obj/structure/bed/chair/e_chair/update_icon() return /obj/structure/bed/chair/e_chair/Initialize() . = ..() add_overlay(image('icons/obj/furniture.dmi', src, "echair_over", MOB_LAYER + 1)) if(!part) part = new /obj/item/assembly/shock_kit(src) part.master = src part.part1 = new /obj/item/clothing/head/helmet(part) part.part2 = new /obj/item/device/radio/electropack(part) part.part1.master = part part.part2.master = part /obj/structure/bed/chair/e_chair/Destroy() if (part) part.master = null part = null . = ..() /obj/structure/bed/chair/e_chair/attackby(obj/item/weapon/W as obj, mob/user as mob) if(iswrench(W)) var/obj/structure/bed/chair/C = new /obj/structure/bed/chair(loc) playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) C.set_dir(dir) part.forceMove(get_turf(src)) part.master = null part = null qdel(src) /obj/structure/bed/chair/e_chair/verb/toggle() set name = "Toggle Electric Chair" set category = "Object" set src in oview(1) if(usr.stat || usr.paralysis || usr.stunned || usr.weakened || usr.lying || usr.restrained() || usr.buckled) return if(on) on = 0 icon_state = "echair0" else on = 1 shock() icon_state = "echair1" user << "You switch [on ? "on" : "off"] [src]." /obj/structure/bed/chair/e_chair/proc/shock() if(!on) return var/obj/structure/cable/C = locate(/obj/structure/cable, get_turf(src)) var/datum/powernet/PN = C.powernet flick("echair1", src) spark(src, 12, alldirs) if(buckled_mob && istype(C)) if(electrocute_mob(buckled_mob, C, src, 1.25, "head")) buckled_mob << "You feel a deep shock course through your body!" sleep(1) if(electrocute_mob(buckled_mob, C, src, 1.25, "head")) buckled_mob.Stun(PN.get_electrocute_damage()*10) visible_message("The electric chair goes off!", "You hear an electrical discharge!") return /obj/item/weapon/mesmetron name = "mesmetron pocketwatch" desc = "An elaborate pocketwatch, with captivating gold etching and an enchanting face. . ." icon = 'icons/obj/items.dmi' icon_state = "pocketwatch" matter = list("glass" = 150, "gold" = 50) w_class = 1 var/datum/weakref/thrall = null var/time_counter = 0 /obj/item/weapon/mesmetron/Destroy() STOP_PROCESSING(SSfast_process, src) thrall = null . = ..() /obj/item/weapon/mesmetron/process() if (!thrall) STOP_PROCESSING(SSfast_process, src) return var/mob/living/carbon/human/H = thrall.resolve() if(!H) thrall = null STOP_PROCESSING(SSfast_process, src) return if (time_counter > 20) time_counter += 0.5 var/thrall_response = alert(H, "Do you believe in hypnosis?", "Willpower", "Yes", "No") if(thrall_response == "No") H.sleeping = max(H.sleeping - 40, 0) H.drowsyness = max(H.drowsyness - 60, 0) thrall = null STOP_PROCESSING(SSfast_process, src) else H.sleeping = max(H.sleeping, 40) H.drowsyness = max(H.drowsyness, 60) else STOP_PROCESSING(SSfast_process, src) /obj/item/weapon/mesmetron/attack_self(mob/user as mob) if(!thrall || !thrall.resolve()) thrall = null user << "You decipher the watch's mesmerizing face, discerning the time to be: '[worldtime2text()]'. Today's date is '[time2text(world.time, "Month DD")]. [game_year]'." return var/mob/living/carbon/human/H = thrall.resolve() var/response = alert(user, "Would you like to make a suggestion to [thrall], or release them?", "Mesmetron", "Suggestion", "Release") if (response == "Release") thrall = null STOP_PROCESSING(SSfast_process, src) else if(get_dist(user, H) > 1) user << "You must stand in whisper range of [H]." return text = input("What would you like to suggest?", "Hypnotic suggestion", null, null) text = sanitize(text) if(!text) return var/thrall_response = alert(H, "Do you believe in hypnosis?", "Willpower", "Yes", "No") if(thrall_response == "Yes") H << "... [text] ..." H.cure_all_traumas(cure_type = CURE_HYPNOSIS) else thrall = null /obj/item/weapon/mesmetron/afterattack(mob/living/carbon/human/H, mob/user, proximity) if(!proximity) return if(!istype(H)) return user.visible_message("[user] begins to mesmerizingly wave [src] like a pendulum before [H]'s very eyes!") if(!do_mob(user, H, 10 SECONDS)) return if((!user in view(1,target))) return var/response = alert(H, "Do you believe in hypnosis?", "Willpower", "Yes", "No") if(response == "Yes") H.visible_message("[H] falls into a deep slumber!", "You fall into a deep slumber!") H.sleeping = max(H.sleeping, 40) H.drowsyness = max(H.drowsyness, 60) thrall = WEAKREF(H) START_PROCESSING(SSfast_process, src) /obj/structure/metronome name = "metronome" desc = "Tick. Tock. Tick. Tock. Tick. Tock." icon = 'icons/obj/structures.dmi' icon_state = "metronome1" anchored = 1 density = 0 var/time_last_ran = 0 var/ticktock = "Tick" /obj/structure/metronome/Destroy() STOP_PROCESSING(SSfast_process, src) . = ..() /obj/structure/metronome/Initialize() . = ..() START_PROCESSING(SSfast_process, src) /obj/structure/metronome/attackby(obj/item/weapon/W as obj, mob/user as mob) if(iswrench(W)) playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) if(anchored) user << "You unanchor \the [src] and it destabilizes." STOP_PROCESSING(SSfast_process, src) icon_state = "metronome0" anchored = 0 else user << "You anchor \the [src] and it restabilizes." START_PROCESSING(SSfast_process, src) icon_state = "metronome1" anchored = 1 else ..() /obj/structure/metronome/process() if (world.time - time_last_ran < 60) return time_last_ran = world.time var/counter = 0 var/mob/living/carbon/human/H for(var/mob/living/L in view(3,src.loc)) counter++ if(ishuman(L)) H = L if(counter == 1 && H) if(ticktock == "Tick") ticktock = "Tock" else ticktock = "Tick" H << "[ticktock]. . ." H << 'sound/effects/singlebeat.ogg' if(prob(1)) H.cure_all_traumas(cure_type = CURE_SOLITUDE) /obj/machinery/chakrapod name = "Crystal Therapy Pod" desc = "A state-of-the-art crystal therapy pod. Designed to utilize phoron enhanced quartz crystals to remove mental trauma from the body. Proven to be 100% effective 30% of the time!" icon = 'icons/obj/Cryogenic2.dmi' icon_state = "syndipod_0" density = 1 anchored = 1 use_power = 1 idle_power_usage = 60 active_power_usage = 10000 var/datum/weakref/occupant = null var/locked var/obj/machinery/chakraconsole/connected /obj/machinery/chakrapod/Destroy() if (connected) connected.connected = null connected = null occupant = null return ..() /obj/machinery/chakrapod/relaymove(mob/user as mob) if (user.stat) return src.go_out() return /obj/machinery/chakrapod/verb/eject() set src in oview(1) set category = "Object" set name = "Eject Crystal Therapy Pod" if (usr.stat != 0) return src.go_out() add_fingerprint(usr) return /obj/machinery/chakrapod/verb/move_inside() set src in oview(1) set category = "Object" set name = "Enter Crystal Therapy Pod" if (usr.stat != 0 || locked) return if (occupant.resolve()) usr << "The pod is already occupied!" return if (usr.abiotic()) usr << "The subject cannot have abiotic items on." return if(locked) user << "The pod is currently locked!" return if(!ishuman(usr)) user << "The subject does not fit!" return usr.pulling = null usr.client.perspective = EYE_PERSPECTIVE usr.client.eye = src usr.forceMove(src) src.occupant = WEAKREF(usr) update_use_power(2) src.icon_state = "syndipod_1" for(var/obj/O in src) O.forceMove(get_turf(src)) src.add_fingerprint(usr) return /obj/machinery/chakrapod/proc/go_out() if (!src.occupant || !occupant.resolve()) occupant = null return var/mob/living/carbon/human/H = occupant.resolve() if(locked) H << "You push against the pod door and attempt to escape. This process will take roughly two minutes." if(!do_after(H, 1200)) return for(var/obj/O in src) O.forceMove(get_turf(src)) if (H.client) H.client.eye = H.client.mob H.client.perspective = MOB_PERSPECTIVE H.forceMove(get_turf(src)) occupant = null update_use_power(1) src.icon_state = "syndipod_0" return /obj/machinery/chakrapod/attackby(obj/item/weapon/grab/G, mob/user) if (!istype(G) || !ishuman(G.affecting)) return if (occupant) user << "The pod is already occupied!" return if (G.affecting.abiotic()) user << "Subject cannot have abiotic items on." return if(locked) user << "The pod is locked." return var/mob/living/L = G.affecting visible_message("[user] starts putting [L] into the pod bed.", 3) if (do_mob(user, L, 30, needhand = 0)) var/bucklestatus = L.bucklecheck(user) if (!bucklestatus)//incase the patient got buckled during the delay return if (bucklestatus == 2) var/obj/structure/LB = L.buckled LB.user_unbuckle_mob(user) if (L.client) L.client.perspective = EYE_PERSPECTIVE L.client.eye = src L.forceMove(src) occupant = WEAKREF(L) update_use_power(2) icon_state = "syndipod_1" for(var/obj/O in src) O.forceMove(get_turf(src)) src.add_fingerprint(user) qdel(G) return /obj/machinery/chakrapod/MouseDrop_T(mob/living/carbon/human/H, mob/living/user) if(!istype(user) || !istype(H)) return if (occupant) user << "The pod is already occupied!" return if (H.abiotic()) user << "Subject cannot have abiotic items on." return if(locked) user << "The pod is locked." return var/bucklestatus = H.bucklecheck(user) if (!bucklestatus)//We must make sure the person is unbuckled before they go in return if(H == user) visible_message("[user] starts climbing into the pod bed.", 3) else visible_message("[user] starts putting [H.name] into the pod bed.", 3) if (do_mob(user, H, 30, needhand = 0)) if (bucklestatus == 2) var/obj/structure/LB = H.buckled LB.user_unbuckle_mob(user) if (H.client) H.client.perspective = EYE_PERSPECTIVE H.client.eye = src H.forceMove(src) occupant = WEAKREF(H) update_use_power(2) src.icon_state = "syndipod_1" for(var/obj/Obj in src) Obj.forceMove(get_turf(src)) src.add_fingerprint(user) return /obj/machinery/chakraconsole name = "Therapy Pod Console" desc = "A control panel for some kind of medical device." icon = 'icons/obj/Cryogenic2.dmi' icon_state = "syndipod_scannerconsole" density = 0 anchored = 1 var/obj/machinery/chakrapod/connected var/crystal = 0 var/working = 0 /obj/machinery/chakraconsole/ex_act(severity) switch(severity) if(1.0) qdel(src) return if(2.0) if (prob(50)) qdel(src) return else return /obj/machinery/chakraconsole/Destroy() if (connected) connected.connected = null connected = null return ..() /obj/machinery/chakraconsole/power_change() ..() if((stat & BROKEN) || (stat & NOPOWER)) icon_state = "syndipod_scannerconsole-p" else icon_state = initial(icon_state) /obj/machinery/chakraconsole/Initialize() . = ..() for(var/obj/machinery/chakrapod/C in orange(1,src)) connected = C break if(connected) connected.connected = src /obj/machinery/chakraconsole/Destroy() if (connected) connected.connected = null connected = null . = ..() /obj/machinery/chakraconsole/attack_ai(user as mob) return src.attack_hand(user) /obj/machinery/chakraconsole/attack_hand(user as mob) if(..()) return button_prompt(user) /obj/machinery/chakraconsole/emag_act(var/remaining_charges, var/mob/user) if(!emagged) user << "You short out [src]'s safety measurements." visible_message("[src] hums oddly...") emagged = 1 return 1 /obj/machinery/chakraconsole/proc/button_prompt(user as mob) var/mob/living/carbon/human/H = connected && connected.occupant ? connected.occupant.resolve() : null if(!H) user << "The pod is currently unoccupied." else var/list/choices1 = list("Therapy Pod", "Toggle Locking Mechanism", "Initiate Neural Scan", "Initiate Crystal Therapy", "Recycle Crystal", "Cancel") if(emagged) choices1.Add("%eRr:# C:\\NT>quaid.exe") var/response1 = input(user,"Input Operation","Therapy Pod OS") as null|anything in choices1 switch(response1) if("Toggle Locking Mechanism") connected.locked = !connected.locked visible_message("[connected]'s locking mechanism clicks.", "You hear a click.") return if("Initiate Neural Scan") visible_message("[connected] begins humming with an electrical tone.", "You hear an electrical humming.") if(H && connected.occupant.resolve() == H) var/obj/item/organ/brain/sponge = H.internal_organs_by_name["brain"] var/retardation = H.getBrainLoss() if(sponge && istype(sponge)) if(!sponge.lobotomized) user << "Scans indicate [retardation] distinct abnormalities present in subject." return else user << "Scans indicate [retardation+rand(-20,20)] distinct abnormalities present in subject." return user << "Scans indicate total brain failure in subject." return if("Initiate Crystal Therapy") if(!crystal) neural_check(user, H) return user << "Error: Crystal depleted. Terminating operation.." playsound(src, 'sound/machines/buzz-two.ogg', 50, 1) visible_message("[connected] buzzes harshly.", "You hear a sharp buzz.") if("%eRr:# C:\\NT>quaid.exe") if(!crystal) total_recall(user, H) return user << "Error: Crystal depleted. Terminating operation.." playsound(src, 'sound/machines/buzz-two.ogg', 50, 1) visible_message("[connected] buzzes harshly.", "You hear a sharp buzz.") if("Recycle Crystal") if(crystal) user << "Eliminating depleted crystal." playsound(src.loc, 'sound/machines/juicer.ogg', 50, 1) sleep(100) crystal = 0 visible_message("[connected] pings cheerfully.", "You hear a ping.") playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) return user << "Error: Crystal depletion not detected. Terminating operation.." playsound(src, 'sound/machines/buzz-two.ogg', 50, 1) visible_message("[connected] buzzes harshly.", "You hear a sharp buzz.") /obj/machinery/chakraconsole/proc/neural_check(var/mob/user, var/mob/living/carbon/human/H) var/response = input(user,"Input number of rotations","Therapy Pod","0") var/alert = text2num(sanitize(response)) if(!alert) user << "Error. Invalid input." return for(var/i=0;iError: Subject not recognized. Terminating operation." playsound(src, 'sound/machines/buzz-two.ogg', 50, 1) visible_message("[connected] buzzes harshly.", "You hear a sharp buzz.") break var/obj/item/organ/brain/sponge = H.internal_organs_by_name["brain"] if (!istype(sponge) || !sponge.traumas.len) if(get_dist(user,src) <= 1) user << "Error: Subject not recognized. Terminating operation." playsound(src, 'sound/machines/buzz-two.ogg', 50, 1) visible_message("[connected] buzzes harshly.", "You hear a sharp buzz.") break for(var/X in sponge.traumas) var/datum/brain_trauma/trauma = X if(trauma.cure_type == CURE_CRYSTAL) if(!trauma.permanent) qdel(trauma) electroshock_trauma = 1 break if(electroshock_trauma) visible_message("[connected] pings cheerfully.", "You hear a ping.") playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) else if(get_dist(user,src) <= 1) user << "Error: Brain abnormality not recognized. Subject contamination detected." playsound(src, 'sound/machines/buzz-two.ogg', 50, 1) visible_message("[connected] buzzes harshly.", "You hear a sharp buzz.") H.apply_radiation(max(1,i)) /obj/machinery/chakraconsole/proc/total_recall(var/mob/user, var/mob/living/carbon/human/H) if(H && H == connected.occupant.resolve()) var/list/choices1 = list("Wipe Memory", "Implant Memory", "Cancel") var/response1 = input(user,"Input operation.","quaid.exe") as null|anything in choices1 if(response1 == "Cancel") return if(response1 == "Wipe Memory") var/list/choices2 = list("5 minutes", "15 minutes", "30 minutes", "2 hours", "6 months", "Cancel") var/response2 = input(user,"Input timeframe.","Memory Wipe") as null|anything in choices2 if(response2 != "Cancel") user << "Initiating memory wipe. Process will take approximately two minutes." H << "You feel a sharp pain in your brain as the therapy pod begins to hum menacingly!!" sleep(1200-rand(0,150)) if(H && H == connected.occupant.resolve()) var/timespan = response2 H << "You feel a part of your past self, a portion of your memories, a piece of your very being slip away..." H << "Your memory of the past [timespan] has been wiped. Your ability to recall these past [timespan] has been removed from your brain, and you remember nothing that ever ocurred within those [timespan]." crystal = 1 return else return if(response1 == "Implant Memory") var/new_memory = input(user,"Input New Memory","quaid.exe") var/memory_implant = sanitize(new_memory) if(memory_implant) user << "Initiating memory implantation. Process will take approximately two minutes. Subject's memory of this process will also be wiped." H << "You feel a sharp pain in your brain as the therapy pod begins to hum menacingly!" sleep(1200-rand(0,150)) if(H && H == connected.occupant.resolve()) H << "You blink, and somehow between the timespan of your eyes closing and your eyes opening your perception of the world has changed in some imperceptible way..." H << "A new memory has been implanted in your mind as follows: [memory_implant] - you have no reason to suspect the memory to be fabricated, as your memory of the past two minutes has also been altered." crystal = 1 return if(get_dist(user,src) <= 1) user << "Error: Operation failed. Terminating operation." playsound(src, 'sound/machines/buzz-two.ogg', 50, 1) visible_message("[connected] buzzes harshly.", "You hear a sharp buzz.")