[MIRROR] You can do revival surgery on Ian [MDB IGNORE] (#23773)

* You can do revival surgery on Ian

* Update revival.dm

* Update code/modules/surgery/revival.dm

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
Co-authored-by: Pinta <68373373+softcerv@users.noreply.github.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-09-18 16:49:41 -04:00
committed by GitHub
co-authored by Jacquerel Pinta Bloop
parent c8b64fca9f
commit 287c35e6b2
5 changed files with 104 additions and 59 deletions
+7
View File
@@ -236,3 +236,10 @@
speak = list() //they're very patient and focused on holding the butter on 'em
emote_see = list("shakes a little.", "looks around.")
emote_hear = list("licks a trickle of the butter up.", "smiles.")
/datum/dog_fashion/head/eyepatch
name = "Punished %REAL_NAME%"
desc = "%REAL_NAME% has really been going through it today."
obj_icon_state = "eyepatch"
emote_hear = list("sighs gruffly.", "groans.")
emote_see = list("considers their own mortality.", "stares bleakly into the middle distance.", "ponders the horrors of warfare.")
@@ -195,6 +195,7 @@
base_icon_state = "eyepatch"
inhand_icon_state = null
actions_types = list(/datum/action/item_action/flip)
dog_fashion = /datum/dog_fashion/head/eyepatch
/obj/item/clothing/glasses/eyepatch/attack_self(mob/user, modifiers)
. = ..()
+43 -35
View File
@@ -44,27 +44,29 @@
/mob/living/basic/pet/dog/corgi/Exited(atom/movable/gone, direction)
. = ..()
var/dropped_something = FALSE
if(gone == inventory_head)
dropped_something = TRUE
inventory_head = null
update_corgi_fluff()
update_appearance(UPDATE_OVERLAYS)
if(gone == inventory_back)
dropped_something = TRUE
inventory_back = null
if(dropped_something)
update_corgi_fluff()
update_appearance(UPDATE_OVERLAYS)
/mob/living/basic/pet/dog/corgi/gib()
if(inventory_head)
inventory_head.forceMove(drop_location())
inventory_head = null
if(inventory_back)
inventory_back.forceMove(drop_location())
inventory_back = null
undress_dog()
if(access_card)
access_card.forceMove(drop_location())
access_card = null
return ..()
/// Removes the hat and shirt (but not ID) of this corgi
/mob/living/basic/pet/dog/corgi/proc/undress_dog()
inventory_head?.forceMove(drop_location())
inventory_back?.forceMove(drop_location())
/mob/living/basic/pet/dog/corgi/examine(mob/user)
. = ..()
if(access_card)
@@ -194,44 +196,42 @@
/mob/living/basic/pet/dog/corgi/proc/place_on_head(obj/item/item_to_add, mob/living/user)
if(inventory_head)
if(user)
to_chat(user, span_warning("You can't put more than one hat on [src]!"))
return
if(!item_to_add)
user.visible_message(span_notice("[user] pets [src]."), span_notice("You rest your hand on [src]'s head for a moment."))
if(flags_1 & HOLOGRAM_1)
return
user.add_mood_event(REF(src), /datum/mood_event/pet_animal, src)
return
balloon_alert(user, "already wearing a hat!")
return FALSE
if(isnull(item_to_add))
if (!isnull(user))
user.visible_message(span_notice("[user] pets [src]."), span_notice("You rest your hand on [src]'s head for a moment."))
if(flags_1 & HOLOGRAM_1)
return
user.add_mood_event(REF(src), /datum/mood_event/pet_animal, src)
return FALSE
if(user && !user.temporarilyRemoveItemFromInventory(item_to_add))
to_chat(user, span_warning("\The [item_to_add] is stuck to your hand, you cannot put it on [src]'s head!"))
return
var/valid = FALSE
if(ispath(item_to_add.dog_fashion, /datum/dog_fashion/head))
valid = TRUE
return FALSE
//Various hats and items (worn on his head) change Ian's behaviour. His attributes are reset when a hat is removed.
if(valid)
if(user && (stat == DEAD || HAS_TRAIT(src, TRAIT_FAKEDEATH)))
to_chat(user, span_notice("There is merely a dull, lifeless look in [real_name]'s eyes as you put \the [item_to_add] on [p_them()]."))
else if(user)
user.visible_message(span_notice("[user] puts [item_to_add] on [real_name]'s head. [src] looks at [user] and barks once."),
span_notice("You put [item_to_add] on [real_name]'s head. [src] gives you a peculiar look, then wags [p_their()] tail once and barks."),
span_hear("You hear a friendly-sounding bark."))
item_to_add.forceMove(src)
inventory_head = item_to_add
update_corgi_fluff()
update_appearance(UPDATE_OVERLAYS)
else
if(!ispath(item_to_add.dog_fashion, /datum/dog_fashion/head))
to_chat(user, span_warning("You set [item_to_add] on [src]'s head, but it falls off!"))
item_to_add.forceMove(drop_location())
if(prob(25))
step_rand(item_to_add)
dance_rotate(src, set_original_dir = TRUE)
return FALSE
return valid
if (user)
if(stat == DEAD || HAS_TRAIT(src, TRAIT_FAKEDEATH))
to_chat(user, span_notice("There is merely a dull, lifeless look in [real_name]'s eyes as you put \the [item_to_add] on [p_them()]."))
else
user.visible_message(span_notice("[user] puts [item_to_add] on [real_name]'s head. [src] looks at [user] and barks once."),
span_notice("You put [item_to_add] on [real_name]'s head. [src] gives you a peculiar look, then wags [p_their()] tail once and barks."),
span_hear("You hear a friendly-sounding bark."))
item_to_add.forceMove(src)
inventory_head = item_to_add
update_corgi_fluff()
update_appearance(UPDATE_OVERLAYS)
return TRUE
/mob/living/basic/pet/dog/corgi/proc/update_corgi_fluff()
// First, change back to defaults
@@ -380,6 +380,14 @@
Write_Memory(TRUE)
return ..()
/mob/living/basic/pet/dog/corgi/ian/revive(full_heal_flags, excess_healing, force_grab_ghost)
. = ..()
if (!.)
return
if (!istype(inventory_head, /obj/item/clothing/glasses/eyepatch))
inventory_head?.forceMove(drop_location())
place_on_head(new /obj/item/clothing/glasses/eyepatch/medical)
/mob/living/basic/pet/dog/corgi/ian/narsie_act()
playsound(src, 'sound/magic/demon_dies.ogg', 75, TRUE)
var/mob/living/basic/pet/dog/corgi/narsie/narsIan = new(loc)
+53 -24
View File
@@ -3,7 +3,8 @@
desc = "An experimental surgical procedure which involves reconstruction and reactivation of the patient's brain even long after death. \
The body must still be able to sustain life."
requires_bodypart_type = NONE
possible_locs = list(BODY_ZONE_HEAD)
possible_locs = list(BODY_ZONE_CHEST)
target_mobtypes = list(/mob/living)
surgery_flags = SURGERY_REQUIRE_RESTING | SURGERY_REQUIRE_LIMB | SURGERY_MORBID_CURIOSITY
steps = list(
/datum/surgery_step/incise,
@@ -15,15 +16,22 @@
/datum/surgery_step/close,
)
/datum/surgery/revival/can_start(mob/user, mob/living/carbon/target)
/datum/surgery/revival/can_start(mob/user, mob/living/target)
if(!..())
return FALSE
if(target.stat != DEAD)
return FALSE
if(HAS_TRAIT(target, TRAIT_SUICIDED) || HAS_TRAIT(target, TRAIT_HUSK) || HAS_TRAIT(target, TRAIT_DEFIB_BLACKLISTED))
return FALSE
var/obj/item/organ/internal/brain/target_brain = target.get_organ_slot(ORGAN_SLOT_BRAIN)
if(!target_brain)
if(!is_valid_target(target))
return FALSE
return TRUE
/// Extra checks which can be overridden
/datum/surgery/revival/proc/is_valid_target(mob/living/patient)
if (iscarbon(patient))
return FALSE
if (!(patient.mob_biotypes & (MOB_ORGANIC|MOB_HUMANOID)))
return FALSE
return TRUE
@@ -59,7 +67,7 @@
to_chat(user, span_warning("You need an electrode for this!"))
return FALSE
/datum/surgery_step/revive/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
/datum/surgery_step/revive/preop(mob/user, mob/living/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(
user,
target,
@@ -69,13 +77,13 @@
)
target.notify_ghost_cloning("Someone is trying to zap your brain.", source = target)
/datum/surgery_step/revive/play_preop_sound(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
/datum/surgery_step/revive/play_preop_sound(mob/user, mob/living/target, target_zone, obj/item/tool, datum/surgery/surgery)
if(istype(tool, /obj/item/shockpaddles))
playsound(tool, 'sound/machines/defib_charge.ogg', 75, 0)
else
..()
/datum/surgery_step/revive/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results)
/datum/surgery_step/revive/success(mob/user, mob/living/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results)
display_results(
user,
target,
@@ -87,24 +95,27 @@
target.adjustOxyLoss(-50, 0)
target.updatehealth()
if(target.revive())
target.visible_message(span_notice("...[target] wakes up, alive and aware!"))
target.emote("gasp")
target.adjustOrganLoss(ORGAN_SLOT_BRAIN, 50, 199) //MAD SCIENCE
to_chat(target, "<span class='userdanger'>[CONFIG_GET(string/blackoutpolicy)]</span>") //SKYRAT EDIT ADDITION - BLACKOUT POLICY
if(HAS_MIND_TRAIT(user, TRAIT_MORBID) && ishuman(user)) //Contrary to their typical hatred of resurrection, it wouldn't be very thematic if morbid people didn't love playing god
var/mob/living/carbon/human/morbid_weirdo = user
morbid_weirdo.add_mood_event("morbid_revival_success", /datum/mood_event/morbid_revival_success)
on_revived(user, target)
return TRUE
else
//SKYRAT EDIT ADDITION - DNR TRAIT - need this so that people dont just keep spamming the revival surgery; it runs success just bc the surgery steps are done
if(HAS_TRAIT(target, TRAIT_DNR))
target.visible_message(span_warning("...[target.p_they()] lies still, unaffected. Further attempts are futile, they're gone."))
else
target.visible_message(span_warning("...[target.p_they()] convulses, then lies still."))
//SKYRAT EDIT ADDITION END - DNR TRAIT - ORIGINAL: target.visible_message(span_warning("...[target.p_they()] convulses, then lies still."))
return FALSE
/datum/surgery_step/revive/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
//SKYRAT EDIT CHANGE - DNR TRAIT - need this so that people don't just keep spamming the revival surgery; it runs success just bc the surgery steps are done
if(HAS_TRAIT(target, TRAIT_DNR))
target.visible_message(span_warning("...[target.p_they()] lie[target.p_s()] still, unaffected. Further attempts are futile, target.p_theyre() gone."))
else
target.visible_message(span_warning("...[target.p_they()] convulse[target.p_s()], then lie[target.p_s()] still."))
//SKYRAT EDIT CHANGE END - DNR TRAIT - ORIGINAL: target.visible_message(span_warning("...[target.p_they()] convulse[target.p_s()], then lie[target.p_s()] still."))
return FALSE
/// Called when you have been successfully raised from the dead
/datum/surgery_step/revive/proc/on_revived(mob/surgeon, mob/living/patient)
patient.visible_message(span_notice("...[patient] wakes up, alive and aware!"))
patient.emote("gasp")
to_chat(patient, "<span class='userdanger'>[CONFIG_GET(string/blackoutpolicy)]</span>") //SKYRAT EDIT ADDITION - BLACKOUT POLICY
if(HAS_MIND_TRAIT(surgeon, TRAIT_MORBID) && ishuman(surgeon)) // Contrary to their typical hatred of resurrection, it wouldn't be very thematic if morbid people didn't love playing god
var/mob/living/carbon/human/morbid_weirdo = surgeon
morbid_weirdo.add_mood_event("morbid_revival_success", /datum/mood_event/morbid_revival_success)
/datum/surgery_step/revive/failure(mob/user, mob/living/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(
user,
target,
@@ -112,5 +123,23 @@
span_notice("[user] send a powerful shock to [target]'s brain with [tool], but [target.p_they()] doesn't react."),
span_notice("[user] send a powerful shock to [target]'s brain with [tool], but [target.p_they()] doesn't react."),
)
target.adjustOrganLoss(ORGAN_SLOT_BRAIN, 15, 180)
return FALSE
/// Additional revival effects if the target has a brain
/datum/surgery/revival/carbon
possible_locs = list(BODY_ZONE_HEAD)
target_mobtypes = list(/mob/living/carbon)
/datum/surgery/revival/carbon/is_valid_target(mob/living/carbon/patient)
var/obj/item/organ/internal/brain/target_brain = patient.get_organ_slot(ORGAN_SLOT_BRAIN)
return !isnull(target_brain)
/datum/surgery_step/revive/carbon
/datum/surgery_step/revive/carbon/on_revived(mob/surgeon, mob/living/patient)
. = ..()
patient.adjustOrganLoss(ORGAN_SLOT_BRAIN, 50, 199) // MAD SCIENCE
/datum/surgery_step/revive/carbon/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
. = ..()
target.adjustOrganLoss(ORGAN_SLOT_BRAIN, 15, 180)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB