Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Space Parallax #2507

Merged
merged 5 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions code/_onclick/hud/parallax.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
pref = PARALLAX_HIGH
switch(C.prefs.parallax)
if (PARALLAX_INSANE)
C.parallax_throttle = FALSE
C.parallax_throttle = PARALLAX_DELAY_DEFAULT
C.parallax_layers_max = 5
return TRUE

Expand Down Expand Up @@ -298,13 +298,6 @@
speed = 3
layer = 3

/atom/movable/screen/parallax_layer/random/space_gas
icon_state = "space_gas"

/atom/movable/screen/parallax_layer/random/space_gas/Initialize(mapload, view)
. = ..()
src.add_atom_colour(SSparallax.random_parallax_color, ADMIN_COLOUR_PRIORITY)

/atom/movable/screen/parallax_layer/random/asteroids
icon_state = "asteroids"

Expand Down
6 changes: 2 additions & 4 deletions code/controllers/subsystem/parallax.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@ SUBSYSTEM_DEF(parallax)
var/planet_x_offset = 128
var/planet_y_offset = 128
var/random_layer
var/random_parallax_color

//These are cached per client so needs to be done asap so people joining at roundstart do not miss these.
/datum/controller/subsystem/parallax/PreInit()
. = ..()
if(prob(70)) //70% chance to pick a special extra layer
random_layer = pick(/atom/movable/screen/parallax_layer/random/space_gas, /atom/movable/screen/parallax_layer/random/asteroids)
random_parallax_color = pick(COLOR_TEAL, COLOR_GREEN, COLOR_SILVER, COLOR_YELLOW, COLOR_CYAN, COLOR_ORANGE, COLOR_PURPLE)//Special color for random_layer1. Has to be done here so everyone sees the same color.
if(prob(20)) //20% chance to pick a special extra layer, in this case just asteroids, no space dirt
random_layer = /atom/movable/screen/parallax_layer/random/asteroids
planet_y_offset = rand(100, 160)
planet_x_offset = rand(100, 160)

Expand Down
Binary file modified icons/effects/parallax.dmi
Binary file not shown.
Binary file modified icons/turf/space.dmi
Binary file not shown.