Commit Graph

37 Commits

Author SHA1 Message Date
OrionTheFox
d097050d1d [Manual Mirror] Adds checkgrep for improper or missing atom Initialize args (mapload) (#19539)
* Adds checkgrep for improper or missing atom Initialize args (`mapload`) (#72846)

## About The Pull Request

Adds a grep for atom initialize overrides which does not include mapload

Regex used
`^/(obj|mob|turf|area|atom)/.+/Initialize\((?!mapload).*\)`

Also replaced some space indentation with some tab indentation in some
other greps


![image](https://user-images.githubusercontent.com/51863163/213883049-ef6d953a-e11f-4876-9852-c09633ddc289.png)

## Why It's Good For The Game

See #69107, #61759, #61623

## Changelog

No player facing changes

* Missed by #8374

* Add (mapload) to a //Skyrat Edit so that it passes

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2023-02-26 15:20:38 -05:00
SkyratBot
5f9f60713b [MIRROR] Starlight Polish (Space is blue!) [MDB IGNORE] (#19059)
* Starlight Polish (Space is blue!) (#72886)

<!-- 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

Adds support to underlays to realize_overlays
Ensures decals properly handle plane offsets
Fixes space lighting double applying if it's changeturf'd into. this
will be important later
Makes solar vis_contents block emissives as expected
Moves transit tube overlays to update_overlays, adds emissive blockers
to them

#### Adds render steps

An expansion on render_target based emissive blockers. 
They allow us to hijack an object's appearance and draw it somewhere
else, or even modify it, THEN draw it somewhere else.
They chain quite nicely

Fixes shuttles deleting z holder objects

#### Makes space emissive, makes walls and floors block emissives
The core idea here goes like this:
We make space glow, and give its overlays some color

This way, the tile and space parallax remain fullbright, along with
anything that doesn't block emissives, but anything that does block
emissives will instead get shaded the color of starlight

This requires a bit of extra work, see later

This is done automatically with render relays, which now support
specifiying layer and color (Need to make an editor for these one of
these days)

The emissive blocking floor stuff requires making a second render plate
to prevent double scaling

Also adds some new layering defines for lighting, and ensures all turf
lights have a layer. We'll get to this soon

#### Makes things in space blue

We color them the same as starlight, by taking advantage of space being
emissive
This means that things in space that block emissive will block it
correctly and be colored blue by the light overlay, but space itself
will remain fullbright

This does require redefining what always_lit means, but nothing but
cordons use that so it's fineee


#### Makes glass above space glow, and some other stuff

Glass tiles that sit above space will now shine light with matching
color to the glasses color. This includes mat tiles.

Glass tiles (not mat because they have no alpha) also only partially
block emissives.
Adds a new proc that uses render steps to acomplish this, essentially
we're cutting out bits below X alpha and drawing what remains as an
emissive.

#### Modifies partial space showing to support glow

Essentially, alongside displaying space as an underlay, we also display
a light overlay colored like starlight.
That starlight overlay gets masked to only be visible in bits that do
not contain any alpha.

We also mask the turf lighting to not go into bits that have no alpha,
to ensure we get the effect we want.
This is done with that lighting layer thing I mentioned earlier.

#### Makes appearance realization's list output ordered

I want it output in order of overlay, sub overlay suboverlay, next
overlay
Need to use insert for that

## Why It's Good For The Game

Pretty!
Also having space be emissive is a very very good way to test for fucked
emissive blockers (If it's broken why are we even drawing the overlay)
I know for a fact mob blockers on lizards and socks are kinda yorked, I
think there's more

<details>
<summary>
Old
</summary>


![image](https://user-images.githubusercontent.com/58055496/213916157-d4b38aa7-3ab6-42a4-989f-7bfba2dc2cba.png)

![image](https://user-images.githubusercontent.com/58055496/213916077-637fa288-bbee-477d-aded-730d9683477e.png)

![image](https://user-images.githubusercontent.com/58055496/213916088-0657a8a2-5627-48e2-8c4b-870c90ef2072.png)

</details>


<details>
<summary>
New
</summary>


![image](https://user-images.githubusercontent.com/58055496/213916107-2af74e64-1817-4a44-b528-180a9160cb9e.png)

![image](https://user-images.githubusercontent.com/58055496/213916115-5fa36fcc-b988-4ccf-850e-21c26ed463d0.png)

![image](https://user-images.githubusercontent.com/58055496/213916120-6833187d-b12e-42a7-ac4b-63c56deb71e5.png)

</details>

## 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: Space now makes things in it starlight faintly blue
fix: Glass floors that display space now properly let space shine
through them, rather then hiding it in the dark
add: Glass floors above space now glow faintly depending on their glass
type
/🆑

<!-- 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: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>

* update modular

* Update _decal.dm

* Update _decal.dm

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
2023-02-12 00:42:28 -08:00
lessthanthree
12d989be4c [MANUAL MIRROR] Adds an Escape Menu (#19217)
* Adds an Escape Menu (#72906)

* suicide

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2023-02-08 02:20:09 +00:00
SkyratBot
ffac8f0df0 [MIRROR] Fixes critical plane masters improperly not being readded in show_to [MDB IGNORE] (#19060)
Fixes critical plane masters improperly not being readded in show_to (#72604)

## About The Pull Request

[Adds support for pulling z offset context from an atom's
plane](9f215c5316)

This is needed to fix paper bins, since the object we plane set there
isn't actually on a z level.
Useful elsewhere too!

[Fixes compiler errors that came from asserting that plane spokesmen had
a plane
var](b830002443)

[Ensures lighting backdrops ALWAYS exist for each lighting
plane.](0e931169f7)

They can't float becuase we can see more then one plane at once yaknow?

[Fixes parallax going to shit if a mob moved zs without having a
client](244b2b25ba)

Issue lies with how is_outside_bounds just blocked any plane readding
It's possible for a client to not be connected during z moves, so we
need to account for them rejoining in show_to, instead of just blocking
any of our edge cases.

Fixing this involved having parallax override blocks for show_plane and
anything with the right critical flags ensuring mobs have JUST the right
PMs and relays.
It's duped logic but I'm unsure of how else to handle it and frankly
this stuff is just kinda depressing.
Might refactor later

[show_to can be called twice successfully with no hide_from
call.](092581a5c0)

Ensures no runtimes off the registers from this

## Why It's Good For The Game

Fixes #72543
Fixes lighting looking batshit on multiz. None reported this I cry into
the night.

## Changelog
🆑
fix: Fixes parallax showing up ABOVE the game if you moved z levels
while disconnected
/🆑

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Time-Green <timkoster1@hotmail.com>
2023-01-31 16:30:01 -05:00
SkyratBot
9c5408fe27 [MIRROR] Optimizes changing z level as a ghost by something like 85% [MDB IGNORE] (#19030)
Optimizes changing z level as a ghost by something like 85% (#73005)

<!-- 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! -->

Optimizes hud image addition/removal on z change

We were doing a lot of repeated work here, not to mention all the proc
calls.
So I pushed the "operate on loops" behavior into its own proc, so I
could ensure we only do some of this stuff once

This plus some removal of safeties saves 75% of the cost of z level
transitions as a ghost

Prevents double on_changed_z_level calls from ghosts and shuttles

Reacting to z changes used to be done off doMove or one of those
children, timber moved it to Moved, but did not remove the calls that
assumed things like abstract_move wouldn't trigger it

This means that moving up/down as a ghost was causing a double call of
the whole z move stack. Suprised this never broke anything tbh

Makes csv stat tracking actually encode numbers properly, cleans up an
indev comment from plane group code

## Why It's Good For The Game

Speed, and fixes

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2023-01-29 23:50:33 +00:00
SkyratBot
c812d943e6 [MIRROR] Rescale SM health from 900 to 100, UI improvements, visual changes. [MDB IGNORE] (#18456)
* Rescale SM health from 900 to 100, UI improvements, visual changes. (#72252)

Rescaling because i saw someone think that the number on the supermatter
UI are actually the percent damage over time, which is wrong.

Added delta symbol to damage and energy since they actually denote
change, not the actual value.

Chose the numbers that look good instead of doing a 1:1 rescale of the
old one (i.e. im dividing or multiplying things by 10 instead of 9). In
practice this means I'm lowering the damage cap but increasing damage
over the board for atmos (since it's mostly divisors). Lowered the
damage overall for external stuffs.

A bit of modification on the filter helpers to suit my needs. Added
documentation because I'm awesome.

* Rescale SM health from 900 to 100, UI improvements, visual changes.

Co-authored-by: vincentiusvin <54709710+vincentiusvin@users.noreply.github.com>
2023-01-01 09:15:37 -08:00
SkyratBot
1737ab8598 [MIRROR] Fixes parallax on >2 level maps going fucky with optimized multiz [MDB IGNORE] (#18298)
* Fixes parallax on >2 level maps going fucky with optimized multiz (#72169)

## About The Pull Request

We no longer always render parallax.
This was causing issues because we can't isolate the white of space from
the vaugely white of everything else.

So instead, if your parallax plane is out of view, we'll not only
disable it, but we'll disable the strand we send from the main plane TO
it.

Instead only blending against the bottom stack.

This does mean there's a possibility for fullwhite on z transition
borders (potentially fixable), or when hijacking the plane (also
fixable, but significantly more annoying).

This is enough to make large maps functional though, so I'm happy with
it

## Why It's Good For The Game

Allows for #71731 and other maps like it. Makes my code actually work

## Changelog
🆑
fix: Using optimized multiz on > 2 z layer maps will no longer cause
fucko bungo
/🆑

* Fixes parallax on >2 level maps going fucky with optimized multiz

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2022-12-24 21:27:07 -08:00
SkyratBot
1c76ea5334 [MIRROR] Changes our map_format to SIDE_MAP [MDB IGNORE] (#18070)
* 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>

* Changes our map_format to SIDE_MAP

* Modular!

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
Co-authored-by: Funce <funce.973@gmail.com>
2022-12-19 20:58:43 +13:00
SkyratBot
ea1e6ff95f [MIRROR] Adds a preference that disables intensive rendering on different multiz layers [MDB IGNORE] (#17737)
* Adds a preference that disables intensive rendering on different multiz layers (#71218)

## About The Pull Request

It's kinda hacky, but it is nearly the same as just rendering one z
layer.
We allow people to ENTIRELY REMOVE most plane masters from their screen.
This has the side effect of disabling most visual effects (AO is a big
one) which saves a LOT of gpu.

We rely on planes being essentially layers to ensure things render in
the proper order. (outside of some hackyness required to make parallax
work)

I've kept parallax and lighting enabled, so visuals will still look
better then multiz pre plane cube.
It does also mean that things like FOV don't work, but honestly they
didn't work PRE plane cube, and FOV's implementation makes me mad so I
have a hard time caring.

Reduces gpu usage on my machine on tram from 47% to 32%, just above the
27% I get on meta.

I'm happy with this.

Oh also turns out the parallaxing had almost no cost. Need to remove it
as a side effect of what I'm doing but if I could keep it I would.

There's still room for in between performance options, like disabling
things like AO on lower z layers, but I didn't expect it to make a huge
impact, so I left things as is

Also fixes a bug with paper bins not respecting z layer. It came up in
testing and annoyed me

## Why It's Good For The Game

Ensures we can make multiz maps without running into client performance
issues, allows users to customize performance and visual quality.

## Changelog
🆑
add: Adds a new rendering option to the gameplay preferences. You can
now limit the rendering intensity of multiz levels. This will make
things look a bit worse, but run a LOT better. Try it out if your
machine chokes on icebox or somethin.
/🆑

Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>

* Adds a preference that disables intensive rendering on different multiz layers

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
2022-11-25 14:27:27 +00:00
Zonespace
f7c26bbf25 515 Compat (#17465)
* ONLY SKYRAT CHANGES

* ACTUALLY SKYRAT CHANGES

* yolo, revert later

* Update alternate_byond_versions.txt

Co-authored-by: AnturK <AnturK@users.noreply.github.com>
2022-11-15 06:59:06 +00:00
Tastyfish
38fbd28a2e [MISSED MIRROR] 71005: Adds a game option to toggle the MultiZ parallax effect for a player (#17375)
Missed mirror 71005
2022-11-05 02:25:24 +00:00
SkyratBot
c649995506 [MIRROR] [NO GBP] Fixes blindness icons on lower station z-levels [MDB IGNORE] (#17170)
* [NO GBP] Fixes blindness icons on lower station z-levels (#70608)

I previously tested that footsteps worked when hearing them from a lower Z-level but forgot to test if you can see them while on a lower z-level.

It didn't occur to me that offsetted planecube planes wouldn't work with being over the fullscreen blindness mask past the top level but that makes sense in retrospect.

So the blindness effects (via play_fov_effect()) are now on the fullscreen plane. Partially reverted doing this with manually talking bubbles as well so they look normal again, and then added a FOV effect as well for chat bubbles.

NOTE: Runetext is in general also only above the blind mask on the highest station level and below on others for the same planecube issue but that's a whole other can of worms.

* [NO GBP] Fixes blindness icons on lower station z-levels

Co-authored-by: Tastyfish <crazychris32@gmail.com>
2022-10-25 23:47:47 -04:00
SkyratBot
59dc5c36b7 [MIRROR] Cleans up the fallout from plane cube [MDB IGNORE] (#17003)
* 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

* Cleans up the fallout from plane cube

* liquid tweaks

* oop

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
2022-10-19 19:43:05 -04:00
SkyratBot
9bf006d189 [MIRROR] Multiz Rework: Human Suffering Edition (Contains PLANE CUBE) [MDB IGNORE] (#16472)
* Multiz Rework: Human Suffering Edition (Contains PLANE CUBE)

* skyrat changes

* bodyparts merge

* unres door floorlight fix

* Future upstream fix for blindness

* upcoming upstream airlock fix

* fix button emissive

* Fix FOV markings?

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
2022-10-02 23:30:09 -04:00
SkyratBot
68e962fa21 [MIRROR] Adds seethrough component [MDB IGNORE] (#16421)
* Adds seethrough component (#69642)

Adds a seethrough component!
Standing behind a big object with this component will make the object transparent:

https://youtu.be/nnyWMJakVtE

And no one else can see it:

And yes you can click through it thanks to the power of plane masters!

Standing behind a tree is a pretty big meme and people will have to either shift right click or bump into you to ever find you. This makes it so much better to implement big objects, since they no longer obscure the tiles behind them
It's also useful for existing big objects, like billboards and the likes

🆑
qol: You can now see through big trees when you stand behind them!
refactor: Adds a seethrough component to make it easier to add big stationairy objects without reducing visibility
/🆑

Info

This is done by sending an override overlay to the user that obscures the normal object and plays an animation.

It registers an ENTERED signal on specific turfs. Those tiles in which it hides stuff is defined as a list of list coordinates, for which I made a global list with some defines. It's really crappy and I'd appreciate some feedback on that

* Adds seethrough component

Co-authored-by: Time-Green <timkoster1@hotmail.com>
2022-09-25 14:56:36 -07:00
SkyratBot
24de6b009d [MIRROR] Fixes our rendering for 514.1587 [MDB IGNORE] (#16125)
* Fixes our rendering for 514.1587 (#69778)

About The Pull Request

Ok so we have a blackness plane master right? it's setup to catch byond darkness but it doesn't rn cause we don't got the sight flags set.

So what it does is just sit there and do NOTHING.

BUT some genius put a color var on it, prob meant to just make it fully black.
But I think they just wrote it wrong, because byond just treats it as "make this plane have alpha 255 everywhere"

The problem is it's got zip on it, so if it actually worked this would black out everything below plane 0.
BUT it didn't work before, because setting anything on non overlay PMs broke them, and made them invis.

Then lummy fixed that, and now we get this.

I've fixed this bug by just removing the color set. It's not actually used for anything so outside this accidential working as intended behavior, it effects nothing, and doesn't actually impact darkness even if we used the sight flag. (I know this because I did this same thing in my multiz pr, which uses the sightflag)

Anyho I think they just wrote it wrong, because byond just treats it as "make this plane have alpha 255 everywhere"

We support 514.1587 now, so that's nice (NOT FOR RUNTIME THO CAUSE IT BROKE ?. LUMMOX ALSO KNOWS THIS)

Fixes #69774
Changelog

cl
fix: Hey, we support byond version 514.1587 now. You can upgrade if you'd like. I hope.
/cl

* Fixes our rendering for 514.1587

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2022-09-08 09:55:43 -04:00
SkyratBot
24c9fc0296 [MIRROR] Fixes 118(give or take) cases of mapload not being passed to initilaize [MDB IGNORE] (#15546)
* Fixes 118(give or take) cases of mapload not being passed to initilaize (#69107)

fixes 114 cases of mapload not being passed to initilaize

* Fixes 118(give or take) cases of mapload not being passed to initilaize

* Fixes a lot (give or take) cases of mapload not being passed to initilaize

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
2022-08-11 08:31:27 -07:00
SkyratBot
57059c6842 [MIRROR] Mild plane tweaks, thermomachine dropshadow [MDB IGNORE] (#14806)
* Mild plane tweaks, thermomachine dropshadow (#68185)

Adds the area plane to the game and colorblind plane master controllers
Mostly because it's actually used now, for weather, and should be
blurred/recolored

Sets the thermomachine on the game plane
I want it to have a dropshadow, and right now it's on the floor plane,
just from atmospherics, which I think is stupid

* Mild plane tweaks, thermomachine dropshadow

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2022-07-09 03:27:27 +01:00
SkyratBot
29a9e3f499 [MIRROR] Removes Rad Text Plane (MOTHHHHH) [MDB IGNORE] (#13973)
* Removes Rad Text Plane (MOTHHHHH) (#67337)

>Be mothblocks

* Removes Rad Text Plane (MOTHHHHH)

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2022-05-28 13:52:13 +01:00
SkyratBot
196d6f500a [MIRROR] Fix transparent floors ignoring blur effects [MDB IGNORE] (#13924)
* Fix transparent floors ignoring blur effects (#67191)

* Fix transparent floors ignoring blur effects

Co-authored-by: Tim <timothymtorres@gmail.com>
2022-05-26 23:25:02 +01:00
SkyratBot
edfaf90ebf [MIRROR] Ventcrawling improvements, performance and visual [MDB IGNORE] (#13461)
* Ventcrawling improvements, performance and visual (#66709)

* Initial pipecrawl work

Ok so pipecrawl images were updating EVERY TIME YOU MOVED
This was not good mojo

What I've done here is twofold
First, I ensured pipecrawl updates only when the net changes. This
breaks the current implementation, but I intend on fixing that

Second, I moved our method of getting pipes to the spatial grid
This isn't that great at the moment, but I intend on adding support for
tracking entered/exited cells, which should make this much better

* Much faster pipecrawling processing, niceties

Adds a concept called a cell tracker datum.
It manages a list of cells a passed in bound is "inside", and when
queried will return a list of new cells, and old cells.

Because we only really care about maintaining an absolute window of
"CELLS WE ARE IN" and less about always removing cells we're not in, we
can manage a second window to prevent moving up and down on a cell line
causing a ton of updates.

Uses this concept to optimize pipecrawling significantly, from 3ms per
call before to roughly 0.03ms per call.

Also moves pipecrawl images to their own plane, so they don't overlap ui
elements

* Pipecrawling effects niceties, direction help

You can now move in more then one direction when pipecrawling
This works as expected, if you hold up and left, move up for a while,
and come to a fork, you'll go left

Added some effects to pipecrawling. It'll darken the lighting plane
slightly, so you get a nice effect instead of just fullbright.
Also added a color matrix and drop shadow to the pipe images, this way
they stand out a bit more.

You now glide between pipe moves, rather then moving instantly. This
doesn't effect your actual move rate, but it no longer feels jittery
with say, 60fps

* Bounds

* Fixes runtimes, cache something somethign sonic speed

* Reworks how being interested in the spatial grid is tracked

Rather then checking multiple variables on the atom to consider, we
instead check for the existence of a string key.

This key is used by a list on the spatial grid subsystem to retrive a
cached list of all of the atoms "types"

Doing this requires doing a bit of extra work in
important_recursive_contents code, but it allows us to separate being a
part of the spatial grid from using important recursive contents, which
is very nice.

As a consequence, I've had to unroll some lazylist macros in important
recursive contents logic. It's not ""that"" bad but it's not great
either.

Oh and this adds a slight cost to enter/exit cell, but it's minimal.
Basically, rather then checking for different features of a grid member,
we just iterate the list their string key points to. Very handy

So there's an added cost of a list copy and all, but we save the
headache of more types technically increasing the cost of
addition/removal.

I also made adding/removing from the grid into one "pulbic" proc rather then two
different ones for each operation, because it was starting to get silly

* waaa waa it doesn't compile

* chord -> coord

* Ensures important_recursive_contents is actually emptied on removal

* Removes soul

* Kyler's review

Co-authored-by: Kylerace <kylerlumpkin1@ gmail.com>

* Kyler's review 2

Co-authored-by: Kylerace <kylerlumpkin1@ gmail.com>

* Kyler's review 3

Moves some procs around, improves some documentation, catches a few
small issues

Co-authored-by: Kylerace <kylerlumpkin1@ gmail.com>

* Ventcrawling improvements, performance and visual

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Kylerace <kylerlumpkin1@ gmail.com>
2022-05-09 15:06:38 +01:00
Gandalf
5f1815b0c0 https://github.com/tgstation/tgstation/pull/65971 2022-05-02 14:37:59 +01:00
SkyratBot
ee5f9e2180 [MIRROR] Fixes hud objects being hidden by blindness [MDB IGNORE] (#12001)
* Fixes hud objects being hidden by blindness (#65385)

They have a higher plane then fullscreen overlays, but unfortunately for
me, they were rendering to the game plane, which is below
RENDER_PLANE_NON_GAME. I was therefore getting hit in the nuts.

Hate this timeline

* Fixes hud objects being hidden by blindness

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2022-03-11 12:21:24 -05:00
SkyratBot
41aa1d2ee4 [MIRROR] Adds a colorblind accessability testing tool [MDB IGNORE] (#11995)
* Adds a colorblind accessability testing tool (#65217)

* Adds a colorblind accessability testing tool

I keep finding myself worrying about if things I create will be parsable
for colorblind people. So I've made a debug tool for approximating
different extreme forms of colorblindness.

It's very very much a hack. We can't do the proper correction required
to actually deal directly with long medium and short wavelengths of
light, so we need to rely on approximations. Part of that means say,
bright things being brighter then they ought to be. S not how people
actually experience things, but it's not something we can do anything
about in byond.

Anyway uh, it works by taking color matrixes, and using the plane master
grouping system floyd added to apply them to most all parts of the game
you would want to color correct.

There's some slight fragility here, but I couldn't think of a better way
of handling it.

We also need to deal with planes that have BLEND_MULTIPLY as their
blendmode, since that fucks up the filter. I've come up with a hack for
it, since I wanted to avoid breaking anything.

Oh and since I want it to apply to huds too I added plane masters to
represent them. I think that's about it.

Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>

* Adds a colorblind accessability testing tool

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
2022-03-10 20:35:12 -05:00
SkyratBot
054802781f [MIRROR] Fix distortion effect cutting [MDB IGNORE] (#11667)
* Fix distortion effect cutting (#64947)

Changed blend mode for the plane master

* Fix distortion effect cutting

Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com>
2022-02-22 15:59:29 +00:00
SkyratBot
b2cc74a77e [MIRROR] Fixes layering issues brought by the FoV PR. [MDB IGNORE] (#11411)
* Fixes layering issues brought by the FoV PR.

* Update code/__DEFINES/layers.dm

* Update code/modules/mob/living/living_defines.dm

* Update code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
2022-02-10 02:51:52 +00:00
SkyratBot
4b38b7f933 [MIRROR] Fixes hud layering issues [MDB IGNORE] (#11351)
* Fixes hud layering issues (#64746)

Co-authored-by: TiviPlus <572233640+TiviPlus@ users.noreply.com>

* Fixes hud layering issues

Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com>
Co-authored-by: TiviPlus <572233640+TiviPlus@ users.noreply.com>
2022-02-08 01:59:55 +00:00
SkyratBot
67b89dccf9 [MIRROR] Change default render relay plane to game relay [MDB IGNORE] (#11337)
* Change default render relay plane to game relay (#64567)

* Change default render relay plane to game plane

* fix typo

Co-authored-by: TiviPlus <572233640+TiviPlus@ users.noreply.com>

* Change default render relay plane to game relay

Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com>
Co-authored-by: TiviPlus <572233640+TiviPlus@ users.noreply.com>
2022-02-07 10:05:30 +00:00
SkyratBot
e63bb39ac9 [MIRROR] Fix Transparent Floors Multi Z clipping [MDB IGNORE] (#10523)
* Fix Transparent Floors Multi Z clipping (#63878)

Fixes #63770 (Objects on Lower Z level appearing on top Z level when under glass tiles)

This fixes some MultiZ issues that were discovered after I made #62875 (566b9ee1d8). I never setup a new plane for the transparent turfs and because of this any objects, icons, or sprites that were offset from the boundary of the turf would make any bottom Z level stuff appear on the current Z level.

We want stuff to look normal.

* Fix Transparent Floors Multi Z clipping

Co-authored-by: Tim <timothymtorres@gmail.com>
2022-01-08 02:43:42 +00:00
SkyratBot
c0706f4a41 [MIRROR] Field of View and Blindness improvements [bounty + upstream push] [MDB IGNORE] (#10060)
* Field of View and Blindness improvements [bounty + upstream push]

* Update death.dm

* almost done

* Update fov_handler.dm

* Face mouse when in combat mode, fix

* Fixes the category for the fov admin verb. #63401

* Fixes objects with bad planes and FoV bugs #63412

* pain

* there we go

* face pref

Co-authored-by: Azarak <azarak10@gmail.com>
2021-12-22 14:56:01 +00:00
SkyratBot
959f66bf47 [MIRROR] Fixed spelling of possession, Separate, and Cemetery [MDB IGNORE] (#9862)
* Fixed spelling of possession, separate, and cemetery (#63203)

Just fixes some spelling for gangs. I also fixed misspellings for "posession" to "possession". Fixed "seperate " to "Separate" Fixed "Cemetary" to "Cemetery"

* Fixed spelling of possession, Separate, and Cemetery

Co-authored-by: Doctor Pope <84367152+Dr-Pope@users.noreply.github.com>
2021-12-03 16:58:40 -05:00
SkyratBot
4dcc055fef [MIRROR] Fixing parallax plane above blackness [MDB IGNORE] (#9683)
* Fixing parallax plane above blackness  (#62902)

* merge

* Update plane_master.dm

* What Iam doing

* Fixing parallax plane above blackness

Co-authored-by: KIBORG04 <bossmira4@gmail.com>
2021-11-24 11:15:31 -05:00
SkyratBot
8213460bdf [MIRROR] Mention in the rendering docs that the byond displacement filter is not actually a displacement filter [MDB IGNORE] (#9088)
* Displacement maps in byond are not displacement maps (#62403)

Totally forgot to add this

* Mention in the rendering docs that the byond displacement filter is not actually a displacement filter

Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com>
2021-10-27 18:54:14 -04:00
SkyratBot
873d80335a [MIRROR] Fixes overlay lighting not having any color [MDB IGNORE] (#8873)
* Fixes overlay lighting not having any color. (#62087)

The overlay lighting plane was never actually being drawn, only used as an alpha filter over the main lighting plane.
That's fine to do, but it only cuts away darkness, doesn't actually lay down any color.

So let's properly draw it too, so things look right

Fixes #61899

* Fixes overlay lighting not having any color

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2021-10-16 20:40:09 -04:00
SkyratBot
3701087507 [MIRROR] Fix ambient occlusion stacking [MDB IGNORE] (#8664)
* Fix ambient occlusion stacking (#61822)

Fixes filter not being removed and relays stacking up

* Fix ambient occlusion stacking

Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com>
2021-10-08 08:25:54 -04:00
SkyratBot
b5cb1d7c07 [MIRROR] Add undocumented render debug command to the rendering documentation [MDB IGNORE] (#8679)
* Add debug suggestions (#61908)

.debug profile mapicons
prints a massive oneline json with the data of all currently onscreen rendering objects

* Add undocumented render debug command to the rendering documentation

Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com>
2021-10-08 08:12:17 -04:00
SkyratBot
6a3a1aed83 Rendering refactor P1: Plane unification and render relaying (pictures and video included) (#8479)
Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com>
2021-10-01 00:08:39 +01:00