Skip to content

Commit

Permalink
New Space Parallax (#2507)
Browse files Browse the repository at this point in the history
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request
Updates space parallax with new sprites, and fixes the mysterious black
pixels that would show up in parallax. This was happening because old
space sprites had a few transparent pixels in it. Hell.
Example:

![image](https://github.com/shiptest-ss13/Shiptest/assets/81882910/fe11f892-0404-4253-8845-6483ff0775c5)


## Changelog

:cl: Thgvr, PositiveEntropy
fix: Space will no longer have stray black pixels
imageadd: New space parallax by Imaginos
/:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
  • Loading branch information
thgvr authored Nov 22, 2023
1 parent c881027 commit 5e9a351
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 12 deletions.
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.

0 comments on commit 5e9a351

Please sign in to comment.