mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-30 08:29:57 +01:00
Ports the neural suppressor from Bay (#7124)
Neural Suppressor -> You click table with a man laying on it. The man goes to sleep. Really is that easy.
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
var/mob/living/carbon/human/victim = null
|
||||
var/strapped = 0.0
|
||||
var/suppressing = FALSE
|
||||
|
||||
var/obj/machinery/computer/operating/computer = null
|
||||
|
||||
@@ -27,6 +28,10 @@
|
||||
computer.table = src
|
||||
break
|
||||
|
||||
/obj/machinery/optable/examine(var/mob/user)
|
||||
. = ..()
|
||||
to_chat(user, "<span class='notice'>The neural suppressors are switched [suppressing ? "on" : "off"].</span>")
|
||||
|
||||
/obj/machinery/optable/ex_act(severity)
|
||||
|
||||
switch(severity)
|
||||
@@ -50,9 +55,21 @@
|
||||
visible_message("<span class='danger'>\The [usr] destroys \the [src]!</span>")
|
||||
src.density = 0
|
||||
qdel(src)
|
||||
return
|
||||
return
|
||||
|
||||
if(!victim)
|
||||
to_chat(user, "<span class='warning'>There is nobody on \the [src]. It would be pointless to turn the suppressor on.</span>")
|
||||
return TRUE
|
||||
|
||||
if(user != victim && !suppressing) // Skip checks if you're doing it to yourself or turning it off, this is an anti-griefing mechanic more than anything.
|
||||
user.visible_message("<span class='warning'>\The [user] begins switching on \the [src]'s neural suppressor.</span>")
|
||||
if(!do_after(user, 30, src) || !use_check_and_message(user))
|
||||
return
|
||||
if(!victim)
|
||||
to_chat(user, "<span class='warning'>There is nobody on \the [src]. It would be pointless to turn the suppressor on.</span>")
|
||||
|
||||
suppressing = !suppressing
|
||||
user.visible_message("<span class='notice'>\The [user] switches [suppressing ? "on" : "off"] \the [src]'s neural suppressor.</span>")
|
||||
|
||||
/obj/machinery/optable/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group || (height==0)) return 1
|
||||
@@ -71,13 +88,18 @@
|
||||
return
|
||||
|
||||
/obj/machinery/optable/proc/check_victim()
|
||||
if(locate(/mob/living/carbon/human, src.loc))
|
||||
var/mob/living/carbon/human/M = locate(/mob/living/carbon/human, src.loc)
|
||||
if(M.lying)
|
||||
src.victim = M
|
||||
icon_state = M.pulse ? "[modify_state]-active" : "[modify_state]-idle"
|
||||
return 1
|
||||
src.victim = null
|
||||
if(!victim || !victim.lying || victim.loc != loc)
|
||||
suppressing = FALSE
|
||||
victim = null
|
||||
var/mob/living/carbon/human/H = locate() in loc
|
||||
if(istype(H))
|
||||
if(H.lying)
|
||||
icon_state = H.pulse ? "[modify_state]-active" : "[modify_state]-idle"
|
||||
victim = H
|
||||
if(victim)
|
||||
if(suppressing && victim.sleeping < 3)
|
||||
victim.Sleeping(3 - victim.sleeping)
|
||||
return 1
|
||||
icon_state = "[modify_state]-idle"
|
||||
return 0
|
||||
|
||||
@@ -178,4 +200,4 @@
|
||||
if(patient.buckled)
|
||||
to_chat(usr, "<span class='notice'>Unbuckle \the [patient] first!</span>")
|
||||
return 0
|
||||
return 1
|
||||
return 1
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
################################
|
||||
# Example Changelog File
|
||||
#
|
||||
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||
#
|
||||
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||
# When it is, any changes listed below will disappear.
|
||||
#
|
||||
# Valid Prefixes:
|
||||
# bugfix
|
||||
# wip (For works in progress)
|
||||
# tweak
|
||||
# soundadd
|
||||
# sounddel
|
||||
# rscadd (general adding of nice things)
|
||||
# rscdel (general deleting of nice things)
|
||||
# imageadd
|
||||
# imagedel
|
||||
# maptweak
|
||||
# spellcheck (typo fixes)
|
||||
# experiment
|
||||
# balance
|
||||
# admin
|
||||
# backend
|
||||
# security
|
||||
# refactor
|
||||
#################################
|
||||
|
||||
# Your name.
|
||||
author: MattAtlas
|
||||
|
||||
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||
delete-after: True
|
||||
|
||||
# Any changes you've made. See valid prefix list above.
|
||||
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||
# SCREW THIS UP AND IT WON'T WORK.
|
||||
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
|
||||
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
|
||||
changes:
|
||||
- rscadd: "Added a neural suppressor to surgery operating tables. Putting people on them and clicking the table will activate it, making them fall asleep. No need for anesthetic.."
|
||||
Reference in New Issue
Block a user