Files
Paradise/code/datums/components/aura_healing.dm
Kyani 203105788c [IDB Ignore] Heretic: The Mansus Re-Opened (#30738)
* fixes

* fuck my stupid chungus life

* Minion limit, heal fix, dead sac fix

* cooldown, no sacrificing star gazer or ascended alive heretics

* blade debuff

* oopsy

* Update tgui.bundle.js

* map diff bot what ya doing

* fuck that chat spam

* lets heretic armour hold a haunted longsword

* why not it makes sense

* do_after

* god I hate this bullshit

* other lewc stuff

* push

* heretic id card fix

* she tg on my ui till I css

* yes

* spent

* fix / ipc buff (real)™️

* moderate again

* revert

* no reserve

* bringing up to master

* update map files to master

* didnt replace centcomm

* beginning some rebalancing

* aggressive spread tweaks

* lots of tweaks and fixes

* trying to un-key the maps

* maybe this time

* this time????

* oops

* sql fix

* basicmob conversion

* paintings! and a critical influence fix

* rust + tweaks

* monster tweak

* small change

* removing this

* more tweaks. no more dusting

* added some examine_more

* flower seeds

* various tweaks. more to come

* no more conduit spacing

* fixed some dumb stuff

* silly stuff

* its always prettier

* bugfixes and linters

* linters, wow

* oops

* bah

* linter

* fuck you

* temp check

* hidden influence drain

* influence visible message

* tweak fix

* void cloak bugfix

* small fixes

* fixes

* do_after_once broken

* fixes and tweaks

* heretic blade potential fix + sacrifice changes

* batch of fixes

* tiny tweak

* rebuilt TGUI

* no greentext + rerolls

* logging + bugfix

* unused var

* small fix

* various fixes

* comment

* projectile change

* tgui rebuild

* tgui bundle redo

* rune issue solved

* influence visible now

* fix ui reloading

* new moon ascension + fixes + icons

* tweaks, species sprites

* tgui rebuild

* small tweak + linter

* harvester icon tweak

* spans

* fixes and tweaks

* caretaker nerf + tweaks

* potential fix for knowledge

* roller fix

* mad mask

* Update tgui.bundle.js

* void phase tweak

* Update tgui.bundle.js

* misc tweaks

* fix heretic not retargeting correctly with cryo

* simplify logic

* this is better

* lots of fixes and tweaks

* Update tgui.bundle.js

* linter

* linter

* fireshark and greyscale insanity

* fish

* Update tgui.bundle.js

* linter

* linter

* tgui

* no window shopping

* fish fix

* tgui rebundle

* moon smile runtime fix

* various fixes

* sacrifice fixes

* insanity is easier now, madness mask changes.

* bugfixing + teleport change

* linters + tweaks

* Update code/modules/antagonists/heretic/status_effects/mark_effects.dm

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

* Update code/modules/antagonists/heretic/status_effects/mark_effects.dm

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>

---------

Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com>
Co-authored-by: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Co-authored-by: warriorstar-orion <orion@snowfrost.garden>
Co-authored-by: Paul <pmerkamp@gmail.com>
Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
2026-01-27 20:36:52 +00:00

149 lines
4.6 KiB
Plaintext

#define HEAL_EFFECT_COOLDOWN 1 SECONDS
/// Applies healing to those in the area.
/// Will provide them with an alert while they're in range, as well as
/// give them a healing particle.
/// Can be applied to those only with a trait conditionally.
/datum/component/aura_healing
/// The range of which to heal
var/range = 5
/// Whether or not you must be a visible object of the parent
var/requires_visibility = TRUE
/// Brute damage to heal over a second
var/brute_heal = 0
/// Burn damage to heal over a second
var/burn_heal = 0
/// Toxin damage to heal over a second
var/toxin_heal = 0
/// Suffocation damage to heal over a second
var/suffocation_heal = 0
/// Stamina damage to heal over a second
var/stamina_heal = 0
/// Amount of blood to heal over a second
var/blood_heal = 0
/// Amount of damage to heal on simple mobs over a second
var/simple_heal = 0
/// Trait to limit healing to, if set
var/limit_to_trait = null
/// The color to give the healing visual
var/healing_color = COLOR_GREEN
/// A list of being healed to active alerts
var/list/mob/living/current_alerts = list()
/// Cooldown between showing the heal effect
COOLDOWN_DECLARE(last_heal_effect_time)
/datum/component/aura_healing/Initialize(
range = 5,
requires_visibility = TRUE,
brute_heal = 0,
burn_heal = 0,
toxin_heal = 0,
suffocation_heal = 0,
stamina_heal = 0,
blood_heal = 0,
simple_heal = 0,
limit_to_trait = null,
healing_color = COLOR_GREEN,
)
if(!isatom(parent))
return COMPONENT_INCOMPATIBLE
START_PROCESSING(SSfastprocess, src)
src.range = range
src.requires_visibility = requires_visibility
src.brute_heal = brute_heal
src.burn_heal = burn_heal
src.toxin_heal = toxin_heal
src.suffocation_heal = suffocation_heal
src.stamina_heal = stamina_heal
src.blood_heal = blood_heal
src.simple_heal = simple_heal
src.limit_to_trait = limit_to_trait
src.healing_color = healing_color
/datum/component/aura_healing/Destroy(force)
STOP_PROCESSING(SSfastprocess, src)
var/alert_category = "aura_healing_[src.UID()]"
for(var/mob/living/alert_holder as anything in current_alerts)
alert_holder.clear_alert(alert_category)
current_alerts.Cut()
return ..()
/datum/component/aura_healing/process()
var/should_show_effect = COOLDOWN_FINISHED(src, last_heal_effect_time)
if(should_show_effect)
COOLDOWN_START(src, last_heal_effect_time, HEAL_EFFECT_COOLDOWN)
var/list/to_heal = list()
var/alert_category = "aura_healing_[src.UID()]"
if(requires_visibility)
for(var/mob/living/candidate in view(range, parent))
if(!isnull(limit_to_trait) && !HAS_TRAIT(candidate, limit_to_trait))
continue
to_heal[candidate] = TRUE
else
for(var/mob/living/candidate in range(range, parent))
if(!isnull(limit_to_trait) && !HAS_TRAIT(candidate, limit_to_trait))
continue
to_heal[candidate] = TRUE
for(var/mob/living/candidate as anything in to_heal)
if(!current_alerts[candidate])
var/atom/movable/screen/alert/aura_healing/alert = candidate.throw_alert(alert_category, /atom/movable/screen/alert/aura_healing, new_master = parent)
alert.desc = "You are being healed by [parent]."
current_alerts[candidate] = TRUE
if(should_show_effect && candidate.health < candidate.maxHealth)
new /obj/effect/temp_visual/heal(get_turf(candidate), healing_color)
if(issilicon(candidate))
candidate.adjustBruteLoss(-brute_heal, updating_health = FALSE)
candidate.adjustFireLoss(-burn_heal, updating_health = FALSE)
if(iscarbon(candidate))
candidate.adjustToxLoss(-toxin_heal, updating_health = FALSE)
candidate.adjustOxyLoss(-suffocation_heal, updating_health = FALSE)
candidate.adjustStaminaLoss(-stamina_heal)
if(ishuman(candidate))
var/mob/living/carbon/human/i_wish_roboheal_was_global = candidate
i_wish_roboheal_was_global.adjustBruteLoss(-brute_heal, updating_health = FALSE, robotic = TRUE)
i_wish_roboheal_was_global.adjustFireLoss(-burn_heal, updating_health = FALSE, robotic = TRUE)
else
candidate.adjustBruteLoss(-brute_heal, updating_health = FALSE)
candidate.adjustFireLoss(-burn_heal, updating_health = FALSE)
else if(isanimal(candidate))
var/mob/living/simple_animal/animal_candidate = candidate
animal_candidate.adjustHealth(-simple_heal, updating_health = FALSE)
if(candidate.blood_volume < BLOOD_VOLUME_NORMAL)
candidate.blood_volume += blood_heal
candidate.updatehealth()
for(var/mob/living/remove_alert_from as anything in current_alerts - to_heal)
remove_alert_from.clear_alert(alert_category)
current_alerts -= remove_alert_from
/atom/movable/screen/alert/aura_healing
name = "Aura Healing"
icon_state = "template"
#undef HEAL_EFFECT_COOLDOWN