mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Improve space map edges
This commit is contained in:
@@ -4,12 +4,13 @@ SUBSYSTEM_DEF(skybox)
|
||||
name = "Space skybox"
|
||||
init_order = INIT_ORDER_SKYBOX
|
||||
flags = SS_NO_FIRE
|
||||
var/list/skybox_cache = list()
|
||||
var/static/list/skybox_cache = list()
|
||||
|
||||
var/list/dust_cache = list()
|
||||
var/list/speedspace_cache = list()
|
||||
var/list/phase_shift_by_x = list()
|
||||
var/list/phase_shift_by_y = list()
|
||||
var/static/list/dust_cache = list()
|
||||
var/static/list/speedspace_cache = list()
|
||||
var/static/list/mapedge_cache = list()
|
||||
var/static/list/phase_shift_by_x = list()
|
||||
var/static/list/phase_shift_by_y = list()
|
||||
|
||||
/datum/controller/subsystem/skybox/PreInit()
|
||||
//Static
|
||||
@@ -31,6 +32,29 @@ SUBSYSTEM_DEF(skybox)
|
||||
im.plane = DUST_PLANE
|
||||
im.blend_mode = BLEND_ADD
|
||||
speedspace_cache["EW_[i]"] = im
|
||||
//Over-the-edge images
|
||||
for (var/dir in alldirs)
|
||||
var/image/I = image('icons/turf/space.dmi', "white")
|
||||
var/matrix/M = matrix()
|
||||
var/horizontal = (dir & (WEST|EAST))
|
||||
var/vertical = (dir & (NORTH|SOUTH))
|
||||
M.Scale(horizontal ? 8 : 1, vertical ? 8 : 1)
|
||||
I.transform = M
|
||||
I.appearance_flags = KEEP_APART | TILE_BOUND
|
||||
I.plane = SPACE_PLANE
|
||||
I.layer = 0
|
||||
|
||||
if(dir & NORTH)
|
||||
I.pixel_y = 112
|
||||
else if(dir & SOUTH)
|
||||
I.pixel_y = -112
|
||||
|
||||
if(dir & EAST)
|
||||
I.pixel_x = 112
|
||||
else if(dir & WEST)
|
||||
I.pixel_x = -112
|
||||
|
||||
mapedge_cache["[dir]"] = I
|
||||
|
||||
//Shuffle some lists
|
||||
phase_shift_by_x = get_cross_shift_list(15)
|
||||
@@ -41,9 +65,6 @@ SUBSYSTEM_DEF(skybox)
|
||||
/datum/controller/subsystem/skybox/Initialize()
|
||||
. = ..()
|
||||
|
||||
/datum/controller/subsystem/skybox/Recover()
|
||||
skybox_cache = SSskybox.skybox_cache
|
||||
|
||||
/datum/controller/subsystem/skybox/proc/get_skybox(z)
|
||||
if(!skybox_cache["[z]"])
|
||||
skybox_cache["[z]"] = generate_skybox(z)
|
||||
|
||||
Reference in New Issue
Block a user