Commit Graph

26 Commits

Author SHA1 Message Date
Zergspower 27551e1caf Tweaks blindness to be more player friendly (#94323)
## About The Pull Request

So something i missed from when i played Goonstation a long while ago
was my blind characters, i tried recreating them in TGCode but found
that the blind quirk here is far more harsh to play visually. So i got
some help from Melbert and got a plan goin and here's the results.


![blinds](https://github.com/user-attachments/assets/d12bd5c1-e0cb-4997-835f-279076c6a665)

Players can see colors! But muted, this change is strictly for visual
enjoyment as the constant monochrome is just - i cant really describe
how much i hate seeing it for more than 15 minutes.

Secondly the flicker is gone from the quirk but remains for all the
temporary blindness, this is 100% Melberts code as they're a helluva lot
smarter than I am and I just nod and smile before pasting it. This did
entail creating a new fulscreen in the dmi, but i just copy/pasted the
existing one and took out the animated frames and named it as 'static'
so it wouldnt interfere with anything else using it.

## Why It's Good For The Game

Playing a blind character is great, however it causes some serious
eyestrain after prolonged playstyle

## Changelog
🆑 MrMelbert, Zergspower
qol: The world is now heavily desaturated while blind, rather than pure
monochrome, to give players some visual stimulus
qol: When blind, the brief flicker of the entire screen now only appears
for mobs temporarily blinded - ie, mobs blinded from quirk / trauma /
genetic mutation no longer experience it
/🆑
2025-12-10 20:42:56 +00:00
SmArtKar a5eed384ce Colorblindness now prevents you from seeing wire colors (#91315)
Being colorblind now makes you see all wires in tones of grey.

Also fixes the eyechart not taking the monochromacy quirk into account
when checking for colorblindness

Makes the quirk/trauma a bit more immersive and can lead to funny
situations when you know which color to cut but can't find it.
2025-05-28 09:45:20 -04:00
SmArtKar 845ed7459e Bravo Six, Going Dark: Refactors client colors to fix dupe issues and support filters (#89843)
## About The Pull Request

Completely refactored how client colors are handled. Now they're similar
to traits, having a source associated with them. Instead of adding and
removing by strict type (which makes client colors prone to getting
duplicated and not cleaned up) you remove a filter associated with a
specific source. Adding another client color with the same source as an
already existing one will replace the existing one if its of a different
type, or do nothing if they're the same (unless force is set to TRUE).
Client colors can also force filter splitting, putting all colors that
come before them, themselves, and all colors after them into separate
filters - this is useful to prevent mixing in filters which are supposed
to remove a certain color.

<details>

<summary>Example of how Perceptomatrix and nightmare vision goggles
combined before this PR:</summary>


![dreamseeker_fBOse2i0jq](https://github.com/user-attachments/assets/fb164e1f-ce8b-4a8c-8820-5db25e710056)

And this is after, as you can see nightmare vision effect's red is only
slightly tinted by perceptomatix instead of being literally halved.


![dreamseeker_U6A24fetK8](https://github.com/user-attachments/assets/8d8b3eb5-9f53-4646-bc56-0f5897013c6f)

</details>

Additionally, added support for custom filters (and not just colors) to
client color code to allow us to work with more colorspaces.

Also fixed weird blindness behavior, so this also 
Closes #89787

## Why It's Good For The Game

Makes code less ass to work with, fixes weird color mixing, etc.

## Changelog
🆑
fix: Fixed perceptomatix helmet allowing you to see even when
unconscious
refactor: Refactored how client colors are handled, ensuring that
certain effects like nightmare goggles don't disappear when another
vision-affecting piece of clothing is worn.
/🆑
2025-03-17 11:35:11 +00:00
carlarctg 6c30a0179b Adds the Perceptomatrix Helm, a hallucination anomaly core item. (#87701)
## About The Pull Request

Changes the color of hallucination cores from red (?) to hot pink.

Adds the Perceptomatrix Helm, a hallucination anomaly core item.


![image](https://github.com/user-attachments/assets/d1b37313-f141-4638-b950-7d58556dbf8d)

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.

![image](https://github.com/user-attachments/assets/7dd4eaba-90ba-4e67-a302-2aae844009a7)
## 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.
2024-11-15 18:25:25 +00:00
Ghom a1366fc905 Night Vision Goggles update (#84594)
## About The Pull Request
This is a reboot of #84550 but with way less unbearable: mesons are off
the table and I've made the night vision tonalities lighter now, while
also improving the darkness cutoffs of some of them. Btw, you can also
turn night vision googles on/off now. Each pair of departmental night
vision goggles now comes with their own tint to boot.

As always, this doesn't affect nukies and ninjas. They're almost
garaunteed to keep their googles equipped and on at all time, so it
would honestly adulterate the overall experience a little.

Now, for some pictures...

In the dark, **top** row is **old**, **bottom** row is **new**. from
left to right: security, science, standard/meson, diagnostic, health:

![dank](https://github.com/tgstation/tgstation/assets/42542238/4eb0dc3d-5b3a-47b1-ad65-d3da138a9213)

In the light: security, science, no goggles, standard/meson, diagnostic,
health:

![lite](https://github.com/tgstation/tgstation/assets/42542238/6e56262f-8ed6-4ea9-bab7-2110bc589d65)

The screenshots were taken from varedited goggles on the servers because
it's bit faster than booting up a local server, plus I had to finetune a
few things.

## Why It's Good For The Game
So, I kinda wanted to give a bit of screen colors to goggles that was
not some sort of "optional, by default turned off" kind of crap nobody
cares about, however my previous PR was met with a lot of criticism,
which made me rethink how to do it. I honestly don't want it to be a
burden, but I do want to make them a bit fancier tho.

Also the the medical NVs (and perhaps sec NVs) were a bit crappier than
the rest.

## Changelog

🆑
add: Night vision goggles now subtly tint your screen.
add: You can turn your night vision goggles off. Doing so removes the
tint and the eye protection malus.
/🆑
2024-07-07 15:17:37 -04:00
Ghom d1e5e61eb1 Converts glasses client colour into an element, appliable to other worn items. (#84542)
## About The Pull Request
The title barely does justice to the content.

This PR turns a snowflake, neigh-unused, broken feature for glasses into
a rock-hard, functional, badass feature which can be applied to any
item, and also brings back the halloween screen tint, inside the pumpkin
hardhat, and also a polaroid tint for the helmet of the flash suit,
because the define was just there, unused.


![immagine](https://github.com/tgstation/tgstation/assets/42542238/367504dd-8828-4518-b8d5-afbc6b9dfa35)

for reference, the normal brightness/saturation is somewhere in the
middle. Also the pumpkin hardhat's effect is only there when it's lit

## Why It's Good For The Game
Less hardcoded implementation of the client colours for items, which
also doubles as a fix because the old code was checking for the trait on
the mob but was adding it to the item.

## Changelog

🆑
fix: Fixed toggleable screen colors for glasses.
code: De-hardcoded, refactored the above, now-fixed feature.
add: Pumpkin hardhats and the hood of the flash suit now affect the
color of your screen.
add: Prism glasses, obtainable through xenobiology crossbreeding, now
also affect the color of your screen.
/🆑
2024-07-03 11:45:15 -04:00
Jeremiah 9723b4b317 Replaces even more deciseconds with SECONDS (#82438)
## About The Pull Request
Using these search regexes:

Ending in 0:
`addtimer\((.*),\s?(\d{1,3})0\b\)`
replacement:
`addtimer($1, $2 SECONDS)`

Two digit ending in odd:
`addtimer\((.*), (\d)([1-9])\)$`
replacement:
`addtimer($1, $2.$3 SECONDS)`

Single digit ending odd:
`addtimer\((.*), ([1-9])\)$`
replacement:
`addtimer($1, 0.$2 SECONDS)`

## Why It's Good For The Game
Code readability

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2024-04-06 15:18:49 -06:00
MrMelbert fa4ada025c Client colo(u)r no longer uses Client.color, now coloring the render game plane instead (#81328)
## About The Pull Request

Rather than utilizing `client.color`, client color datums now apply
their colors to the render game plane.

This means 
1. The player's HUD is no longer affected by client colors. Being
colorblind (in game) no longer makes all hud elements grey as well, only
the world.
2. Overall, less harsh colors. 

## Why It's Good For The Game

1. The player's HUD, being an OOC concept, should remain unaffected by
stuff like glasses and blindness. This is how it worked in the past,
before plane cube (IIRC), but it was lost in the transition.
2. Overall just looks a lot better, IMO. 

Here's what meson goggles with glasses colors active looks like:

Before: 


![image](https://github.com/tgstation/tgstation/assets/51863163/081b69b2-e545-48f8-9016-071107b2c4c1)

After: 


![image](https://github.com/tgstation/tgstation/assets/51863163/8a823a82-3953-4889-9594-ccae87843c00)


## Changelog

🆑 Melbert
qol: Glasses colors should be a lot less harsh, and being blind no
longer also blinds your hud.
/🆑
2024-02-11 15:23:18 +01:00
Ghom f3983e3901 Color matrix defines for filters and identity (#80320)
This PR converts the procs `color_matrix_identity`,
`color_matrix_lightness` and `color_matrix_contrast` into
defines/macros. Also adds in defines for common color matrix filters.

I don't like how `color_matrix_identity` is a one-line proc with no arg.
Also these help people identify the sort of color matrix filter is being
used.
2023-12-24 20:14:01 +00:00
lizardqueenlexi 6bdf052a84 Converts cursed heart effect into a component. (#78554)
## About The Pull Request

Fixes #58401 
Fixes #58799
Fixes #58800

Converts the manual heart-beating effect of the cursed heart into a
component.

Behavior has mostly been maintained, but polished a bit as compared to
the original cursed heart. Most notably, the action for beating your
heart is now a cooldown action - providing a visual indicator of when
you can beat it again, rather than leaving you guessing. Some better
checks have also been put in place for edge cases such as having your
species changed.

Implementation inspired by the existing "manual blinking" and "manual
breathing" components. Currently only used by the cursed heart and the
(now majorly simplified) effect of corazargh.

My first component, so hopefully I didn't miss anything.
## Why It's Good For The Game

The cursed heart was kind of unusably bad - which may have been part of
the intent, but having to count in your head or spam-click the button is
just annoying. With a visual indicator of when you should beat your
heart, hopefully it will be slightly less awful for the cursed.

The real motivation here was that corazargh's implementation was kind of
a travesty - summoning a cursed heart inside of your body while it was
in your system, then restoring your old heart afterward. This was
error-prone as well as just being ridiculous. Making this effect a
component gets rid of these problems, and leaves space open for new uses
of manual heart beating if anyone feels like being cruel.
## Changelog
🆑
fix: Your heart will no longer be deleted if an admin heals you while
you have corazargh in your system.
refactor: The cursed heart has been streamlined a bit, and now gives you
a visual cooldown for when you can beat your heart again.
/🆑
2023-10-04 00:43:25 +02:00
Ghom 43428545b2 Adds a unit test for client colours. (#77484)
## About The Pull Request
I'm adding a unit test for the sanity of client colours, ancient datums
which I had refactored a long time ago. This also affects the
`color_to_full_rgba_matrix()` proc, which I had also worked on.

## Why It's Good For The Game
Ever since that aforementioned years old refactor, there have always
been a few issues with client colours.
The most annoying one being the monochromacy client color lingering even
after the blindness status effect is ok.
It's unlikely this will fix that. However, this should clear a few other
runtimes with the feature.

## Changelog
N/A.
2023-08-12 09:31:48 -04:00
ChungusGamer666 8aa635f137 Adds colorblindness as a mild brain trauma (#76527)
## About The Pull Request

What the title says. 
The brain trauma makes the whole screen monochrome until cured.

![image](https://github.com/tgstation/tgstation/assets/82850673/442d24a8-6625-454c-bc28-64b786b03f49)

## Why It's Good For The Game

I feel like the current pool for mild brain traumas is quite lame, this
helps spice it up a bit with something that is quite annoying and
distracting but not game breaking (as mild brain traumas should
generally be).

## Changelog

🆑
add: Added colorblindness as a mild brain trauma.
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2023-07-06 21:42:34 -06:00
carlarctg 129c74c945 EMPs on robotic limbs will now disable them for 4-8 seconds rather than causing a 10-20 second full stun (#74570)
## About The Pull Request

EMPs on robotic limbs will now disable them for 10-20 seconds rather
than causing a 10-20 second full stun on the user. Additionally, they
will damage the limb for a little brute and some burn.

Arm EMPs don't do anything special as the limb being disabled already
drops items.

Leg EMPs cause a 10-20 second knockdown, only really applicable if
there's only one robotic leg as two disabled legs KD you anyways.

Chest EMPs cause a 3-6 second standing-up paralyze, visible to the
player by a quite noticeable shaking of their body.

Head EMPs break the optical transponder circuits for 7.5-15 seconds,
effectively giving the user nightmare goggles vision with green instead
of red as the only remaining color.

Tacit approval for the PR at least existing.

![image](https://user-images.githubusercontent.com/53100513/230537462-b06d0bb5-0607-4f83-954c-6b2a0bcdc635.png)
## Why It's Good For The Game

Robotic limbs are not so strong that a glancing EMP that may not even
have been directed at you should stun you for ten, TEN seconds, or
worse, twenty. This is basically legacy stunning from the days of
super-stuns on soap, stunbatons, etc. The code for it was last touched
six years ago.

**_The stats as shown above are not even close to final. I really don't
know or care what the right stats should be in the end. and I'm fine
with making them a 10-20 second timer again. I just put some
reasonable-seeming numbers in as a placeholder. EMPs could also still
cause a short stun if that is deemed necessary. Hell, that could be the
chest effect!_**
## Changelog
🆑
balance: EMPs on robotic limbs will now disable them for 10-20 seconds
rather than causing a 10-20 second full stun on the user. Additionally,
they will damage the limb for a little brute and some burn.
EMPs on robotic limbs will now disable them for 10-20 seconds rather
than causing a 10-20 second full stun on the user. Additionally, they
will damage the limb for a little brute and some burn.
balance: Arm EMPs don't do anything special as the limb being disabled
already drops items.
balance: Leg EMPs cause a 10-20 second knockdown, only really applicable
if there's only one robotic leg as two disabled legs KD you anyways.
balance: Chest EMPs cause a 3-6 second standing-up paralyze, visible to
the player by a quite noticeable shaking of their body.
balance: Head EMPs break the optical transponder circuits for 7.5-15
seconds, effectively giving the user nightmare goggles vision with green
instead of red as the only remaining color.
/🆑
2023-04-28 20:24:40 +00:00
Fikou 35b5ac0c4e Psykers (#71566)
## About The Pull Request
Finishes #66471
At burden level nine (or through a deadly genetic breakdown), you now
turn into a psyker.
This splits your skull in half and transforms it into a weird fleshy
mass. You become blind, but your skull is perfectly suited for sending
out psychic waves. You get potent psy abilities.
First one is brainwave echolocation, inspired by Gehennites (but not as
laggy).
Secondly, you get the ability of Psychic Walls, which act similarly to
wizard ones, but last shorter, and cause projectiles to ricochet off
them.
Thirdly, you get a projectile boost ability, this temporarily lets you
fire guns twice as fast and gives them homing to the target you clicked.
Lastly, you get the ability of psychic projection. This terrifies the
victim, fucking their screen up and causing them to rapidfire any gun
they have in their general direction (they'll probably miss you)
With most of the abilities being based around guns, a burden level nine
chaplain now gets a new rite, Transmogrify. This lets them turn their
null rod into a 5-shot 18 damage .77 revolver. The revolver possesses a
weaker version of antimagic (protects against mind and unholy spells,
but not wizard/cult ones). It is reloaded by a prayer action (can also
only be performed by a max burdened person).
General Video: https://streamable.com/w3kkrk
Psychic Projection Video: https://streamable.com/4ibu7o

![image](https://user-images.githubusercontent.com/23585223/204150279-a6cf8e2f-c678-476e-b72c-6088cd8b684b.png)

## Why It's Good For The Game
Rewards the burdened chaplain with some pretty cool stuff for going
through hell like losing half his limbs, cause the current psychics dont
cut it as much as probably necessary, adds echolocation which can be
used for neat stuff in the future (bat organs for DNA infuser for
example).

## Changelog
🆑 Fikou, sprites from Halcyon, some old code from Basilman and
Armhulen.
refactor: Honorbound and Burdened mutations are brain traumas now.
add: Psykers. Become a psyker through the path of the burdened, or a
genetic breakdown.
add: Echolocation Component.
/🆑

Co-authored-by: tralezab <spamqetuo2@gmail.com>
Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2022-11-29 20:13:28 +00:00
AnturK 4d6a8bc537 515 Compatibility (#71161)
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>
2022-11-15 03:50:11 +00:00
Fikou 73e7d9c115 Adds nightmare vision goggles to maintenance (#66088) 2022-04-11 00:52:34 -07:00
Fikou 24082a2b4f Adds Maintenance MOD Modules! (#63791) 2022-01-04 15:47:21 -08:00
TiviPlus 0eaab0bc54 Grep for space indentation (#54850)
#54604 atomizing
Since a lot of the space indents are in lists ill atomize those later
2020-11-30 12:48:40 -05:00
Ghom cc51e57b44 datum/client_colour refactor. (#54741) 2020-11-02 12:20:34 -08:00
AnturK a94c600d5a Let's save some more time here. 2019-12-02 10:09:58 +01:00
L 42873d424e Cleanup 2019-10-25 04:26:09 -03:00
nightred dc23d15170 Blindness removes your ability to see colours (#46475)
* Blindness removes colours so you can only see if an object is near, not the fine points on it.

* Fixed up the monochromatic trait to persist when removing blindness

* Removed added trait and created new colour filter for blindness

* Blankspace Removal

* removed the src before the proc as it was not needed
2019-09-15 00:34:21 -07:00
nemvar 8671f8e7af Adds a unique client color for the trance status effect. 2019-07-29 00:24:09 +02:00
Ashe Higgs bd42041c9c Adds the Family Heirloom, Nyctophobia, and Monochromacy traits, and rebalances Social Anxiety (#36426)
* Adds some more traits

* April Fools' heirlooms

* Fixes the detective sound

* Refactor to use signals
2018-03-28 16:14:08 +03:00
phil235 8e8061e851 Wearing colored glasses colors your vision, if you want to. (#20499)
* Adds semi-transparent colored fullscreen overlays which are used by glasses with tint_color.
Currently only red, blue, and green are available. And only nightvision glasses currently have a tint_color when worn (green).

* Completely rewrites how I did color tinting. We now use datum/client_colour and the client's color var.
I fixed items in our inventory UI being colored when using client.color.
I added an altclick() option on all glasses to toggle a new pref regarding the use of glass coloring your view.
I made a lot more glasses use vision coloring.
I fixed Thermal HUD Scanner not having its action button to switch hud type.
2016-09-17 16:28:50 +12:00
Remie Richards 984afed89f Adds a priority system for client.color effects 2016-04-07 21:55:31 +01:00