mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-28 10:01:58 +00:00
3591 individual conflicts Update build.js Update install_node.sh Update byond.js oh my fucking god hat slow huh holy shit we all fall down 2 more I missed 2900 individual conflicts 2700 Individual conflicts replaces yarn file with tg version, bumping us down to 2200-ish Down to 2000 individual conflicts 140 down mmm aaaaaaaaaaaaaaaaaaa not yt 575 soon 900 individual conflicts 600 individual conflicts, 121 file conflicts im not okay 160 across 19 files 29 in 4 files 0 conflicts, compiletime fix time some minor incap stuff missed ticks weird dupe definition stuff missed ticks 2 incap fixes undefs and pie fix Radio update and some extra minor stuff returns a single override no more dupe definitions, 175 compiletime errors Unticked file fix sound and emote stuff honk and more radio stuff
60 lines
2.0 KiB
Plaintext
60 lines
2.0 KiB
Plaintext
/// Buffs and heals the target while standing on rust.
|
|
/datum/element/leeching_walk
|
|
|
|
/datum/element/leeching_walk/Attach(datum/target)
|
|
. = ..()
|
|
if (!isliving(target))
|
|
return ELEMENT_INCOMPATIBLE
|
|
|
|
RegisterSignal(target, COMSIG_MOVABLE_MOVED, PROC_REF(on_move))
|
|
RegisterSignal(target, COMSIG_LIVING_LIFE, PROC_REF(on_life))
|
|
|
|
/datum/element/leeching_walk/Detach(datum/source)
|
|
. = ..()
|
|
UnregisterSignal(source, list(COMSIG_MOVABLE_MOVED, COMSIG_LIVING_LIFE))
|
|
|
|
/*
|
|
* Signal proc for [COMSIG_MOVABLE_MOVED].
|
|
*
|
|
* Checks if we should have baton resistance on the new turf.
|
|
*/
|
|
/datum/element/leeching_walk/proc/on_move(mob/source, atom/old_loc, dir, forced, list/old_locs)
|
|
SIGNAL_HANDLER
|
|
|
|
var/turf/mover_turf = get_turf(source)
|
|
if(HAS_TRAIT(mover_turf, TRAIT_RUSTY))
|
|
ADD_TRAIT(source, TRAIT_BATON_RESISTANCE, type)
|
|
return
|
|
|
|
REMOVE_TRAIT(source, TRAIT_BATON_RESISTANCE, type)
|
|
|
|
/**
|
|
* Signal proc for [COMSIG_LIVING_LIFE].
|
|
*
|
|
* Gradually heals the heretic ([source]) on rust,
|
|
* including baton knockdown and stamina damage.
|
|
*/
|
|
/datum/element/leeching_walk/proc/on_life(mob/living/source, seconds_per_tick, times_fired)
|
|
SIGNAL_HANDLER
|
|
|
|
var/turf/our_turf = get_turf(source)
|
|
if(!HAS_TRAIT(our_turf, TRAIT_RUSTY))
|
|
return
|
|
|
|
// Heals all damage + Stamina
|
|
var/need_mob_update = FALSE
|
|
need_mob_update += source.adjustBruteLoss(-3, updating_health = FALSE)
|
|
need_mob_update += source.adjustFireLoss(-3, updating_health = FALSE)
|
|
need_mob_update += source.adjustToxLoss(-3, updating_health = FALSE, forced = TRUE) // Slimes are people to
|
|
need_mob_update += source.adjustOxyLoss(-1.5, updating_health = FALSE)
|
|
need_mob_update += source.adjustStaminaLoss(-10, updating_stamina = FALSE)
|
|
if(need_mob_update)
|
|
source.updatehealth()
|
|
// Reduces duration of stuns/etc
|
|
source.AdjustAllImmobility(-0.5 SECONDS)
|
|
// Heals blood loss
|
|
if(source.blood_volume < BLOOD_VOLUME_NORMAL)
|
|
source.blood_volume += 2.5 * seconds_per_tick
|
|
// Slowly regulates your body temp
|
|
source.adjust_bodytemperature((source.get_body_temp_normal() - source.bodytemperature)/5)
|