Fixes the flipped table spawners (#90518)

## About The Pull Request

They weren't actually working turns out. There was a race condition with
icon smoothing, so it needs to be flipped after the table gets smoothed.
On top of that the dir wasn't being passed properly.

## Why It's Good For The Game

Stuff that actually works!

This will allow for things like this on mapload:


![image](https://github.com/user-attachments/assets/372297d7-2a30-4d85-8e89-91d14fd584d7)


## Changelog

🆑
fix: fixes flipped table spawners not initializing correctly
/🆑
This commit is contained in:
Bloop
2025-04-29 17:49:24 -06:00
committed by Shadow-Quill
parent 72f8a3f9bc
commit 4148bc92b6
2 changed files with 10 additions and 5 deletions
@@ -386,7 +386,12 @@ again.
/obj/effect/spawner/structure/flipped_table/Initialize(mapload)
. = ..()
var/obj/structure/table/table_to_flipped = new table_to_spawn(loc)
table_to_flipped.dir = dir
table_to_flipped.flip_table()
var/obj/structure/table/table_to_flip = new table_to_spawn(loc)
table_to_flip.dir = dir
RegisterSignal(table_to_flip, COMSIG_ATOM_SMOOTHED_ICON, PROC_REF(on_icon_smoothed))
/// The flip_table() proc HAS to be run after smooth_icon() is completed or else we will get runtimes.
/obj/effect/spawner/structure/flipped_table/proc/on_icon_smoothed(obj/structure/table/table_to_flip)
SIGNAL_HANDLER
table_to_flip.flip_table(table_to_flip.dir)
UnregisterSignal(table_to_flip, COMSIG_ATOM_SMOOTHED_ICON)