mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 10:33:30 +01:00
Merge pull request #6612 from Crazylemon64/partial_cloning
Cloning now puts you together bit by bit
This commit is contained in:
@@ -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
|
||||
var/co2overloadtime = null
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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, "<span class='notice'>You feel your heart beating again!</span>")
|
||||
. = ..()
|
||||
|
||||
@@ -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"))
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
color = "#CEC3C6" // rgb: 206,195,198
|
||||
|
||||
@@ -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)
|
||||
..()
|
||||
..()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
..()
|
||||
..()
|
||||
|
||||
@@ -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."
|
||||
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)
|
||||
|
||||
@@ -191,7 +191,6 @@ datum/genesequence
|
||||
visible_message("<span class='notice'>[bicon(src)] [src] clones something from a reconstituted gene sequence!</span>")
|
||||
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
|
||||
|
||||
@@ -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, "<span class='notice'>You feel your heart beating again!</span>")
|
||||
|
||||
|
||||
@@ -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("<span class='danger'>[owner] clutches their chest and gasps!</span>","<span class='userdanger'>You clutch your chest in pain!</span>")
|
||||
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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user