Files
Bubberstation/tools/UpdatePaths/Scripts/76134_tram_window_cleanup.txt
4eff7c5edd [MIRROR] Adds border smoothing! (Look ma I'm upstreaming) [MDB IGNORE] (#21988)
* Adds border smoothing! (Look ma I'm upstreaming) (#76134)

## About The Pull Request

Ok so we currently have 1 (count em) border object that wants to smooth
with other border objects. That's the tram window.

It currently does this manually, via map edits, but that's kinda crappy
so lets be better.

This pr adds a new smoothing mode to handle border objects.
Unlike other smoothing modes, it returns a bitfield of directions the
border object connects in.

I do this by memorizing a calculation of which dirs "connect" at init,
and reading out of a global list with border object direction, direction
between objects, and if it's a border object, the other object's dir.

I'm doing this primarily because it's become useful for wallening (a
spriter saw the tram thing and is doing the same thing to pod windows,
and I want to support that)

I do think it's potentially useful in other applications too tho, and I
like dehardcoding tram windows.

Also fun bonus (or maybe downside), it's nearly 0 cost because I pulled
the bitmask smoothing define into 2 subdefines, and am swapping the
handler one out to do what I want.
Oh also I got rid of a for loop in smoothing code, redundant and costs
time in list iteration

[Moves tram windows over to the new border object
smoothing](https://github.com/tgstation/tgstation/commit/114873679c94d680788edee9665fa18dba8108c0)

Also replaces some typepath chicanery with a setDir override, for
redundancy in future
Oh and there's a update paths script too, to be nice

## Why It's Good For The Game

More visual possibility in future, fixes a hack we have currently, and
makes some spriters happy.

## Changelog
🆑
fix: Dehardcodes some stuff with tram windows, they'll be easier to map
with now
refactor: Border objects can now smooth with each other. I'm sure
something cool will come of this
/🆑

* Adds border smoothing! (Look ma I'm upstreaming)

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2023-06-23 16:16:03 -07:00

6 lines
431 B
Plaintext

#comment Cleans up manual tram window alignment, made redundant by {} which added automatic alignment on init/dir change
/obj/structure/window/reinforced/tram/left/@SUBTYPES : /obj/structure/window/reinforced/tram/@SUBTYPES
/obj/structure/window/reinforced/tram/mid/@SUBTYPES : /obj/structure/window/reinforced/tram/@SUBTYPES
/obj/structure/window/reinforced/tram/right/@SUBTYPES : /obj/structure/window/reinforced/tram/@SUBTYPES