diff --git a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm
index 2a72c4a9b9b..1408e0a87fc 100644
--- a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm
+++ b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm
@@ -588,6 +588,7 @@ Congratulations! You are now trained for invasive xenobiology research!"}
icon = 'icons/obj/abductor.dmi'
icon_state = "bed"
no_icon_updates = 1 //no icon updates for this; it's static.
+ injected_reagents = list("corazone")
/obj/structure/closet/abductor
name = "alien locker"
@@ -595,4 +596,4 @@ Congratulations! You are now trained for invasive xenobiology research!"}
icon_state = "abductor"
icon_closed = "abductor"
icon_opened = "abductoropen"
- material_drop = /obj/item/stack/sheet/mineral/abductor
\ No newline at end of file
+ material_drop = /obj/item/stack/sheet/mineral/abductor
diff --git a/code/game/machinery/OpTable.dm b/code/game/machinery/OpTable.dm
index 6a5253b599c..4b332b94543 100644
--- a/code/game/machinery/OpTable.dm
+++ b/code/game/machinery/OpTable.dm
@@ -14,6 +14,7 @@
var/obj/machinery/computer/operating/computer = null
buckle_lying = 90
var/no_icon_updates = 0 //set this to 1 if you don't want the icons ever changing
+ var/list/injected_reagents = list()
/obj/machinery/optable/New()
..()
@@ -97,8 +98,18 @@
icon_state = "table2-idle"
return 0
+/obj/machinery/optable/Crossed(atom/movable/AM)
+ . = ..()
+ if(iscarbon(AM) && LAZYLEN(injected_reagents))
+ to_chat(AM, "You feel a series of tiny pricks!")
+
/obj/machinery/optable/process()
check_victim()
+ if(LAZYLEN(injected_reagents))
+ for(var/mob/living/carbon/C in get_turf(src))
+ for(var/chemical in injected_reagents)
+ if(C.reagents.get_reagent_amount(chemical) < 1)
+ C.reagents.add_reagent(chemical, 1)
/obj/machinery/optable/proc/take_victim(mob/living/carbon/C, mob/living/carbon/user as mob)
if(C == user)
diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm
index b3957234d01..e5c9d1a0804 100644
--- a/code/game/machinery/cloning.dm
+++ b/code/game/machinery/cloning.dm
@@ -5,6 +5,9 @@
#define CLONE_BIOMASS 150
#define BIOMASS_MEAT_AMOUNT 50
+#define MINIMUM_HEAL_LEVEL 40
+#define CLONE_INITIAL_DAMAGE 190
+#define BRAIN_INITIAL_DAMAGE 90 // our minds are too feeble for 190
/obj/machinery/clonepod
anchored = 1
@@ -15,12 +18,10 @@
icon_state = "pod_0"
req_access = list(access_genetics) //For premature unlocking.
var/mob/living/carbon/human/occupant
- var/heal_level = 90 //The clone is released once its health reaches this level.
- var/locked = 0
+ var/heal_level //The clone is released once its health reaches this level.
var/obj/machinery/computer/cloning/connected = null //So we remember the connected clone machine.
var/mess = 0 //Need to clean out it if it's full of exploded clone.
var/attempting = 0 //One clone attempt at a time thanks
- var/eject_wait = 0 //Don't eject them as soon as they are created fuckkk
var/biomass = 0
var/speed_coeff
var/efficiency
@@ -33,6 +34,10 @@
var/obj/effect/countdown/clonepod/countdown
+ var/list/brine_types = list("corazone", "salbutamol", "hydrocodone")
+ var/list/missing_organs
+ var/organs_number = 0
+
light_color = LIGHT_COLOR_PURE_GREEN
/obj/machinery/clonepod/power_change()
@@ -84,6 +89,7 @@
connected.pods -= src
QDEL_NULL(Radio)
QDEL_NULL(countdown)
+ QDEL_LIST(missing_organs)
return ..()
/obj/machinery/clonepod/RefreshParts()
@@ -93,7 +99,7 @@
efficiency += S.rating
for(var/obj/item/weapon/stock_parts/manipulator/P in component_parts)
speed_coeff += P.rating
- heal_level = min((efficiency * 15) + 10, 100)
+ heal_level = max(min((efficiency * 15) + 10, 100), MINIMUM_HEAL_LEVEL)
//The return of data disks?? Just for transferring between genetics machine/cloning machine.
//TO-DO: Make the genetics machine accept them.
@@ -217,19 +223,21 @@
if(!G)
return 0
+/*
+ if(clonemind.damnation_type) //Can't clone the damned.
+ playsound('sound/hallucinations/veryfar_noise.ogg', 50, 0)
+ malfunction()
+ return -1 // so that the record gets flushed out
+ */
+
if(biomass >= CLONE_BIOMASS)
biomass -= CLONE_BIOMASS
else
return 0
attempting = 1 //One at a time!!
- locked = 1
countdown.start()
- eject_wait = 1
- spawn(30)
- eject_wait = 0
-
if(!R.dna)
R.dna = new /datum/dna()
@@ -246,9 +254,24 @@
for(var/datum/language/L in R.languages)
H.add_language(L.name)
+ domutcheck(H, null, MUTCHK_FORCED) //Ensures species that get powers by the species proc handle_dna keep them
+
+ if(efficiency > 2 && efficiency < 5 && prob(25))
+ randmutb(H)
+ if(efficiency > 5 && prob(20))
+ randmutg(H)
+ if(efficiency < 3 && prob(50))
+ randmutb(H)
+
+ H.dna.UpdateSE()
+ H.dna.UpdateUI()
+
+ H.sync_organ_dna(1) // It's literally a fresh body as you can get, so all organs properly belong to it
+ H.UpdateAppearance()
+
+ check_brine()
//Get the clone body ready
- H.adjustCloneLoss(190) //new damage var so you can't eject a clone early then stab them to abuse the current damage system --NeoFite
- H.adjustBrainLoss(90) // The rand(10, 30) will come out as extra brain damage
+ maim_clone(H)
H.Paralyse(4)
//Here let's calculate their health so the pod doesn't immediately eject them!!!
@@ -266,21 +289,6 @@
beginning to regenerate in a cloning pod. You will
become conscious when it is complete."})
- domutcheck(H, null, MUTCHK_FORCED) //Ensures species that get powers by the species proc handle_dna keep them
-
- if(efficiency > 2 && efficiency < 5 && prob(25))
- randmutb(H)
- if(efficiency > 5 && prob(20))
- randmutg(H)
- if(efficiency < 3 && prob(50))
- randmutb(H)
-
- H.dna.UpdateSE()
- H.dna.UpdateUI()
-
- H.sync_organ_dna(1) // It's literally a fresh body as you can get, so all organs properly belong to it
- H.UpdateAppearance()
-
update_icon()
H.suiciding = 0
@@ -299,13 +307,11 @@
if(stat & NOPOWER) //Autoeject if power is lost
if(occupant)
- locked = 0
go_out()
connected_message("Clone Ejected: Loss of power.")
else if((occupant) && (occupant.loc == src))
if((occupant.stat == DEAD) || (occupant.suiciding)) //Autoeject corpses and suiciding dudes.
- locked = 0
announce_radio_message("The cloning of [occupant] has been aborted due to unrecoverable tissue failure.")
go_out()
connected_message("Clone Rejected: Deceased.")
@@ -316,34 +322,43 @@
//Slowly get that clone healed and finished.
occupant.adjustCloneLoss(-((speed_coeff/2)))
+ // For human species that lack non-vital parts for some weird reason
+ if(organs_number)
+ var/progress = CLONE_INITIAL_DAMAGE - occupant.getCloneLoss()
+ progress += (100 - MINIMUM_HEAL_LEVEL)
+ var/milestone = CLONE_INITIAL_DAMAGE / organs_number
+// Doing this as a #define so that the value can change when evaluated multiple times
+#define INSTALLED (organs_number - LAZYLEN(missing_organs))
+
+ while((progress / milestone) > INSTALLED && LAZYLEN(missing_organs))
+ var/obj/item/organ/I = pick_n_take(missing_organs)
+ I.replaced(occupant)
+
+#undef INSTALLED
+
//Premature clones may have brain damage.
occupant.adjustBrainLoss(-((speed_coeff/20)*efficiency))
- //So clones don't die of oxyloss in a running pod.
- if(occupant.reagents.get_reagent_amount("salbutamol") < 5)
- occupant.reagents.add_reagent("salbutamol", 5)
+ check_brine()
//Also heal some oxyloss ourselves just in case!!
occupant.adjustOxyLoss(-4)
use_power(7500) //This might need tweaking.
- else if((occupant.cloneloss <= (100 - heal_level)) && (!eject_wait))
+ else if((occupant.cloneloss <= (100 - heal_level)))
connected_message("Cloning Process Complete.")
announce_radio_message("The cloning cycle of [occupant] is complete.")
- locked = 0
go_out()
else if((!occupant) || (occupant.loc != src))
occupant = null
- if(locked)
- locked = 0
update_icon()
use_power(200)
//Let's unlock this early I guess. Might be too early, needs tweaking.
/obj/machinery/clonepod/attackby(obj/item/weapon/W, mob/user, params)
- if(!(occupant || mess || locked))
+ if(!(occupant || mess))
if(default_deconstruction_screwdriver(user, "[icon_state]_maintenance", "[initial(icon_state)]", W))
return
@@ -357,14 +372,14 @@
if(!check_access(W))
to_chat(user, "Access Denied.")
return
- if (!locked || !occupant)
- return
- if(occupant.health < -20 && occupant.stat != DEAD)
- to_chat(user, "Access Refused. Patient status still unstable.")
+ if(!(occupant || mess))
+ to_chat(user, "Error: Pod has no occupant.")
return
else
- locked = 0
- to_chat(user, "System unlocked.")
+ connected_message("Authorized Ejection")
+ announce_radio_message("An authorized ejection of [occupant.real_name] has occured")
+ to_chat(user, "You force an emergency ejection.")
+ go_out()
//Removing cloning pod biomass
else if(istype(W, /obj/item/weapon/reagent_containers/food/snacks/meat))
@@ -374,7 +389,7 @@
qdel(W)
return
else if(istype(W, /obj/item/weapon/wrench))
- if(locked && (anchored || occupant))
+ if(occupant)
to_chat(user, "Can not do that while [src] is in use.")
else
if(anchored)
@@ -399,8 +414,6 @@
/obj/machinery/clonepod/emag_act(user)
if(isnull(occupant))
return
- to_chat(user, "You force an emergency ejection.")
- locked = 0
go_out()
/obj/machinery/clonepod/proc/update_clone_antag(var/mob/living/carbon/human/H)
@@ -435,21 +448,7 @@
connected.updateUsrDialog()
return 1
-/obj/machinery/clonepod/verb/eject()
- set name = "Eject Cloner"
- set category = "Object"
- set src in oview(1)
-
- if(!usr)
- return
- if(usr.incapacitated())
- return
- go_out()
- add_fingerprint(usr)
-
/obj/machinery/clonepod/proc/go_out()
- if(locked)
- return
countdown.stop()
if(mess) //Clean that mess and dump those gibs!
@@ -470,8 +469,11 @@
You feel like a new being.")
occupant.flash_eyes(visual = 1)
+ for(var/i in missing_organs)
+ qdel(i)
+ missing_organs.Cut()
occupant.forceMove(get_turf(src))
- eject_wait = 0 //If it's still set somehow.
+ occupant.update_body()
domutcheck(occupant) //Waiting until they're out before possible notransform.
occupant.shock_stage = 0 //Reset Shock
occupant = null
@@ -481,19 +483,24 @@
if(occupant)
connected_message("Critical Error!")
announce_radio_message("Critical error! Please contact a Thinktronic Systems technician, as your warranty may be affected.")
- mess = 1
- update_icon()
if(occupant.mind != clonemind)
clonemind.transfer_to(occupant)
occupant.grab_ghost() // We really just want to make you suffer.
to_chat(occupant, {"Agony blazes across your
consciousness as your body is torn apart.
Is this what dying is like? Yes it is."})
- playsound(loc, 'sound/machines/warning-buzzer.ogg', 50, 0)
occupant << sound('sound/hallucinations/veryfar_noise.ogg',0,1,50)
+ for(var/i in missing_organs)
+ qdel(i)
+ missing_organs.Cut()
spawn(40)
qdel(occupant)
+
+ playsound(loc, 'sound/machines/warning-buzzer.ogg', 50, 0)
+ mess = TRUE
+ update_icon()
+
/obj/machinery/clonepod/update_icon()
..()
icon_state = "pod_0"
@@ -535,6 +542,43 @@
else
return
+/obj/machinery/clonepod/proc/maim_clone(mob/living/carbon/human/H)
+ LAZYINITLIST(missing_organs)
+ for(var/i in missing_organs)
+ qdel(i)
+ missing_organs.Cut()
+
+ H.setCloneLoss(CLONE_INITIAL_DAMAGE)
+ H.setBrainLoss(BRAIN_INITIAL_DAMAGE)
+
+ for(var/o in H.internal_organs)
+ var/obj/item/organ/O = o
+ if(!istype(O) || O.vital)
+ continue
+
+ // Let's non-specially remove all non-vital organs
+ // What could possibly go wrong
+ var/obj/item/I = O.remove(H)
+ // Make this support stuff that turns into items when removed
+ I.forceMove(src)
+ missing_organs += I
+
+ var/static/list/zones = list("r_arm", "l_arm", "r_leg", "l_leg")
+ for(var/zone in zones)
+ var/obj/item/organ/external/E = H.get_organ(zone)
+ var/obj/item/I = E.remove(H)
+ I.forceMove(src)
+ missing_organs += I
+
+ organs_number = LAZYLEN(missing_organs)
+
+/obj/machinery/clonepod/proc/check_brine()
+ // Clones are in a pickled bath of mild chemicals, keeping
+ // them alive, despite their lack of internal organs
+ for(var/bt in brine_types)
+ if(occupant.reagents.get_reagent_amount(bt) < 1)
+ occupant.reagents.add_reagent(bt, 1)
+
/*
* Diskette Box
*/
@@ -586,3 +630,5 @@
if(istype(A, /obj/machinery/clonepod))
A:malfunction()
*/
+
+#undef MINIMUM_HEAL_LEVEL
diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm
index ee307dd84d5..5f72dab528c 100644
--- a/code/game/machinery/computer/cloning.dm
+++ b/code/game/machinery/computer/cloning.dm
@@ -310,6 +310,7 @@
temp = "Error: No cloning pod detected."
else
var/obj/machinery/clonepod/pod = selected_pod
+ var/cloneresult
if(!selected_pod)
temp = "Error: No cloning pod selected."
else if(pod.occupant)
@@ -320,13 +321,16 @@
temp = "Error: The cloning pod is malfunctioning."
else if(!config.revival_cloning)
temp = "Error: Unable to initiate cloning cycle."
- else if(pod.growclone(C))
- temp = "Initiating cloning cycle..."
- records.Remove(C)
- qdel(C)
- menu = 1
else
- temp = "[C.name] => Initialisation failure."
+ cloneresult = pod.growclone(C)
+ if(cloneresult)
+ if(cloneresult > 0)
+ temp = "Initiating cloning cycle..."
+ records.Remove(C)
+ qdel(C)
+ menu = 1
+ else
+ temp = "[C.name] => Initialisation failure."
else
temp = "Error: Data corruption."
diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm
index ca4da5b2107..8c747a26d97 100644
--- a/code/game/objects/items/devices/scanners.dm
+++ b/code/game/objects/items/devices/scanners.dm
@@ -240,7 +240,7 @@ REAGENT SCANNER
if(H.species.exotic_blood)
user.show_message("Subject possesses exotic blood.")
user.show_message("Exotic blood type: [blood_type].")
- if(H.heart_attack && H.stat != DEAD)
+ if(H.undergoing_cardiac_arrest() && H.stat != DEAD)
user.show_message("Subject suffering from heart attack: Apply defibrillator immediately.")
user.show_message("Subject's pulse: [H.get_pulse(GETPULSE_TOOL)] bpm.")
var/implant_detect
diff --git a/code/game/objects/items/weapons/defib.dm b/code/game/objects/items/weapons/defib.dm
index 5d0dcebcacc..e332011d2ee 100644
--- a/code/game/objects/items/weapons/defib.dm
+++ b/code/game/objects/items/weapons/defib.dm
@@ -330,8 +330,8 @@
H.updatehealth() //forces health update before next life tick
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
H.emote("gasp")
- if(!H.heart_attack && (prob(10) || defib.combat)) // Your heart explodes.
- H.heart_attack = 1
+ if(!H.undergoing_cardiac_arrest() && (prob(10) || defib.combat)) // Your heart explodes.
+ H.set_heartattack(TRUE)
add_logs(user, M, "stunned", object="defibrillator")
defib.deductcharge(revivecost)
cooldown = 1
@@ -368,7 +368,7 @@
busy = 0
update_icon()
return
- if(H.heart_attack)
+ if(H.undergoing_cardiac_arrest())
if(!H.get_int_organ(/obj/item/organ/internal/heart) && !H.get_int_organ(/obj/item/organ/internal/brain/slime)) //prevents defibing someone still alive suffering from a heart attack attack if they lack a heart
user.visible_message("[defib] buzzes: Resuscitation failed - Failed to pick up any heart electrical activity.")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
@@ -376,7 +376,7 @@
update_icon()
return
else
- H.heart_attack = 0
+ H.set_heartattack(FALSE)
user.visible_message("[defib] pings: Cardiac arrhythmia corrected.")
M.visible_message("[M]'s body convulses a bit.")
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
@@ -474,8 +474,8 @@
H.adjustStaminaLoss(50)
H.Weaken(5)
H.updatehealth() //forces health update before next life tick
- if(!H.heart_attack && prob(10)) // Your heart explodes.
- H.heart_attack = 1
+ if(!H.undergoing_cardiac_arrest() && prob(10)) // Your heart explodes.
+ H.set_heartattack(TRUE)
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
H.emote("gasp")
add_logs(user, M, "stunned", object="defibrillator")
diff --git a/code/modules/mob/living/carbon/carbon_defines.dm b/code/modules/mob/living/carbon/carbon_defines.dm
index e900fc10517..6e34291caae 100644
--- a/code/modules/mob/living/carbon/carbon_defines.dm
+++ b/code/modules/mob/living/carbon/carbon_defines.dm
@@ -20,7 +20,6 @@
var/pulse = PULSE_NORM //current pulse level
- var/heart_attack = 0
var/wetlevel = 0 //how wet the mob is
var/oxygen_alert = 0
@@ -29,4 +28,4 @@
var/fire_alert = 0
var/failed_last_breath = 0 //This is used to determine if the mob failed a breath. If they did fail a brath, they will attempt to breathe each tick, otherwise just once per 4 ticks.
- var/co2overloadtime = null
\ No newline at end of file
+ var/co2overloadtime = null
diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm
index b3580778d22..69e86de81e6 100644
--- a/code/modules/mob/living/carbon/human/death.dm
+++ b/code/modules/mob/living/carbon/human/death.dm
@@ -99,7 +99,7 @@
stat = DEAD
SetDizzy(0)
SetJitter(0)
- heart_attack = 0
+ set_heartattack(FALSE)
//Handle species-specific deaths.
if(species) species.handle_death(src)
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 887798bd1c3..000a7a52bd0 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -683,9 +683,9 @@
if(species)
species_siemens_coeff = species.siemens_coeff
siemens_coeff = gloves_siemens_coeff * species_siemens_coeff
- if(heart_attack)
+ if(undergoing_cardiac_arrest())
if(shock_damage * siemens_coeff >= 1 && prob(25))
- heart_attack = 0
+ set_heartattack(FALSE)
if(stat == CONSCIOUS)
to_chat(src, "You feel your heart beating again!")
. = ..()
diff --git a/code/modules/mob/living/carbon/human/human_organs.dm b/code/modules/mob/living/carbon/human/human_organs.dm
index 5ae7547be58..24ed336a4a3 100644
--- a/code/modules/mob/living/carbon/human/human_organs.dm
+++ b/code/modules/mob/living/carbon/human/human_organs.dm
@@ -65,7 +65,8 @@
stance_damage = 0
// Buckled to a bed/chair. Stance damage is forced to 0 since they're sitting on something solid
- if(istype(buckled, /obj/structure/stool/bed))
+ // Not standing, so no need to care about stance
+ if(istype(buckled, /obj/structure/stool/bed) || !isturf(loc))
return
for(var/limb_tag in list("l_leg","r_leg","l_foot","r_foot"))
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index be265669b79..b9ce09f88a9 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -1032,7 +1032,7 @@
if(stat == DEAD)
return PULSE_NONE //that's it, you're dead, nothing can influence your pulse
- if(heart_attack)
+ if(undergoing_cardiac_arrest())
return PULSE_NONE
var/temp = PULSE_NORM
@@ -1175,14 +1175,37 @@
return stuttering
+
+/mob/living/carbon/human/proc/can_heartattack()
+ if(species.flags & NO_BLOOD)
+ return FALSE
+ return TRUE
+
+/mob/living/carbon/human/proc/undergoing_cardiac_arrest()
+ if(!can_heartattack())
+ return FALSE
+ var/obj/item/organ/internal/heart/heart = get_int_organ(/obj/item/organ/internal/heart)
+ if(istype(heart) && heart.beating)
+ return FALSE
+ return TRUE
+
+/mob/living/carbon/human/proc/set_heartattack(status)
+ if(!can_heartattack())
+ return FALSE
+
+ var/obj/item/organ/internal/heart/heart = get_int_organ(/obj/item/organ/internal/heart)
+ if(!istype(heart))
+ return FALSE
+
+ heart.beating = !status
+
/mob/living/carbon/human/proc/handle_heartattack()
- if(!heart_attack)
+ if(!can_heartattack() || !undergoing_cardiac_arrest() || reagents.has_reagent("corazone"))
return
- else
- AdjustLoseBreath(2, bound_lower = 0, bound_upper = 3)
- adjustOxyLoss(5)
- Paralyse(4)
- adjustBruteLoss(2)
+ AdjustLoseBreath(2, bound_lower = 0, bound_upper = 3)
+ adjustOxyLoss(5)
+ Paralyse(4)
+ adjustBruteLoss(2)
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index b8a5284072d..5e1dab9874b 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -492,7 +492,6 @@
if(iscarbon(src))
var/mob/living/carbon/C = src
C.handcuffed = initial(C.handcuffed)
- C.heart_attack = 0
for(var/datum/disease/D in C.viruses)
D.cure(0)
@@ -500,6 +499,7 @@
// restore all of the human's blood and reset their shock stage
if(ishuman(src))
human_mob = src
+ human_mob.set_heartattack(FALSE)
human_mob.restore_blood()
human_mob.shock_stage = 0
human_mob.decaylevel = 0
diff --git a/code/modules/reagents/chemistry/reagents/disease.dm b/code/modules/reagents/chemistry/reagents/disease.dm
index f9fbf930e3e..7db78883e90 100644
--- a/code/modules/reagents/chemistry/reagents/disease.dm
+++ b/code/modules/reagents/chemistry/reagents/disease.dm
@@ -141,11 +141,11 @@
can_synth = 0
/datum/reagent/concentrated_initro/on_mob_life(mob/living/M)
- if(volume >=5)
+ if(volume >= 5)
if(ishuman(M))
var/mob/living/carbon/human/H = M
- if(!H.heart_attack)
- H.heart_attack = 1 // rip in pepperoni
+ if(!H.undergoing_cardiac_arrest())
+ H.set_heartattack(TRUE) // rip in pepperoni
//virus foods
@@ -183,4 +183,4 @@
/datum/reagent/plasma_dust/plasmavirusfood/weak
name = "weakened virus plasma"
id = "weakplasmavirusfood"
- color = "#CEC3C6" // rgb: 206,195,198
\ No newline at end of file
+ color = "#CEC3C6" // rgb: 206,195,198
diff --git a/code/modules/reagents/chemistry/reagents/food.dm b/code/modules/reagents/chemistry/reagents/food.dm
index 082b6496357..a18f1c01c42 100644
--- a/code/modules/reagents/chemistry/reagents/food.dm
+++ b/code/modules/reagents/chemistry/reagents/food.dm
@@ -772,8 +772,8 @@
M.Weaken(1)
if(ishuman(M))
var/mob/living/carbon/human/H = M
- if(!H.heart_attack)
- H.heart_attack = 1
+ if(!H.undergoing_cardiac_arrest())
+ H.set_heartattack(TRUE)
..()
/datum/reagent/fungus
@@ -847,7 +847,7 @@
if(volume >= 5 && !istype(T, /turf/space))
new /obj/effect/decal/cleanable/vomit/green(T)
playsound(T, 'sound/effects/splat.ogg', 50, 1, -3)
-
+
////Lavaland Flora Reagents////
/datum/reagent/consumable/entpoly
@@ -878,7 +878,7 @@
if(!light_activated)
M.set_light(2)
light_activated = 1
- ..()
+ ..()
/datum/reagent/consumable/tinlux/on_mob_delete(mob/living/M)
M.set_light(0)
@@ -894,4 +894,4 @@
if(prob(80))
M.adjustBruteLoss(-1 * REAGENTS_EFFECT_MULTIPLIER)
M.adjustFireLoss(-1 * REAGENTS_EFFECT_MULTIPLIER)
- ..()
\ No newline at end of file
+ ..()
diff --git a/code/modules/reagents/chemistry/reagents/medicine.dm b/code/modules/reagents/chemistry/reagents/medicine.dm
index a8fcf888318..452f9f6d2ff 100644
--- a/code/modules/reagents/chemistry/reagents/medicine.dm
+++ b/code/modules/reagents/chemistry/reagents/medicine.dm
@@ -1023,3 +1023,11 @@
/datum/reagent/medicine/earthsblood/overdose_process(mob/living/M)
M.SetHallucinate(min(max(0, M.hallucination + 10), 50))
M.adjustToxLoss(5 * REAGENTS_EFFECT_MULTIPLIER)
+
+/datum/reagent/medicine/corazone
+ name = "Corazone"
+ id = "corazone"
+ description = "A medication used to treat pain, fever, and inflammation, along with heart attacks."
+ color = "#F5F5F5"
+
+// This reagent's effects are handled in heart attack handling code
diff --git a/code/modules/reagents/chemistry/reagents/toxins.dm b/code/modules/reagents/chemistry/reagents/toxins.dm
index 8fabc46db00..40d9cb1c481 100644
--- a/code/modules/reagents/chemistry/reagents/toxins.dm
+++ b/code/modules/reagents/chemistry/reagents/toxins.dm
@@ -648,8 +648,8 @@
M.Weaken(2)
if(ishuman(M))
var/mob/living/carbon/human/H = M
- if(!H.heart_attack)
- H.heart_attack = 1 // rip in pepperoni
+ if(!H.undergoing_cardiac_arrest())
+ H.set_heartattack(TRUE) // rip in pepperoni
..()
/datum/reagent/pancuronium
@@ -1090,4 +1090,4 @@
shock_timer = 0
M.electrocute_act(rand(5,20), "Teslium in their body", 1, 1) //Override because it's caused from INSIDE of you
playsound(M, "sparks", 50, 1)
- ..()
\ No newline at end of file
+ ..()
diff --git a/code/modules/reagents/chemistry/recipes/medicine.dm b/code/modules/reagents/chemistry/recipes/medicine.dm
index 1c22693513f..31547e10c44 100644
--- a/code/modules/reagents/chemistry/recipes/medicine.dm
+++ b/code/modules/reagents/chemistry/recipes/medicine.dm
@@ -271,4 +271,11 @@
required_reagents = list("ethanol" = 1, "copper" = 1, "silver" = 1)
result_amount = 3
min_temp = 370
- mix_message = "The solution gently swirls with a metallic sheen."
\ No newline at end of file
+ mix_message = "The solution gently swirls with a metallic sheen."
+
+/datum/chemical_reaction/corazone
+ name = "Corazone"
+ id = "corazone"
+ result = "corazone"
+ result_amount = 3
+ required_reagents = list("phenol" = 2, "lithium" = 1)
diff --git a/code/modules/research/xenoarchaeology/genetics/reconstitutor.dm b/code/modules/research/xenoarchaeology/genetics/reconstitutor.dm
index 2cacdc4801e..a4a52b3ea5f 100644
--- a/code/modules/research/xenoarchaeology/genetics/reconstitutor.dm
+++ b/code/modules/research/xenoarchaeology/genetics/reconstitutor.dm
@@ -191,7 +191,6 @@ datum/genesequence
visible_message("[bicon(src)] [src] clones something from a reconstituted gene sequence!")
playsound(src.loc, 'sound/effects/screech.ogg', 50, 1, -3)
pod1.occupant = new cloned_genesequence.spawned_type(pod1)
- pod1.locked = 1
pod1.icon_state = "pod_1"
//pod1.occupant.name = "[pod1.occupant.name] ([rand(0,999)])"
pod1.biomass -= CLONE_BIOMASS
diff --git a/code/modules/surgery/organs/augments_internal.dm b/code/modules/surgery/organs/augments_internal.dm
index ffd0b4f0b1e..278941d87e4 100644
--- a/code/modules/surgery/organs/augments_internal.dm
+++ b/code/modules/surgery/organs/augments_internal.dm
@@ -249,9 +249,9 @@
if(istype(owner, /mob/living/carbon/human))
var/mob/living/carbon/human/H = owner
if(H.stat != DEAD && prob(50 / severity))
- H.heart_attack = 1
+ H.set_heartattack(TRUE)
spawn(600 / severity)
- H.heart_attack = 0
+ H.set_heartattack(FALSE)
if(H.stat == CONSCIOUS)
to_chat(H, "You feel your heart beating again!")
diff --git a/code/modules/surgery/organs/organ.dm b/code/modules/surgery/organs/organ.dm
index 1af9e92b233..045e34ea41e 100644
--- a/code/modules/surgery/organs/organ.dm
+++ b/code/modules/surgery/organs/organ.dm
@@ -294,7 +294,7 @@ var/list/organ_cache = list()
/obj/item/organ/internal/heart/emp_act(intensity)
if(owner && robotic == 2)
- owner.heart_attack = 1
+ Stop() // In the name of looooove~!
owner.visible_message("[owner] clutches their chest and gasps!","You clutch your chest in pain!")
else if(owner && robotic == 1)
take_damage(11,1)
@@ -324,18 +324,8 @@ var/list/organ_cache = list()
owner = null
return src
-/obj/item/organ/proc/replaced(var/mob/living/carbon/human/target,var/obj/item/organ/external/affected)
-
- if(!istype(target)) return
-
- owner = target
- processing_objects -= src
- affected.internal_organs |= src
- if(!target.get_int_organ(src))
- target.internal_organs += src
- loc = target
- if(robotic)
- status |= ORGAN_ROBOT
+/obj/item/organ/proc/replaced(var/mob/living/carbon/human/target)
+ return // Nothing uses this, it is always overridden
/obj/item/organ/proc/surgeryize()
diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm
index 7bea9c480af..ae421c98025 100644
--- a/code/modules/surgery/organs/organ_internal.dm
+++ b/code/modules/surgery/organs/organ_internal.dm
@@ -69,9 +69,8 @@
A.Remove(M)
return src
-/obj/item/organ/internal/replaced(var/mob/living/carbon/human/target,var/obj/item/organ/external/affected)
+/obj/item/organ/internal/replaced(var/mob/living/carbon/human/target)
insert(target)
- ..()
/obj/item/organ/internal/item_action_slot_check(slot, mob/user)
return
@@ -155,11 +154,9 @@
. = ..()
if(ishuman(M))
var/mob/living/carbon/human/H = M
- if(H.stat == DEAD || H.heart_attack)
+ if(H.stat == DEAD)
Stop()
return
- if(!special)
- H.heart_attack = 1
spawn(120)
if(!owner)
@@ -173,15 +170,6 @@
if(!owner)
Stop()
-
-/obj/item/organ/internal/heart/insert(mob/living/carbon/M, special = 0)
- ..()
- if(ishuman(M) && beating)
- var/mob/living/carbon/human/H = M
- if(H.heart_attack)
- H.heart_attack = 0
- return
-
/obj/item/organ/internal/heart/proc/Stop()
beating = 0
update_icon()