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")
*/
+17 -6
View File
@@ -117,11 +117,22 @@
set_target(T)
/turf/open/chasm/cloud
name = "clouds"
gender = PLURAL
name = "hazy clouds"
desc = "Clouds as far as the eye can see... Or is it just fog? Best not fall into it."
icon = 'icons/turf/floors/cloud_chasm.dmi'
desc = "Clouds as far as the eye can see... Watch your step."
icon = 'icons/turf/space.dmi'
icon_state = "0"
plane = PLANE_SPACE
tiled_dirt = FALSE
baseturfs = /turf/open/chasm/cloud
//light_range = 5
//light_power = 0.45
//light_color = LIGHT_COLOR_WHITE
smooth = SMOOTH_FALSE
/turf/open/chasm/cloud/Initialize()
. = ..()
icon_state = SPACE_ICON_STATE
/turf/open/chasm/cloud/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir)
underlay_appearance.icon = 'icons/turf/space.dmi'
underlay_appearance.icon_state = SPACE_ICON_STATE
underlay_appearance.plane = PLANE_SPACE
return TRUE
Binary file not shown.

Before

Width:  |  Height:  |  Size: 554 KiB

After

Width:  |  Height:  |  Size: 568 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 500 B

After

Width:  |  Height:  |  Size: 515 B