Ghommie is a good friend

This commit is contained in:
Thalpy
2019-11-21 14:22:04 +00:00
parent 8256a206cf
commit 46076c95c7
5 changed files with 40 additions and 34 deletions
@@ -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
// -----------------------------
@@ -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)
@@ -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, "<span class='notice'>induces a stable rythum in [H]'s heart.</span>",
"[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, "<span class='notice'>induces a stable rythum in [H]'s heart.</span>",
"[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, "<span class='warning'>You screw up, sending current racing though their body!</span>",
"<span class='warning'>[user] screws up, causing [H] to flop around violently as they're zapped!</span>",
"<span class='warning'>[user] screws up, causing [H] to flop around violently as they're zapped!</span>")
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, "<span class='warning'>You screw up, sending current racing though their body!</span>",
"<span class='warning'>[user] screws up, causing [H] to flop around violently as they're zapped!</span>",
"<span class='warning'>[user] screws up, causing [H] to flop around violently as they're zapped!</span>")
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)
@@ -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.