Merge branch 'master' into aro-bellies

This commit is contained in:
Aronai Sieyes
2018-02-27 21:39:53 -05:00
committed by GitHub
43 changed files with 222 additions and 295 deletions
@@ -1,28 +0,0 @@
//
// Floor Decals Initialization Subsystem
// This is part of the giant decal hack that works around a BYOND bug where DreamDaemon will crash if you
// update overlays on turfs too much.
// The master_controller on Polaris used to init decals prior to initializing areas (which initilized turfs)
// Now that we switched to subsystems we still want to do the same thing, so this takes care of it.
//
SUBSYSTEM_DEF(floor_decals)
name = "Floor Decals"
init_order = INIT_ORDER_DECALS
flags = SS_NO_FIRE
/datum/controller/subsystem/floor_decals/Initialize(timeofday)
if(floor_decals_initialized)
return ..()
to_world_log("Initializing Floor Decals")
admin_notice("<span class='danger'>Initializing Floor Decals</span>", R_DEBUG)
var/list/turfs_with_decals = list()
for(var/obj/effect/floor_decal/D in world)
var/T = D.add_to_turf_decals()
if(T) turfs_with_decals |= T
CHECK_TICK
for(var/item in turfs_with_decals)
var/turf/T = item
if(T.decals) T.apply_decals()
CHECK_TICK
floor_decals_initialized = TRUE
return ..()
+3 -1
View File
@@ -11,6 +11,8 @@ SUBSYSTEM_DEF(overlays)
var/list/overlay_icon_state_caches // Cache thing
var/list/overlay_icon_cache // Cache thing
var/global/image/appearance_bro = new() // Temporarily super-global because of BYOND init order dumbness.
/datum/controller/subsystem/overlays/PreInit()
overlay_icon_state_caches = list()
overlay_icon_cache = list()
@@ -90,7 +92,7 @@ SUBSYSTEM_DEF(overlays)
icon_cache[icon] = .
/atom/proc/build_appearance_list(old_overlays)
var/static/image/appearance_bro = new()
// var/static/image/appearance_bro = new() // Moved to be superglobal due to BYOND insane init order stupidness.
var/list/new_overlays = list()
if (!islist(old_overlays))
old_overlays = list(old_overlays)