mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-29 07:59:01 +01:00
Queued table icon updates (#2206)
changes: Tables now use queue_icon_update() to trigger icon updates. SSicon_update has been promoted to SS_TICKER to reduce delay in icon updates. SSicon_update now only has one queue. This should prevent excessive table icon updates & mitigate table-lag from nar'sie.
This commit is contained in:
@@ -2,25 +2,25 @@
|
||||
|
||||
/datum/controller/subsystem/icon
|
||||
name = "Icon Updates"
|
||||
flags = SS_BACKGROUND | SS_NO_INIT
|
||||
wait = 1 // ds
|
||||
wait = 1 // ticks
|
||||
flags = SS_TICKER
|
||||
priority = SS_PRIORITY_ICON_UPDATE
|
||||
init_order = SS_INIT_ICON_UPDATE
|
||||
|
||||
var/list/queue = list()
|
||||
var/list/currentrun
|
||||
|
||||
/datum/controller/subsystem/icon/New()
|
||||
NEW_SS_GLOBAL(SSicon_update)
|
||||
|
||||
/datum/controller/subsystem/icon/stat_entry()
|
||||
..("Q:[queue.len] P:[LAZYLEN(currentrun)]")
|
||||
..("QU:[queue.len]")
|
||||
|
||||
/datum/controller/subsystem/icon/fire(resumed = FALSE)
|
||||
if (!resumed)
|
||||
currentrun = queue
|
||||
queue = list()
|
||||
/datum/controller/subsystem/icon/Initialize()
|
||||
fire(FALSE, TRUE)
|
||||
..()
|
||||
|
||||
var/list/curr = currentrun
|
||||
/datum/controller/subsystem/icon/fire(resumed = FALSE, no_mc_tick = FALSE)
|
||||
var/list/curr = queue
|
||||
|
||||
if (!curr.len)
|
||||
suspend()
|
||||
@@ -34,7 +34,9 @@
|
||||
A.update_icon()
|
||||
A.last_icon_update = world.time
|
||||
|
||||
if (MC_TICK_CHECK)
|
||||
if (no_mc_tick)
|
||||
CHECK_TICK
|
||||
else if (MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
/atom
|
||||
|
||||
Reference in New Issue
Block a user