## About The Pull Request
Turns out ear protection was subtracting the values rather than adding
them to the protection, and I didn't notice that much until later (now).
Also flashbangs don't have much of a bang (flashbangs without the bang
basically) when there's no air.
## Why It's Good For The Game
Also everyone should know that IRL sounds don't work well in vacuums cuz
there are no molecules to carry sound waves around. Unfortunately we are
not so refined about it in game, which is a fucking shame. This is a
very simplistic implementation than anything. The fact that I'm adding
it to this PR as well is because being in a vacuum gives you plenty of
sound protection now. It's about *some* consistency.
## Changelog
🆑
fix: Fixes ear protection equipment doing nothing.
balance: Detonating a flashbang in space or any environment with little
to no air no longer stuns anyone NOT on the same tile as the flashbang
with loud bangs. Flashing still works as intended though.
/🆑
so, the current `COMSIG_CARBON_SOUNDBANG` signal is kinda lame because:
1) it's relegated to carbon mobs
2) it means ear protection equipment actually has no effect when
`get_ear_protection` is called instead.
3) It's sent in more than one place in the code
So I replaced it with another signal, this one properly sent in
`get_ear_protection`, and therefore `soundbang_act` as well.
What's also lame is that the code for both `get_ear_protection` and
`soundbang_act` can be easily moved to the living type, and it wouldn't
make a huge impact aside causing simple mobs to be stunned very briefly
by flashbangs since they cannot be knocked down anyway. The less the
code is specific to a subtype, the easier it's to work with, the fewer
the paradigms etc.
Another lame thing is some of the code being kinda old. Also I wanted to
fix an issue with the shriek ling ability detailed in #93401. I wanted
to make the ability more consistent with how other sound-related
abilities work by making it use `soundbang_act`, but with an intensity
higher than any other feature so far, beside point-blank flashbangs
(holding on standing on one). I've also buffed the "ear protection"
offered by vacuums from 1 to 3, meaning nothing but point-blank
flashbangs will go through. Yes, this means shrieks are not good in a
vacuum because sound generally propagate in absence of molecules that
can transmit the vibration... at least IRL. The game's an approximation
anyway, but it's still inconsistent, like a fuckton of other things that
are even more outside of the scope of this PR. Well, at least it affects
simple/basic mobs too now.
## Why It's Good For The Game
This will fix#93401 and make some code less old and bad.
## Changelog
🆑
refactor: refactored code for ear/soundbang protection. Flashbangs and
other things can now affect simple/basic mobs as well, not just carbon
and occasionally silicons.
balance: Aliens are no longer impervious to soundbang_act. Still very
resistant to it due to their hardcoded ear protection
balance: How the resonant shriek changeling ability works is now
slightly more consistent with the ear/soundbang protection, meaning it
won't work well in a vacuum, but at least it works on simple mobs now.
fix: Everyone can now hear a changeling shriek, unless they're already
deafened or in a vacuum.
/🆑
## About The Pull Request
This PR fixes wrong usage of bitflags in a few places, where instead of
bitfields lists were used.
## Why It's Good For The Game
It will help prevent problems that can be a thing in the future,
improving consistency of the codebase.
## About The Pull Request
Changes the color of hallucination cores from red (?) to hot pink.
Adds the Perceptomatrix Helm, a hallucination anomaly core item.

This helmet shields the user's brain from all external stimuli while
creating a 1:1 replica of it, beamed straight into their mind. What this
means in practice is that the user's perception is hypercharged and
their brain shielded from psychic phenomena.
The sprite is a resprited marine helmet. It's mid and I don't like it
but I'm not a spriter.
List of effects:
Perception:
- Flash/Weld Immunity
- True Night Vision
- Blindness and blurriness immunity
- Expanded FOV
Brain Shielding:
- Perceptual Trauma Immunity
- Hallucination Immunity
Psyshield:
- Conversion and Mindswap Immunity
- Magical Mind Resistance (Much more limited than normal resistance)
- Technically counts as casting clothes
Additionally, you can an ability to invoke hallucinations on others on a
25-second cooldown.

## Why It's Good For The Game
I'm kinda tired of half the anomaly cores in the game having jack and
shit going for them. I also think there's a moderate lack of psychic
content in the game, so here we go.
### Yeah this is cool but like isn't it kinda fucking nuts? Holy shit
dude
Let's dissect this.
> Perception:
> - Flash/Weld Immunity
> - True Night Vision
> - Blindness and blurriness immunity
> - Expanded FOV
This part effectively amounts to nothing but night vision sunglasses.
> Brain Shielding:
> - Perceptual Trauma Immunity
> - Hallucination Immunity
This isn't all that impactful, either. Hallucination immunity is
immensely irrelevant. Perceptual trauma immunity, which means you ignore
effects like blindness or imaginary friends, is very, very niche.
> Psyshield:
> - Conversion and Mindswap Immunity
> - Magical Mind Resistance (Much more limited than normal resistance)
> - Technically counts as casting clothes
Basically just having a mindshield, and that only if you don't get it
taken off anyways. Mindswap immunity could be nice, that's really not
something you can even get otherwise.
Magical mind resistance isn't very good. It blocks mind reading,
nullblade sneak attacks, eye of god, many forms of telepathy, psyker
magic, the curse of madness, the curse of babel, and that's about it.
It's nice, but it won't stop a fireball.
A lot of this can in the end be duplicated with sunglasses &
oculine/mesons and welding protection, and a tinfoil hat, which is
partly why I added the ability. It staggers for a small duration and
causes hallucinations, and it's pretty fun to use, despite its effects
being rather understated.
Makes the code compatible with 515.1594+
Few simple changes and one very painful one.
Let's start with the easy:
* puts call behind `LIBCALL` define, so call_ext is properly used in 515
* Adds `NAMEOF_STATIC(_,X)` macro for nameof in static definitions since
src is now invalid there.
* Fixes tgui and devserver. From 515 onward the tmp3333{procid} cache
directory is not appened to base path in browser controls so we don't
check for it in base js and put the dev server dummy window file in
actual directory not the byond root.
* Renames the few things that had /final/ in typepath to ultimate since
final is a new keyword
And the very painful change:
`.proc/whatever` format is no longer valid, so we're replacing it with
new nameof() function. All this wrapped in three new macros.
`PROC_REF(X)`,`TYPE_PROC_REF(TYPE,X)`,`GLOBAL_PROC_REF(X)`. Global is
not actually necessary but if we get nameof that does not allow globals
it would be nice validation.
This is pretty unwieldy but there's no real alternative.
If you notice anything weird in the commits let me know because majority
was done with regex replace.
@tgstation/commit-access Since the .proc/stuff is pretty big change.
Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
* kill BANG_PROTECT_2
* let's put this back in
* dirty
* kill OMNITONGUE_2
This is a write-only variable, probably leftover from some refactor years ago
* kill flags_2