mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 07:08:00 +01:00
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:  ## Changelog 🆑 fix: fixes flipped table spawners not initializing correctly /🆑
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user