//Zlevel where overmap objects should be #define OVERMAP_ZLEVEL 1 //How far from the edge of overmap zlevel could randomly placed objects spawn #define OVERMAP_EDGE 7 //list used to track which zlevels are being 'moved' by the proc below var/list/moving_levels = list() //Proc to 'move' stars in spess //yes it looks ugly, but it should only fire when state actually change. //null direction stops movement proc/toggle_move_stars(zlevel, direction) if(!zlevel) return var/gen_dir = null if(direction & (NORTH|SOUTH)) gen_dir += "ns" else if(direction & (EAST|WEST)) gen_dir += "ew" if(!direction) gen_dir = null if (moving_levels["zlevel"] != gen_dir) moving_levels["zlevel"] = gen_dir for(var/turf/space/S in world) if(S.z == zlevel) spawn(0) var/turf/T = S if(!gen_dir) T.icon_state = "[((T.x + T.y) ^ ~(T.x * T.y) + T.z) % 25]" else T.icon_state = "speedspace_[gen_dir]_[rand(1,15)]" for(var/atom/movable/AM in T) if (!AM.anchored) AM.throw_at(get_step(T,reverse_direction(direction)), 5, 1)