[MIRROR] Extensive surgery additions (#5590)

* Extensive surgery additions

* Update role_preferences.dm

* Update surgery_step.dm
This commit is contained in:
CitadelStationBot
2018-02-19 10:48:11 -06:00
committed by Poojawa
parent d8faf15832
commit 1e65c813f0
46 changed files with 1098 additions and 251 deletions
+13 -1
View File
@@ -6,12 +6,24 @@
circuit = /obj/item/circuitboard/computer/operating
var/mob/living/carbon/human/patient
var/obj/structure/table/optable/table
var/list/advanced_surgeries = list()
light_color = LIGHT_COLOR_BLUE
/obj/machinery/computer/operating/Initialize()
. = ..()
find_table()
/obj/machinery/computer/operating/attackby(obj/item/O, mob/user, params)
if(istype(O, /obj/item/disk/surgery))
user.visible_message("[user] begins to load \the [O] in \the [src]...",
"You begin to load a surgery protocol from \the [O]...",
"You hear the chatter of a floppy drive.")
var/obj/item/disk/surgery/D = O
if(do_after(user, 10, target = src))
advanced_surgeries |= D.surgeries
return TRUE
return ..()
/obj/machinery/computer/operating/proc/find_table()
for(var/direction in GLOB.cardinals)
table = locate(/obj/structure/table/optable, get_step(src, direction))
@@ -69,4 +81,4 @@
"next_step" = capitalize(surgery_step.name),
"alternative_step" = alternative_step
))
return data
return data
+10 -1
View File
@@ -161,7 +161,16 @@ GAS ANALYZER
if(LAZYLEN(C.get_traumas()))
var/list/trauma_text = list()
for(var/datum/brain_trauma/B in C.get_traumas())
trauma_text += B.scan_desc
var/trauma_desc = ""
switch(B.resilience)
if(TRAUMA_RESILIENCE_SURGERY)
trauma_desc += "severe "
if(TRAUMA_RESILIENCE_LOBOTOMY)
trauma_desc += "deep-rooted "
if(TRAUMA_RESILIENCE_MAGIC, TRAUMA_RESILIENCE_ABSOLUTE)
trauma_desc += "permanent "
trauma_desc += B.scan_desc
trauma_text += trauma_desc
to_chat(user, "\t<span class='alert'>Cerebral traumas detected: subjects appears to be suffering from [english_list(trauma_text)].</span>")
if(advanced)
to_chat(user, "\t<span class='info'>Brain Activity Level: [(200 - M.getBrainLoss())/2]%.</span>")
@@ -20,13 +20,17 @@
if(..())
if(!target.mind)
return TRUE
if(target.mind.has_antag_datum(/datum/antagonist/brainwashed))
target.mind.remove_antag_datum(/datum/antagonist/brainwashed)
if(target.mind.has_antag_datum(/datum/antagonist/rev/head) || target.mind.unconvertable)
if(!silent)
target.visible_message("<span class='warning'>[target] seems to resist the implant!</span>", "<span class='warning'>You feel something interfering with your mental conditioning, but you resist it!</span>")
removed(target, 1)
qdel(src)
return FALSE
var/datum/antagonist/rev/rev = target.mind.has_antag_datum(/datum/antagonist/rev)
if(rev)
rev.remove_revolutionary(FALSE, user)
@@ -179,17 +179,16 @@
/obj/machinery/implantchair/brainwash/implant_action(mob/living/C,mob/user)
if(!istype(C) || !C.mind) // I don't know how this makes any sense for silicons but laws trump objectives anyway.
return 0
return FALSE
if(custom)
if(!user || !user.Adjacent(src))
return 0
return FALSE
objective = stripped_input(usr,"What order do you want to imprint on [C]?","Enter the order","",120)
message_admins("[key_name_admin(user)] set brainwash machine objective to '[objective]'.")
log_game("[key_name(user)] set brainwash machine objective to '[objective]'.")
var/datum/objective/custom_objective = new/datum/objective(objective)
custom_objective.owner = C.mind
C.mind.objectives += custom_objective
C.mind.announce_objectives()
if(C.isloyal())
return FALSE
brainwash(C, objective)
message_admins("[key_name_admin(user)] brainwashed [key_name_admin(C)] with objective '[objective]'.")
log_game("[key_name(user)] brainwashed [key_name(C)] with objective '[objective]'.")
return 1
return TRUE