mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-05 15:02:56 +00:00
Add AO regen verb (#3601)
This commit is contained in:
@@ -214,7 +214,8 @@ var/list/admin_verbs_debug = list(
|
||||
/client/proc/cmd_display_init_log,
|
||||
/client/proc/cmd_ss_panic,
|
||||
/client/proc/reset_openturf,
|
||||
/datum/admins/proc/capture_map
|
||||
/datum/admins/proc/capture_map,
|
||||
/client/proc/global_ao_regenerate
|
||||
)
|
||||
|
||||
var/list/admin_verbs_paranoid_debug = list(
|
||||
|
||||
22
code/modules/ambient_occlusion/ao_verbs.dm
Normal file
22
code/modules/ambient_occlusion/ao_verbs.dm
Normal file
@@ -0,0 +1,22 @@
|
||||
/client/proc/global_ao_regenerate()
|
||||
set name = "Regenerate AO (Global)"
|
||||
set desc = "Regenerates AO caches across the map."
|
||||
set category = "Debug"
|
||||
|
||||
if (!check_rights(R_DEBUG)) return
|
||||
|
||||
log_and_message_admins("has triggered a global ambient occlusion rebuild.")
|
||||
usr << "Beginning global AO rebuild."
|
||||
|
||||
SSocclusion.disable()
|
||||
|
||||
for (var/turf/T in world) // Yes, in world.
|
||||
T.ao_neighbors = null // To force a recalc.
|
||||
if (T.permit_ao)
|
||||
T.queue_ao()
|
||||
|
||||
CHECK_TICK
|
||||
|
||||
SSocclusion.enable()
|
||||
|
||||
usr << "AO rebuild complete."
|
||||
Reference in New Issue
Block a user