mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Changes loop for space tiles from world one to for over coordinates. It would raise infinite loop warnings otherwise when used with big zlevels.
This commit is contained in:
@@ -22,17 +22,18 @@ proc/toggle_move_stars(zlevel, direction)
|
||||
|
||||
if (moving_levels["zlevel"] != gen_dir)
|
||||
moving_levels["zlevel"] = gen_dir
|
||||
for(var/turf/space/S in world)
|
||||
if(S.z == zlevel)
|
||||
for(var/x = 1 to world.maxx)
|
||||
for(var/y = 1 to world.maxy)
|
||||
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)
|
||||
var/turf/space/T = locate(x,y,zlevel)
|
||||
if (T)
|
||||
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)
|
||||
|
||||
|
||||
//list used to cache empty zlevels to avoid nedless map bloat
|
||||
|
||||
Reference in New Issue
Block a user