mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 19:17:50 +01:00
IPCs can die from low power (#22846)
* im so not full from electricity grrr * Update code/modules/mob/living/carbon/human/species/machine.dm whitespace fix Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * now its the microbattery dying * Update code/modules/mob/living/carbon/human/species/machine.dm Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> --------- Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
This commit is contained in:
co-authored by
Henri215
Contrabang
parent
a85d65d6d3
commit
b508640e39
@@ -247,7 +247,10 @@
|
||||
msg += "[p_they(TRUE)] look[p_s()] absolutely soaked.\n"
|
||||
|
||||
if(nutrition < NUTRITION_LEVEL_HYPOGLYCEMIA)
|
||||
msg += "[p_they(TRUE)] [p_are()] severely malnourished.\n"
|
||||
if(ismachineperson(src))
|
||||
msg += "[p_their(TRUE)] power indicator is flashing red.\n"
|
||||
else
|
||||
msg += "[p_they(TRUE)] [p_are()] severely malnourished.\n"
|
||||
|
||||
if(HAS_TRAIT(src, TRAIT_FAT))
|
||||
msg += "[p_they(TRUE)] [p_are()] morbidly obese.\n"
|
||||
|
||||
@@ -127,6 +127,28 @@
|
||||
H.update_hair()
|
||||
H.update_fhair()
|
||||
|
||||
/datum/species/machine/handle_life(mob/living/carbon/human/H) // Handles IPC starvation
|
||||
if(isLivingSSD(H)) // We don't want AFK people dying from this
|
||||
return
|
||||
if(H.nutrition >= NUTRITION_LEVEL_HYPOGLYCEMIA)
|
||||
return
|
||||
|
||||
var/obj/item/organ/internal/cell/microbattery = H.get_organ_slot("heart")
|
||||
if(!istype(microbattery)) //Maybe they're powered by an abductor gland or sheer force of will
|
||||
return
|
||||
if(prob(6))
|
||||
to_chat(H, "<span class='warning'>Error 74: Microbattery critical malfunction, likely cause: Extended strain.</span>")
|
||||
microbattery.receive_damage(4, TRUE)
|
||||
else if(prob(4))
|
||||
H.Weaken(6 SECONDS)
|
||||
H.Stuttering(20 SECONDS)
|
||||
to_chat(H, "<span class='warning'>Power critical, shutting down superfluous functions.</span>")
|
||||
H.emote("collapse")
|
||||
microbattery.receive_damage(2, TRUE)
|
||||
else if(prob(4))
|
||||
to_chat(H, "<span class='warning'>Redirecting excess power from servos to vital components.</span>")
|
||||
H.Slowed(rand(15 SECONDS, 32 SECONDS))
|
||||
|
||||
// Allows IPC's to change their monitor display
|
||||
/datum/action/innate/change_monitor
|
||||
name = "Change Monitor"
|
||||
|
||||
Reference in New Issue
Block a user