Commit Graph

39515 Commits

Author SHA1 Message Date
CesarBaylina
76eddfa59f Adds clarity to the associative list data type in wiremod (#73536)
## About The Pull Request

Once pulled, these changes will adjust how the associative list data
type is shown like on circuits and the description of the index table
component.

![assoclists1](https://user-images.githubusercontent.com/72105993/219969642-e9d76aa7-4f8e-40e5-a864-ae473b78c34e.png)

![assoclists2](https://user-images.githubusercontent.com/72105993/219969644-00b570ea-0c43-4190-9eb9-c8ac97bd1522.png)
## Why It's Good For The Game

Given the entry difficulty level of the circuits system, some players
may find themselves overwhelmed and frustrated seeing that their index
table component's output is not connecting to the index list component's
input, despite there being an index associative list component they may
not be aware of. These changes should hopefully lead players to learn
more about associative lists and how different they are from normal
lists. Just adding "assoc." to the descriptor should lead players to
search the term in the component printer and find the index associative
table.
## Changelog
🆑
qol: Made associative lists more apparent in circuits.
/🆑
2023-02-23 10:10:02 +13:00
MrMelbert
e5b6732d3b Fixes overloading and deconstructing of the master RND server not affecting research rate (#73569)
## About The Pull Request

Only a traitor removing the HDD would affect the income modifier of the
stored research web.

Updated it so `on_deconstruction` with an HDD present or a ninja
overloading with an HDD preset will also negatively affect the income
modifier.

## Why It's Good For The Game

Fixes #73338 

Round impact!

## Changelog

🆑 Melbert
fix: Deconstructing (or overloading) the Master RND server with an HDD
preset will correctly half research rate
/🆑
2023-02-21 22:10:16 -07:00
Jack Edge
0ecdf72795 Fixes serving tray/microwave interaction (#73570)
🆑 coiax
fix: When loading food into a microwave via serving tray, you can now
see the food inside the microwave afterwards.
/🆑

## Why It's Good For The Game

Because when I load rice via serving tray into the microwave, I want to
be able to see it.
2023-02-21 21:53:25 -07:00
Jacquerel
6d98a1313b Paradox Plasmamen won't immediately burn to death (#73567)
## About The Pull Request

Fixes #73376
The orignal code was _always_ equipping a human outfit and then
sometimes trying to equip a plasmaman outfit over the top.
The second outfit would ignore any slots occupied by the first, meaning
you wouldn't actually end up with an envirosuit.

Also it was activating the internals in the wrong hand, so I fixed that
for good measure.

## Why It's Good For The Game

Spawning a burning, dead skeleton in the maintenance tunnels isn't an
efficient use of the round's threat budget.

## Changelog

🆑
fix: The paradox clones of plasmamen now come properly dressed for the
occasion.
/🆑
2023-02-21 21:50:08 -07:00
tralezab
46a6618537 Fixes getting IC spam filter'd for rummaging as a regal rat (#73566)
## About The Pull Request

Fixes #73562

Adds ignore spam and forced tag to the regal rat forcesay

## Why It's Good For The Game

Bugfix

## Changelog
🆑
fix: fixed regal rat rummaging lines sometimes getting you muted!
/🆑
2023-02-21 17:52:41 -07:00
MrMelbert
4a7fa58c9f Fixes ghost roles keeping antag datums (#73568)
## About The Pull Request

I made it so mob spawners transfer existing minds because of golem
shells but ghosts have minds on occasion.

Disassociates mind before spawning from ghosts. 

## Why It's Good For The Game

Wizard golems Fixes #73577

## Changelog

🆑 Melbert
fix: Ghost roles from spawners keeping antag datums
/🆑
2023-02-21 16:44:32 -07:00
Kyle Spier-Swenson
762f01dfe9 Fix lack of to_chat_immediate in client code that disconnects clients. (#73575)
these clients are about to be disconnected, they can't wait for the mc
to tick next
2023-02-21 21:10:53 +13:00
LemonInTheDark
dfeb4f4086 Adds a config option for warning clients about older builds (not just older versions) (#73549)
## About The Pull Request

MSO was being tsundere about this and it seemed useful, so here we go

## Changelog
🆑
config: Added a warning build config setting, you can now lightly
repremand but not block clients with older builds but fine major
versions
/🆑
2023-02-20 18:55:50 -07:00
SuperSlayer
6ad7ea6bb9 Adds new combat cybernetic implant (#73043)
## About The Pull Request

Adds arm empower implant to the game - a cybernetic implant that will
make your punches deal 13 damage(normal human attacks deal between 1 and
10 damage), and throw your target away(doesn't work if you are lying
down) like a baseball bat does. It is inserted into your arm, and it
works only for the arm it is inserted into.

As an EMP effect it would cause you to fall under your target, or get
paralyzed due to muscle spasms.

## Why It's Good For The Game

Expands the implant system and adds more things to stuff into yourself
if you want to roleplay as a cool robo man.

## Changelog

🆑
add: Added a new cybernetic implant that increases punch damage of a
human
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2023-02-20 15:53:11 -07:00
NamelessFairy
5cd6e1a4b8 Mice retain their colors when they die. (#73508)
## About The Pull Request

When mice die the corpse they leave behind was always grey, they now
drop correctly colored corpses.
## Why It's Good For The Game

Bug fix.
## Changelog
🆑
fix: Mice will now retain their color when they die.
/🆑
2023-02-20 15:48:51 -07:00
Jack Edge
ec9b71c8d1 Fix paperplanes unfolding into different hand; balloon alerts (#73522)
🆑 coiax
fix: Paper planes when unfolded will put the paper in your active hand,
rather than a different hand, just like cardboard boxes.
/🆑

- Also, use balloon alerts for folded/unfolded to match boxes

## Why It's Good For The Game
Generally when you transform items from one form into another while
having them in your hand, they generally go into the same hand. Also,
people like balloon alerts now for these sorts of very minor
transformations.
2023-02-20 15:48:04 -07:00
Jacquerel
296ca23aa1 Most actions cannot be used while incapacitated (#73513)
## About The Pull Request

Fixes #39775
The `TRAIT_INCAPACITATED` trait is intended to block you from acting but
does not inherently block actions. Actions only check for "conscious",
"has available hands", "immobile", or "lying down".
Most actions still _can't_ be used while incapacitated. This is because
most actions are spells, most spells have invocations, and you can't
talk while you are incapacitated. This is silly.

I have resolved this by adding a new flag which blocks actions while
incapacitated. This is somewhat redundant with "conscious" because most
sources of that also make you incapacitated but not _always_, you might
want the specificity.

I have tried to be discerning about where this flag is applied, it is
not in all cases (for instance you can still swallow implanted pills
while incapacitated and such), but it's not only possible but I can't
really avoid implementing this without it being a balance change in
_some_ cases,

Actions this effects are things such as:
Xenomorph Tail Sweep, Lesser Magic Missile (cult constucts), Heretic
Shadow Cloak, the Smoke spell in general, Conjuring (but not firing)
Infinite Guns, Mime spells

Times when these actions will no longer be available but were previously
are such times as when the mob is:
Stamina Crit, Stunned, Paralysis, and Time Stopped.

## Why It's Good For The Game

The incapacitated trait is applied by effects which should block acting
but still permits several actions which logically would be prevented.
This fortunately hasn't come up too often due to the high ratio of
actions with invocations, but it feels bad to stun someone and then have
them still able to perform an action they logically wouldn't be able to
take while stunned.
This is especially egregious in the case of Time Stop (the only way to
stun a lot of the mobs effected by this) but that's a rare pick on a
rare antagonist and would also rarely be used on these mobs, so a bit of
an edge case.

## Changelog

🆑
fix: Many spell-like abilities which could be stunned, paralysed, or
frozen in time now cannot be.
/🆑
2023-02-20 15:47:31 -07:00
RikuTheKiller
470b7bba0a [NO GBP] Fixes oculater not working... woops (#73533)
## About The Pull Request

I may or may not have neglected the fact that oculater can't be very low
purity anymore due to my own revamp prior.
So uh, this makes it work like most inverse chemicals, getting better
the higher the purity is.
## Why It's Good For The Game

Bug fix good.
## Changelog
🆑
fix: Oculater works again.
/🆑
2023-02-20 15:46:31 -07:00
tralezab
47206594b9 Fixes Ninjas not being able to use adrenaline while unconscious + code improvement (#73538)
## About The Pull Request

### Bugfix

Fixes #73521

Ninja's adrenaline is supposed to cure unconscious, but you can't
activate it while unconscious. This pr fixes that

### Code improvement

Combined all the allow variables into a bitflag

## Why It's Good For The Game

bugfix

## Changelog
🆑
fix: You can use ninja adrenaline to cure unconsciousness as intended
code: Cleaned up some modsuit code
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2023-02-20 20:30:51 +01:00
Bloop
61353d5f5e Fixes broken holy water flask looking like a broken beer bottle (#73504)
Adds new inhand sprites for the broken holy flask, fixes broken holy water flask looking like a broken beer bottle and unholy flasks now use a blackened holy flask inhand sprite instead of the beaker one.
2023-02-20 04:21:05 -03:00
John Willard
53d6e1fa21 Fake messages now check the item (#73515)
## About The Pull Request

Fake messages about putting items away caused by hallucinations now
checks the name of the item instead of being just a list of names. This
fixes the names of the following items:
.357 Revolver
Energy Bow
Spell book
Hand tele
Station blueprints


![image](https://user-images.githubusercontent.com/53777086/219892805-8c660fad-da83-44dc-9e8c-3e491324a4bb.png)

## Why It's Good For The Game

Fixes grammar errors for hallucinations and futureproofs it a little.

## Changelog

🆑
spellcheck: Hallucinations where you see people put things away now tell
you they put the right thing away.
/🆑
2023-02-19 17:04:12 -07:00
John Willard
ed70994d87 Messenger fixes (#73503)
## About The Pull Request

- Photos now show up in the chat to the person recieving them as a
(Photo) like how it used to be
- Outgoing messages now properly say who it's outgoing to, instead of
saying it's to themselves.
- Messenger now clears photos after sending an image with them, so you
don't accidentally send the same photo 50 times.
- AIs can now send an image from the messenger menu (code stolen from
https://github.com/BeeStation/BeeStation-Hornet/pull/7550)
- Added a balloon alert when you uploaded a photo so it doesn't just
silently pass and you have no idea if it worked or not.

## Why It's Good For The Game

Closes https://github.com/tgstation/tgstation/issues/70140 - an issue
report I've had open for months and kept procrastinating on working on.
Closes https://github.com/tgstation/tgstation/issues/70264

Messenger now properly works as it was originally supposed to.

## Changelog

🆑 JohnFulpWillard and itsmeow
fix: Messenger now clears photos after you send it, so you don't send a
photo repeatedly until you manually clear it.
fix: Sending a photo now has a hyperlink in chat for the target to see
(like with old PDAs)
fix: AIs can now select photos in their Messenger app.
fix: Messenger no longer says you're sending outgoing messages to
yourself.
/🆑
2023-02-19 14:06:48 -07:00
LemonInTheDark
dde3477830 Fixes another case of broken huds on z level work (Also a runtime for ghosts) (#73520)
## About The Pull Request

[Fixes another case of broken huds on z level
work](eed4336c71)

This is I think new, but returning inside these loops is stupid and
breaks shit bad.

[Fixes a runtime in nightvision
checking](c183fef185)

That list defaults to null, it can be null, be nice to it 📰

## Why It's Good For The Game

Huds are more stable, less runtimes

## Changelog
🆑
fix: Moving up and down z levels will break hud stuff slightly less
often
/🆑
2023-02-19 13:59:10 -07:00
MrMelbert
3f659dd9d3 Revert "Rat Trap" (#73539)
Reverts tgstation/tgstation#73159

Pretty sure this wasn't supposed to be merged, considering it disabled a
test, a workflow run, and implements an atom New override
2023-02-20 09:54:40 +13:00
LemonInTheDark
777b4dc367 Rat Trap (#73159) 2023-02-19 15:18:21 -05:00
Rhials
32bd462458 Changeling Meteor event now breaks more gracefully and will absolutely make sure the changeling gets where it should (#73433) 2023-02-19 01:24:43 -05:00
Roryl-c
88ba95b592 Fixes Seiver jank and bad code (#73496)
## About The Pull Request
Seiver is currently way stronger than it was intended due to bad code.
Also the comments didn't make any sense whatsoever and were often just
wrong.

This nerfs hot seiver significantly - it was often almost 3x stronger
than intended, able to reach tox healing levels of 17.7 per tick. With
the change, it maxes out at 6.7 tox healing per tick.
## Why It's Good For The Game
5u hot seiver can no longer heal 442 tox damage over less than a minute
## Changelog
🆑
fix: seiver no longer applies purity and delta time twice
code: made seiver code much less confusing
/🆑
2023-02-19 06:11:07 +00:00
SuperSlayer
eda1b0433e Fixes ooze mending globule not having a cooldown (#73482)
## About The Pull Request

Mending globule ability now actually has a cooldown.

## Why It's Good For The Game

Bugfix

## Changelog
🆑
fix: Fixes mending globule ability not having a cooldown
/🆑
2023-02-18 23:00:07 -07:00
Mothblocks
09cfba5feb Optimize cardboard cutouts saving 1.5s+ on init times (#73404)
New regression in init times. Closes
https://github.com/tgstation/dev-cycles-initiative/issues/32. CC @Fikou

- Instead of creating a human and icon for *every* cardboard cutout when
initialized, only creates the one we're actually using. When you're
about to use a crayon, creates all of them.
- Instead of using getFlatIcon, uses appearances directly.
2023-02-18 22:58:35 -07:00
MidoriWroth
1a49ade0bc [No GBP] Minor Food Tweaks (#73499)
## About The Pull Request

This PR will tweak some of my foods and others to make them a little
less excessive or to buff them a little.

Meatloaf takes 2 meat slabs instead of 3. It felt pretty excessive to
use 3.
Ribs and meat clown now use /obj/item/food/meat/steak instead of
/obj/item/food/meat/steak/plain. This allows custom downstream steaks to
also be used for ribs, instead of only vanilla upstream ones
Truffles and peanut butter cups use 2 of their filling ingredient
instead of 5. 5 felt excessive.
Moved calzones to the pizza crafting menu
Adds the meat foodtype to meat pierogis and removes the dairy foodtype
(wow)
Increases the nutritional value of french toast
Beef stroganoff uses 2 units of salt/pepper instead of 5
Removes sugar from granola bars to make them less complex to make

## Why It's Good For The Game

Re-balancing certain foods to make them simpler or more worthwhile
encourages people to make them =)

## Changelog
🆑
qol: Tweaked around some foods to make them easier to make
/🆑
2023-02-18 22:51:26 -07:00
John Willard
dc8db27fa4 Fixes NtosNet Downloader & App themes (#73500)
## About The Pull Request

NtOS' downloading app is the only application where PC device theme is
actually used by the app directly, instead of handled by NtOS Window. I
forgot about this, and removed it from the data, breaking the TGUI page.

Also two edits;
- NtosWindow now takes their theme directly from PC_device_theme, this
means we're not relying anymore on apps to individually give the theme
they want to have, and tablets will get alerts of downloading illegal
programs if they are on any theme but the syndicate one (instead of not
getting the message if theyre on any but the nt one).
- Removes bad uses of ``as anything`` on stored files, because it holds
more than just programs (like ordnance data).

## Why It's Good For The Game

the NtOS app now works again, sorry for the issue.

Closes https://github.com/tgstation/tgstation/issues/73493
Closes https://github.com/tgstation/tgstation/issues/73507

## Changelog

🆑
fix: NtOS program downloader now works again, and will now properly
alert you of downloading illegal ROMs if you change your theme to
anything that isn't Syndicate.
fix: NtOS themes are now recognized by all windows.
/🆑
2023-02-18 22:50:40 -07:00
lessthanthree
ec56dd820a Tram sign sprites/mapping helpers (#73476)
## About The Pull Request
Did a new pass of my tram sign, now with a frame and better alpha
layering. Added mapping helpers for the signs because I didn't include
them on the first set.


![image](https://user-images.githubusercontent.com/83487515/219555591-b74b7454-9be0-4778-94c2-8a023ec76d28.png)

## Why It's Good For The Game
Better sprite, mapping helpers for mappers.

## Changelog

🆑 LT3
imageadd: Wall mounted tram sign now has improved emissives and casing
/🆑
2023-02-18 19:21:31 -07:00
Jacquerel
2048cea969 Don't print a misleading message when not picking a spider. (#73483)
## About The Pull Request

Fixes #73468 
The admin message in `mob_spawn/ghost_role/attack_ghost` was warning
admins any time a ghost role spawner did not create a mob, however
clicking a spider egg opens a radial menu. Neglecting to choose one of
the options (and closing the menu) does not return a mob, and was
implying that some kind of error occurred when this is actually expected
behaviour.

Also as noted in the comments this probably needn't message admins in
the first place, we now log it as a crash instead.

## Why It's Good For The Game

We shouldn't print a log message in admin chat for expected behaviour.
Logging changes will help diagnose if this was masking an _actual_ bug.

## Changelog

🆑
fix: Clicking a spider egg and then closing the radial menu won't print
a message in admin channel informing admins that the egg didn't spawn
anything.
/🆑
2023-02-18 19:19:52 -07:00
FinancialGoose
475acf2598 Fixes throw messages to always say you threw it very hard (#73498)
## About The Pull Request
Fixes wrong check in throw messages to say "very hard throw" even if its
a weak one.
## Why It's Good For The Game
Actual correct description for throwing is good, at least thats what i
think
## Changelog
🆑
fix: fixed throwing description to always say "it was thrown very hard"
even when its not
/🆑
2023-02-18 19:19:16 -07:00
NamelessFairy
181469d951 Refactors photocopiers and fixes some bugs with them. (#73316)
## About The Pull Request

I set out today to fix a bug with photocopiers, I couldn't replicate the
bug but instead found two more and removed a bunch of duplicate code.
Fixes being able to print blanks despite having no money to print them.
Fixes paperwork not being removed from the photocopier when mounting it.
## Why It's Good For The Game

duplicate code bad, bug fixes good.
## Changelog
🆑
fix: You cannot print blank documents from a photocopier if you cannot
afford them anymore.
fix: Mounting the photocopier will now eject paperwork as it does with
photos and paper.
refactor: Lots of duplicate code and some unnecessary vars removed from
photocopier code.
/🆑
2023-02-18 19:18:31 -07:00
MrMelbert
5fd9aaa467 Fixes a handful of zombie issues (#73489)
## About The Pull Request

- Fixes zombie suffering sudden death due to lacking a heart. 

Infectious zombies don't have noblood but also don't have a heart, so
they suffered damage from it.
Resolves this by granting them `TRAIT_STABLEHEART`. I was unsure if they
should have `NOBLOOD` or not, so I err'd on the side with less
implications

Their higher-functioning counterpart has noblood, but I like seeing
zombies bleed, that's cool

- Fixes zombies not reviving due to lacking a heart

Same issue as above. 

## Why It's Good For The Game

Fixes #73465
Fixes #73466

## Changelog

🆑 Melbert
fix: Heartless zombies will now revive again
fix: Zombies no longer take constant ticking damage from lacking a heart
/🆑
2023-02-18 14:32:35 -07:00
Jacquerel
4599842d7c Makes Shake() proc work (#73480)
## About The Pull Request

Fixes #72321
Fixes #70388

The shake proc didn't work and hasn't for ages.
I remember it having worked at some point, but it was quite a long time
ago.
I cannot guarantee that the end result here is the same as it was, the
reason here being that I have no idea how this proc ever worked in the
first place. My limited understanding of the `animate` proc implies that
the previous implementation as written would never have acted as you
would expect it to, but clearly at some time in the past it did work. A
mystery.

As a result of the previous, possibly because the proc never _did_ work
as expected and just did something which looked vaguely correct most of
the time, both the default values and the values people were passing
into this proc were completely ridiculous.
Why would anyone ever want to pixel shift an object with a range of _15_
pixels in all directions? That's half a full tile! And why would you
want it to do this for 25 seconds?
So I also changed the values being passed in, because you really want
pretty small numbers passed into here most of the time.

Here's a video of everything that vibrates:
https://www.youtube.com/watch?v=Q0hoqmaXkKA

The exception is the v8 engine. I left this alone because it seems to
try and start shaking while in your hands, which doesn't work, and I
don't know how to fix that. This has potentially _also_ never worked.

## Why It's Good For The Game

Now you can see intended visual indicators for:
- Lobstrosities charging.
- Beepsky being EMPed.
- The Savannah Ivanov preparing to jump.
- The DNA infuser putting someone through the spin cycle.
- The mystery box admin item I had no previous idea even existed (fun
animations on this one).
- Anything else which wants to use this proc to create vibrating objects
in the future.

## Changelog

🆑
fix: Lobstrosities and Tarantulas will once more vibrate to let you know
they're about to charge at you.
fix: The Savannah Ivanov will once more vibrate to let you know it's
about to jump into the air.
fix: The DNA infuser will now vibrate to let people know that it's busy
blending someone with a dead animal.
/🆑
2023-02-18 14:28:17 -07:00
Zephyr
069de4f336 Moth Wing Reconstruction surgery works (#73486)
## About The Pull Request

Moth wings only allow themselves to be healed if the proc is called with
HEAL_ORGAN or HEAL_LIMB
So we just make the surgery force healing
## Why It's Good For The Game

Resolves https://github.com/tgstation/tgstation/issues/73485
## Changelog
🆑
fix: Moth wings can now correctly be healed
/🆑
2023-02-18 14:18:06 -07:00
Jack Edge
5a3875dacc Fix fancy boxes to fold like regular boxes (#73406)
🆑 coiax
fix: Folding a "fancy box" like donut or candles will now put cardboard
in your hand, rather than on the floor.
fix: You can always see how many pickles are in a jar of pickles, or
rolling papers there are in a pack of rolling papers, since it's not
possible to close them.
/🆑

Currently, folding a "fancy box", one where the contents are visible in
the icon, like a donut or candle box, the cardboard will drop on the
floor.

The `attack_self()` proc between the two types of boxes have been
unified.

In addition, the `is_open` for fancy boxes has been expanded to include
the "always open" option, where the contents of the box are always
countable on examine, and the box does not have a closed appearance.
Candle boxes previously special cased the `attack_self()` proc, and with
this addition, no longer need to.

## Why It's Good For The Game

Consistency in box interaction. Cardboard in hand. Always can count
pickles.
2023-02-18 13:44:17 -07:00
MrMelbert
023943ff9e Fixes ethereal revival not giving traumas (#73484)
## About The Pull Request

All that needed to be done was `revive` be moved to the end of the
chain, as it was responsible for `null`ing the ethereal heart references
/ causing the runtimes.

While I was here, I fixed a few other issues - like, using
`visible_messages` to start the process was not a good idea, as often
you are blind from unconsciousness when that message happens.

## Why It's Good For The Game

Fixes #71630

Downsides are good

## Changelog

🆑 Melbert
fix: Ethereal revival causing traumas again.
/🆑
2023-02-18 10:47:22 -08: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
tralezab
77031e2a93 Refactors the Nuclear Authentication Disk's Lone Op Behavior Into a Component, + Examine Message (#73453)
## About The Pull Request

### Refactor

Turns all the behavior for the nuke disk raising lone op probability
when unsecured into a new component, the "Keep Me Secure" component. As
an example (and really, I made it to test that the component was
actually working), there is a new admin plush called the "whiny plushie"
that will change icon depending on whether it is secure or not. Useful!

### Examine

I also added an examine message. Will explain below

## Why It's Good For The Game

The examine message was really what this entire pr's purpose was really
for.

>
[Capsandi](https://tgstation13.org/phpBB/memberlist.php?mode=viewprofile&u=7767)
wrote:
[↑](https://tgstation13.org/phpBB/viewtopic.php?p=665827#p665827)Wed Feb
15, 2023 2:42 pm
Someone needs to pr some sort of indicator as to whether the disk is
'secure' or not so players who don't know about the niche lone op
mechanic won't make the same intuitive assumption (though swat has been
trolled for putting it in the safe before).

I agree with this for the same reasons I did #73016 so I'll restate the
point with it here: A piece of banning a captain recently was that they
didn't secure the disk, but there is no indication in game that the disk
has special condiitons that trigger lone op, just that it should be kept
safe (which yeah, nuke ops want it). I'd rather remove the ambiguity of
a captain knowing this mechanic or not for the sake of the game, a
single examine for it is harmless

I'm considering this administration, not a feature. If maints want me to
take it out and have this be refactor only, that's fine with me

## Changelog
🆑
refactor: Refactors how nuclear activation disk works. Shouldn't notice
a whole lot but if you do, it might be because of this.
admin: Disk now has an examine message for whether it's secure or not,
to make it less ambiguous for players.
/🆑
2023-02-17 23:09:41 +00:00
NamelessFairy
7eb4ea5424 [NO GBP] Reinforced plating mapping helper actually function correctly. (#73464)
## About The Pull Request

Reinforced plating mapping helpers worked for only a feew specific
use-case which ended up being the only usecases I tested, I've modified
the code so it should work as expected in all usecases. In short this
fixes reinforced plating appearing in places where there is not actually
plating for it to replace, and stacking multiple layers of plating where
there should not be multiple layers.
## Why It's Good For The Game

Fixes a bug I introduced myself.
## Changelog
🆑
fix: Reinforced Plating baseturf helpers work and should now be bug free
enough to be used in maps.
/🆑
2023-02-17 22:54:50 +00:00
tralezab
64de1617b2 Refactors lizard fake canned food into real canned food (#73469)
## About The Pull Request

/obj/item/food/canned_jellyfish, /obj/item/food/desert_snails, and
/obj/item/food/larvae are now all /canned subtypes. All this means is
that to eat them, you use them once, and now they drop an empty tin
rubbish item.

## Why It's Good For The Game

Making fake false versions of real types that exist is such a pet peeve
of mine, we recently had a bug from it where the snails would go bad.
But even with that fixed you're just chomping the container of snails
and it's not the same behavior as all the other cans
grumgrugmrg I FIXED IT.

## Changelog
🆑
refactor: Lizard related canned food now acts like canned food
/🆑
2023-02-17 15:43:03 -07:00
Time-Green
4c8acee1b1 Fixes not being dumped in space after jumping off the shuttle (#73221)
#72709 added cordons to all reservations, inadvertantly breaking
hyperspace since anyone falling off the shuttle would just... bump into
a cordon

I've added a second "soft-cordon" that can be put x tiles away from the
actual cordon, preferably in a place where the player touching it wont
see the true cordon. Shuttle soft-cordon will dump people in space,
restoring original functionality (sort of)

🆑
fix: falling off the shuttle wont trap you in a box anymore
/🆑

---------

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
2023-02-17 15:16:12 -07:00
MrMelbert
e8d209c6f4 Fixes runtime in golem body swap, Fixes some hard deletes assocaited with golems and mind masters (#73373)
## About The Pull Request

Fixes #73368 

Golems didn't mind transfer on body swap until after the body was
finished creating, this created an issue as golems also did mind
assignment business while creating the body. So the
`mind.enslave_to_creator()` part runtime error'd and caused the create
to fail, which in turn caused the shell to not be consumed.

While sorting this out, I noticed that shells and golems hold a hard
reference to their owner. Yep, hard deletes. Changes mind `enslaved_to`
to a weakref, changes golem `owner` to a weakref, straight up removes
golem `owner` tracking on species because it was ONLY used for card
board golems when it could've just grabbed mind master

## Why It's Good For The Game

No more infinite golem shells

## Changelog

🆑 Melbert
fix: Transferring golem shells no longer make you a free man and also
results in infinite golem shells
fix: Servant golems are considerably less free
fix: Fixes some hard deletes related to mob minds being enslaved to
other mobs
/🆑
2023-02-17 15:06:49 -07:00
Profakos
339d4638a9 Fixes revelation program (#73463)
## About The Pull Request

#70678 removed hard drives from the game, and made the files be stored
directly on the computer. However, revelation has not been updated in
this regard. This PR once again makes it delete all files.

In addition, revelation also had a big red button yelling "activate"
that did nothing, and an option in ui_act that said "PRG_activate", that
wasn't used by anything, so I have linked up the two, allowing you to
revelate immediately. This does not feel like a real change, since you
could do this by arming, closing, and then reopening the program.

## Why It's Good For The Game

Fixes #72682

## Changelog

🆑
fix: Revelation once again wipes the stored files on the computer
/🆑
2023-02-17 15:04:37 -07:00
Jacquerel
7867d14fd4 Lightgeists won't try to heal toxin damage (#73467)
## About The Pull Request

Fixes #73439
Lightgeists use `heal_overall_damage` to heal, but despite the name that
actually only heals burn, brute, and stamina damage.
It will now prompt an error message if you try to heal someone who
doesn't have any of those damage types.
Simpler mobs can't take toxin or oxyloss damage so this has no effect on
spiders (the other user of this component).

Also during my conversion I forgot to set the lightgeist healing time to
0, so I did that too.

I thought about maybe changing this so that they _can_ heal toxin damage
but they've existed without being able to do it for so long that I don't
think it would be a "bug fix" at that point, I'll maybe adjust the
component behaviour further (to use `heal_ordered_damage` instead
probably) after this month. Until then I technically can't do it without
affecting Spider balance a little bit.

## Why It's Good For The Game

Makes it a _little_ clearer why someone's health doesn't increase when
they are clicked on.
Restores lost functionality.

## Changelog

🆑
fix: Lightgeists won't try to heal any damage which isn't burn or brute,
because they can't.
fix: Lightgeists don't need to perform an action bar in order to heal
someone, which was added by mistake.
/🆑
2023-02-17 15:03:57 -07:00
Profakos
f72be2749d Escape pod early launch fixes (#73442)
## About The Pull Request

Ever since dynamic shuttle dock size calculation, escape pods failed to
select the random lavaland/icemoon docking ports as a valid target, as
those ports had no shuttle attached to them, and thus, their dimensions
were stuck at 0. This PR makes permits these to be always a valid
target, similar to hyperspace transit docking ports.

Also, the various pods connected to the pod computer multiple times.
Each of them has added pod_lavaland as its valid destination lists, and
then when the escape pod port's id got updated with a counter to ensure
a unique ID, they have added pod_[counter]_lavaland to its destination.
This meant that every pod past the first had a dropdown, so they could
select which destination they could land at, instead of just the one
intended for solely them. This is also fixed.

Also autodocs two vars, and replaces some single letter vars.

## Why It's Good For The Game

fixes #72966

## Changelog


🆑
fix: emagged/delta pods properly fly to lavaland
/🆑
2023-02-17 15:02:47 -07:00
FinancialGoose
89e66c9b3f Fixes dwarf unable to throw books (#73455)
## About The Pull Request
Fixes #73448
Dwarf gets a -1 to throw speed so any objects with a throw force of 1
would get a throw_speed of 0 therefore failing throw_at. This pr just at
a max() to the speed arg being passed
## Why It's Good For The Game
Dwarf is no longer too weak to throw books, plus knowledge is good!
## Changelog
🆑
fix: fixed weak dwarfs being too weak as to be unable to throw books
/🆑
2023-02-17 02:51:00 +00:00
Roryl-c
c3f6db0942 Fix RPG Titles Runechat Offset (#73443)
## About The Pull Request
Fixes the terribly unreadable situation with RPG titles overlapping with
offset runechat messages.
Also fixes some offset issues for larger mobs with this event enabled.
## Why It's Good For The Game

![image](https://user-images.githubusercontent.com/5150427/219092938-743ce676-1f1b-4e3a-baab-957a1279db39.png)
## Changelog
🆑
fix: fixed chat offsets with the RPG Titles event
/🆑
2023-02-16 19:36:18 -07:00
Tim
a1ada2c9ef Refactor, improve, and rename canUseTopic to be can_perform_action (#73434)
This builds on what #69790 did and improved the code even further.
Notable things:
- `Topic()` is a deprecated proc in our codebase (replaced with
Javascript tgui) so it makes sense to rename `canUseTopic` to
`can_perform_action` which is more straightforward in what it does.
- Positional and named arguments have been converted into a easier to
use `action_bitflag`
- The bitflags adds some new checks you can use like: `NEED_GRAVITY |
NEED_LITERACY | NEED_LIGHT` when you want to perform an action.
- Redundant, duplicate, or dead code has been removed.
- Fixes several runtimes where `canUseTopic` was being called without a
proper target (IV drips, gibber, food processor)
- Better documentation for the proc and bitflags with examples
2023-02-16 20:22:14 -05:00
John Willard
c58cbb4dfb Reworked PDA menu & NtOS themes (#73070)
## About The Pull Request

This is a port/rework of
https://github.com/yogstation13/Yogstation/pull/15735 - I changed a lot
of how it acted (some themes are locked behind maintenance apps).

The original author allowed this port to happen, and I really liked how
it looked there so I'd like to add it here.

### Applications

Removes the hardware configurator application, as all it did was show
you your space and battery now that all hardware was removed. These are
things your PC does by default, so it was just a waste of space.
Adds a Theme manager application instead, which allows you to change
your PDA's theme at will.
Adds a new Maintenance application that will give a new theme, however
it will also increase the size of the theme manager app itself as it's
bloatware.

### Menu

There's now a bar at the top of the menu showing 'special' tablet apps
which, for one reason or another, should stand out from the rest of the
apps. Currently this is PDA messenger and the Theme manager

Flashlight and Flashlight color is now only an icon, and is shown on the
same line as Updating you ID


https://cdn.discordapp.com/attachments/961874788706574386/1069621173693972551/2023-01-30_09-10-52.mov


![image](https://user-images.githubusercontent.com/53777086/215501361-5ea3086e-2ff5-4ab1-bde4-8a3d14014fce.png)

### Themes

Adds a lot of themes to choose from, although SOME are hidden behind
Maintenance applications, which will give you a random theme. These are
bloatware however, so they come with some extra cost to the app's
required space storage.

Themes are now supported on ALL APPLICATIONS! If you have a computer
theme, you will have that theme in EVERY app you enter, rather than just
a select few.
ALSO also, emagging the tablet will automatically set & unlock the
Syndicate theme, which makes your PDA obvious but you can disguise it if
you wish through just re-painting it to something else.


https://cdn.discordapp.com/attachments/828923843829432340/1069565383155122266/2023-01-30_05-29-53.mov

### Preferences

This also adds a pref for theme, reworking the ringtone code to work
with it as well. I also removed 2 entirely unused PDA prefs just 'cause.

Screenshot not up-to-date, they now have proper names.

![image](https://user-images.githubusercontent.com/53777086/215463669-0fe9951a-71f8-4b71-a97d-b79b5a2f945a.png)

### Other stuff

Made defines for device_themes
Added support for special app-side checks to download files
Fixed programs downloading themselves TWICE because defines all had the
same definition
Removes the Chemistry computer disk as it was empty due to chemistry
app's removal
Removes the 'run_emag' proc, since apps can directly refer to the
computer to check for emag status instead.
Moved over and added better documentation on data computer files, and
moved the ordnance ones to the same file as the others.

## Why It's Good For The Game

It makes PDAs a lot more customizable while adding more features to
maintenance applications. I think the themes look cool and it fits with
PDAs being "personal" anyways.

I also explained most of my other arguments in the about section, such
as the hardware configuration application.

## Changelog

🆑 Chubbygummibear & JohnFulpWillard
add: A ton of new NtOS themes, which are accessible by the new Themify
application that comes with all PCs.
add: Emagging a PC now defaults it to the Syndicate option (and adds it
to go back to it if you wish)
add: There's a new maintenance app that gives you rarer themes
qol: The NtOS Main menu was moved around, added "header" applications
that are shown where the Flashlight is, such as your Theme manager and
PDA messenger.
code: Made defines for device_themes
code: Added support for special app-side checks to download files
code: Removes the 'run_emag' proc, since apps can directly refer to the
computer to check for emag status instead.
fix: Programs no longer download twice.
del: Removes the Chemistry computer disk as it was empty due to
chemistry app's removal
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2023-02-17 01:14:24 +00:00
oranges
439a04ef97 Made prox sensor cooldown apply before pulse effect (#73447)
This prevents it pulsing multiple times before the next activation time
is reached

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2023-02-16 16:44:02 -07:00
oranges
3869634972 Made assembly bombs unable to multignite (#73446)
Added stack traces for multignition events

Also moves the tank procs into the tanks file from bomb because I can
and I hate the previous organisation
2023-02-16 16:43:35 -07:00