Datumizes microbatteries (#26900)

* Datumize microbattery

* comments + feedback when you're revivable

* More comment

* more datumization

* Explaining myself

* Being able to charge while not having a microbattery

* Better comment

Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com>
Signed-off-by: BiancaWilkson <42818125+BiancaWilkson@users.noreply.github.com>

* Changes proc name to be more accurate

---------

Signed-off-by: BiancaWilkson <42818125+BiancaWilkson@users.noreply.github.com>
Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com>
This commit is contained in:
BiancaWilkson
2024-10-18 19:30:04 -04:00
committed by GitHub
parent 20dfb3af69
commit 074da2b796
12 changed files with 31 additions and 16 deletions
@@ -6,7 +6,7 @@
death()
create_debug_log("died of damage, trigger reason: [reason]")
return
if(HAS_TRAIT(src, TRAIT_KNOCKEDOUT) || (check_death_method() && getOxyLoss() > 50) || HAS_TRAIT(src, TRAIT_FAKEDEATH) || health < HEALTH_THRESHOLD_KNOCKOUT && check_death_method() || health <= HEALTH_THRESHOLD_DEAD)
if(HAS_TRAIT(src, TRAIT_KNOCKEDOUT) || (check_death_method() && getOxyLoss() > 50) || HAS_TRAIT(src, TRAIT_FAKEDEATH) || health < HEALTH_THRESHOLD_KNOCKOUT && check_death_method() || health <= HEALTH_THRESHOLD_DEAD) // In case anyone is wondering where oldcrit is handled, it's here.
if(stat == CONSCIOUS)
KnockOut()
create_debug_log("fell unconscious, trigger reason: [reason]")
@@ -3,10 +3,14 @@
return
..(reason)
if(stat == DEAD)
if(dna.species && dna.species.can_revive_by_healing)
if(dna.species && dna.species.can_revive_by_healing) // Here's where IPC revival is handled
var/obj/item/organ/internal/brain/B = get_int_organ(/obj/item/organ/internal/brain)
if(B)
if((health >= (HEALTH_THRESHOLD_DEAD + HEALTH_THRESHOLD_CRIT) * 0.5) && check_vital_organs() && !suiciding)
if((health >= (HEALTH_THRESHOLD_DEAD + HEALTH_THRESHOLD_CRIT) * 0.5) && ipc_vital_organ_check() && !suiciding)
var/mob/dead/observer/ghost = get_ghost()
if(ghost)
to_chat(ghost, "<span class='ghostalert'>Your chassis has been repaired and repowered, re-enter if you want to continue playing!</span> (Verbs -> Ghost -> Re-enter corpse)")
SEND_SOUND(ghost, sound('sound/effects/genetics.ogg'))
update_revive()
create_debug_log("revived from healing, trigger reason: [reason]")