Adds charge checking interactions to ethereals (#96904)

## About The Pull Request
This PR adjusts the ethereal stomach equivalent (biological batteries)
such that they provide their charge whenever either they or their mob
owner get hit by a multitool. This is formatted in the exact same way as
seen when multitooling a cable. A tip of the round indicates that this
is possible.

Additionally, health analyzers will show stomach charge as well. While
coding this I made a couple of slight adjustments to the nearby blood
level formatting for spelling and a (sometimes) stray comma. In effect
this makes it go from displaying "Blood level: 100%, 560 cl, <ins>type:
O+</ins>" to "Blood level: 100%, 560 cl <ins>O+</ins>" (with the
underlining being a tooltip).
## Why It's Good For The Game
To my knowledge, there is currently no way to get the exact and
quantified charge of an ethereal. This makes it difficult for anyone
healing an ethereal to definitively tell whether toxins damage is from a
lack/excess of charge or some other source.

Aside from that, it's also just mildly comedic to be able to check the
charge of a living entity in the exact same way as a piece of insulated
copper.
## Changelog
🆑
add: Health analyzers now display ethereal charge.
add: It is also possible to check the charge of an ethereal (or their
stomach equivalent) with a multitool.
/🆑
This commit is contained in:
QuiteLiterallyAnything
2026-07-13 20:56:18 -06:00
committed by GitHub
parent 1c4503b802
commit 9459c2d9d6
3 changed files with 46 additions and 4 deletions
@@ -25,11 +25,13 @@
. = ..()
RegisterSignal(stomach_owner, COMSIG_PROCESS_BORGCHARGER_OCCUPANT, PROC_REF(charge))
RegisterSignal(stomach_owner, COMSIG_LIVING_ELECTROCUTE_ACT, PROC_REF(on_electrocute))
RegisterSignal(stomach_owner, COMSIG_ATOM_TOOL_ACT(TOOL_MULTITOOL), PROC_REF(on_multitool_act))
/obj/item/organ/stomach/ethereal/on_mob_remove(mob/living/carbon/stomach_owner)
. = ..()
UnregisterSignal(stomach_owner, COMSIG_PROCESS_BORGCHARGER_OCCUPANT)
UnregisterSignal(stomach_owner, COMSIG_LIVING_ELECTROCUTE_ACT)
UnregisterSignal(stomach_owner, COMSIG_ATOM_TOOL_ACT(TOOL_MULTITOOL))
stomach_owner.clear_mood_event("charge")
stomach_owner.clear_alert(ALERT_ETHEREAL_CHARGE)
stomach_owner.clear_alert(ALERT_ETHEREAL_OVERCHARGE)
@@ -49,6 +51,24 @@
adjust_charge(shock_damage * siemens_coeff * 2)
to_chat(owner, span_notice("You absorb some of the shock into your body!"))
/obj/item/organ/stomach/ethereal/proc/on_multitool_act(atom/source, mob/user, obj/item/tool)
SIGNAL_HANDLER
return multitool_act(user, tool)
/obj/item/organ/stomach/ethereal/multitool_act(mob/living/user, obj/item/tool)
. = ..()
// Intentionally formatted in the exact same way as multitooling a cable for comedic effect.
// It's as if the multitool is mistaking the ethereal/biological battery for a cable.
var/power_info
if(cell.charge > 0)
power_info = span_danger("Total power: [display_power(cell.charge)]\nLoad: [(owner && (owner.stat != DEAD)) ? display_power(ETHEREAL_DISCHARGE_RATE) : 0]\nExcess power: [display_power(max(0, (cell.charge - ETHEREAL_CHARGE_FULL)))]")
else
power_info = span_danger("The [owner ? owner.name : name] is not powered.")
to_chat(user, power_info)
return ITEM_INTERACT_SUCCESS
/**Changes the energy of the crystal stomach.
* Args:
* - amount: The change of the energy, in joules.