[MIRROR] JSON Logging Refactor (#11623)

Co-authored-by: Selis <12716288+ItsSelis@users.noreply.github.com>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-09-14 20:05:26 +02:00
committed by GitHub
co-authored by Selis Kashargul
parent 272afa33c8
commit 5a62077f2c
425 changed files with 4081 additions and 2568 deletions
@@ -211,7 +211,7 @@ GLOBAL_VAR_INIT(dynamic_sector_master, null)
var/turf/T = locate(round(world.maxx/2), round(world.maxy/2), map_z[1]) // Find center turf, or near center for even-dimension maps.
if(!istype(T))
log_debug("Dynamic overmap POI found [T] instead of a valid turf.")
log_mapping("Dynamic overmap POI found [T] instead of a valid turf.")
return
// Move the shuttle landmarks.
@@ -238,7 +238,7 @@ GLOBAL_VAR_INIT(dynamic_sector_master, null)
/obj/effect/overmap/visitable/dynamic/poi/proc/destroy_poi(mob/user)
if(!loaded) // Ideally this should never happen.
log_debug("Dynamic overmap POI tried to unload itself but is not loaded.")
log_mapping("Dynamic overmap POI tried to unload itself but is not loaded.")
return
if(!parent) // Also shouldn't happen.
log_and_message_admins("Dynamic overmap POI attempted to unload without a parent z-level.")
@@ -246,7 +246,7 @@ GLOBAL_VAR_INIT(dynamic_sector_master, null)
qdel(src)
return
if(!((my_index >= 1) && (my_index <= MAX_DYNAMIC_LEVELS))) // Make sure my_index is sane
log_debug("Dynamic overmap POI attempted to unload with an invalid index.")
log_mapping("Dynamic overmap POI attempted to unload with an invalid index.")
loaded = FALSE
qdel(src)
return
@@ -260,7 +260,7 @@ GLOBAL_VAR_INIT(dynamic_sector_master, null)
return
to_chat(user, "Destabilization initiated...")
log_debug("Dynamic overmap POI unloading initiated...")
log_mapping("Dynamic overmap POI unloading initiated...")
// Some math to return a block of block_size turfs (+ 1 to each dimension to account for even-size maps lacking a true center to safely do math with). Basically, start from center turf and subtract half of block_size for bottom left corner, add for top right corner.
var/list/turfs_to_reset = block(locate(round(world.maxx/2 - my_template.block_size/2 - 1), round(world.maxy/2 - my_template.block_size/2 - 1), map_z[1]), locate(round(world.maxx/2 + my_template.block_size/2 + 1), round(world.maxy/2 + my_template.block_size/2 + 1), map_z[1]))
var/deleted_atoms = 0
@@ -282,7 +282,7 @@ GLOBAL_VAR_INIT(dynamic_sector_master, null)
loaded = FALSE
map_z = null
icon_state = "ring_destroyed"
log_debug("Dynamic POI unload complete, [deleted_atoms] atoms destroyed.")
log_mapping("Dynamic POI unload complete, [deleted_atoms] atoms destroyed.")
to_chat(user, "Subspace pocket collapse successful.")
qdel(src)