mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-31 09:08:30 +01:00
[MIRROR] [no gbp] Fixes runtime in SSstation [MDB IGNORE] (#22791)
* [no gbp] Fixes runtime in SSstation (#77231) No excuse, just dumb. Random layer is the randomly generated parallax layer, which is null 30% of the time, so this would runtime in SSstation setup in 30% of rounds Also another thing where I added extra params and didn't add them to the proc, fucking parallax for some roundstart clients and latejoins 🆑 fix: fixes a runtime in SSstation setup fix: fixes parallax not rendering correctly for latejoins /🆑  * [no gbp] Fixes runtime in SSstation --------- Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com>
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
C.parallax_layers_cached += new /atom/movable/screen/parallax_layer/layer_2(null, src)
|
||||
C.parallax_layers_cached += new /atom/movable/screen/parallax_layer/planet(null, src)
|
||||
if(SSparallax.random_layer)
|
||||
C.parallax_layers_cached += new SSparallax.random_layer.type(null, src, SSparallax.random_layer)
|
||||
C.parallax_layers_cached += new SSparallax.random_layer.type(null, src, FALSE, SSparallax.random_layer)
|
||||
C.parallax_layers_cached += new /atom/movable/screen/parallax_layer/layer_3(null, src)
|
||||
|
||||
C.parallax_layers = C.parallax_layers_cached.Copy()
|
||||
|
||||
@@ -93,4 +93,8 @@ SUBSYSTEM_DEF(parallax)
|
||||
|
||||
random_layer = null
|
||||
|
||||
/// Called at the end of SSstation setup, in-case we want to run some code that would otherwise be too early to run (like GLOB. stuff)
|
||||
/datum/controller/subsystem/parallax/proc/post_station_setup()
|
||||
random_layer?.apply_global_effects()
|
||||
|
||||
#undef PARALLAX_NONE
|
||||
|
||||
@@ -21,7 +21,7 @@ PROCESSING_SUBSYSTEM_DEF(station)
|
||||
#endif
|
||||
|
||||
announcer = new announcer() //Initialize the station's announcer datum
|
||||
SSparallax.random_layer.apply_global_effects() //Apply station effects that parallax might have
|
||||
SSparallax.post_station_setup() //Apply station effects that parallax might have
|
||||
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user