Commit Graph

331 Commits

Author SHA1 Message Date
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
Mothblocks
d67555a0b5 the inevitable Revert "Refactors admin verbs from giant ass lists into datums" in case stuff breaks (#73206)
Reverts tgstation/tgstation#72407
2023-02-05 11:44:38 +13:00
Zephyr
7f25d7f17b Refactors admin verbs from giant ass lists into datums (#72407)
## About The Pull Request

See title.
## Why It's Good For The Game

Makes it easier for people to add new admin buttons, and also removes
the giant ass ugly lists that are an affront to my eyes.

Yes you are still able to call them manually via the verb bar

![image](https://user-images.githubusercontent.com/12817816/210163285-2ecb4b59-67b4-47d2-b324-77048ce852fe.png)

![image](https://user-images.githubusercontent.com/12817816/210163288-5a0ec98c-9589-4cab-8a6b-1ab5151aa040.png)
## Changelog
🆑
refactor: Admin verbs are now datums with a dedicated panel handler
admin: Admin verbs now come with a handy description when you hover over
them!
/🆑

---------

Signed-off-by: GitHub <noreply@github.com>
2023-02-03 16:32:37 -08:00
FelixRuin
dfcee896d2 monophobia blind fix (#72829)
## About The Pull Request
Doll with monophobia and blindness dont die from being "alone" while
someone in 1 tile radius.
## Why It's Good For The Game
maybe if blind and with monophobia die from heart attack while he in the
crowd its funny, but too inescapable situation.
## Changelog
🆑 Winter Schock
fix: Blind doll with monophobia dont get stress while someone in 1 tile
range
/🆑
2023-01-23 11:20:49 +01:00
MrMelbert
c3a1f21c1a Converts blindness and nearsightedness to status effects, scratches some VERY dumb blindness handling that resulted in mobs becoming "incurably" blind (#72267)
## About The Pull Request

- Nearsighted is now a grouped status effect.
- Blindness is now a grouped status effect.
   - Eye handling of blindness has improved. 
- When eyes are removed, they now cause you to become blind, rather than
handling it in `update_tint`.
- Being ahealed no longer blinds you for one tick, meaning that black
overlay on aheal is gone.
- Temporary Blindness is now a status effect.
- Both Nearsightedness and Blindness have been exorcised from mob vars
and life chains. This means that we've finally cut 2 procs from life,
`handle_status_effect` and `handle_traits`, and moved both to event
based processing. Wooo optimizations.
- Swapped pacifism status effect to use apply and set helpers. 
- Removed an unused admin toggle that disabled welding helmet tint but
also tint from every clothing item and also blindness from losing your
eyes.
- Clothes now generally all blind their mob more consistently.
- Oculine, eye surgery, and sensory restoration are now no longer the
only way to fix blindness from eye damage. If your eyes are healed
through any other means, it will also heal your blindness.
- Some things that made you blind, such as ling blind sting, no longer
just flat made you blind from eye damage forever. They now cause eye
damage directly, which in turn makes you blind from eye damage, as
expected.
- Pacifists can't eyestab anymore. Eyestabs now have a limit on the
amount of blur applied.
- Refactored some `is_x_covered` procs to accept flags rather than have
a lot of arguments for some silly reason.
- Unit tests for blindness. 

## Why It's Good For The Game

Blindness was exceptionally poorly handled prior, primarily due to the
fact that it was tied to the mob instead of separated out

On top of that the system put a LOT of faith in proper handling of
blindness on the coder's end which was misplaced evidently. Many places
didn't update or handle blindness correctly, or just let people
perma-blind.

Deferring it to a status effect improves this a lot

## Changelog

🆑 Melbert
refactor: Refactored blindness and nearsightedness. Important to note is
that all mobs are naturally blind until their eyes are actually created.
refactor: Refactored "is covered" procs
fix: Less sources of blindness now cause permanent blindness. Includes
the "Blind" Spell and "Blind Sting" from changelings.
admin: Ahealing someone no longer flashes the blind overlay for 1 tick.
admin: I removed an unused (sort of) inaccessible admin verb that
allowed you to toggle the tint from all welding helmets (and clothing)
(and lack of eyes) in existence, let me know if you want similar back
balance: Changeling "Blind Sting" now causes eye damage (enough to
blind) rather than arbitrarily forcing blindness.
balance: Visionloss virus symptom now causes eye damage (enough to
blind) rather than arbitrarily forcing blindness.
balance: Oculine has been reworked slightly. Prior, Oculine arbitrarily
healed blindness and nearsightedness from eye damage reagrdless of how
damaged the eyes were, and applied blur on success. Now, Oculine just
heals eye damage, and blindness / nearsightedness is restored in the
process. There is now a probability every tick that eye blur is applied
based on how pure the oculine is while healing very damaged eyes.
balance: Pacifists can no longer eyestab.
balance: Any clothing item that covers your eyes contributes to getting
the bonus while sleeping, and to removing temporary blindness faster
/🆑
2023-01-15 23:01:40 -08:00
ShizCalev
df10ad3afd Fixes phobias not pointing properly (#72424)
verb queue memes. need to call the proc directly.

![image](https://user-images.githubusercontent.com/6209658/210277732-240c3d09-a4f6-49fb-8e88-986bec12aec0.png)

🆑 ShizCalev
fix: You'll now point when freaked out about something.
/🆑
2023-01-03 20:02:49 +01:00
MrMelbert
0d4b56435b Converts drowsy and eye blur to status effects, striking yet another two carbon level status vars (#71950)
## About The Pull Request

You know the deal by now.

- Drowsiness is now tracked via status effect.
- Eye blue is now tracked via status effect.

In converting these over, cleaned up a bit of code relating to some
other effects. Attempts to unify behavior between some of them, namely
certain biotypes or mob types shouldn't be experiencing certain effects.

## Why It's Good For The Game

More stuff moved to status effects, slightly more cleaner and better to
work with code. Allows for all mobs that can sleep to be able to get
drowsy, too.

## Changelog

🆑 Melbert
refactor: Drowsiness and Blurred Eyes are now tracked via status effect.
/🆑
2022-12-26 19:58:21 +01:00
SkeletalElite
77bad3e2c6 Fixes Brain Trauma Forced Speech Triggering the World Filter (#71897)
## About The Pull Request
Fixes #71849

## Why It's Good For The Game
bug bad

## Changelog

🆑
fix: Forced speech from brain damage will no longer trigger the world
filter
/🆑
2022-12-11 12:34:20 +01:00
LemonInTheDark
e766444468 Changes our map_format to SIDE_MAP (#70162)
## About The Pull Request

This does nothing currently, but will allow me to test for layering
issues on LIVE, rather then in just wallening.
Oh also I'm packaging in a fix to one of my macros that I wrote wrong,
as a joke

[removes SEE_BLACKNESS usage, because we actually cannot use it
effectively](c9a19dd7cc)

[c9a19dd](c9a19dd7cc)

Sidemap removes the ability to control it on a plane, so it basically
just means there's an uncontrollable black slate even if you have other
toggles set.

This just like, removes that, since it's silly

[fixes weird layering on solars and ai portraits. Pixel y was casuing
things to render below who
shouldn't](3885b9d9ed)

[3885b9d](3885b9d9ed)

[Fixes flicker
issues](2defc0ad20)

[2defc0a](2defc0ad20)

Offsetting the vis_contents'd objects down physically, and then up
visually resolves the confliciting that was going on between the text
and its display.

This resolves the existing reported flickering issues

[fixes plated food not appearing in
world](28a34c64f8)

[28a34c6](28a34c64f8)

pixel_y'd vis_contents strikes again. It's a tad hacky but we'll just
use pixel_z for this

[Adds wall and upper wall plane
masters](89fe2b4eb4)

[89fe2b4](89fe2b4eb4)

We use these + the floor and space planes to build a mask of all the
visible turfs.
Then we take that, stick it in a plane master, and mask the emissive
plane with it.

This solves the lighting fulldark screen object getting cut by emissives
Shifts some planes around to match this new layering. Also ensures we
only shift fullscreen objects if they don't object to it.

[compresses plane master
controllers](bd64cc196a)

[bd64cc1](bd64cc196a)

we don't use them for much rn, but we might in future so I'm keeping it
as a convienince thing

🆑
refactor: The logic of how we well, render things has changed. Make an
issue report if anything looks funky, particularly layers. PLEASE USE
YOUR EYES
/🆑

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-12-10 17:30:54 -08:00
Tim
48e36ef2c7 Saycode refactor, unit tests, and fixes (#69799)
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request

<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

Fixes #69798
Fixes #71621

When using hypnosis on a victim, the language should be accounted for
and whether the victim can properly hear it. Before the hearing code
would magically translate any message, this is no longer the case.

This also fixes the language barrier involving hearing for:
- Mind echo trauma
- Phobia trauma
- Hypnotic trigger trauma
- Split Personality brainwashing trauma
- Codeword hearing
- Hypnotize status effect
- Impure Inacusiate reagent

## Why It's Good For The Game

<!-- Argue for the merits of your changes and how they benefit the game,
especially if they are controversial and/or far reaching. If you can't
actually explain WHY what you are doing will improve the game, then it
probably isn't good for the game in the first place. -->

Better consistency, improved readability, and less bugs in the future.

## 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. -->

🆑
fix: Fix hypnosis, mind echo trauma, phobia trauma, hypnotic trigger
trauma, split personality brainwashing trauma, codeword hearing, and
impure inacusiate reagent all bypassing language and hearing checks. If
you try to give commands to a victim in a language they don't
understand, they will no longer magically understand the words.
fix: Fix sign language having accent modifications
refactor: Refactored saycode to be more robust, readable, and have more
unit tests.
/🆑

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-12-09 20:28:17 +01:00
itseasytosee
478a969cbb Delimbs Stamina (#71663)
## About The Pull Request
This changes stamina damage from a damage that affects limbs (like brute
and burn) to a damage that affects the body at whole (such as tox or
oxy)
Stamina being run like brute or burn is rooted all the way back to when
it was halloss, and used exclusively for holodeck items and
hallucinations.
Most coders probably didn't even know that stamina worked like this, and
most implimentatiosn of stmaina mechanics use a generic "adjust stamina"
or a "apply_damage(type = stamina zone - body_zone_chest)" to avoid the
issues that come when stamina is evenly distributed among limbs (and
some limbs only count as a fraction to stamina damage total)

The only thing that is truly lost here, is disabling limbs (arms and
legs) with stamina damage, by aiming specifically at them with disablers
(batons always apply their stamina damage to the chest, no matter where
they hit) our through smashing limbs on tables.
The idea of making an opponent drop a weapon out of pain is fun, but
stamina doesn't support it, or make sense in context.

A depth filled limb-based pain system that has interactions with
painkillers and replaces damage based move slowdown would be fun, and
maybe something that could be implemented in the future.
## Why It's Good For The Game
The biggest draw here, is that it will make stamina easier to maintain 
## Changelog
🆑 itseasytosee
code: Stamina no longer affects individual limbs. 
/🆑

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2022-12-08 10:20:57 +13:00
Tastyfish
ebc0227176 Makes dog a basic mob [MDB IGNORE] (#70799)
About The Pull Request

    Made a basic version of the pet base called /mob/living/basic/pet. It's significantly more stripped down from the old simple_animal one, because its half collar stuff and...

    Made the collar slot a component that you could theoretically remove from a pet to disable the behavior, or add to any other living mob as long as you set up the icon states for the collar (or not, the visuals are optional).
        The corgi's collar strippable slot is now generally the pet collar slot, and in theory could be used for other pet stripping screens.

    I also gutted the extra access card code from /mob/living/basic/pet as it's only being used by corgis. Having a physical ID is now just inherent to corgis, as they're the only ones that could equip it anyway.

    Ported the make_babies() function from simple_animals to a new subtree and associated behavior, called /datum/ai_planning_subtree/make_babies that uses blackboards to know the animal-specific info.
        Note that it's marginally improved, as the female walks to the male first instead of bluespace reproduction.

    Tweaked and improved the dog AI to work as a basic mob, including making /datum/idle_behavior/idle_dog fully functional.

    Made a /datum/ai_planning_subtree/random_speech/dog that pulls the dynamic speech and emotes to support dog fashion.

I've tested base collars across multiple pet types.

For dogs, I've tested general behavior, fetching, reproduction, dog fashion, and deadchat_plays, covering all the oddities I'm aware of.

image
Why It's Good For The Game

Very big mob converted to a basic mob.
Changelog

cl
fix: Lisa no longer uses bluespace when interacting with Ian.
refactor: A large portion of dog code was re-written; please report any strange bugs.
/cl
2022-12-06 09:13:13 +13:00
MrMelbert
329921639a Rewrites how action buttons icons are generated, makes them layer nicer. Allows observers to see a mob's action buttons. (#71339)
## About The Pull Request

- Rewrites how action button icons are generated.
- Prior, generated an action button icon was fairly simplistic and
didn't allow for many changes. Someone recently added the option for
overlays to be generated over action buttons, but the framework was very
weak.
- Now, action button icon generation is split across multiple procs,
like atom icon updates.
      - The background of action buttons are underlays
- The actual icon of the action button is the icon and icon state of the
action button movable
- The rim / border of the button is an overlay, layered overtop the
button.

- Allows observers to see what action buttons a mob has. They even
update in real time! And no, the observers cannot click on them.

## Why It's Good For The Game

- Runechat text of action buttons are no longer hidden behind the actual
icon. This was very ugly with cooldown actions, as the cooldown text was
hidden behind a lot of spell icons.
- Cuts down on a lot of icon duplication. 
- Gives much finer control over action button icons
- Saves a bit of processing from generating full action button icons
when not necessary. Not implemented in many places, but is in some.


![image](https://user-images.githubusercontent.com/51863163/202816617-342e87e6-2cc6-488e-9af2-4b2053dc3dc6.png)


![image](https://user-images.githubusercontent.com/51863163/202816604-da8d4821-0e2b-45af-b289-7442367f98ce.png)

## Changelog

🆑 Melbert
add: Observers can now see what action buttons an observed mob has. No,
you can't click them. And no it doesn't show EVERY action.
refactor: Refactored how action button icons are generated. Some actions
will now use a colored border when active instead of just turning green.
Cooldown text will also appear on the top layer of actions too. If you
see any funky lookin' icons (namely their borders), let me know.
refactor: Bluespace Golem's teleport action is now a cooldown action.
fix: Construct actions go to the middle of the screen like expected. 
/🆑
2022-12-03 19:01:08 -08:00
RaveRadbury
efd551f520 Changes Obsession resilience to require a lobotomy (#71462)
## About The Pull Request

Obsessed is changed to require a lobotomy rather than brain surgery.
Also nerfs Mind Restoration so it cannot remove deep-rooted traumas.

## Why It's Good For The Game

Obsessed has been well-known for some time as being surprise ganked by
fairly low-key airborne healing viruses. Players are stripped of their
antag status with no fanfare or consequence.

With this change the cure for obsessed will require a lobotomy, which
will cause additional permanent brain traumas. This provides way more
mechanically-informed RP than losing antag due to a friendly sneeze.

## Changelog

🆑
balance: Obsessed has been bumped up to a Deep-Rooted Brain Trauma
balance: Mind Restoration can't remove deep-rooted traumas, making
Obsessed unremovable by virusses
/🆑

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
2022-11-26 10:41:16 +01:00
Riggle
5086f9aad9 Imaginary friend refactor (#71058)
## About The Pull Request

This makes imaginary friends less janky. It adds many QoL features like
runechat and typing indicators, fixes jankyness that results from a
runtime. You can now even emote and whisper as an imaginary friend which
adds countless RP possibilities that weren't available before.


![image](https://user-images.githubusercontent.com/27156122/199902939-c3d98955-7a1d-4752-86d2-710f38b077a2.png)

![image](https://user-images.githubusercontent.com/27156122/199902999-c88ffb5f-fed0-4cdf-a202-f221a5cb836e.png)

![image](https://user-images.githubusercontent.com/27156122/199903282-50146014-bf09-4e6b-98d2-aa8ebc94b5e3.png)

![image](https://user-images.githubusercontent.com/27156122/199903417-105cf372-a69b-4d49-bfa6-47390a0e64cf.png)

![image](https://user-images.githubusercontent.com/27156122/199936352-c614ee9e-8084-4c27-b817-779aeff427ce.png)

![image](https://user-images.githubusercontent.com/27156122/199936394-063e1431-59ff-4f5c-9b0f-47c342797cfe.png)

![image](https://user-images.githubusercontent.com/27156122/199936483-1941c349-91c1-4754-8827-7f9b9f5bb967.png)

## Why It's Good For The Game

It makes an old feature better.

## Changelog

🆑 Riggle
qol: Imaginary friends now have runechat, typing indicators and emotes!
qol: Imaginary friends can point and spin
fix: Fixed a bug with imaginary friends where ghosts would stay after
aghosting
refactor: Imaginary friend code massively improved
refactor: Imaginary friends now support multiple friends at the same
time!
admin: Imaginary friends no longer bypass filters
/🆑
2022-11-19 14:20:51 -08:00
texan-down-under
3f56f3fb46 Moves flick_overlay to atom instead of being global (#71045)
## About The Pull Request
Moves flick_overlay and flick_overlay_view to atom instead of being a
global proc
## Why It's Good For The Game
General performance and syntaxical improvements, makes it easier to
retrieve iconstates
## Changelog
🆑
fix: flick_overlay is an atom proc
/🆑

Co-authored-by: etherware-novice <candy@notarealaddr.com>
Co-authored-by: Candycaneannihalator <candycane@thisisnotarealaddr.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-11-17 08:54:24 -08: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
MrMelbert
bfcfa1e3bb Refactors some signal misuse with the stationloving component (#70496)
* Refactors secluded locs

* Tweak

* Use traits instead of signals

* Review

* Type error
2022-10-25 15:00:26 -04:00
MrMelbert
f1215a12b4 Changing species now maintains Brain traumas, Cybernetic implants, Liver traits, organ damage, and Heretic Living Heart (#70530)
About The Pull Request

    Implements additional code in before_organ_replacement in additional places, to better maintain cohesion when species changes take place.
        Brain traumas will now carry over on species change
        Having synthetic / cybernetic organs will now carry over on species change
        Liver job traits will also carry over on species change
        Organ damage will, in most cases, carry over on species change (only if the new organ is identical to the old)
        The heretic's Living Heart will attempt to carry over to species change, if it's valid
            Some species will still not, as it will attempt to give heart -> liver or something and be invalid

    Heretic Living Heart is now a cooldown action. Still not really content with the current state of it, it could use some improvements.

Fixes #42308
Fixes #35539
Fixes #69574

Why It's Good For The Game

Removes a lot of exploits involving using forced species change to get rid of stuff like quirks / permanent brain traumas and similar.
2022-10-20 14:57:07 -07:00
LemonInTheDark
a625fc8038 Cleans up the fallout from plane cube (#70235)
* Cleans up the fallout from plane cube

Alright.
Makes cleaning bubbles respect planes
Adds support for updating overlays on move, fixing an issue with pointing at items
Adds better error messages for failing to provide args for mutable_appearance()
Fixes a bug where string overlays were not respecting insertion order

* Adds documentation for offset spokesman and offset_const

* Better stack trace

* Removes some redundant uses of cached MAs

At this scale, attempting to cache MAs like this has 0 impact on anything
And just makes things more messy then they need to be

* ensures fullscreen objects START offset, so things are always proper

* ensures chatmessages always have the right offset

* fixes compile

* whoops, the above lighting plane should actually be ABOVE the lighting plane

* fixes compile, also cleans up the fire overlay a tad

* Adds a unit test for plane masters that are shrunk by multiz being double shrunk

This is slightly hacky because of how I'm handing the plane master
group, but it's not THAT bad, and gives me some real good coverage

* Properly targets the seethrough plane at the game world plate. This fixes unit tests, and also just makes more sense

* whoops

* oh

* adds datum support for allocate(), cleans up a harddel from testing

* Makes camera chunks index at 1, and also makes them support non powers of two sizes, since that was unneeded

* fixes runtime in allocate
2022-10-20 09:00:02 +13:00
MrMelbert
f32678fb13 Having very very low sanity will rarely cause hallucintions (#70311)
* Being insane now causes you hallucinations, and hallucination immune has been renamed to RDS immune, since it only works for the quirk.
2022-10-11 11:41:09 -04:00
Tim
f5f6b26e2d Fix xeno hivemind talk causing hissing sound (#69844)
* Fix xeno hivemind talk causing hissing sound

* Fix dullahan speech arg

Add message_range and saymode to say arguments

Add new say args to other say procs

Add new say args to other say procs

* Revert "Fix dullahan speech arg"

This reverts commit abff2bec1a03c1270b2896faa547c465e046ad78.

* Fix speech_args to be list

* Refactor hulk speech signal handler

* Revert "Revert "Fix dullahan speech arg""

This reverts commit 58997930096ef6b7fa8a1c79395595e61db954c6.

* Change filterproof to be null like other say procs

* Remove unused COMSIG_MOB_SAY defines

* Readd defines for COMSIGH_MOB_SAY
2022-10-03 23:10:45 -04:00
LemonInTheDark
23bfdec8f4 Multiz Rework: Human Suffering Edition (Contains PLANE CUBE) (#69115)
About The Pull Request

I've reworked multiz. This was done because our current implementation of multiz flattens planes down into just the openspace plane. This breaks any effects we attach to plane masters (including lighting), but it also totally kills the SIDE_MAP map format, which we NEED for wallening (A major 3/4ths resprite of all wall and wall adjacent things, making them more then one tile high. Without sidemap we would be unable to display things both in from of and behind objects on map. Stupid.)

This required MASSIVE changes. Both to all uses of the plane var for reasons I'll discuss later, and to a ton of different systems that interact with rendering.

I'll do my best to keep this compact, but there's only so much I can do. Sorry brother.
Core idea

OK: first thing.
vis_contents as it works now squishes the planes of everything inside it down into the plane of the vis_loc.
This is bad. But how to do better?

It's trivially easy to make copies of our existing plane masters but offset, and relay them to the bottom of the plane above. Not a problem. The issue is how to get the actual atoms on the map to "land" on them properly.

We could use FLOAT_PLANE to offset planes based off how they're being seen, in theory this would allow us to create lens for how objects are viewed.
But that's not a stable thing to do, because properly "landing" a plane on a desired plane master would require taking into account every bit of how it's being seen, would inherently break this effect.

Ok so we need to manually edit planes based off "z layer" (IE: what layer of a z stack are you on).

That's the key conceit of this pr. Implementing the plane cube, and ensuring planes are always offset properly.
Everything else is just gravy.
About the Plane Cube

Each plane master (except ones that opt out) is copied down by some constant value equal to the max absolute change between the first and the last plane.
We do this based off the max z stack size detected by SSmapping. This is also where updates come from, and where all our updating logic will live.

As mentioned, plane masters can choose to opt out of being mirrored down. In this case, anything that interacts with them assuming that they'll be offset will instead just get back the valid plane value. This works for render targets too, since I had to work them into the system as well.

Plane masters can also be temporarily hidden from the client's screen. This is done as an attempt at optimization, and applies to anything used in niche cases, or planes only used if there's a z layer below you.
About Plane Master Groups

BYOND supports having different "maps" on screen at once (IE: groups of items/turfs/etc)
Plane masters cannot cover 2 maps at once, since their location is determined by their screen_loc.
So we need to maintain a mirror of each plane for every map we have open.

This was quite messy, so I've refactored it (and maps too) to be a bit more modular.

Rather then storing a list of plane masters, we store a list of plane master group datums.
Each datum is in charge of the plane masters for its particular map, both creating them, and managing them.

Like I mentioned, I also refactored map views. Adding a new mapview is now as simple as newing a /atom/movable/screen/map_view, calling generate_view with the appropriate map id, setting things you want to display in its vis_contents, and then calling display_to on it, passing in the mob to show ourselves to.

Much better then the hardcoded pattern we used to use. So much duplicated code man.

Oh and plane master controllers, that system we have that allows for applying filters to sets of plane masters? I've made it use lookups on plane master groups now, rather then hanging references to all impacted planes. This makes logic easier, and prevents the need to manage references and update the controllers.

image

In addition, I've added a debug ui for plane masters.
It allows you to view all of your own plane masters and short descriptions of what they do, alongside tools for editing them and their relays.

It ALSO supports editing someone elses plane masters, AND it supports (in a very fragile and incomplete manner) viewing literally through someone else's eyes, including their plane masters. This is very useful, because it means you can debug "hey my X is yorked" issues yourself, on live.

In order to accomplish this I have needed to add setters for an ungodly amount of visual impacting vars. Sight flags, eye, see_invis, see_in_dark, etc.

It also comes with an info dump about the ui, and plane masters/relays in general.

Sort of on that note. I've documented everything I know that's niche/useful about our visual effects and rendering system. My hope is this will serve to bring people up to speed on what can be done more quickly, alongside making my sin here less horrible.
See https://github.com/LemonInTheDark/tgstation/blob/multiz-hell/.github/guides/VISUALS.md.
"Landing" planes

Ok so I've explained the backend, but how do we actually land planes properly?
Most of the time this is really simple. When a plane var is set, we need to provide some spokesperson for the appearance's z level. We can use this to derive their z layer, and thus what offset to use.

This is just a lot of gruntwork, but it's occasionally more complex.
Sometimes we need to cache a list of z layer -> effect, and then use that.
Also a LOT of updating on z move. So much z move shit.

Oh. and in order to make byond darkness work properly, I needed to add SEE_BLACKNESS to all sight flags.
This draws darkness to plane 0, which means I'm able to relay it around and draw it on different z layers as is possible. fun darkness ripple effects incoming someday

I also need to update mob overlays on move.
I do this by realiizing their appearances, mutating their plane, and then readding the overlay in the correct order.

The cost of this is currently 3N. I'm convinced this could be improved, but I've not got to it yet.
It can also occasionally cause overlays to corrupt. This is fixed by laying a protective ward of overlays.Copy in the sand, but that spell makes the compiler confused, so I'll have to bully lummy about fixing it at some point.
Behavior changes

We've had to give up on the already broken gateway "see through" effect. Won't work without managing gateway plane masters or something stupid. Not worth it.
So instead we display the other side as a ui element. It's worse, but not that bad.

Because vis_contents no longer flattens planes (most of the time), some uses of it now have interesting behavior.
The main thing that comes to mind is alert popups that display mobs. They can impact the lighting plane.
I don't really care, but it should be fixable, I think, given elbow grease.

Ah and I've cleaned up layers and plane defines to make them a bit easier to read/reason about, at least I think.
Why It's Good For The Game
<visual candy>

Fixes #65800
Fixes #68461
Changelog

cl
refactor: Refactored... well a lot really. Map views, anything to do with planes, multiz, a shit ton of rendering stuff. Basically if you see anything off visually report it
admin: VV a mob, and hit View/Edit Planes in the dropdown to steal their view, and modify it as you like. You can do the same to yourself using the Edit/Debug Planes verb
/cl
2022-09-27 20:11:04 +13:00
MrMelbert
45516f4741 Adds macros to help with common set_- and adjust_timed_status_effect uses (#69951)
* Adds helpers for status effect application
2022-09-24 11:04:26 -04:00
MrMelbert
6baebf47a1 Completely refactors hallucinations, and also adds a few (#69706)
* Refactors hallucinations slightly, organizes them

* Refactors hallucination into a status effect

* Further hallucination proper refactoring

* Refactors battle hallucinations

* Refactors "fake item other" hallucination

* Gets it a bit closer to working state

* Refactors screwydoll and fake alerts

* Refactors fake inhand items

* Refactors a few more.
- Fake death
- Fake messages
- Fake sounds
- Projectiles

* Refactoring delusions, hallucination effects

* Furthering the hallucination status effect
- removes copypaste of hallucination pulses

* Almost finalizes the changeover to status effect

* Last staus effect stuff

* Delusion business

* Airlocks, fire, and more delusion stuff

* Finishes screwyhud. It compiles now!

* Swaps screwyhud over to a grouped status effect

* Removes hal_screwyhud

* Comment

* Bugfixing

* image cleaning

* Get rid of this it came back

* What if I finished this branch?

* Oops

* Messing with the randomness

* Mass hallucination tweaks

* +

* Some more mass tweaks

* Review

* Updates

* Unit tests hallucination icons

* More tweaks

* Move folder

* Another re-name

* Minor tweaks

* Anomaly unity

* Mass hallucination buffs

* t

* Sig

* Merge

* Lints

* Unit test already coming in clutch

* Another failure

* Use named args for cause_hallucination via some define trickery

* Some cleanup

* This is better

* adds some hallucinations

* Oops

* More sounds

* Tweaks

* Some additional documentation

* Flash

* Fixes mass hallucination

* Json changes

* Updates documentation

* Json conflicts

* Makes it work

* Missed that one too

* Helpers

* More signalization (WIP)

* Fixes bump

* Missed a helper use

* Dumb
2022-09-21 01:30:04 -04:00
Marina
fcaa0b24db Alphabetized, fixed spelling error, clarifying event descriptions. Polish (#69707)
About The Pull Request

Alphabetized several long lists of strings so its easier for us to look through them, just code polish, nothing the players would see.

Fixed some minor spelling errors as well.

Clarified door bolt state to be less ambiguous in the door wiring gui.
Originally it would say the door bolts have fallen, and the door bolts "Look up". i dont know about you but that was very not clear for me to read. Like where are the bolts? In the door or the frame? Arnt there bolts on top and bottom? Just didn't make sense to me.

Now it says "Have engaged!" & "Have disengaged"
hopefully that makes the state clearer at a glance.

I also added a small handful of funny texts to some string files. See changelog
Why It's Good For The Game

Well, who doesn't like a bit of polish? Just makes the game a little easier for people.
Also funny text funny text.
Changelog

spelling: improves spelling and adds more flavortext
2022-09-11 21:51:01 +12:00
Arturlang
2be5bc531d Removes-blind_eyes (#69652)
* Removes blind_eyes, replaces it with adjust_blindness.
2022-09-04 16:05:10 -04:00
skylord-a52
be0e6efdf6 [IDB IGNORE] [MDB IGNORE] Makes the icons/mob folder sane (#69302)
About The Pull Request

Reorganizes the entire icons/mob folder.

Added the following new subfolders:

    nonhuman-player (this was initially just called "antag", but then I realized guardians aren't technically antags)
    simplemob
    silicon
    effects (for bloodstains, fire, etc)
    simplemob/held-pets (for exactly that -- I wasn't sure if this should go in inhands instead)
    species/monkey

Moves the following stuff:

    All human parts moved into species, with moth, lizard, monkey, etc parts moved to corresponding subfolders. Previously, there were some moth parts in mob/species/moth, and others just loose in mob. Other species were similar.
    icemoon, lavaland, and jungle folders made into subfolders of simplemob
    All AI and silicon stuff, as well as Beepsky et al. into the silicon folder, simplemobs into the simplemob folder, aliens into the nonhuman-player folder, etc.
    Split up animal_parts.dmi into two bodyparts.dmi which were put in their respective folders (species/alien and species/monkey)

Code changes:

    Filepath changes to account for all of this
    Adds a check when performing surgery on monkeys and xenos, because we can no longer assume their limbs are in the same file
    Turns some hardcoded statues and showcases that were built into maps into objects instead

Things I'd like to do in the future but cant be assed right now:

    Remove primarily-antag sprites from simplemob/mob.dmi (Revenant, Morph, etc.) and put them in the nonhuman-player folder
    Split up mutant_bodyparts.dmi into different files for Tizirans, Felinids, monkeys, etc and put them in their own folders. Those may have once been meant primarily for mutated humans but that's now how they're being used right now.
2022-09-03 11:52:54 -07:00
Seth Scherer
34b4034777 Replaces the mood component with a mood datum (#68592)
About The Pull Request

Mood was abusing signals and get component pretty badly, so I redid it as a datum to stop this.
Why It's Good For The CODEBASE

Better code pratices, also gives admins easier tools to manage mood
Changelog

cl
admin: Added two new procs into the VV dropdown menu to add and remove mood events from living mobs.
/cl
2022-08-12 08:59:20 +12:00
Mooshimi
b09f3868f8 individual LOG_GAME (#68683)
About The Pull Request

    replaces a ton of log_game with user.log_message so the log is added to individual and global logs.
    adds a few logs for individual LOG_VICTIM, LOG_ATTACK etc logging.
    adds logging for bluespace launchpad's tele coords being changed.
    took the word "has" out of log_combat, as it's extra and just lengthens the log.

Why It's Good For The Admins

It's extremely laggy to open game.txt so an alternative is individual game logs
Changelog

cl
admin: A lot of game logs will now also be in individual game logs, for convenience in log diving.
admin: Added logging for bluespace launchpad x and y offset changes, which go to individual game logs.
admin: Attack logs will now be slightly shorter, one useless word was removed.
/cl
2022-08-05 09:32:02 +12:00
MrMelbert
f8f3dbed98 Completely removes proc_holders from existence. Refactors all wizard, xeno, spider, and genetics powers to be actions. Also refactors and sorts ton of accompanying code. (#67083)
* destroy proc holder pt1
- change proc_holder/spell to action/cooldown/spell
- docs all the spell vars, renames some of them
- removes some useless vars
- start with pointed spells, as they're easy

* kill proc_holder pt2
- kill a buncha vars and replace it with flags
- convert a ton over
- general code improvements

* kill proc_holders pt3
- convert a good few more spells
- rename some signals
- handle statpanel
- better docs

* kiill proc_holder pt4:
- restructure the file system of action.dm, separating a good amount of item actions and miscellaneous garbage into files where they belong slightly better. Also splits off item actions, cooldown actions, innate actions, etc. into their own files, overlal making it much better to work with
- converts touch attacks to actions
- converts blood crawl, jaunt subtype

* kills proc_holder pt5
- clears up some icon issues so all the currently converted pages don't have errors
- shapeshift
- some more action cleanup

* kills proc_holder pt5.5:
- some documentation
- reworks feedback to prevent oversight with teleports and stuff

* kills proc_holder pt6:
- converted cult spells
- converted magic missile
- converted mime spells
- chipped away at the errors
- removed some vars which were too general, replaced them with more locally applicable vars. for example "range" which could mean "projectile range" or "aoe radius" or whatever - instead of having a broad net which everyone applies to in a confusing matter, instead lets each spell delegate on their own.
- merged magic/spell and magic/aoe, as the comment intended
- more unified behavior for spell levelling

* kill proc_holders pt 6.5:
- replacing a buncha old proc_holders that have been updated to reduce some errors. sub 900 baby

* kills proc_holder pt 6.75:
- minor fixes

* kills proc_holder pt7:
- cuts down on some errors
- refactors some wiz events

* kills proc_holder pt 7.5:
- malf ranged modules
- some minor errors

* kills proc_holder pt 7.75:
- mor eminor error handling, cleaning up changes

* kill proc_holder pt8:
- refactors spell book
- refactors spell implant
- some more minor error fixing

* kill proc_holder pt 8.5:
- scan ability

* Adds some robust documentation

* kill proc_holder pt9:
- converts some / most mutations over

* kill proc_holder pt10:
- sort out all the granters
- refactor them slightly
- fix some compile errors

* Some set-unset sanity - going to need to test removing Share()

* Removes transfer actions. It doesn't seem to do anything.
- Transfer_actions was called when current = new_character so locially speaking the early return in Grant() should cause it to NOOP. Test this in the future though

* Removes sharing from actions, docs actions better

* Some better documentation for spell and spell components

* Kills proc_holder pt11:
- Finally finishes ALL THE SPELLS IN THE SPELL FOLDER
- Fixes some more errors

* kills proc_holder pt11.5:
- minor error fixing and sanity

* Method of sharing actions. Can be improved  in the future, needs testing

* Implements a way to update the stat panel entry for a spell. Also gets rid of VV stuff, as you can update the bigflags directly in VV now.

* Curse of madness bug I put in.

* kills proc_holder pt12:
- sub 500 errors!
- converts cytology mobs
- converts and refactors spiders slightly
- some minor fixing around the place as usual

* kill proc_holder pt13
- Finishes heretic spells
- Sub 300 errors!
- some touch refactoring to account for mansus grasp

* kills proc_holder pt14:
- revenant
- minor bugfixing for heretic stuff

* kills proc_holder pt14.5:
- some missed stuff for revenant + heretic

* kills proc_holder pt15:
- alien abilities
- more minor fixing
- sub 100 errors. The end is nigh

* kill proc_holder pt16? 17:
- Finishes cult spells
- sub 50 errors!
- refactors the way charge works
- renames / moves some signals

* kills proc_holder pt final:
- sdql spells
- no more errors!

* Bugfixes round 1

* Various bugfixing
- documentation done
- give spell works
- can cast spell gives feedback conditionally
- is available takes into account casting ability

* Some accidental reversions + fixes

* Unit tests

* Completely refactors jaunting
- All bloodcrawling is now handled on the action itself instead of across various living procs
- slaughter demons have their own blood crawls
- jaunting dummies don't have side effects on destroy() anymore

* Wizard spell logging and even more refactoring
2022-07-01 02:01:02 -04:00
Kapu1178
6d470992cb This tail refactor turned into an organ refactor. Funny how that works. (#67017)
* Fuck you (refactors ur tails)

* Errors

* Wow. Pain.

* Fixes up probably everything

* finish up here

* Fixes hard del maybe

* original owner hard del

* garbage collection runtime

* suck my peen byond

* Mapped tails

* motherfucker.

* motherrfucker. again.

* Whooopppppsie

* yeah bad idea

* Turns out external organs literally just sat in nullspace forever if their parent was deleted, and didnt Remove() themselves, causing harddels.

* So anyways I repathed all organs

* Fixes

* really.

* unit test... test

* unit test-test but it passes linters this time because im a moh-ron

* I've lost track of what im doing at this point

* Hopefully fixes hard del?

* meh

* Update code/datums/dna.dm

* things n stuff

* repath from master pull
2022-05-30 21:18:34 -07:00
Tim
0c5b3ac1fd New illiterate quirk (#66648)
* New illiterate quirk that makes a person unable to read or write. This applies to books, PDAs, paper, computers, and other electronics.
* New brain trauma dyslexia that makes you illiterate until fixed.
* Ashlizards are now illiterate as a default starting trait. The mining shuttle computer has been updated to compensate illiterate mobs randomly smashing buttons that causes a shuttle launch.

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
2022-05-23 20:06:52 -04:00