mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-22 19:46:36 +01:00
Convert turfs to use add_overlays(), eliminating the turf_overlay_holder!
- Converted as much as I could find about turf overlays to use add_overlay(). - This should be enough to stop BYOND from crashing, so we can eliminate the turf_overlay_holder hack. - This also lets us remove the anti-corruption hacks from walls and open space. - ZAS gas overlays can use priority overlays, so this also fixes the gas-goes-away-when-crowbarring-plating issue. - Stuff like that
This commit is contained in:
@@ -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 ..()
|
||||
Reference in New Issue
Block a user