Files
+37 21b4095dfd [MDB IGNORE] [IDB IGNORE] Upstream Sync - 04/17/2026 (#5453)
Upstream 04/17/2026

fixes https://github.com/Bubberstation/Bubberstation/issues/5549

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: tgstation-ci[bot] <179393467+tgstation-ci[bot]@users.noreply.github.com>
Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Rhials <28870487+Rhials@users.noreply.github.com>
Co-authored-by: rageguy505 <54517726+rageguy505@users.noreply.github.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: Aliceee2ch <160794176+Aliceee2ch@users.noreply.github.com>
Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com>
Co-authored-by: Tsar-Salat <62388554+Tsar-Salat@users.noreply.github.com>
Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com>
Co-authored-by: Maxipat <108554989+Maxipat112@users.noreply.github.com>
Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Co-authored-by: deltanedas <39013340+deltanedas@users.noreply.github.com>
Co-authored-by: SimplyLogan <47579821+loganuk@users.noreply.github.com>
Co-authored-by: loganuk <fakeemail123@aol.com>
Co-authored-by: Leland Kemble <70413276+lelandkemble@users.noreply.github.com>
Co-authored-by: FalloutFalcon <86381784+FalloutFalcon@users.noreply.github.com>
Co-authored-by: Roxy <75404941+TealSeer@users.noreply.github.com>
Co-authored-by: Lucy <lucy@absolucy.moe>
Co-authored-by: siliconOpossum <138069572+siliconOpossum@users.noreply.github.com>
Co-authored-by: Isratosh <Isratosh@hotmail.com>
Co-authored-by: TheRyeGuyWhoWillNowDie <70169560+TheRyeGuyWhoWillNowDie@users.noreply.github.com>
Co-authored-by: Neocloudy <88008002+Neocloudy@users.noreply.github.com>
Co-authored-by: Alexander V. <volas@ya.ru>
Co-authored-by: ElGitificador <168473461+ElGitificador@users.noreply.github.com>
Co-authored-by: Twaticus <46540570+Twaticus@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
Co-authored-by: Cameron Lennox <killer65311@gmail.com>
Co-authored-by: Tim <timothymtorres@gmail.com>
Co-authored-by: Iamgoofball <iamgoofball@gmail.com>
Co-authored-by: Layzu666 <121319428+Layzu666@users.noreply.github.com>
Co-authored-by: Arturlang <24881678+Arturlang@users.noreply.github.com>
Co-authored-by: _0Steven <42909981+00-Steven@users.noreply.github.com>
Co-authored-by: mrmanlikesbt <99309552+mrmanlikesbt@users.noreply.github.com>
Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com>
Co-authored-by: John F. Kennedy <54908920+MacaroniCritter@users.noreply.github.com>
Co-authored-by: Cursor <102828457+theselfish@users.noreply.github.com>
Co-authored-by: Josh <josh.adam.powell@gmail.com>
Co-authored-by: Josh Powell <josh.powell@softwire.com>
Co-authored-by: Yobrocharlie <Charliemiller5617@gmail.com>
Co-authored-by: Hardly3D <66234359+Hardly3D@users.noreply.github.com>
Co-authored-by: shayoki <96078776+shayoki@users.noreply.github.com>
Co-authored-by: LT3 <83487515+lessthnthree@users.noreply.github.com>
2026-05-16 00:56:00 +02:00

119 lines
4.5 KiB
Plaintext

/// The minimum amount of water stacks needed to start washing off the slime.
#define MIN_WATER_STACKS 5
/// The minimum amount of health a mob has to have before the status effect is removed.
#define MIN_HEALTH 10
/atom/movable/screen/alert/status_effect/slimed
name = "Covered in Slime"
desc = "You are covered in slime and it's eating away at you! Click to start cleaning it off, or find a faster way to wash it away!"
use_user_hud_icon = USER_HUD_STYLE_INHERIT
overlay_state = "slimed"
clickable_glow = TRUE
/atom/movable/screen/alert/status_effect/slimed/Click()
. = ..()
if (!.)
return FALSE
if (!can_wash())
return FALSE
INVOKE_ASYNC(src, PROC_REF(remove_slime))
return TRUE
/// Confirm that we are capable of washing off slime
/atom/movable/screen/alert/status_effect/slimed/proc/can_wash()
var/mob/living/living_owner = owner
if (!living_owner.can_resist())
return FALSE
if (DOING_INTERACTION_WITH_TARGET(owner, owner))
return FALSE
if (locate(/datum/status_effect/fire_handler/wet_stacks) in living_owner.status_effects)
return FALSE // Don't double dip with washing
return TRUE
/// Try to get rid of it
/atom/movable/screen/alert/status_effect/slimed/proc/remove_slime()
owner.balloon_alert(owner, "cleaning off slime...")
var/datum/status_effect/slimed/slime_effect = owner.has_status_effect(/datum/status_effect/slimed)
while (!QDELETED(src) && !isnull(slime_effect))
if (!can_wash())
return
var/clean_interval = HAS_TRAIT(owner, TRAIT_WOUND_LICKER) ? 1.2 SECONDS : 1.5 SECONDS
owner.Shake(2, 0, duration = clean_interval * 0.8, shake_interval = 0.05 SECONDS)
if (!do_after(owner, clean_interval, owner))
return
slime_effect.remove_stacks()
/datum/status_effect/slimed
id = "slimed"
tick_interval = 3 SECONDS
alert_type = /atom/movable/screen/alert/status_effect/slimed
remove_on_fullheal = TRUE
/// The amount of slime stacks that were applied, reduced by showering yourself under water.
var/slime_stacks = 10 // ~10 seconds of standing under a shower
/// Slime color, used for particles.
var/slime_color
/// Changes particle colors to rainbow, this overrides `slime_color`.
var/rainbow
/datum/status_effect/slimed/on_creation(mob/living/new_owner, slime_color = COLOR_SLIME_GREY, rainbow = FALSE)
src.slime_color = slime_color
src.rainbow = rainbow
return ..()
/datum/status_effect/slimed/on_apply()
if(owner.get_organic_health() <= MIN_HEALTH)
return FALSE
to_chat(owner, span_userdanger("You have been covered in a thick layer of slime! Find a way to wash it off!"))
return ..()
/datum/status_effect/slimed/on_remove()
owner.remove_shared_particles(rainbow ? "slimed_rainbow" : "slimed_[slime_color]")
/datum/status_effect/slimed/update_particles()
var/obj/effect/abstract/shared_particle_holder/holder = owner.add_shared_particles(rainbow ? /particles/slime/rainbow : /particles/slime, rainbow ? "slimed_rainbow" : "slimed_[slime_color]")
if (!rainbow)
holder.particles.color = "[slime_color]a0"
/datum/status_effect/slimed/proc/remove_stacks(stacks_to_remove = 1)
slime_stacks -= stacks_to_remove // lose 1 stack per second
if(slime_stacks <= 0)
to_chat(owner, span_notice("You manage to wash off the layer of slime completely."))
qdel(src)
return
if(prob(10))
to_chat(owner,span_warning("The layer of slime is slowly getting thinner."))
/datum/status_effect/slimed/tick(seconds_between_ticks)
// remove from the mob once we have dealt enough damage
if(owner.get_organic_health() <= MIN_HEALTH)
to_chat(owner, span_warning("You feel the layer of slime crawling off of your weakened body."))
qdel(src)
return
// handle washing slime off
var/datum/status_effect/fire_handler/wet_stacks/wetness = locate() in owner.status_effects
if(istype(wetness) && wetness.stacks > (MIN_WATER_STACKS * seconds_between_ticks))
wetness.adjust_stacks(-5 * seconds_between_ticks)
remove_stacks(seconds_between_ticks) // 1 per second
if(slime_stacks <= 0)
return
// otherwise deal brute damage
owner.apply_damage(rand(2,4) * seconds_between_ticks, damagetype = BRUTE)
if(SPT_PROB(10, seconds_between_ticks))
var/feedback_text = pick(list(
"Your entire body screams with pain",
"Your skin feels like it's coming off",
"Your body feels like it's melting together"
))
to_chat(owner, span_userdanger("[feedback_text] as the layer of slime eats away at you!"))
/datum/status_effect/slimed/get_examine_text()
return span_warning("[owner.p_They()] [owner.p_are()] covered in bubbling slime!")
#undef MIN_HEALTH
#undef MIN_WATER_STACKS