mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-30 16:38:22 +01:00
<img width="1549" height="857" alt="image" src="https://github.com/user-attachments/assets/3830233d-0635-4942-b2aa-024651e6cffa" /> Limbs make up roughly half of the "Per additional player" processing overhead, while Organs make up most of the other half. Not every organ is an easy candidate for "Event-only processing", but external limbs are significantly easier to do so. So this PR makes it so that External Limbs no longer require Processing unless an event happens that would justify them requiring processing. Which SIGNIFICANTLY reduces the overall additional cost to the Processing subsystem per player that joins the server. Oh and I also made the Appendix and Kidneys not require constant processing. The Appendix will only process if it is hit by an Appendicitis event, and the Kidneys will only process if they are either damaged, or you get poisoned.
76 lines
2.8 KiB
Plaintext
76 lines
2.8 KiB
Plaintext
/singleton/psionic_power/skinsight
|
|
name = "Skinsight"
|
|
desc = "Get information on a creature's vitals. Activate in your hand to switch between a normal mode or a slower, more detailed mode. Note that the body scan mode \
|
|
is not 100% accurate with the numbers given."
|
|
icon_state = "wiz_blind"
|
|
point_cost = 1
|
|
ability_flags = PSI_FLAG_EVENT|PSI_FLAG_CANON
|
|
spell_path = /obj/item/spell/skinsight
|
|
|
|
/obj/item/spell/skinsight
|
|
name = "skinsight"
|
|
desc = "A health analyzer, but cooler."
|
|
icon_state = "blink"
|
|
item_icons = null
|
|
cast_methods = CAST_MELEE|CAST_USE
|
|
aspect = ASPECT_PSIONIC
|
|
cooldown = 10
|
|
psi_cost = 10
|
|
var/body_scan_mode = FALSE
|
|
|
|
/obj/item/spell/skinsight/Initialize()
|
|
. = ..()
|
|
src.LoadComponent(/datum/component/health_analyzer)
|
|
|
|
/obj/item/spell/skinsight/on_use_cast(mob/user)
|
|
. = ..()
|
|
body_scan_mode = !body_scan_mode
|
|
if(body_scan_mode)
|
|
psi_cost = 30
|
|
to_chat(user, SPAN_NOTICE("You will now use more psionic energy for a more detailed readout."))
|
|
else
|
|
psi_cost = 10
|
|
to_chat(user, SPAN_NOTICE("You will now use less psionic energy for a more standard readout."))
|
|
|
|
/obj/item/spell/skinsight/on_melee_cast(atom/hit_atom, mob/living/user, def_zone)
|
|
if(!ishuman(hit_atom))
|
|
return
|
|
|
|
var/mob/living/carbon/human/target = hit_atom
|
|
if(!target.has_zona_bovinae())
|
|
to_chat(user, SPAN_WARNING("Psionic power cannot flow through this being."))
|
|
return
|
|
|
|
if(!isliving(user))
|
|
return
|
|
|
|
if(target.stat == DEAD)
|
|
to_chat(user, SPAN_WARNING("The total lack of psionic energy flowing through this person can only mean one thing: they are dead."))
|
|
return
|
|
|
|
. = ..()
|
|
if(!.)
|
|
return
|
|
|
|
if(!body_scan_mode)
|
|
user.visible_message(SPAN_NOTICE("[user] passes [user.get_pronoun("his")] hand over [target]."), SPAN_NOTICE("You pass your hand over [target]."))
|
|
var/datum/component/health_analyzer/h_analyzer = src.GetComponent(/datum/component/health_analyzer)
|
|
if(!h_analyzer)
|
|
return
|
|
h_analyzer.health_scan_mob(target, user, TRUE, FALSE)
|
|
else
|
|
user.visible_message(SPAN_NOTICE("[user] slowly passes [user.get_pronoun("his")] hand over [target]..."),
|
|
SPAN_NOTICE("You slowly pass your hand over [target]..."))
|
|
if(do_mob(user, target, 10 SECONDS))
|
|
for(var/obj/item/organ/internal/I in target.internal_organs)
|
|
if(I.is_bruised())
|
|
to_chat(user, SPAN_WARNING("You notice some irregularity in the psionic flow through their [I]."))
|
|
if(I.is_broken())
|
|
to_chat(user, SPAN_WARNING("Your psionic flow through their [I] is <b>highly irregular</b>."))
|
|
if(I.get_damage())
|
|
to_chat(user, SPAN_WARNING("You are sure there is some damage in their [I]."))
|
|
var/pulse = target.get_pulse()
|
|
to_chat(user, SPAN_NOTICE("Their pulse is [pulse]."))
|
|
var/oxygenation = max(min(target.get_blood_oxygenation() + rand(-10, 10), 100), 0)
|
|
to_chat(user, SPAN_NOTICE("Their oxygenation is more or less [oxygenation]%."))
|