Commit Graph

263 Commits

Author SHA1 Message Date
MrMelbert
47dc38fee2 Let's you talk through action figures, plushies, and toy mechs with .l and .r. Also a big clean up of say because its support for non-mobs was lackluster. (#81848) 2024-03-07 09:21:12 -07:00
13spacemen
357799c8a5 Removes Orbit Polling Component, SSpolling improvement (#81748)
When I made SSpolling, jlsnow gave me his blessing to delete the orbit
polling component [where you orbit something for 20 seconds before it
chooses a ghost from the orbiters]
It's only used in a few places like soulstones replacing
jobbanned/inactive players, etc.

Also upgraded SSpolling; you can now place a little icon on the sides in
the chat message, chat message looks a lot nicer, the alert pic and the
jump target don't have to be the same anymore, and I made it be able to
pre-pick candidates since 90% of the use cases would just want 1
candidate

Also prints to chat who the chosen one was

Also made slime intelligence potions ask the user for a reason, which
will be displayed in the alert poll
2024-03-06 08:24:36 +00:00
ViktorKoL
d6319d2b87 Lots of description changes and grammar fixes for heretics (#81761)
## About The Pull Request

Changes a lot of text. Apart from grammar fixes, here are the notable
changes:

- Ash jaunt description just said it is a "short range jaunt" without
explaining what exactly a jaunt is. I believe it is better to describe
without comparing to another spell the player may not have experience
with.
- Cosmic grasp now explains what the deal is with star marks and cosmic
fields. It is still possible to crosspath into a star mark spell,
skipping this description, but I assume a player like that is
experienced enough to know what the star mark does anyway...
- The knowledge for ash spirits no longer refers to them as "Ash Men" -
"Ash Spirit" is the mob's actual name. If you think "Ash Man" is a
better name, I can change it around so that the mob gets renamed that
instead.
- Removes the lines from paradoxical curio's description about causing
brain damage on examination - many heretic items cause adverse effects
to heathens who try to interact with them, and there is never a need to
clutter the description with them.
- Changes the eldritch coin description, because the old one was, in my
opinion, awkward. I changed it to be more inline with the other items'
descriptions, and to not tell non-heretics what its purpose is. If you
liked the old one better, I can revert this change.
## Why It's Good For The Game

Grammar good. Accurate descriptions good.
## Changelog
🆑
fix: made some heretic descriptions more accurate
spellcheck: improved english of the heretical eldritch patrons
/🆑
2024-03-03 20:00:17 +01:00
DrTuxedo
35242b4985 NEW TRAIT ROLE: Veteran Advisor (#81667)
## About The Pull Request
Adds a new Trait Job (jobs which only appear when the station gets a
trait for it) - Veteran Advisor.
The weight of the trait is 2 which makes it very rare.

Veteran Security Advisor is a role designated as a (duh) Advisor for the
HoS and Captain, as well as a mentor for all of the Officers. This is
because it has an experience requirement of **100 SECURITY HOURS**, so
no green Veterans.

Veteran Security Advisors are paraplegic (bonded to a wheelchair) and
with PTSD which freezes their mood and sometimes causes hallucinations.
They get an M1911 pistol in a holster because that's badass.

<details>
<summary>THE IMAGES</summary>

ADVISOR
![veteran advisor
chair](https://github.com/tgstation/tgstation/assets/42353186/e094669c-002f-4552-9692-c8f055a042eb)

THINGS HE SPAWNS WITH
![veteran advisor
shit](https://github.com/tgstation/tgstation/assets/42353186/27ed7e8a-bcd0-4ec2-9504-135a443492f0)

HIS UNIQUE MOODLET
![veteran advisor
desentized](https://github.com/tgstation/tgstation/assets/42353186/6fc04a24-b4fc-40bd-938f-c32389ac9eab)

SIGNUP BUTTON
![signup
button](https://github.com/tgstation/tgstation/assets/42353186/f10020c7-69fe-47f0-aa5f-7b56dfbc8200)

</details>

## Why It's Good For The Game
More funny Trait Jobs to the game!
There is a certain lack of those, there is only Cargorilla and Bridge
Assistant.

This job has big opportunities. Advisors can behave themselves like
drill sergeants, or wise old mentors. Because they are kinda, as people
only with 100 Security hours (yes those masochists exist) could play it
when it appears. This will also open opportunities for retired Sec mains
to tutor new generations without being directly involved in all of the
stress.
I mostly took a look at the Goonstation "Nanotrasen Security Consultant"
and Baystation "Senior Enlisted Advisor" as inspiration.

I tried to cut down any chances of this role being abused by power
gamers for its M1911 pistol and Bridge access, due to this they are
paraplegic so power gamers get disgusted, and if someone does somehow
win Antagonists while in a wheelchair - props to them, pure skill.

**REMEMBER THAT THIS IS A TRAIT JOB!** This means they won't appear
every round, but rather rarely! So they fit in as an occasional extra
fun for the round.
## Changelog
🆑
add: NEW TRAIT JOB: Veteran Security Advisor! Advise HoS and Captain on
Security matters, mentor Security Officers. Note that they are
paraplegic and fully emotional desensitized due to their past
experience.
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-02-27 03:59:36 +00:00
Lucy
081b84c631 Painkillers now actually induce analgesic effects (#81335)
## About The Pull Request

This adds a new trait, `TRAIT_ANALGESIA`, and makes various painkillers
(+ tenacity trauma) apply said trait.

This prevents various pain-related effects, such as screaming due to
pain, and also provides a speed bonus during surgery.

## Why It's Good For The Game

Gives more of an incentive to actually use reagents such as morphine or
miner's salve.

## Changelog
🆑
add: Painkillers (i.e morphine, miner's salve) now actually induce
analgesic effects, preventing various pain-related effects, such as
screaming due to pain, and also provides a speed bonus during surgery.
add: The tenacity trauma (traumatic neuropathy) also applies analgesic
effects.
refactor: Simplified code related to reagents adding traits.
/🆑
2024-02-14 01:01:06 +01:00
MrMelbert
e21dc5fec7 Kicks Martial Arts out of the attack chain (yippee), makes it use signals, plus a large clean up of existing martial arts (#81097)
## About The Pull Request

- Kicks Martial Arts out of the attack chain. 
- All Martial Arts attacks are now handled via unarmed attack or grab
signals
- This means all martial arts are now technically on the living level,
allowing any mob that can unarmed attack to martial arts. Sort of. YMMV.

- All martial arts block checking is now handled by the arts themselves,
meaning you can selectively decide for a martial arts strike to not be
blocked. Maybe good for the future.

- A comprehensive cleanup of all existing martial arts. Improving var
names, code, adding some missing animation calls, etc.

Fixes #74829

## Why It's Good For The Game

Untangles the mess that is martial arts, making it a lot easier to work
with the attack chain and making it overall a ton more consistent.

## Changelog

🆑 Melbert
refactor: Big martial arts refactor, they should now overall act a ton
more consistent. Also technically any mob can do martial arts. Let me
know if something is funky.
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-02-01 14:18:46 +00:00
Bloop
fc0a1f4068 Removes timeout_mod arg from add_mood_effect (#80964)
## About The Pull Request

Partial Revert of https://github.com/tgstation/tgstation/pull/80800

Assuming every num passed in the parameters of `add_mood_effect` is a
`timeout_mod` is incorrect, because there can be mood events that take a
numeric arg which is not meant to be multiplied against the timeout.

This leads to the same issue as multiplying it with strings essentially
(in one case, shown below, this results in a negative duration of a
timer).


![image](https://github.com/tgstation/tgstation/assets/13398309/f8af858f-04ef-4144-9a0b-2fae60b71272)


![Code_ZN176cpMqA](https://github.com/tgstation/tgstation/assets/13398309/a6ec7689-0171-4909-91cb-a17b56454eb6)

Plus having a keyword arg that may or may not actually be what the
keyword arg claims to be is really confusing and bad.

Instead here's what I propose: passing in an instantiated mood datum
itself, which has been modified, and copying the timeout from it before
discarding it.

It is not as clean as I'd prefer either, but at least it's logically
sound and the intent is clear, and it's the best I can think of short of
a major refactor of the entire system for this one small thing which is
only being used by food quality.


![image](https://github.com/tgstation/tgstation/assets/13398309/8560c066-bb0b-4066-af94-372d5ea62679)

## Why It's Good For The Game

Clearer, less smelly code.

## Changelog

🆑
code: removed the timeout_mod arg from add_mood_event, which was only
used for one thing and causes more issues than it's worth
/🆑
2024-01-16 20:57:42 +01:00
Hatterhat
27386bffe8 fixes a bunch of moodlets potentially lasting forever (less band-aidy) (#80800)
## About The Pull Request
In a previous PR (https://github.com/tgstation/tgstation/pull/79661), I
noted that a lot of moodlets tended to have their timeouts break because
it was passing their names and whatnot as a parameter, that gets fed
into the timeout modifier parameter, causing the timeout multiplier to
break, because BYOND type-agnosticism means that it can multiply a
number (timeout_mod) by text (a name or some other object), resulting in
0 - which makes a moodlet permanent. This is probably not intended.

This fixes that in two ways:
- Adding a `1` to potentially applicable moodlets (searched for with a
regex of `.add_mood_event(.*, .*,)`) just to make sure the timeout
doesn't get multiplied out weirdly.
- Making the add_mood_event thing CRASH() if the timeout_mod is bad.

If someone else wants to come up with a solution better than this,
please do.

## Why It's Good For The Game
Maybe having your arm permanently fall asleep after getting it
reattached sucks, moodlet-wise. (Being stuck with permanent
positive/negative moodlets is probably not intended.)

## Changelog

🆑
fix: Moodlets with parameters/effects e.g. limb reattachment moodlets
should probably disappear more appropriately.
/🆑

---------

Co-authored-by: Hatterhat <Hatterhat@users.noreply.github.com>
2024-01-15 07:08:01 +01:00
Rex9001
f88da4bcb9 Heretic DLC: Path of Moon (#79536)
## About The Pull Request
This pull request adds a new path.
The cross path is between ash and lock.

Credit to Fury McFlurry for the following sprites:
 ring_leader_effect

The path goes as follows:
 Moonlight Troupe
 Grasp of Lunacy
 Smile of the moon
 > Sidepaths:
    Mind Gate
    Ashen Eyes
 
 Mark of Moon
 Ritual of Knowledge
 Lunar Parade
 Moonlight Amulette
 > Sidepaths:
   Curse of Paralasys
   Unfathomable Curio
   Unsealed Arts
 
Moonlight blade
Ringleaders Rise
> Sidepaths:
   Ashen Ritual
 
 Last Act


Moonlight Troupe:
The first knowledge of path of moon, lets you make Lunar Blades with 2
iron and a knife

Grasp of Lunacy:
The grasp of this path hides your name for 15 seconds after use, but
more importantly it causes the person hit with the grasp
 to hallucinate everyone as indistinct human like figures.

Smile of the Moon:
A pointed spell that causes temporary blinding, muting, deafening and
confusing on the person its targeted at, these effects
 last longer the less sanity your victim has.

https://github.com/tgstation/tgstation/assets/120136161/db7cfaaa-8fe2-4f20-aa78-c17c17be4d63

Mindgate:
Lock-Moon. This spell causes you and your victim brain damage, the
victim also suffers a short amount of hallucinations
 and also 20 oxyloss.

https://github.com/tgstation/tgstation/assets/120136161/11d15acd-11d0-4e7d-a180-6481b18e9fd9

Mark of Moon:
When applied this paths mark pacifies the victim and they remain
pacifist until attacked or until the mark is detonated, when
 detonated the victim is left confused.

https://github.com/tgstation/tgstation/assets/120136161/41e601b5-76d4-4765-8b49-ada7de09feb7

Lunar Parade:
A spell that sends out a projectile that causes people hit by it to
follow the projectile whilst being unable to move. The
projectile also bounces around and is really useful to get people off
your back during chases.

https://github.com/tgstation/tgstation/assets/120136161/cddc8390-e8aa-4d68-b1a5-ab181e941a9b

Unfathomable Curio:
Transmute 3 rods, a brain and a belt into an Unfathomable Curio a belt
that can hold blades and items for rituals. Whilst worn
will also veil the heretic, allowing them to take 1 hit without
suffering damage, this veil will recharge quickly outside of
combat. If examined the examiner suffers brain damage and temporary
brain damage, and if a non-heretic uses it once the shield is damaged
the non-heretic user suffers massive brain damage and a permanent
uncurbable brain trauma. Lock-moon

Unsealed Arts:
Allows you to transmute a canvas and an additional item to create a
piece of art, these paintings have different effects depending on the
additional item added. Lock-moon
Possible paintings: 
    The sister and He Who Wept: 
    Additional atoms: Eyes. 
When a non-heretic looks at the painting they will begin to hallucinate
everyone as heretics.

   The First Desire: 
   Additional atoms: Any bodypart.
Increases the hunger of non-heretics, when examined drops an organ or
body part at the painting.

   Great chaparral over rolling hills: 
   Additional atoms: Any grown food. 
Spreads kudzu when placed, when examined grants a flower to the heretic.
			
   Lady out of gates: 
   Additional atoms: Gloves.
Causes non-heretics to scratch themselves until they remove their
jumpsuit, when examined removes all your mutations.
   
    Climb over the rusted mountain: 
    Additional atoms: Trash. 
Causes non-heretics to rust the floor they walk on and when examined
gives you a cool moodlet

These effects are mitigated for a few minutes when a non-heretic
suffering an effect examines the painting that caused the
effect. Except for great chapparal which spawns kudzu at their feet, and
Lady out of gates which gives them a random negative mutation.

https://github.com/tgstation/tgstation/assets/120136161/1d1bdd2f-cda5-4430-b3af-4742f98a59a8

https://github.com/tgstation/tgstation/assets/120136161/4e843ae4-9786-4e9b-8681-582713f4c789

Moonlight Amulette:
Allows the heretic to transmute 2 sheets of glass, a pair of eyes, a
brain and a tie. If the amulette is used on someone with low
sanity they go berserk attacking everyone if their sanity isnt low
enough it decreases their mood. Optionally you can add a
 poppy in the ritual to further decrease their mood on hit.

https://github.com/tgstation/tgstation/assets/120136161/ab820b3f-e7e6-407a-9a1a-93d49c0d7387

Moonlight Blade:
Causes the heretics blades to do brain and sanity damage whilst causing
hallucinations. The blades also cause giggling and
 laughter on hit. 

Ringleaders Rise:
An AoE spell that deals more brain damage the lower the sanity of the
victim, also causes hallucinations that last longer the
lower the sanity of the victim. If the victims sanity is low enoughit
causes them to go insane, the spell then halves their sanity.
This spell is on a longer cooldown and is more meant to be used as a
payoff or an instigator for a fight. The AoE area is 7 tiles

https://github.com/tgstation/tgstation/assets/120136161/4de85ba2-448a-485c-b739-77fcce86c0cb

Last Act:
The ascension lowers the cooldown of all the heretics spells by 33% and
increases the AoE range of Ringleaders Rise. The main
effect of this ascension is a passive sanity drain and hallucination
aura, if you have low sanity in the aura you will start to suffer
brain damage and if you reach the bottom you gain an aura of
hallucinations thus spreading the moon heretics influence
further. Not only that but roughly 1/5th of the crew will rise in
support of you becoming mini-heretics called acolytes that will attempt
to obey your commands!

I had videos showing off everything but they were too big for github
sadly so I will have to think of some other way to showcase all this
stuff.

This pr also adds a new optional atoms system which means that you can
have rituals that can be improved by adding additional atoms, like for
example moonlight amulette.
 
Feel free to give some suggestions for further ascension effects.
## Why It's Good For The Game

I feel like heretic is really missing a playstyle around insanity and
this slots neatly in to feel that gap. For being an eldritch antag of
horrors there is surprisingly little interaction with the sanity system
and I feel like this makes up for it, heretic is also missing some
distractions which is where the paintings can really shine and the
hallucinations which breed paranoia.

## Changelog
🆑
add: A new heretic path opens up! Gaze up at the great sky for the path
of the moon opens and the lie shall be slain in pursuit of ultimate
truth!
fix: Fixes the syndicate delusion not working
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-01-01 15:03:03 +01:00
13spacemen
908d6f1a2b Better Ghost Selection (#80283)
## About The Pull Request
Revived my old PR https://github.com/tgstation/tgstation/pull/68901

Replaces the annoying tgui alert popup "Do you want to be X? | Yes | No
| Never for this round" that is hard to read and steals window focus,
with a nice clean alert in the top right that counts down. If it's the
same event/mob they stack with 2x, 3x, etc. It also shows how many
candidates/ghosts are signed up.

The poll alerts have screentips too, they countdown and show if you're
signed up, how many people are signed up, if you chose "never for this
round" (which is cancelable)
## Why It's Good For The Game
![Screenshot 2023-12-13
030302](https://github.com/tgstation/tgstation/assets/46101244/04061a6b-cd9a-4546-9d71-bba6a6b70d87)

Way easier to see what role is available, you get a nice pic of the role
and get it's name in big text, you can cancel "never for this round",
and you can cancel signing up for a role before the timer is up
## Changelog
🆑
refactor: Ghost roles now offer ghosts a clickable poll button. Ghosts
can select a role, deselect it, alt-click it for "Never For This Round",
can cancel "Never", can see the countdown, and can see how many other
people are signed up for the role poll.
/🆑
2023-12-22 11:44:55 -08:00
tattle
fc1e5bfdba Obsession targets are logged (#80361)
## About The Pull Request
Obsession targets are logged

## Why It's Good For The Game
Obsession targets are logged

## Changelog
🆑 Tattle
admin: obsession targets are logged
/🆑

Co-authored-by: tattle <article.disaster@gmail.com>
2023-12-17 10:46:03 +01:00
LemonInTheDark
f03084c1ca FOV is Dead (Long Live FOV) (#80062)
## About The Pull Request

FOV as it is currently implemented is incompatible* with wallening.
I'm doin wallening, so we gotta redo things here.

The issue is the masking of mobs. Wallening relies on sidemap (layering
based off physical position), which only works on things on the same
plane (because planes are basically sheets we render down onto)
So rather then masking mobs, let's reuse the masking idea from old fov,
and use it to cut out a bit of the game render plane, and
blur/over-saturate the bit that's masked out.

My hope is this makes things visible in light, but not as much in
darkness, alongside making more vivid shit more easily seen (just like
real life)

Here's some videos, what follows after is the commits I care about
(since I had to rip a bunch of planes to nothing, so the files changed
tab might be a bit of a mess)

Oh also I had to remove the darkness pref since the darkness is doing a
lot of the heavy lifting now. I'm sorry.

Edit:
NEW FOV SPRITES! Thanks dongle your aviator glasses will guide us to a
better future.


https://github.com/tgstation/tgstation/assets/58055496/afa9eeb8-8b7b-4364-b0c0-7ac8070b5609


https://github.com/tgstation/tgstation/assets/58055496/0eff040c-8bf1-47e4-a4f3-dac56fb2ccc8

## Commits I Care About

[Implements something like fov, but without the planes as layers
hell](a604c7b1c8)

Rather then masking out mobs standing behind us, we use a combo color
matrix and blur filter to make the stuff covered by fov harder to see.

We achive this by splitting the game plane into two, masking both by fov
(one normally and one inversely), and then applying effects to one of
the two.

I want to make the fov fullscreens more gradient, but as an effect this
is a good start

[Removes WALL_PLANE_UPPER by adding a WALL_PLANE overlay to material
walls (init cost comes
here)](2548933739)

@Mothblocks see this. comment in commit explains further but uh, we need
to draw material walls to the light mask plane so things actually can be
seen on them, but we can't do that and also have them be big, so they
get an overlay. Sorry, slight init time bump, about 0.5 seconds. I can
kill it with wallening.

[Moves SEETHROUGH_PLANE above
ABOVE_GAME_PLANE](beec4c00e0)

I don't think it actually wants to draw here
@Time-Green I think this was you so pinging for opinion

[Resprites FOV masks to be clean (and more
consistent)](f02ad13696)

[f02ad13](f02ad13696)

This is 100% donglesplonge's work, he's spent a week or so going back
and forth with me sharpening these to a mirror shine, real chill

## Why It's Good For The Game

Walls are closing in

## Changelog
🆑 LemonInTheDark, Donglesplonge
image: Redoes fov "mask" sprites. They're clean, have a very pleasant
dithering effect, and look real fuckin good!
del: Changed FOV, it no longer hides mobs, instead it blurs the hidden
area, and makes it a bit darker/oversaturated
/🆑

###### * It's technically possible if we start using render targets to
create 2 sets of sources but that's insane and we aren't doing it
2023-12-13 15:52:24 +01:00
Rhials
53304ed25d Blackout drunkard warning adjustment (#80210)
## About The Pull Request

This adjusts the "you have 50 seconds before sobering up!" warning for
the blackout-drunkard split personality.

Originally, this message would always send when 50 seconds are left,
meaning you'd get a "50 seconds left" warning every second, for the last
50 seconds.

Now, instead of that, you get a warning starting at the 60 second mark,
that updates you every 20 seconds.

So basically, you get a warning at 60, 40, and 20 seconds left instead
of every second for the last 50 seconds of drunkenness
2023-12-11 13:20:38 -06:00
GoldenAlpharex
c2e5e2f0a8 Fixes the typing indicator (#80153)
## About The Pull Request
It was very specifically broken by [this
commit](94d00aa526),
because it wrongfully changed the logic. Now the typing indicator is
back, it's no longer just the thinking indicator.

## Why It's Good For The Game
Typing indicator is meant to be there, now it's back! No more awkward
flickering!

## Changelog

🆑 GoldenAlpharex
fix: The typing indicator has overcome its shyness and is now back to
its usual form.
/🆑
2023-12-06 19:52:28 -07:00
san7890
904c81bbcd Moves thinking_IC variable to a trait (#80122)
## About The Pull Request

This was another boolean that was used to just manage stuff codeside
that really was not accessed _too_ much and is ultimately not useful as
a variable on `/mob`. This just moves it to a trait because it's only
really used in a few spots for a similar intent+purpose.
## Why It's Good For The Game

Less stuff to deal with in the average view variables window whenever
looking at a mob, which is really nice and welcome.
## Changelog
Doesn't concern players.
2023-12-05 02:22:07 -05:00
MGOOOOOO
c00f7d53a3 The Inversenning : Superior Healing Medications (#79342)
Introducing new inverse reagents for existing superior healing
medications! This push includes...

**Benzoic Acid** : Inverse of Salicylic Acid. Robust fertilizer that
provides a decent range of benefits for plant life.

**Oxymetholone** : Inverse of Oxandrolone. Anabolic steroid that
promotes the growth of muscle during and after exercise.

**Bamethan** : Inverse of Salbutamol. Blood thinner that drastically
increases the chance of receiving bleeding wounds.

**Pendetide** : Inverse of Pentetic Acid. An unusual bioradioactive drug
that purges basic radiation healing chems. Also increases the severity
of radiation poisoning.

**Hyoscyamine** : Inverse of Atropine. Heals heart and stomach damage,
and slowly removes minor toxin damage.

**Ammoniated Sludge** : Inverse of Ammoniated Mercury. A ghastly looking
mess of mercury by-product which causes bursts of manic hysteria.

**Inreziniver** : Inverse of Rezadone. Makes the user horribly afraid of
all things related to carps.

This is an effort to add more variety to the existing inverse reagent
system within chemistry. Not only should this variety serve to provide
additional options for a Chemist to experiment with, they should also
broaden the possibilities for already existing strategies.
2023-11-28 14:53:09 +00:00
Jeremiah
bbe440b3d6 More standardization for ghost notifications (READY) (#79596)
## About The Pull Request
I'm still not satisfied with how ghost notifications work. This gives
every notification with a source (99% of all notifications, in other
words) a link to jump/orbit. Currently, notifications with "play"
interactions would only get the interact link, so jumping to the source
was pretty annoying.

It removes posting the entire message in the alert tooltip, as some got
pretty lengthy and it didn't seem to fit. To replace this, they will
always use headers

After:


![image](https://github.com/tgstation/tgstation/assets/42397676/debfce52-3627-4a43-8663-33d61d893161)


![image](https://github.com/tgstation/tgstation/assets/42397676/01f299ae-dc6a-45f8-a97a-cb2c815088b2)


![image](https://github.com/tgstation/tgstation/assets/42397676/99567376-063e-458e-af2a-2dd4306747cc)

NOTIFY_JUMP and NOTIFY_ORBIT have been merged, since the only difference
seems to be whether it's a turf. The result shaves off some redundant
lines of code, since most-every usage of notify_ghosts uses
NOTIFY_ORBIT.
## Why It's Good For The Game
More standardization for the ghost notification system. Adds a few alert
headers that never had them. All in all, makes it easier for creators to
throw alerts at ghosts
## Changelog
🆑
qol: Nearly every ghost alert should now feature a "VIEW" button, even
those with click interaction.
del: Ghost alerts no longer show the entire message in the tooltip,
instead have been replaced with titles.
/🆑
2023-11-19 05:13:25 +01:00
MrMelbert
1a204ec4eb Fix split personality commune being unusable I think (#79631)
## About The Pull Request

Likely fixes #79586 and likely fixes #78081 . 

Split persons's loc is their parent mob, so they were being disallowed
from casting due to not being loc's in a turf.

Further testing required

## Changelog

🆑 Melbert
fix: Split persons can talk to their host once again
/🆑
2023-11-10 21:06:16 -07:00
MrMelbert
73d108025f Adds wibbles to certain anomalous entities (#79549)
## About The Pull Request

Adds wibble animation to portals, some anomalies, and bluespace rifts.


https://github.com/tgstation/tgstation/assets/51863163/9355dc53-590e-4558-82a3-15145829ce16

## Why It's Good For The Game

It looks kinda cool.
Helps cement these as anomalous, wacky things that don't necessarily fit
in our plane of existence.

## Changelog

🆑 Melbert
add: Anomalies, portals, and bluespace rifts will now wibble a bit. 
/🆑
2023-11-07 17:41:42 -07:00
lizardqueenlexi
5f1125c902 Drunken Blackout cannot be gained randomly. (#79526)
## About The Pull Request

Fixes #79138.

Removes random gain from Alcohol-Induced CNS Impairment, making it only
obtainable by actually getting blackout drunk, rather than just bashing
your head in with a bat to see what happens.
## Why It's Good For The Game

The drunken blackout trauma has a specific flavor tied to the method of
gaining it, which is to say, getting drunk off your shits. It doesn't
make much sense for it to be gained from other sources of brain damage,
since those largely don't involve actually being drunk.

This should also fix a bug where the text "**_is blacking out!_**" will
randomly appear to observers without any name or anything, which appears
to happen when random human corpses have their brains decay enough to
randomly receive this trauma while dead. I think there's something to be
said for the idea that corpses should not be rolling traumas at all, but
that's something for another day.
## Changelog
🆑
fix: You will now only become blackout drunk if you've actually been
drinking.
fix: Observers should stop being notified that a nameless entity is
blacking out.
/🆑
2023-11-05 23:08:45 -07:00
Rhials
3c7005a37c Converts some notify_ghosts args to bitflags, multilines all notify_ghosts calls (#79320)
## About The Pull Request

This helps clean up my favorite helper proc in the whole codebase,
`notify_ghosts()`.

The notify_suiciders, ignore_mapload, and flashwindow args are GONE.
They have been replaced with the notify_flags bitflag argument. This was
intended to make deadchat announcements a bitflag argument too, but
those got reverted right before I originally wanted to submit this PR.

The on-screen popup now shows the notification body when you hover it
with your mouse again. The format is now `[notify_ghosts message] --
[click action (orbit/jump/play)]`

Every single `notify_ghosts()` call has been changed to multiline format
and has been given trailing commas. Pretty!
## Why It's Good For The Game

Cleans up a proc that is very popular and going through a lot of changes
at the time.

Allows for further flexibility when this proc inevitably gets tweaked or
improved. 12 -> 10 args is an improvement, and it doesn't impact the
helper's flexibility at all.
## Changelog
🆑 Rhials
code: The notify_ghosts proc has been cleaned up. Please report any
abnormal changes in deadchat notification behavior.
qol: The on-screen deadchat popups now contain the notification blurb
when hovered with your mouse again.
/🆑
2023-11-05 15:26:50 -08:00
san7890
e03822fe1d Standardizes Adding Datum Actions into a proc/define (Bonus AI Support) (Bonus Useless Code Cleanup) (#79389)
## About The Pull Request

The way we add multiple actions has been very unstandardized, with
several implementations of this code doing certain things wrongly (i.e.
not nullchecking `ai_controller`), so let's do something in the vein of
#74037 and just make one nice big ol' proc that catches a lot of these
cases. There are still a few things that simply can't be done here, but
this gets the most generic "give my mob some actions and also maybe tell
the AI about it" stuff done.

This is only useful in cases where we don't ever need to reference the
ability ever again when it's added. In an ideal world we would never
need to reference the ability again and it would all be self-contained,
but this is not an ideal world. However, a lot of the latticework has
been built around certain implementations of this behavior making
refactoring it just a bit easier.

I also did a lot of auditing on `Destroy()` stuff, because
`/datum/action`s listen to signals when their parent is `qdel`ing, so we
don't need to neither hold nor clear references on our mob's
`Destroy()`. This was all cleaned up now because even if we couldn't use
`grant_multiple_actions()` (the new proc I add in this PR), it's just
not useful at all and will further hinder efforts to implement this new
proc.

Also also, I noticed in some places (such as megafauna) that we were
initializing a lot of datum actions _in nullspace_. We didn't pass the
`src` argument to `New()`. I quickly fixed that, as well as got rid of
the useless types we had going on.

Also also also, I added a define macro to handle some of the cases that
melbert was speaking about in his review down below. All you need to do
is invoke the define on the typepath, and you should be good to go from
there. There's probably a better way to do it, lmk though. we do the
whole `do while` thing in order to prevent code leakages.

## Why It's Good For The Game

* Very easy to change the implementation. In case we need to do
something different in how we add actions or anything like that, we can
simply just edit instances where this proc is located.
* Standardizes addition behavior. There's a lot of cases like the
aforementioned not-null-checking `ai_controller` that we really need to
look out for, so having it all in one accessible proc ensures standard
behavior.
* Reduces copy-pasta. A lot of mobs had their own individual
implementation of this, so let's just clean up all those lines of code.
## Changelog
🆑
refactor: The way mobs get specialized actions (like revenants shocking
lights or regal rats summoning rats to their side when you slap them)
have been modified, please report any bugs.
/🆑

This doesn't touch the following case FTR:
* Instances where we need to do work on the `/datum/action` after we
`Grant()` it, like if we were to edit some variable on the action or if
we need to call procs on said action. I don't like how the current code
is so reliant on storing a variable to it, but that's a windmill to
attack another time.
2023-11-03 04:02:26 +00:00
Jackraxxus
fdfc55d483 Fixes Obsessed Moodlets Not Going Away When They Lose The Trauma (#79295)
Adds a clear_mood_event proc to obsessed's on_lose so that the mood
event goes away.
2023-10-31 00:45:59 +00:00
FinancialGoose
689ce7b5a7 Blackout qol (#78965)
## About The Pull Request
This pr improves the gameplay of blackout drunk character via:
-Add hiccup sound cues and emote
-Add warning for duration running out
-Makes it more reasonable for blackout character to survives
-Makes it harder for blackout character to sleep
Balance changes:
-Blackout char will have random 10 seconds bouts of inability to
interact with advance tools, computer, tools, scanner etc..
-Blackout char will gain some stamina regen, sort of a "too drunk to
feel tired" buff
To-do
- [x] Add some sort of buff for blackout character
## Why It's Good For The Game
Makes it so blackout character gameplay is more enjoyable than just
getting sleep for 90 seconds, plus more feedback for the surrounding
player to know that they are blackout. The penalty is added so that its
harder for player to majorly grief i.e assembling the ttv, or turning
off power/sm cooling, wont stop them outright tho.
Fixes #79138, #79163
## Changelog
🆑
qol: improves blackout drunk character gameplay
fix: fixed improper prob() placement that caused blackout character to
be forced sleep
sound: added hiccup sound
/🆑
2023-10-24 01:08:10 +00:00
Jeremiah
be5e7ccb02 Adds a subtle ghost poll (#79105)
## About The Pull Request
This makes a new ghost poll system which doesn't give TGUI popups -
instead, users are prompted to follow the POI and one of the orbiters is
chosen. The old system remains in place, so you can still prompt if you
want to.

This gives two things:
1. A deadchat notification:

![image](https://github.com/tgstation/tgstation/assets/42397676/073fcfff-b1ed-47c3-bae0-4abf9c599144)
2. A screen alert:

![image](https://github.com/tgstation/tgstation/assets/42397676/92a4e566-614a-43ca-8680-3cb4ff86ced9)

## Why It's Good For The Game
As stated in #76507, popups are pretty annoying. This is halfway between
a screen alert with no time limit and an event with more important
pings. This is better because:
1. Less popup fatigue
2. You can SEE how many you're competing with
4. DRY
## Changelog
🆑
add: Adds a subtle ghost poll. This pings in dead chat and gives a
screen alert, but no TGUI popup. Orbit the point of interest to be
selected for the role.
refactor: A number of ghost spawns now feature this alert. Write an
issue report if anything breaks.
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2023-10-21 20:21:36 +00:00
Rhials
dde1db66e7 Ghost orbit popup double feature: Blackout drunkeness and Nar'Sie runes (#78982)
## About The Pull Request

This adds two new notify_ghosts popups, for Blackout Drunkeness and
Nar'Sie Rune Inscription.
## Why It's Good For The Game

Nar'Sie rune inscription already has a big announcement, but no orbit
prompt. It's an important enough event to warrant having one.

The blackout drunkenness period is something that deserves to have an
audience.
## Changelog
🆑 Rhials
qol: Ghosts will now be prompted to orbit when someone loses control due
to being blackout drunk.
qol: Ghosts will now be prompted to orbit when a cultist begins
inscribing a Nar'Sie rune.
/🆑
2023-10-19 23:14:10 +02:00
FinancialGoose
491e80c521 Add blackout drunk (#78394)
## About The Pull Request
You drink too much you lose your memory, but we cant really do that so
instead a ghost will take control of your body temporary. The drunk
character will then be given objective to do wild, wacky and otherwise
unusual stuff until the original returns to backtrack what transpired.
The blackout character will not be able to kill or hurt the body. Oh and
the duration is about 10 minutes
## Why It's Good For The Game

![image](https://github.com/tgstation/tgstation/assets/92416224/16808551-43a3-4495-848a-4707412fc049)
## Changelog
🆑
add: Added blackout, happens when you drink...ALOT
/🆑

---------

Co-authored-by: carlarctg <53100513+carlarctg@users.noreply.github.com>
2023-10-03 00:16:32 -04:00
san7890
a7060641bb Converts vomit() to use bitflags (#78191)
## About The Pull Request

Having seven trillion boolean arguments isn't kino nor poggerchampion,
let's adjust it so we use a define flag-based system that works really
nice. I also cleaned up a lot of jank and stuff that simply just never
was meant to work.

We also had sprites for nanite vomit, but this was completely unused!
Since we still have an interaction where you're meant to throw up
nanites, I added that it so it could be leveraged. Neato.
## Why It's Good For The Game

Much easier to pass in the right args or special args to a high-profile
proc.
## Changelog
🆑
image: When you throw up nanites, your vomit should now be appropriately
nanite-colored.
/🆑

Let me know if I glonked anything.

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
2023-09-11 21:39:16 +00:00
John Willard
ef352ca731 minor changes to living and mob vars (#77820)
## About The Pull Request

Renames m_intent to move_intent and moves it to the living level
renames tod to station_timestamp_timeofdeath
removes stun_absorption and see_override as one was unused and the other
was never actually implemented

## Why It's Good For The Game

Many vars on the mob and living level were intended to be on the living
and carbon level, but weren't for one reason or another. Generally it
was out of laziness to ensure the mobs being checked for these vars were
the intended mobs, and there's some todo comments on how they want it
changed in the future, though it never happened.
I'm hoping to get these all down in the future, I originally wanted to
move ``stat`` from mob to living but it had hundreds of errors so I
didn't want to do it all here.

## Changelog

Nothing player-facing.
2023-08-26 02:24:15 +01:00
DATAxPUNGED
e02595078c Adds a Heresy phobia, fixes some typos in heretic code, places the stargazer and fire shark under heretic_summon (#77306)
## About The Pull Request

Instead of a supernatural phobia, sacrificed people will now get a
HERESY phobia, which specifically targets heretic stuff, instead of all
of magic. Other heretics, however, do not get this, but instead get
knowledge points sapped from them, as their mind is ruined in a
different way than normal people. This comes with different flavour text
and a harsher but shorter lasting mood debuff. Also fixes some
"knowlege" code typos and places the star gazer and fire shark all in
under heretic_summon
## Why It's Good For The Game

Heretics, Wizards, Chaplains and Cultists will now be able to keep
playing the game after getting sacrificed without overdosing on
psicodine, while still retaining the phobia's original design purpose.
placing the fire shark and star gazer under the same type also is useful
as they share a lot of values. typos bad.
## Changelog
🆑
add: Sacrificed heretic targets will now receive a phobia of heresy
instead of a phobia of the supernatural. Sacrificed heretics will not
get this phobia, but will lose knowledge points instead.
/🆑
Huge thanks to Helg2 for doing the original PR and helping me with this
one, couldn't be done without them

---------

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
Co-authored-by: Helg2 <93882977+Helg2@users.noreply.github.com>
2023-08-21 02:11:36 +02:00
Bloop
ed8445a312 Adds sanity checking to prefs checks, fixing a bug that can cause emotes to stop displaying intermittently (#76946)
## About The Pull Request

This PR adds a bunch of sanity checking to the `prefs.chat_toggles` var
accesses.

Prefs can be null when client is creating/deleting and this causes a
runtime where you might not be able to use emotes.


![image](https://github.com/tgstation/tgstation/assets/13398309/d89649d4-19c7-439f-b080-332709196505)

EDIT: as per suggestion I stopped masking the issue and added stack
traces instead. And made them into helper procs to avoid code
duplication.

For some of these procs it is important that we are able to continue
running to get to the end. **A ghost having null prefs should not stop
everyone else from hearing/seeing the emote.**

So now they will put the stack trace and keep on trucking if that issue
occurs. This is the main 'point' of the PR, which has seemingly gotten
bogged down in the creation of the two helper procs--apologies.

See https://github.com/tgstation/tgstation/pull/70404 for essentially
the same issue but applied to chat messages. I have gone back and
replaced the duplicated code from that to use the new helper procs
instead.

## Why It's Good For The Game

Anything chat related is a bad place to runtime. Some messages can take
a while to type out and to have it not display is frustrating at worst,
possibly detrimental if you have to communicate something urgently.

## Changelog

🆑
fix: fixes a bug that can cause emotes to stop working if a client is
being created or deleted
/🆑
2023-08-14 22:30:35 +02:00
Jacquerel
41b11f513d Improved Imaginary Friend Smite (#77331)
## About The Pull Request

By admin request:
- The Imaginary Friend smite now allows you to select "Offer to ghosts"
rather than selecting an observer mob manually.
- If you select this option you can also select to bulk-accept multiple
ghosts at a time, if you want to give people twelve imaginary friends
without having to smite them 12 times.

This necessitated changing the order of events a little bit so nwo you
choose whether they have a randomised appearance before picking a
candidate.

## Why It's Good For The Game

Makes it easier to drop the entire end of round deadchat into one guy's
brain with just a couple of clicks

## Changelog

🆑
admin: The imaginary friend smite now allows selecting "offer to ghosts"
instead of having to perform that poll yourself manually. When offering
to ghosts you can also offer for several ghosts to volunteer at the same
time.
/🆑
2023-08-04 12:29:19 -06:00
GPeckman
5cbe67e195 Replaces Upgraded Cybernetic Ears with two new variants (#75931)
## About The Pull Request
Adjusts the placement of basic and upgraded cybernetic ears in the
research tree and adds two new variants: Whisper-sensitive Cybernetic
Ears, which make it slightly easier to hear whispers from a tile away,
at the cost of higher vulnerability to flashbangs and other loud noises;
and Wall-penetrating Cybernetic Ears, which allow you to 'hear through
walls' so to speak, also at the cost of higher vulnerability to loud
noises.

Basic cybernetic ears are now in basic medical tech node, meaning that
medbay can print them roundstart the same as other basic cybernetics.
The upgraded cybernetic ears are now unlocked with the other tier 2
cybernetics. The two new ear variants are unlocked with the other tier 3
cybernetic organs, and the luminiscent and welding shield eyes have also
been moved there from the cybernetic implants node for consistency
reasons.

The whisper ears allow you to clearly hear whispers from up to seven
tiles away, the same range where you can hear normal speech. The
wall-penetrating ears allow you to hear normal speech within seven tiles
even through walls. Due to technical limitations, runechat popups do not
show up for people you can't see, but the messages will still show up in
chat.
## Why It's Good For The Game
Currently, upgraded cybernetic ears are very underwhelming compared to
other high-tier cybernetic organs. All other high tier organs provide
some sort of benefit; even if the benefit is minor like a built-in
flashlight, a slightly higher tolerance to alcohol and toxins, or higher
tolerance to disgusting food. This change is intended to grant similarly
minor but useful benefits to the cybernetic ears.
## Changelog
🆑
add: Added whisper-sensitive cybernetic ears, which make it much easier
for the user to hear whispers at the cost of being more vulnerable to
loud noises
add: Added wall-penetrating cybernetic ears, which allow you to hear
speech through walls
balance: Basic cybernetic ears and upgraded cybernetic ears are now
unlocked with the other basic/normal cybernetics
balance: The welding shield and luminiscent cybernetic eyes are now
unlocked with the other upgraded cybernetics
/🆑
2023-08-03 11:38:25 +02:00
Bloop
16ee828253 Fixes a type mismatch error with phobias (#77120)
## About The Pull Request

Closes https://github.com/tgstation/tgstation/issues/77113
Closes https://github.com/Skyrat-SS13/Skyrat-tg/issues/22686

Fixes the recently introduced type mismatch seen above.

span_phobia() needs a string arg not a datum. This is why you test your
code folks.

## Why It's Good For The Game

<details><summary>Works</summary>


![dreamseeker_kV93wU6eT8](https://github.com/tgstation/tgstation/assets/13398309/570704ca-66e3-4612-9855-791a1e27bc77)

</details>

## Changelog

🆑
fix: fixes a type mismatch error with some of the phobia chat messages
/🆑
2023-07-27 13:03:58 -06:00
distributivgesetz
9bd54af761 Phobia warnings have the same glowy text now as they would in say messages (#77066)
## About The Pull Request

Title.
## Why It's Good For The Game

Fixes #48028
## Changelog
🆑
spellcheck: Phobia warnings have the same glowy text now as they would
in messages.
/🆑
2023-07-25 11:06:42 -07:00
MrMelbert
74e268f558 Unit test gaining and removing traumas (#76748)
## About The Pull Request

Requires #76744 

Tests the granting and removing of brain traumas. 

## Why It's Good For The Game

See
https://github.com/tgstation/tgstation/pull/76744#issuecomment-1630066603

## Changelog

Not necessary unless it finds something funky

---------

Co-authored-by: san7890 <the@san7890.com>
2023-07-12 03:39:22 -04:00
MrMelbert
25ff13b6bb Fix Alphasia removal (#76744)
## About The Pull Request

Got messed up in resolving merge conflicts
Hello darkness my old friend

Fixes #76734 

## Changelog

🆑 Melbert
fix: Fixes Aphasia being removed
/🆑
2023-07-11 12:44:53 -06:00
MrMelbert
8c1e35e1c0 Refactors mind language holders into non-existent, fixes new languages being deleted on species swap + tests (#76612)
## About The Pull Request

This PR refactors mind language holders into non-existence

As a result, `update_atom_languages` is no longer necessary

Mind-bound languages are transferred via `/mind/proc/transfer_to`

Species changing no longer deletes and re-creates the mob's language
holder, allowing them to keep any languages they have.

Species languages are sourced from `LANGUAGE_SPECIES` now, meaning they
are removed when they change species. If the mob is not a human with a
species datum, these are effectively just atom level languages.

Makes a bunch of unit tests to ensure language transfer over certain
events works as intended

## Why It's Good For The Game

Mobs with minds having two independent language holders results in a
good few bugs, and simply doesn't make sense when we have sources
(`LANGUAGE_MIND`).

Instead of tracking two language holders, we can simply use sources
better and only track one.

This means that the language holder you start with is your language
holder, period. It doesn't get deleted or re-instantiated or whatever.

## Changelog

🆑 Melbert
refactor: Refactored language holders, making species changes not delete
all of your known languages
/🆑
2023-07-10 18:34:57 +00: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
ChungusGamer666
1f9bc21fc5 Hemiplegic quirk (#76526)
## About The Pull Request

Like paraplegic, but instead of a horizontal half of your body being
fucked, it's a vertical half!

![image](https://github.com/tgstation/tgstation/assets/82850673/aab1059e-9f5a-4778-a72a-c55c9fe75403)

![image](https://github.com/tgstation/tgstation/assets/82850673/2edf1a76-906f-41f5-984c-4260b65a279d)

## Why It's Good For The Game

Character customization and pure, undistilled human suffering.

## Changelog
🆑
add: Added Hemiplegic quirk.
/🆑

---------

Co-authored-by: carlarctg <53100513+carlarctg@users.noreply.github.com>
2023-07-05 19:09:38 -06:00
MrMelbert
d3fbaea8bd Fixes flaky language holder failure (#76477)
## About The Pull Request


![image](https://github.com/tgstation/tgstation/assets/51863163/d4f2fd51-6884-4623-b208-f670b6cdb75d)

## Why It's Good For The Game

Flaky failure

## Changelog

🆑 Melbert
fix: Fixes a runtime from people with aphasia trauma getting deleted
/🆑
2023-07-02 01:28:20 +01:00
Sealed101
dfa0487f7d Makes Godwoken Syndrome VoG commands ignore spam filter (#76146)
## About The Pull Request
they're basically forced speech and should not account for the spam
filter

## Why It's Good For The Game
fixes #55392

## Changelog
🆑
fix: fixed Godwoken Syndrome VoG commands triggering the spam filter
/🆑
2023-06-20 22:02:15 -04:00
Thunder12345
27005bbfa2 Alphabetises Phobias (#75150)
## About The Pull Request

Alphabetises some lists, json, and type paths related to phobias

## Why It's Good For The Game

It's neat and tidy

## Changelog
Not player facing
2023-05-04 10:33:57 -07:00
oranges
4c48966ff8 Renames delta time to be a more obvious name (#74654)
This tracks the seconds per tick of a subsystem, however note that it is
not completely accurate, as subsystems can be delayed, however it's
useful to have this number as a multiplier or ratio, so that if in
future someone changes the subsystem wait time code correctly adjusts
how fast it applies effects

regexes used

git grep --files-with-matches --name-only 'DT_PROB' | xargs -l sed -i
's/DT_PROB/SPT_PROB/g'
git grep --files-with-matches --name-only 'delta_time' | xargs -l sed -i
's/delta_time/seconds_per_tick/g'
2023-04-11 21:31:07 -07:00
Jacquerel
7db43373d9 You will only be scared by phobia items equipped to players if the slot is visible on examine (#74273)
## About The Pull Request

This PR adds a new helper proc which returns a list of all items
_visible_ on a human and then applies it to phobias in place of "all
items equipped on any slot of a human".
This excludes pockets at all times, and other slots if you are wearing
items which cover them up.

If you have a clown phobia and the CE is storing a bananapeel in their
pocket and is wearing a clown suit under their deployed MODsuit then you
will not be afraid of them as there is no reason you would be aware of
these facts.
As soon as they remove the banana peel from their pocket to their hands,
or undeploy their suit to reveal their secret baggy pants, the terror
will strike.

## Why It's Good For The Game

Phobias are annoying and debilitating by design, but they should at
least only be triggered by objects which have a visible and identifiable
source.

## Changelog

🆑
fix: Players with phobias will no longer be frightened by items equipped
to players in slots which are not considered to be visible.
fix: Players with a phobia of the supernatural won't be spooked by void
cloaks which are currently invisible.
/🆑
2023-03-27 13:07:22 -06:00
san7890
bf6f81a9b5 Implements AddTraits and RemoveTraits procs for adding/removing multiple traits + swag unit test (#74037)
On the tin, doing it like this means we can reduce our overall line
fingerprint whenever we have to add two or more traits from the same
source on the same target. Especially helps when we get to the 4+ range
of traits, a breath of fresh air even.

Doesn't mean we have to do for loops, as that's already handled within
the define as well. I replaced some of the checks with `length()`
checks, let me know if I should switch it over to something else (maybe
`islist()`)? We stack_trace whenever we're not passed a list reference
on purpose, and sometimes var/lists are null by default (or just empty,
making this redundant).
## Why It's Good For The Game

I commonly feel the urge to write "use `AddTraits()`" or something in
reviews, then am sad when I remember it doesn't exist. I will no longer
be sad.

Can ensure a lot more trait safety as well by using static lists- when
both ADD_TRAIT_LIST and REMOVE_TRAIT_LIST re-use the same list, you are
confident (from a static point of view) that everything that you want to
be adding/removing works.

I may have missed a few things where this could be used, but both macros
implemented in this PR still use the same framework that was being used
in the last four years- so stuff won't break if left untouched. Just a
nifty new tool for developers.

also fixed up some code in the area, numerous bugs were found and
exploded
2023-03-18 01:57:06 +00:00
Kubisopplay
85d66cea79 Fixes split personality ghosting its owner if cured in a wrong moment (#73579) 2023-02-25 14:05:11 -05:00
LemonInTheDark
ab307032ed Nightvision Rework (In the name of color) (#73094)
## About The Pull Request

Relies on #72886 for some render relay expansion I use for light_mask
stuff.

Hello bestie! Night vision pissed me off, so I've come to burn this
place to the ground.
Two sections to discuss here. First we'll talk about see_in_dark and why
I hate it, second we'll discuss the lighting plane and how we brighten
it, plus introducing color to the party.

### `see_in_dark` and why it kinda sucks

https://www.byond.com/docs/ref/#/mob/var/see_in_dark

See in dark lets us control how far away from us a turf can be before we
hide it/its contents if it's dark (not got luminosity set)
We currently set it semi inconsistently to provide nightvision to mobs.

The trouble is stuff that produces light != stuff that sets luminosity.
The worst case of this can be seen by walking out of escape on icebox,
where you'll see this


![image](https://user-images.githubusercontent.com/58055496/215683654-587fb00f-ebb8-4c83-962d-a1b2bf429c4a.png)

Snow draws above the lighting plane, so the snow will intermittently
draw, depending on see_in_dark and the luminosity from tracking lights.
This would in theory be solvable by modifying the area, but the same
problem applies across many things in the codebase.
As things currently stand, to be emissive you NEED to have a light on
your tile. People are bad at this, and honestly it's a bit much to
expect of them. An emissive overlay on a canister shouldn't need an
element or something and a list on turfs to manage it.
This gets worse when you factor in the patterns I'm using to avoid
drawing lights above nothing, which leads to lights that should show,
but are misoffset because their parent pixel offsets.

It's silly. We do it so we can have things like mesons without just
handing out night vision, but even there the effect of just hiding
objects and mobs looks baddddddd when moving. It's always bothered me.
I'll complain about mesons more later, but really just like, they're too
bright as it is.

I'm proposing here that rather then manually hiding stuff based off
distance from the player, we can instead show/hide using just the
lighting plane. This means things like mesons are gonna get dimmer, but
that's fine because they suck.

It does have some side effects, things like view() on mobs won't hide
stuff in darkness, but that's fine because none actually thinks about
view like that, I think.

Oh and I added a case to prevent examining stuff that's in darkness, and
not right next to you when you don't have enough nightvision, to match
the old behavior `see_in_dark` gave us.

Now I'd like to go on a mild tangent about color, please bare with me

### Color and why `lighting_alpha` REALLY sucks

You ever walk around with mesons on when there's a fire going, or an
ethereal or firelocks down.
You notice how there isn't really much color to our lights? Doesn't that
suck?

It's because the way we go about brighting lighting is by making
everything on the lighting plane transparent.
This is fine for brightening things, but it ends up looking kinda crummy
in the end and leads to really washed out colors that should be bright.
Playing engineer or miner gets fucking depressing.

The central idea of this pr, that everything else falls out of, is
instead of making the plane more transparent, we can use color matrixes
to make things AT LEAST x bright.

https://www.byond.com/docs/ref/#/{notes}/color-matrix

Brief recap for color matrixes, fully expanded they're a set of 20
different values in a list
Units generally scale 0-1 as multipliers, though since it's
multiplication in order to make an rgb(1,1,1) pixel fullbright you would
need to use 255s.

A "unit matrix" for color looks like this:
```
list(1, 0, 0, 0,
     0, 1, 0, 0,
     0, 0, 1, 0,
     0, 0, 0, 1,
     0, 0, 0, 0
)
```

The first four rows are how much each r, g, b and a impact r, g, b and
well a.
So a first row of `(1, 0, 0, 0)` means 1 unit of r results in 1 unit of
r. and 0 units of green, blue and alpha, and so on.
A first row of `(0, 1, 0, 0)` would make 1 red component into 1 green
component, and leave red, blue and alpha alone, shifting any red of
whatever it's applied to a green.

Using these we can essentially color transform our world. It's a fun
tool. But there's more.

That last row there doesn't take a variable input like the others.
Instead, it ADDS some fraction of 255 to red, green, blue and alpha.

So a fifth row of `(1, 0, 0, 0)` would make every pixel as red as it
could possibly be.

This is what we're going to exploit here. You see all these values
accept negative multipliers, so we can lower colors down instead of
raising them up!
The key idea is using color matrix filters
https://www.byond.com/docs/ref/#/{notes}/filters/color to chain these
operations together.

Pulling alllll the way back, we want to brighten darkness without
affecting brighter colors.
Lower rgb values are darker, higher ones are brighter. This relationship
isn't really linear because of suffering reasons, but it's good enough
for this.
Let's try chaining some matrixes on the lighting plane, which is bright
where fullbright, and dark where dark.

Take a list like this

```
list(1, 0, 0, 0,
     0, 1, 0, 0,
     0, 0, 1, 0,
     0, 0, 0, 1,
     -0.2, -0.2, -0.2, 0
)
```
That would darken the lighting a bit, but negative values will get
rounded to 0
A subsequent raising by the same amount
```
list(1, 0, 0, 0,
     0, 1, 0, 0,
     0, 0, 1, 0,
     0, 0, 0, 1,
     0.2, 0.2, 0.2, 0
)
```
Will essentially threshold our brightness at that value.
This ensures we aren't washing out colors when we make things brighter,
while leaving higher values unaffected since they basically just had a
constant subtracted and then readded.

### But wait, there's more

You may have noticed, we gain access to individual color components
here.
This means not only can we darken and lighten by thresholds, we can
COLOR those thresholds.
```
list(1, 0, 0, 0,
     0, 1, 0, 0,
     0, 0, 1, 0,
     0, 0, 0, 1,
     0.1, 0.2, 0.1, 0
)
```
Something like the above, if applied with its inverse, would tint the
darkness green.
The delta between the different scalars will determine how vivid the
color is, and the actual value will impact the brightness.

Something that's always bothered me about nightvision is it's just
greyscale for the most part, there isn't any color to it.
There was an old idea of coloring the game plane to match their lenses,
but if you've ever played with the colorblind quirk you know that gets
headachey really fast.
So instead of that, lets color just the darkness that these glasses
produce.
It provides some reminder that you're wearing them, instead of just
being something you forget about while playing, and provides a reason to
use flashlights and such since they can give you a clearer, less tinted
view of things while retaining the ability to look around things.

I've so far applied this pattern to JUST headwear for humans (also those
mining wisps)
I'm planning on furthering it to mobs that use nightvision, but I wanted
to get this up cause I don't wanna pr it the day before the freeze.

Mesons are green, sec night vision is red, thermals orange, etc.

I think the effect this gives is really really nice. 
I've tuned most things to work for the station, though mesons works for
lavaland for obvious reasons.

I've tuned things significantly darker then we have them set currently,
since I really hate flat lighting and this system suffers when
interacting with it.

My goal with these is to give you a rough idea of what's around you,
without a good eye for detail.
That's the difference between say, mesons, and night vision. One helps
you see outlines, the other gives you detail and prevents missing
someone in the darkness.

It's hard to balance this precisely because of different colored
backgrounds (looking at you icebox)
More can be done on this front in future but I'm quite happy with things
as of now

### **EDIT**

I have since expanded to all uses of nightvision, coloring most all of
them.

Along the way I turned some toggleable nightvision into just one level. 
Fullbright sucks, and I'd rather just have one "good" value.

I've kept it for a few cases, mostly eyes you rip out of mobs.
Impacted mobs are nightmares, aliens, zombies, revenants, states and
sort of stands.

I've done a pass on all mobs and items that impact nightvision and added
what I thought was the right level of color to them. This includes stuff
like blobs and shuttle control consoles
As with glasses much of this was around reducing vision, though I kept
it stronger here, since many of these mobs rely on it for engaging with
the game

<details>
<summary>
Technical Changes
</summary>

#### Adds filter proc (the ones that act like templates) support to
filter transitions.
Found this when testing this pr, seemed silly.

#### Makes our emissive mask mask all light instead
This avoids dumbass overlay lighting lighting up wallmounts.
We switch modes if some turfflags are set, to accomplish the same thing
with more overhead, and support showing things through the darkness.

Also fixes a bug where you'd only get one fullscreen object per mob, so
opening and closing a submap would take it away

Also also fixes the lighting backdrop not actually spanning the screen. 
It doesn't actually do anything anymore because of the fullscreen light
we have, but just in case that's unsued.
Needs cleanup in future.

#### Moves openspace to its own plane that doesn't draw, maxing its
color with a sprite

This is to support the above
We relay this plane to lighting mask so openspace can like, have
lighting

#### Changes our definition of nightvision to the light cutoff of night
vision goggles and such
Side affect of removing see_in_dark. This logic is a bit weak atm, needs
some work.

#### Removes the nightvision spell
It's a dupe of the nightvision action button, and newly redundant since
I've removed all uses of it

#### Cleans up existing plane master critical defines, ensures
trasnparent won't render

These sucked
Also transparent stuff should never render, if it does you'll get white
blobs which suck

</details>

## Why It's Good For The Game

Videos! (Github doesn't like using a summary here I'm sorry)
<details>

Demonstration of ghost lighting, and color


https://user-images.githubusercontent.com/58055496/215693983-99e00f9e-7214-4cf4-a76a-6e669a8a1103.mp4

Engi-glass mesons and walking in maint (Potentially overtuned, yellow is
hard)


https://user-images.githubusercontent.com/58055496/215695978-26e7dc45-28aa-4285-ae95-62ea3d79860f.mp4

Diagnostic nightvision goggles and see_in_dark not hiding emissives


https://user-images.githubusercontent.com/58055496/215692233-115b4094-1099-4393-9e94-db2088d834f3.mp4

Sec nightvision (I just think it looks neat)


https://user-images.githubusercontent.com/58055496/215692269-bc08335e-0223-49c3-9faf-d2d7b22fe2d2.mp4

Medical nightvision goggles and other colors


https://user-images.githubusercontent.com/58055496/215692286-0ba3de6a-b1d5-4aed-a6eb-c32794ea45da.mp4

Miner mesons and mobs hiding in lavaland (This is basically the darkest
possible environment)


https://user-images.githubusercontent.com/58055496/215696327-26958b69-0e1c-4412-9298-4e9e68b3df68.mp4

Thermal goggles and coloring displayed mobs


https://user-images.githubusercontent.com/58055496/215692710-d2b101f3-7922-498c-918c-9b528d181430.mp4

</details>

I think it's pretty, and see_in_dark sucks butt.

## Changelog

<!-- If your PR modifies aspects of the game that can be concretely
observed by players or admins you should add a changelog. If your change
does NOT meet this description, remove this section. Be sure to properly
mark your PRs to prevent unnecessary GBP loss. You can read up on GBP
and it's effects on PRs in the tgstation guides for contributors. Please
note that maintainers freely reserve the right to remove and add tags
should they deem it appropriate. You can attempt to finagle the system
all you want, but it's best to shoot for clear communication right off
the bat. -->

🆑
add: The darkness that glasses and hud goggles that impact your
nightvision (think mesons, nightvision goggles, etc) lighten is now
tinted to match the glasses. S pretty IMO, and hopefully it helps with
forgetting you're wearing X.
balance: Nightvision is darker. I think bright looks bad, and things
like mesons do way too much
balance: Mesons (and mobs in general) no longer have a static distance
you can see stuff in the dark. If a tile is lit, you can now see it.
fix: Nightvision no longer dims colored lights, instead simply
thresholding off bits of darkness that are dimmer then some level.
/🆑
2023-02-17 18:10:39 -07:00
Sol N
fedf2f3a26 more span macro changes in brain traumas and disease files (#73273)
## About The Pull Request

i was fucking around with brain traumas on a downstream and noticed they
had similar issues to quirks so i decided to continue work from #73116


![Code_Klx14O288V](https://user-images.githubusercontent.com/116288367/217046732-765ffe27-73c9-416a-833e-e0d9e2aa7a86.png)
(search in VSC for span class = 'notice')
its going to be a bit of a thing to get all of these but this is a
decent chunk i think

there was only one annoying/tough file.
imaginary_friend.dm had class = 'game say' and class = 'emote' both of
which after some testing did not seem like they did anything. ill try to
keep that in mind in other files if i continue to do this but i either
omitted them because they didnt have any formatting or, in the case of
emote, turned it into name, which i think is what you'd want those
messages to look like.

there were also a few small spelling errors that i fixed

## Why It's Good For The Game

more consistent and stops people from copying brain trauma formatting
wrong

## Changelog

they should all work the same

---------

Co-authored-by: san7890 <the@san7890.com>
2023-02-07 23:37:18 +00:00
Jacquerel
a5c6e883d3 Fix incorrectly passed biotype args in take_overall_damage (#73203)
## About The Pull Request

The linters in #73202 revealed to me that `heal_overall_damage` was
overridden wrong in `carbon` and left out an argument, meaning that
plausibly some places that didn't provide an argument for `stamina`
probably had an off-by-one error with args and wouldn't apply them
properly.
I fixed that in that PR because it was using it. Then I noticed that the
same problem exists in `take_overall_damage` so I am fixing that too.

I don't know if this was linked to any actual bugs, but it might cause
some. They'd be hard to spot because it'd be for stuff like "a
shadowperson with a prosthetic takes damage to their prosthetic if not
in darkness" and probably nobody would even get into that situation let
alone notice to report it.

## Why It's Good For The Game

We want arguments to do what they are supposed to do.

## Changelog

🆑
fix: Biotypes will be more consistently applied when taking damage, pod
and shadowperson prosthetic limbs won't be corroded due to light levels.
fix: Podperson and Wooden Golem prosthetic limbs won't be corroded by
having a hungry tummy.
/🆑
2023-02-05 12:26:36 +08:00