mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-29 16:10:02 +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.
71 lines
2.9 KiB
Plaintext
71 lines
2.9 KiB
Plaintext
/singleton/psionic_power/mend
|
|
name = "Mend"
|
|
desc = "Mend a creature's wounds. This handles internal wounds as well, such as ruptured organs and broken bones."
|
|
icon_state = "tech_biomedaura"
|
|
point_cost = 2
|
|
ability_flags = PSI_FLAG_ANTAG
|
|
spell_path = /obj/item/spell/mend
|
|
|
|
/obj/item/spell/mend
|
|
name = "mend"
|
|
desc = "Clear!"
|
|
icon_state = "mend_wounds"
|
|
item_icons = null
|
|
cast_methods = CAST_MELEE
|
|
aspect = ASPECT_PSIONIC
|
|
cooldown = 50
|
|
psi_cost = 30
|
|
|
|
/obj/item/spell/mend/on_melee_cast(atom/hit_atom, mob/living/user, def_zone)
|
|
if(!ishuman(hit_atom))
|
|
return
|
|
|
|
var/mob/living/carbon/human/H = hit_atom
|
|
if(!H.has_zona_bovinae())
|
|
to_chat(user, SPAN_WARNING("Psionic power cannot flow through this being."))
|
|
return
|
|
|
|
if(H.stat == DEAD || H.status_flags & FAKEDEATH)
|
|
to_chat(user, SPAN_WARNING("Psionic power does not flow through a dead person."))
|
|
return
|
|
|
|
. = ..()
|
|
if(!.)
|
|
return
|
|
|
|
user.visible_message(SPAN_NOTICE("[user] lays a palm on [H]..."), SPAN_NOTICE("You lay your palm on [H] and get to work."))
|
|
to_chat(user, SPAN_NOTICE("You start by flowing your regenerative psionic energy through their vital organs..."))
|
|
for(var/obj/item/organ/O in H.internal_organs)
|
|
if(do_mob(user, H, 15 SECONDS))
|
|
if(O.get_damage() > 0) // Fix internal damage
|
|
to_chat(user, SPAN_NOTICE("You mend their [O]'s bruising."))
|
|
O.heal_damage(O.get_damage())
|
|
if((O.status & ORGAN_BROKEN))
|
|
to_chat(user, SPAN_NOTICE("You restart their [O]'s functionality."))
|
|
O.status &= ~ORGAN_BROKEN
|
|
if(O.get_damage() <= 5 && O.organ_tag == BP_EYES) // Fix eyes
|
|
H.sdisabilities &= ~BLIND
|
|
|
|
to_chat(user, SPAN_NOTICE("You continue by flowing your regenerative psionic energy through their limbs..."))
|
|
for(var/obj/item/organ/external/O in H.organs) // Fix limbs
|
|
if(!O.robotic < ORGAN_ROBOT) // No robot parts for this.
|
|
continue
|
|
if(do_mob(user, H, 15 SECONDS))
|
|
to_chat(user, SPAN_NOTICE("You mend their [O]'s bruising."))
|
|
O.heal_damage(0, O.get_damage(), internal = TRUE, robo_repair = FALSE)
|
|
|
|
to_chat(user, SPAN_NOTICE("Finally, you begin flowing your regenerative psionic energy through their broken limbs..."))
|
|
for(var/obj/item/organ/E in H.bad_external_organs) // Fix bones
|
|
var/obj/item/organ/external/affected = E
|
|
if(do_mob(user, H, 10 SECONDS))
|
|
if((affected.get_damage() < affected.min_broken_damage * GLOB.config.organ_health_multiplier) && (affected.status & ORGAN_BROKEN))
|
|
to_chat(user, SPAN_NOTICE("You mend their [affected] together."))
|
|
affected.status &= ~ORGAN_BROKEN
|
|
if((affected.status & ORGAN_ARTERY_CUT))
|
|
to_chat(user, SPAN_NOTICE("You mend a spliced artery in their [affected]."))
|
|
affected.status &= ~ORGAN_ARTERY_CUT
|
|
if((affected.status & ORGAN_DEAD))
|
|
to_chat(user, SPAN_NOTICE("You mend some necrosis from their [affected]."))
|
|
affected.status &= ~ORGAN_DEAD
|
|
user.visible_message(SPAN_NOTICE("[user] raises their palm from [H]."), SPAN_NOTICE("You raise your palm, having finished your work."))
|