Spaghetti Parallax Framework

This commit is contained in:
Dahlular
2021-04-19 10:42:13 -06:00
parent 6c8a4cb9e0
commit ba903783e2
4 changed files with 66 additions and 10 deletions
+49 -4
View File
@@ -25,6 +25,12 @@
if(SSparallax.random_layer)
C.parallax_layers_cached += new SSparallax.random_layer
C.parallax_layers_cached += new /obj/screen/parallax_layer/layer_3(null, C.view)
if(SSmapping.config?.map_name == "Layenia Station")
C.parallax_layers_cached += new /obj/screen/parallax_layer/layenia/horizon(null, C.view)
C.parallax_layers_cached += new /obj/screen/parallax_layer/layenia/clouds1(null, C.view)
C.parallax_layers_cached += new /obj/screen/parallax_layer/layenia/clouds2(null, C.view)
C.parallax_layers_cached += new /obj/screen/parallax_layer/layenia/clouds3(null, C.view)
C.parallax_layers = C.parallax_layers_cached.Copy()
@@ -66,17 +72,17 @@
switch(C.prefs.parallax)
if (PARALLAX_INSANE)
C.parallax_throttle = FALSE
C.parallax_layers_max = 5
C.parallax_layers_max = 10
return TRUE
if (PARALLAX_MED)
C.parallax_throttle = PARALLAX_DELAY_MED
C.parallax_layers_max = 3
C.parallax_layers_max = 8
return TRUE
if (PARALLAX_LOW)
C.parallax_throttle = PARALLAX_DELAY_LOW
C.parallax_layers_max = 1
C.parallax_layers_max = 7
return TRUE
if (PARALLAX_DISABLE)
@@ -320,7 +326,7 @@
blend_mode = BLEND_OVERLAY
absolute = TRUE //Status of seperation
speed = 3
layer = 30
layer = 4
/obj/screen/parallax_layer/planet/update_status(mob/M)
var/client/C = M.client
@@ -331,3 +337,42 @@
/obj/screen/parallax_layer/planet/update_o()
return //Shit wont move
//Layenia parallaxes
/obj/screen/parallax_layer/layenia
icon_state = null
blend_mode = BLEND_OVERLAY
absolute = TRUE
speed = 0.6
layer = 5
/obj/screen/parallax_layer/layenia/horizon
icon_state = "layeniahorizon"
/obj/screen/parallax_layer/layenia/clouds1
icon_state = "layenia1"
speed = 1
layer = 6
/obj/screen/parallax_layer/layenia/clouds2
icon_state = "layenia2"
speed = 1
layer = 1.4
/obj/screen/parallax_layer/layenia/clouds3
icon_state = "layenia3"
speed = 1
layer = 3
/obj/screen/parallax_layer/layenia/update_status(mob/M)
var/client/C = M.client
var/turf/posobj = get_turf(C.eye)
if(!posobj)
return
invisibility = is_station_level(posobj.z) ? 0 : INVISIBILITY_ABSTRACT
/*
/obj/screen/parallax_layer/tparallax1/update_status(mob/M)
if(SSmapping.config?.map_name != "Layenia Station")
*/