mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-10 08:54:15 +00:00
About The Pull Request Fixes #45341 so that blueprints can no longer be used when not in-hand, and turfs now properly compile a list of the blueprint items it should hold by delaying when it retrieves this information, as objects such as manifolds and wires didn't initialize with their proper sprite. Changelog cl fix: The CE's blueprints can no longer be used if not in-hand, and its scanning function has been fixed. /cl
54 lines
1.2 KiB
Plaintext
54 lines
1.2 KiB
Plaintext
SUBSYSTEM_DEF(icon_smooth)
|
|
name = "Icon Smoothing"
|
|
init_order = INIT_ORDER_ICON_SMOOTHING
|
|
wait = 1
|
|
priority = FIRE_PRIOTITY_SMOOTHING
|
|
flags = SS_TICKER
|
|
|
|
///Blueprints assemble an image of what pipes/manifolds/wires look like on initialization, and thus should be taken after everything's been smoothed
|
|
var/list/blueprint_queue = list()
|
|
var/list/smooth_queue = list()
|
|
var/list/deferred = list()
|
|
|
|
/datum/controller/subsystem/icon_smooth/fire()
|
|
var/list/cached = smooth_queue
|
|
while(cached.len)
|
|
var/atom/A = cached[cached.len]
|
|
cached.len--
|
|
if (A.flags_1 & INITIALIZED_1)
|
|
smooth_icon(A)
|
|
else
|
|
deferred += A
|
|
if (MC_TICK_CHECK)
|
|
return
|
|
|
|
if (!cached.len)
|
|
if (deferred.len)
|
|
smooth_queue = deferred
|
|
deferred = cached
|
|
else
|
|
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
|
|
queue = blueprint_queue
|
|
blueprint_queue = list()
|
|
var/atom/movable/AM
|
|
var/turf/T
|
|
for(var/item in queue)
|
|
AM = item
|
|
T = AM.loc
|
|
if(T && AM)
|
|
T.add_blueprints(AM)
|
|
|
|
return ..()
|