Smooth z1 and z2 on initialize.

This commit is contained in:
xxalpha
2016-03-13 00:43:37 +00:00
parent 688137c7dc
commit e2dd404d39
2 changed files with 18 additions and 3 deletions
+9 -3
View File
@@ -276,16 +276,22 @@
return A && A.type == source.type ? A : null
//Icon smoothing helpers
/proc/smooth_zlevel(var/zlevel)
/proc/smooth_zlevel(var/zlevel, now = FALSE)
var/list/away_turfs = block(locate(1, 1, zlevel), locate(world.maxx, world.maxy, zlevel))
for(var/V in away_turfs)
var/turf/T = V
if(T.smooth)
queue_smooth(T)
if(now)
smooth_icon(T)
else
queue_smooth(T)
for(var/R in T)
var/atom/A = R
if(A.smooth)
queue_smooth(A)
if(now)
smooth_icon(A)
else
queue_smooth(A)
/atom/proc/clear_smooth_overlays()
overlays -= top_left_corner
@@ -13,3 +13,12 @@ var/datum/subsystem/icon_smooth/SSicon_smooth
for(var/atom in smooth_queue)
ss_smooth_icon(atom)
smooth_queue -= atom
/datum/subsystem/icon_smooth/Initialize()
smooth_zlevel(1,TRUE)
smooth_zlevel(2,TRUE)
for(var/V in smooth_queue)
var/atom/A = V
if(A.z == 1 || A.z == 2)
smooth_queue -= A
..()