Files
Bubberstation/code/datums/components
MrMelbert 57c5701307 Pepperspray / Mask dirt tweaks (#95683)
## About The Pull Request

1. Pushing a dirty mask out of the way (such as adjusting a sec hailer
down) will no longer keep the screen tint, nor will they accrue dirt

2. Applied dirt is now rounded to `0.25` rather than `1`. Before, you'd
need a minimum of 2.5u to apply dirt and 2.5u-5u would all apply "1
dirt". Now, you need a minimum of 1.5u to apply dirt and it applies it
piecemeal, ie 1.5u applies "0.25 dirt".

3. Adds a passive message if you are wearing a dirty mask/helmet to
indicate you need to clean it.

4. A tint of 1.5 now applies tier 1 screen impairment, I don't think
this will affect any existing items as tints are all defined in 1/2/3.

5. Pepper spray can no longer stack blindness infinitely, much like how
it can't stack eye blur, knockdown, or confusion infinitely.

## Why It's Good For The Game

1. While it may be illogical that a sec hailer being dirty blocks your
vision, it's even MORE illogical that it blocks your vision when it's
not even protecting you from pepperspray.

(Yes, the sec hailer topic is for another PR) 

2. I noticed in testing that depending on how you spray the pepper spray
container, sometimes it would apply no dirt - because if you do a ranged
spray it only applies 1.67u . This isn't super consistent with how the
reagent works (any volume applies 100% of the downsides).

3. Aims to make it a bit more clear how the mechanic works by reminding
the player occasionally.

4. Allows for one tier of granularity between "No obscured vision" and
"Majorly obscured vision". So you know that you're approaching problem
territory rather than being thrust into it.

5. This feels like an oversight to me - all effects of pepperspray are
capped but the blindness, so multiple rapid exposures (which is not
entirely uncommon) could quickly stack up to minutes of blindness.

## Changelog

🆑 Melbert
fix: A dirty mask that CAN be pushed out of the way no longer obscures
vision if it IS pushed out of the way.
qol: If your mask is dirty from pepper spray, you get some passive chat
messages indicating that it can be cleaned off.
balance: Pepper spray clothing dirt is applied piecemeal - smaller
dosages, rather than doing nothing, now build up with repeat
applications.
balance: Pepper spray clothing dirt now has a tier between "very
obscured vision" and "no obscured vision", giving the wearer more of a
warning before being thrust into darkness.
balance: Pepper spray can no longer stack blindness infinitely - it is
now capped to 6 seconds. This brings it in line with its other effects
(confusion capped at 5 seconds, blur capped at 10 seconds, knockdown
capped at 3 seconds).
/🆑
2026-04-09 16:15:53 +12:00
..
2025-10-02 18:15:25 +02:00
2025-12-20 12:33:10 -05:00
2024-10-09 02:03:50 +02:00
2025-09-07 09:24:34 +02:00
2024-08-21 17:07:02 +12:00
2025-10-07 20:28:59 +02:00
2025-01-22 20:50:07 -07:00
2025-01-28 03:12:59 +01:00
2025-12-28 19:57:42 +01:00

Datum Component System (DCS)

Concept

Loosely adapted from /vg/. This is an entity component system for adding behaviours to datums when inheritance doesn't quite cut it. By using signals and events instead of direct inheritance, you can inject behaviours without hacky overloads. It requires a different method of thinking, but is not hard to use correctly. If a behaviour can have application across more than one thing. Make it generic, make it a component. Atom/mob/obj event? Give it a signal, and forward its arguments with a SendSignal() call. Now every component that want's to can also know about this happening.

HackMD page for an introduction to the system as a whole.

See/Define signals and their arguments in __DEFINES\components.dm