Files
Aurora.3/code/controllers/subsystems/ao.dm
Fluffy e867030c2e Update MC (#18112)
* sdf

* fsda

* fuck

* fuck2

* toolz

* sdaf

* sdfa

* saf

* sdfa

* sdfa

* sdf

* sdfa

* temp rename

* temp rename

* temp rename

* sdaf

* the pain is immensurable in the land of byond

* the curse of rah

* safd

* sadf

* sadf

* gf

* asf

* fssdfa

* sfd

* sadf

* sfda

* brah

* brah

* it's easier for you to fix this

* ffs

* brah

* brah
2024-01-06 17:03:57 +01:00

46 lines
1.0 KiB
Plaintext

SUBSYSTEM_DEF(ao)
name = "Ambient Occlusion"
init_order = SS_INIT_AO
wait = 1
priority = SS_PRIORITY_LIGHTING
runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY
var/list/queue = list()
/datum/controller/subsystem/ao/stat_entry(msg)
msg = "P:[queue.len]"
return ..()
/datum/controller/subsystem/ao/Initialize()
fire(FALSE, TRUE)
return SS_INIT_SUCCESS
/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()
can_fire = FALSE
/datum/controller/subsystem/ao/ExplosionEnd()
can_fire = TRUE