mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
* Moves proc/initialize() from being on /atom/movable, /are and /turf/simulated to being on /atom - Now turfs can initialize too * Added the SSatoms subsystem which controls initialization of atoms at roundstart and during normal conditions. * Disabled the old auto_init = 0 behavior, ALL atoms should get initialized() called on them now. * Refactored the way initialize() is called during /New() to utilize SSatoms instead of SScreation * Removed SScreation, as it was only a stop-gap until SSatoms could be ported. * Updated the maploader to inform SSatoms when it is loading maps instead of SScreation. * Updated the template map loader to use SSatoms to perform initTemplateBounds * Renamed 'initialized' var in seed_storage to deconflict. * Removed usage of auto_init = 0, replaced with a no-op initialize() proc for atoms that don't need initialization.
29 lines
1.0 KiB
Plaintext
29 lines
1.0 KiB
Plaintext
//
|
|
// 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 ..()
|