mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +01:00
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:
@@ -389,22 +389,22 @@
|
||||
if (blood_type.restoration_chem == /datum/reagent/iron)
|
||||
recommendation += "[/datum/reagent/medicine/salglu_solution::name]"
|
||||
if (length(recommendation))
|
||||
recommendation += "[blood_type.get_blood_name()] transufion"
|
||||
recommendation += "[blood_type.get_blood_name()] transfusion"
|
||||
else
|
||||
recommendation += "immediate [blood_type.get_blood_name()] transufion"
|
||||
recommendation += "immediate [blood_type.get_blood_name()] transfusion"
|
||||
level_format = conditional_tooltip(level_format, "Recommendation: [english_list(recommendation, and_text = " or ")].", tochat)
|
||||
else
|
||||
level_format = "[blood_percent]%, [cached_blood_volume] cl"
|
||||
|
||||
if (blood_type.get_type())
|
||||
blood_type_format = "type: [blood_type.get_type()]"
|
||||
blood_type_format = "[blood_type.get_type()]"
|
||||
if(tochat && length(blood_type.compatible_types))
|
||||
var/list/compatible_types_readable = list()
|
||||
for(var/datum/blood_type/comp_blood_type as anything in blood_type.compatible_types)
|
||||
compatible_types_readable |= initial(comp_blood_type.name)
|
||||
blood_type_format = span_tooltip("Can receive from types [english_list(compatible_types_readable)].", blood_type_format)
|
||||
|
||||
render_list += "<span class='[cached_blood_volume < BLOOD_VOLUME_SAFE ? "alert" : "info"] ml-1'>[blood_type.get_blood_name()] level: [level_format],</span> <span class='info'>[blood_type_format]</span><br>"
|
||||
render_list += "<span class='[cached_blood_volume < BLOOD_VOLUME_SAFE ? "alert" : "info"] ml-1'>[blood_type.get_blood_name()] level: [level_format]</span> <span class='info'>[blood_type_format]</span><br>"
|
||||
|
||||
var/blood_alcohol_content = target.get_blood_alcohol_content()
|
||||
if(blood_alcohol_content > 0)
|
||||
@@ -414,6 +414,27 @@
|
||||
else
|
||||
render_list += "<span class='info ml-1'>[blood_type?.get_blood_name() || "Blood"] alcohol content: [blood_alcohol_content]%</span><br>"
|
||||
|
||||
// Ethereal Charge
|
||||
if(istype(target.get_organ_slot(ORGAN_SLOT_STOMACH), /obj/item/organ/stomach/ethereal))
|
||||
var/obj/item/organ/stomach/ethereal/battery_stomach = target.get_organ_slot(ORGAN_SLOT_STOMACH)
|
||||
var/charge = battery_stomach.cell.charge
|
||||
var/charge_dangerous = charge > ETHEREAL_CHARGE_FULL || charge < ETHEREAL_CHARGE_LOWPOWER
|
||||
var/charge_format = "[display_power(charge)] / [display_power(ETHEREAL_CHARGE_FULL)]"
|
||||
|
||||
if(charge_dangerous)
|
||||
var/recommendation = "Recommendation: "
|
||||
switch(charge)
|
||||
if(-INFINITY to ETHEREAL_CHARGE_LOWPOWER)
|
||||
recommendation += "charging by LE-fortified food"
|
||||
if(ETHEREAL_CHARGE_FULL to ETHEREAL_CHARGE_OVERLOAD)
|
||||
recommendation += "discharge into nearest undercapacity APC"
|
||||
if(ETHEREAL_CHARGE_OVERLOAD to ETHEREAL_CHARGE_DANGEROUS)
|
||||
recommendation += "preparation for violent electrocardiac discharge event"
|
||||
recommendation = uppertext(recommendation)
|
||||
charge_format = span_tooltip("[recommendation] followed with toxins treatment.", charge_format)
|
||||
|
||||
render_list += "<span class='[charge_dangerous ? "alert" : "info"] ml-1'>Electrical charge: [charge_format]</span><br>"
|
||||
|
||||
//Diseases
|
||||
var/disease_hr = FALSE
|
||||
for(var/datum/disease/disease as anything in target.diseases)
|
||||
|
||||
Reference in New Issue
Block a user