mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 07:33:34 +01:00
Merge pull request #9719 from SamHPurp/smoothing-improvements
Icon Smoothing to StonedMC
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
SUBSYSTEM_DEF(icon_smooth)
|
||||
name = "Icon Smoothing"
|
||||
init_order = INIT_ORDER_ICON_SMOOTHING
|
||||
wait = 1
|
||||
priority = FIRE_PRIOTITY_SMOOTHING
|
||||
flags = SS_TICKER
|
||||
|
||||
var/list/smooth_queue = list()
|
||||
|
||||
/datum/controller/subsystem/icon_smooth/fire()
|
||||
while(smooth_queue.len)
|
||||
var/atom/A = smooth_queue[smooth_queue.len]
|
||||
smooth_queue.len--
|
||||
smooth_icon(A)
|
||||
if(MC_TICK_CHECK)
|
||||
return
|
||||
if(!smooth_queue.len)
|
||||
can_fire = 0
|
||||
|
||||
/datum/controller/subsystem/icon_smooth/Initialize()
|
||||
smooth_zlevel(1,TRUE)
|
||||
smooth_zlevel(2,TRUE)
|
||||
var/queue = smooth_queue
|
||||
smooth_queue = list()
|
||||
for(var/V in queue)
|
||||
var/atom/A = V
|
||||
if(!A || A.z <= 2)
|
||||
continue
|
||||
smooth_icon(A)
|
||||
CHECK_TICK
|
||||
|
||||
..()
|
||||
Reference in New Issue
Block a user