mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-21 07:32:02 +00:00
* Openturf icon fixes and improvements * more things * Remove some pointless/bad layering/planing * yeah well I didn't need this anyways * Refactor Z mimickry to be at /turf * more refactoring * Cleanup, use turf/flags instead of z_mimic_flags * Fix turf/Entered() * misc optimizations * fixes * Major icon smoothing optimizations * Speed up boot some more * Fix AO * Remove some redundant code * Tie Z-lights to Z-mimic instead of openturfs * Fix an opacity issue with no_mutate turfs * Fix some issues with Z-mimic AO not properly clearing * Fix some OT->OT changetuf bugs * Add helpers for changing Z-mimic operational state on turfs * Fix some merge issues, change how F_CUT smoothhint works a bit. * indentation * SSopenturf -> SSzcopy
49 lines
1.1 KiB
Plaintext
49 lines
1.1 KiB
Plaintext
/var/datum/controller/subsystem/ao/SSocclusion
|
|
|
|
/datum/controller/subsystem/ao
|
|
name = "Ambient Occlusion"
|
|
flags = SS_FIRE_IN_LOBBY
|
|
init_order = SS_INIT_AO
|
|
wait = 1
|
|
priority = SS_PRIORITY_LIGHTING
|
|
|
|
var/list/queue = list()
|
|
|
|
/datum/controller/subsystem/ao/New()
|
|
NEW_SS_GLOBAL(SSocclusion)
|
|
|
|
/datum/controller/subsystem/ao/stat_entry()
|
|
..("P:[queue.len]")
|
|
|
|
/datum/controller/subsystem/ao/Initialize()
|
|
fire(FALSE, TRUE)
|
|
..()
|
|
|
|
/datum/controller/subsystem/ao/fire(resumed = 0, no_mc_tick = FALSE)
|
|
var/list/curr = queue
|
|
while (curr.len)
|
|
var/turf/target = curr[curr.len]
|
|
curr.len--
|
|
|
|
if (!QDELETED(target))
|
|
if (target.ao_queued == AO_UPDATE_REBUILD)
|
|
var/old_n = target.ao_neighbors
|
|
var/old_z = target.ao_neighbors_mimic
|
|
target.calculate_ao_neighbors()
|
|
if (old_n != target.ao_neighbors || old_z != target.ao_neighbors_mimic)
|
|
target.update_ao()
|
|
else
|
|
target.update_ao()
|
|
target.ao_queued = AO_UPDATE_NONE
|
|
|
|
if (no_mc_tick)
|
|
CHECK_TICK
|
|
else if (MC_TICK_CHECK)
|
|
return
|
|
|
|
/datum/controller/subsystem/ao/ExplosionStart()
|
|
suspend()
|
|
|
|
/datum/controller/subsystem/ao/ExplosionEnd()
|
|
wake()
|