mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-31 09:00:25 +01:00
Microbattery Asystole (#11519)
This commit is contained in:
@@ -224,9 +224,9 @@
|
||||
/mob/living/carbon/human/is_asystole()
|
||||
if(isSynthetic())
|
||||
var/obj/item/organ/internal/cell/C = internal_organs_by_name[BP_CELL]
|
||||
if(istype(C))
|
||||
if(!C.is_usable() || !C.percent())
|
||||
return TRUE
|
||||
if(istype(C) && C.is_usable() && C.percent())
|
||||
return FALSE
|
||||
return TRUE
|
||||
else if(should_have_organ(BP_HEART))
|
||||
var/obj/item/organ/internal/heart/heart = internal_organs_by_name[BP_HEART]
|
||||
if(!istype(heart) || !heart.is_working())
|
||||
|
||||
@@ -742,7 +742,7 @@
|
||||
if (species.tail)
|
||||
animate_tail_reset()
|
||||
if(prob(2) && is_asystole() && isSynthetic())
|
||||
visible_message("<b>[src]</b> [pick("emits low pitched whirr","beeps urgently")]")
|
||||
visible_message("<b>[src]</b> [pick("emits low pitched whirr","beeps urgently")].")
|
||||
|
||||
if(paralysis)
|
||||
AdjustParalysis(-1)
|
||||
@@ -957,7 +957,7 @@
|
||||
|
||||
if(isSynthetic())
|
||||
var/obj/item/organ/internal/cell/IC = internal_organs_by_name[BP_CELL]
|
||||
if (istype(IC))
|
||||
if(istype(IC) && IC.is_usable())
|
||||
var/chargeNum = Clamp(Ceiling(IC.percent()/25), 0, 4) //0-100 maps to 0-4, but give it a paranoid clamp just in case.
|
||||
cells.icon_state = "charge[chargeNum]"
|
||||
else
|
||||
@@ -1073,16 +1073,22 @@
|
||||
/mob/living/carbon/human/proc/handle_shock()
|
||||
if(status_flags & GODMODE)
|
||||
return 0
|
||||
var/is_asystole = is_asystole()
|
||||
if(is_asystole && isSynthetic())
|
||||
if(!lying && !buckled_to)
|
||||
to_chat(src, SPAN_WARNING("You don't have enough energy to function!"))
|
||||
Paralyse(3)
|
||||
return
|
||||
if(!can_feel_pain())
|
||||
return
|
||||
|
||||
if(is_asystole())
|
||||
if(is_asystole)
|
||||
shock_stage = max(shock_stage + 1, 61)
|
||||
|
||||
var/traumatic_shock = get_shock()
|
||||
if(traumatic_shock >= max(30, 0.8*shock_stage))
|
||||
shock_stage += 1
|
||||
else if (!is_asystole())
|
||||
else if (!is_asystole)
|
||||
shock_stage = min(shock_stage, 160)
|
||||
var/recovery = 1
|
||||
if(traumatic_shock < 0.5 * shock_stage) //lower shock faster if pain is gone completely
|
||||
|
||||
Reference in New Issue
Block a user