[MIRROR] Extensive surgery additions (#5590)
* Extensive surgery additions * Update role_preferences.dm * Update surgery_step.dm
This commit is contained in:
committed by
Poojawa
parent
d8faf15832
commit
1e65c813f0
@@ -11,7 +11,7 @@
|
||||
var/outfit
|
||||
var/landmark_type
|
||||
var/greet_text
|
||||
|
||||
|
||||
|
||||
/datum/antagonist/abductor/agent
|
||||
name = "Abductor Agent"
|
||||
@@ -167,7 +167,7 @@
|
||||
/datum/antagonist/abductee/proc/give_objective()
|
||||
var/mob/living/carbon/human/H = owner.current
|
||||
if(istype(H))
|
||||
H.gain_trauma_type(BRAIN_TRAUMA_MILD)
|
||||
H.gain_trauma_type(BRAIN_TRAUMA_MILD, TRAUMA_RESILIENCE_LOBOTOMY)
|
||||
var/objtype = (prob(75) ? /datum/objective/abductee/random : pick(subtypesof(/datum/objective/abductee/) - /datum/objective/abductee/random))
|
||||
var/datum/objective/abductee/O = new objtype()
|
||||
objectives += O
|
||||
|
||||
@@ -52,49 +52,4 @@
|
||||
user.temporarilyRemoveItemFromInventory(tool, TRUE)
|
||||
var/obj/item/organ/heart/gland/gland = tool
|
||||
gland.Insert(target, 2)
|
||||
return 1
|
||||
|
||||
/datum/surgery/pacify
|
||||
name = "violence neutralization"
|
||||
steps = list(/datum/surgery_step/incise,
|
||||
/datum/surgery_step/retract_skin,
|
||||
/datum/surgery_step/saw,
|
||||
/datum/surgery_step/clamp_bleeders,
|
||||
/datum/surgery_step/pacify,
|
||||
/datum/surgery_step/close)
|
||||
|
||||
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
|
||||
possible_locs = list("head")
|
||||
requires_bodypart_type = 0
|
||||
|
||||
/datum/surgery/pacify/can_start(mob/user, mob/living/carbon/target)
|
||||
if(!ishuman(user))
|
||||
return FALSE
|
||||
var/mob/living/carbon/human/H = user
|
||||
. = FALSE
|
||||
if(!(H.dna.species.id == "abductor"))
|
||||
. = TRUE
|
||||
for(var/obj/item/implant/abductor/A in H.implants)
|
||||
. = TRUE
|
||||
var/obj/item/organ/brain/B = target.getorganslot(ORGAN_SLOT_BRAIN)
|
||||
if(!B)
|
||||
to_chat(user, "<span class='warning'>It's hard to do surgery on someone's brain when they don't have one.</span>")
|
||||
return FALSE
|
||||
|
||||
/datum/surgery_step/pacify
|
||||
name = "rewire brain"
|
||||
implements = list(/obj/item/hemostat = 100, /obj/item/screwdriver = 35, /obj/item/pen = 15)
|
||||
time = 40
|
||||
|
||||
/datum/surgery_step/pacify/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
user.visible_message("[user] begins to reshape [target]'s brain.", "<span class='notice'>You begin to reshape [target]'s brain...</span>")
|
||||
|
||||
/datum/surgery_step/pacify/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
user.visible_message("[user] successfully reshapes [target]'s brain!", "<span class='notice'>You succeed in reshaping [target]'s brain.</span>")
|
||||
target.gain_trauma(/datum/brain_trauma/severe/pacifism)
|
||||
return TRUE
|
||||
|
||||
/datum/surgery_step/pacify/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
user.visible_message("[user] successfully reshapes [target]'s brain!", "<span class='notice'>You screwed up, and rewired [target]'s brain the wrong way around...</span>")
|
||||
target.gain_trauma_type(BRAIN_TRAUMA_SEVERE)
|
||||
return FALSE
|
||||
return 1
|
||||
@@ -230,12 +230,12 @@
|
||||
/obj/item/organ/heart/gland/trauma/activate()
|
||||
to_chat(owner, "<span class='warning'>You feel a spike of pain in your head.</span>")
|
||||
if(prob(33))
|
||||
owner.gain_trauma_type(BRAIN_TRAUMA_SPECIAL, TRUE)
|
||||
owner.gain_trauma_type(BRAIN_TRAUMA_SPECIAL, TRAUMA_RESILIENCE_LOBOTOMY)
|
||||
else
|
||||
if(prob(20))
|
||||
owner.gain_trauma_type(BRAIN_TRAUMA_SEVERE, TRUE)
|
||||
owner.gain_trauma_type(BRAIN_TRAUMA_SEVERE, TRAUMA_RESILIENCE_LOBOTOMY)
|
||||
else
|
||||
owner.gain_trauma_type(BRAIN_TRAUMA_MILD, TRUE)
|
||||
owner.gain_trauma_type(BRAIN_TRAUMA_MILD, TRAUMA_RESILIENCE_LOBOTOMY)
|
||||
|
||||
/obj/item/organ/heart/gland/spiderman
|
||||
cooldown_low = 450
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
/proc/brainwash(mob/living/L, directives)
|
||||
if(!L.mind)
|
||||
return
|
||||
if(!islist(directives))
|
||||
directives = list(directives)
|
||||
var/datum/mind/M = L.mind
|
||||
var/datum/antagonist/brainwashed/B = M.has_antag_datum(/datum/antagonist/brainwashed)
|
||||
if(B)
|
||||
for(var/O in directives)
|
||||
var/datum/objective/brainwashing/objective = new(O)
|
||||
B.objectives += objective
|
||||
M.objectives += objective
|
||||
B.greet()
|
||||
else
|
||||
B = new()
|
||||
for(var/O in directives)
|
||||
var/datum/objective/brainwashing/objective = new(O)
|
||||
B.objectives += objective
|
||||
M.add_antag_datum(B)
|
||||
|
||||
var/begin_message = "<span class='deadsay'><b>[L]</b> has been brainwashed with the following objectives: "
|
||||
var/obj_message = english_list(directives)
|
||||
var/end_message = "</b>.</span>"
|
||||
var/rendered = begin_message + obj_message + end_message
|
||||
deadchat_broadcast(rendered, follow_target = L, turf_target = get_turf(L), message_type=DEADCHAT_REGULAR)
|
||||
|
||||
/datum/antagonist/brainwashed
|
||||
name = "Brainwashed Victim"
|
||||
job_rank = ROLE_BRAINWASHED
|
||||
roundend_category = "brainwashed victims"
|
||||
show_in_antagpanel = TRUE
|
||||
antagpanel_category = "Other"
|
||||
show_name_in_check_antagonists = TRUE
|
||||
|
||||
/datum/antagonist/brainwashed/on_gain()
|
||||
owner.objectives |= objectives
|
||||
. = ..()
|
||||
|
||||
/datum/antagonist/brainwashed/on_removal()
|
||||
owner.objectives -= objectives
|
||||
. = ..()
|
||||
|
||||
/datum/antagonist/brainwashed/greet()
|
||||
to_chat(owner, "<span class='warning'>Your mind reels as it begins focusing on a single purpose...</span>")
|
||||
to_chat(owner, "<big><span class='warning'><b>Follow the Directives, at any cost!</b></span></big>")
|
||||
var/i = 1
|
||||
for(var/X in objectives)
|
||||
var/datum/objective/O = X
|
||||
to_chat(owner, "<b>[i].</b> [O.explanation_text]")
|
||||
i++
|
||||
|
||||
/datum/antagonist/brainwashed/farewell()
|
||||
to_chat(owner, "<span class='warning'>Your mind suddenly clears...</span>")
|
||||
to_chat(owner, "<big><span class='warning'><b>You feel the weight of the Directives disappear! You no longer have to obey them.</b></span></big>")
|
||||
owner.announce_objectives()
|
||||
|
||||
/datum/antagonist/brainwashed/admin_add(datum/mind/new_owner,mob/admin)
|
||||
var/mob/living/carbon/C = new_owner.current
|
||||
if(!istype(C))
|
||||
return
|
||||
var/list/objectives = list()
|
||||
do
|
||||
var/objective = stripped_input(admin, "Add an objective, or leave empty to finish.", "Brainwashing", null, MAX_MESSAGE_LEN)
|
||||
if(objective)
|
||||
objectives += objective
|
||||
while(alert(admin,"Add another objective?","More Brainwashing","Yes","No") == "Yes")
|
||||
|
||||
if(alert(admin,"Confirm Brainwashing?","Are you sure?","Yes","No") == "No")
|
||||
return
|
||||
|
||||
if(!LAZYLEN(objectives))
|
||||
return
|
||||
|
||||
if(QDELETED(C))
|
||||
to_chat(admin, "Mob doesn't exist anymore")
|
||||
return
|
||||
|
||||
brainwash(C, objectives)
|
||||
var/obj_list = english_list(objectives)
|
||||
message_admins("[key_name_admin(admin)] has brainwashed [key_name_admin(C)] with the following objectives: [obj_list].")
|
||||
log_admin("[key_name(admin)] has brainwashed [key_name(C)] with the following objectives: [obj_list].")
|
||||
|
||||
/datum/objective/brainwashing
|
||||
completed = TRUE
|
||||
Reference in New Issue
Block a user