Commit Graph

8 Commits

Author SHA1 Message Date
SkyratBot
474ffe50ef [MIRROR] Flattens The Floor Plane (Camera Update Too) (#28632)
* Flattens The Floor Plane (Camera Update Too) (#84350)

## About The Pull Request

Ok so like, side map right? It makes things higher up in the world
render above things lower down in the world.

Most of the time this is what we want, but it is NOT what we want for
floors.
Floors are allowed to be larger then 32x32, and if they are we want them
to render based off JUST their layer.
If we don't allow this grass turfs and others get cut off on their
bottom edge, which looks WEIRD.

In order to make this happen, we can add TOPDOWN_LAYER to every layer on
the floor plane and disable sidemap.

I've added documentation for this to VISUALS.md, and have also
implemented unit test errors to prevent mixing TOPDOWN layers with non
topdown planes (or vis versa).
This new test adds ~1 second to tests, which is I think a perfectly
scrumpulent number.

EDIT:

I nerd sniped myself and implemented sidemap layering and lighting for
cameras (also larger then 32x32 icon support for getflat)
The lighting isn't perfect, we don't handle things displaying in the
void all that well (I am convinced getflat blending is broken but I have
no debugger so I can't fix it properly), but it'll do.

This came up cause I had to fix another layering issue in cameras and
thought I might as well go all in.

![image](https://github.com/tgstation/tgstation/assets/58055496/601b422c-f6aa-42ba-bcd9-b1faebe236e3)

## Why It's Good For The Game

Old:

![image](https://github.com/tgstation/tgstation/assets/58055496/d4102386-420d-4346-b05c-b819e62d98d0)

New:

![image](https://github.com/tgstation/tgstation/assets/58055496/1f5e303e-adee-427d-8fe3-76c8f2dbe098)

## Changelog
🆑
fix: Grass turfs will render properly now. Reworked how floors render,
please report any bugs!
fix: Cameras now properly capture lighting
fix: The layering seen in photos should better match the actual game
/🆑

* Flattens The Floor Plane (Camera Update Too)

* modular things

* Update fluff.dm

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: SpaceLoveSs13 <68121607+SpaceLoveSs13@users.noreply.github.com>
2024-07-13 18:39:17 +05:30
SkyratBot
002ab78d9b [MIRROR] useless update_appearance reduction, emissive_blocker micro optimization (saves a second of init) [MDB IGNORE] (#18243)
* useless update_appearance reduction, emissive_blocker micro optimization (saves a second of init)

* merge conflict

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
2023-01-07 18:45:54 -05: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
110fd07f34 [MIRROR] Micros the lighting subsystem (Saves a second of init) [MDB IGNORE] (#16461)
* Micros the lighting subsystem (Saves a second of init)

* Update stat_tracking.dm

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
2022-09-28 12:19:43 -07:00
SkyratBot
1736440cc0 [MIRROR] changes most uses of SSvis_overlays.add_vis_overlay() inside of update_overlays() to true overlays (#4569)
* changes most uses of SSvis_overlays.add_vis_overlay() inside of update_overlays() to true overlays (#57985)

* changes most uses of SSvis_overlays.add_vis_overlay() inside of update_overlays() to true overlays

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
2021-04-01 02:04:42 +01:00
deathride58
56896dfc8e Makes light fixtures actually glow in the dark while on (And adds the necessary groundwork for other above lighting plane stuff) (#35879)
* adds an above lighting layer, adds lighting overlays

* fixes wonkiness with broken and burned lights

* decreases overlay alpha a tad bit

* i gotta test this - removes new() override from mutable_appearance

* readds /mutable_appearance/New() for legacy behaviour
2018-02-24 00:46:43 -05:00
MrPerson
ff3f84ab81 Replaces /image with /mutable_appearance, where appropriate (#26518)
In cases where you're creating an image to use as an overlay, it makes more sense to use a mutable_appearance if you can. The image will create a static appearance for not just the image but also each intermediate step if you change vars along the way. The mutable appearance avoids this unnecessary and expensive process. The only situation that requires an image instead of a mutable_appearance is if the overlay is supposed to be directional. MA's ignore direction while images don't. I dunno why, probably another BYOND-ism.

I added a convenience function, mutable_appearance(), designed to emulate image(). Also went ahead and set the default plane of /mutable_appearance to FLOAT_PLANE because it's fucking 0 by default.

Several overlays that were image() calls were changed to just text strings when I could. overlays += "string" has the same result as overlays += image(icon, "string") and saves a proc call.
2017-04-25 12:15:16 +02:00