Merge pull request #6612 from Crazylemon64/partial_cloning

Cloning now puts you together bit by bit
This commit is contained in:
Fox McCloud
2017-05-27 14:48:23 -04:00
committed by GitHub
21 changed files with 211 additions and 134 deletions
@@ -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"))
+30 -7
View File
@@ -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)
+1 -1
View File
@@ -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