mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-06-04 21:56:01 +01:00
Smooth z1 and z2 on initialize.
This commit is contained in:
@@ -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
|
||||
..()
|
||||
Reference in New Issue
Block a user