From 46076c95c7cf9712c364dc09c08a7890114373a5 Mon Sep 17 00:00:00 2001 From: Thalpy <48600475+ThalpySci@users.noreply.github.com> Date: Thu, 21 Nov 2019 14:22:04 +0000 Subject: [PATCH] Ghommie is a good friend --- .../kitchen_machinery/smartfridge.dm | 10 ++++- .../chemistry/reagents/medicine_reagents.dm | 5 +-- .../emergency_cardioversion_recovery.dm | 40 +++++++++---------- code/modules/surgery/organs/organ_internal.dm | 7 +++- .../reagents/chemistry/reagents/healing.dm | 12 +++--- 5 files changed, 40 insertions(+), 34 deletions(-) diff --git a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm index 01e0001226..9af7235815 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm @@ -407,7 +407,8 @@ if(!.) //if the item loads, clear can_decompose return var/obj/item/organ/organ = O - organ.organ_flags |= ORGAN_FROZEN + if(organ) + organ.organ_flags |= ORGAN_FROZEN /obj/machinery/smartfridge/organ/RefreshParts() for(var/obj/item/stock_parts/matter_bin/B in component_parts) @@ -428,10 +429,15 @@ /obj/machinery/smartfridge/organ/preloaded initial_contents = list( - /obj/item/organ/random = 1, /obj/item/reagent_containers/medspray/synthtissue = 1, /obj/item/reagent_containers/medspray/sterilizine = 1) +/obj/machinery/smartfridge/organ/preloaded/Initialize() + ..() + var/list = list(/obj/item/organ/tongue, /obj/item/organ/brain, /obj/item/organ/heart, /obj/item/organ/liver, /obj/item/organ/ears, /obj/item/organ/eyes, /obj/item/organ/tail, /obj/item/organ/stomach) + var/newtype = pick(list) + load(new newtype) + // ----------------------------- // Chemistry Medical Smartfridge // ----------------------------- diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm index d864616b9f..0bf1339bad 100644 --- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm @@ -941,10 +941,9 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M) color = "#EEFF8F" /datum/reagent/neurine/reaction_mob(mob/living/M, method=TOUCH, reac_volume) - var/mob/living/carbon/C = M - if(!C) + var/obj/item/organ/brain/B = M.getorganslot(ORGAN_SLOT_BRAIN) + if(!B) return - var/obj/item/organ/brain/B = C.getorganslot(ORGAN_SLOT_BRAIN) if(method == INJECT) if(B.organ_flags & ORGAN_FAILING) B.applyOrganDamage(-20) diff --git a/code/modules/surgery/emergency_cardioversion_recovery.dm b/code/modules/surgery/emergency_cardioversion_recovery.dm index 4f82a0b66d..fd14c2ea8f 100644 --- a/code/modules/surgery/emergency_cardioversion_recovery.dm +++ b/code/modules/surgery/emergency_cardioversion_recovery.dm @@ -18,6 +18,7 @@ playsound(src, 'sound/machines/defib_charge.ogg', 75, 0) /datum/surgery_step/incise_heart/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) + var/mob/living/carbon/human/H = target playsound(src, 'sound/machines/defib_zap.ogg', 75, 1, -1) playsound(src, "bodyfall", 50, 1) if(H.stat != DEAD) @@ -29,32 +30,29 @@ H.emote("flip") H.Jitter(100) return FALSE - if(ishuman(target)) - var/mob/living/carbon/human/H = target - if (!(NOBLOOD in H.dna.species.species_traits)) - display_results(user, target, "induces a stable rythum in [H]'s heart.", - "[H]'s heart is shocked, attemping to bring them back to a stable rythum!.", - "") - H.bleed_rate += 10 - H.adjustBruteLoss(10) - H.adjustOrganLoss(ORGAN_SLOT_HEART, -10) - H.adjustOrganLoss(ORGAN_SLOT_BRAIN, -5) - H.electrocute_act(0, (get_turf(C)), 1, FALSE, FALSE, FALSE, TRUE) - if(!do_they_live(H)) - playsound(src, 'sound/machines/defib_failed.ogg', 50, 0) + display_results(user, target, "induces a stable rythum in [H]'s heart.", + "[H]'s heart is shocked, attemping to bring them back to a stable rythum!.", + "") + if (!(NOBLOOD in H.dna.species.species_traits)) + H.bleed_rate += 10 + H.adjustBruteLoss(10) + H.adjustOrganLoss(ORGAN_SLOT_HEART, -10) + H.adjustOrganLoss(ORGAN_SLOT_BRAIN, -5) + H.electrocute_act(0, (get_turf(C)), 1, FALSE, FALSE, FALSE, TRUE) + if(!do_they_live(H)) + playsound(src, 'sound/machines/defib_failed.ogg', 50, 0) return TRUE /datum/surgery_step/incise_heart/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) playsound(src, 'sound/machines/defib_zap.ogg', 75, 1, -1) playsound(src, "bodyfall", 50, 1) - if(ishuman(target)) - var/mob/living/carbon/human/H = target - display_results(user, target, "You screw up, sending current racing though their body!", - "[user] screws up, causing [H] to flop around violently as they're zapped!", - "[user] screws up, causing [H] to flop around violently as they're zapped!") - H.electrocute_act(25, (get_turf(C)), 1, FALSE, FALSE, FALSE, TRUE) - H.emote("flip") - H.adjustOrganLoss(ORGAN_SLOT_HEART, 10) + var/mob/living/carbon/human/H = target + display_results(user, target, "You screw up, sending current racing though their body!", + "[user] screws up, causing [H] to flop around violently as they're zapped!", + "[user] screws up, causing [H] to flop around violently as they're zapped!") + H.electrocute_act(25, (get_turf(C)), 1, FALSE, FALSE, FALSE, TRUE) + H.emote("flip") + H.adjustOrganLoss(ORGAN_SLOT_HEART, 10) /datum/surgery_step/incise_heart/do_they_live(mob/living/carbon/human/H) diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm index 036ef87428..55f81504d9 100644 --- a/code/modules/surgery/organs/organ_internal.dm +++ b/code/modules/surgery/organs/organ_internal.dm @@ -98,13 +98,16 @@ //Checks to see if the organ is frozen from temperature /obj/item/organ/proc/is_cold() - var/freezing_objects = list(/obj/structure/closet/crate/freezer, /obj/structure/closet/secure_closet/freezer, /obj/structure/bodycontainer, /obj/item/autosurgeon) + var/freezing_objects = list(/obj/structure/closet/crate/freezer, /obj/structure/closet/secure_closet/freezer, /obj/structure/bodycontainer, /obj/item/autosurgeon, /obj/machinery/smartfridge/organ) if(istype(loc, /obj/))//Freezer of some kind, I hope. if(is_type_in_list(loc, freezing_objects)) if(!(organ_flags & ORGAN_FROZEN))//Incase someone puts them in when cold, but they warm up inside of the thing. (i.e. they have the flag, the thing turns it off, this rights it.) organ_flags |= ORGAN_FROZEN return TRUE - return + var/external_check = FALSE + if(organ_flags & ORGAN_FROZEN) + external_check = TRUE + return external_check var/local_temp if(istype(loc, /turf/))//Only concern is adding an organ to a freezer when the area around it is cold. diff --git a/modular_citadel/code/modules/reagents/chemistry/reagents/healing.dm b/modular_citadel/code/modules/reagents/chemistry/reagents/healing.dm index 310403effc..8ac5e1a192 100644 --- a/modular_citadel/code/modules/reagents/chemistry/reagents/healing.dm +++ b/modular_citadel/code/modules/reagents/chemistry/reagents/healing.dm @@ -172,18 +172,18 @@ update_name() ..() -/datum/reagent/synthtissue/proc/update_name() +/datum/reagent/synthtissue/proc/update_name() //They are but babes on creation and have to grow unto godhood switch(data["grown_volume"]) if(-INFINITY to 50) - name = "Young Synthtissue Colony" + name = "Induced Synthtissue Colony" if(50 to 80) - name = "Adolescent Synthtissue Colony" + name = "Oligopotent Synthtissue Colony" if(80 to 135) - name = "Adult Synthtissue Colony" + name = "Pluripotent Synthtissue Colony" if(135 to 175) - name = "Master Synthtissue Colony" + name = "SuperSomatic Synthtissue Colony" if(175 to INFINITY) - name = "Apex Synthtissue Colony" + name = "Omnipotent Synthtissue Colony" /datum/reagent/synthtissue/on_mob_delete(mob/living/M) if(!iscarbon(M))