mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
[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:
committed by
GitHub
parent
272afa33c8
commit
5a62077f2c
@@ -77,7 +77,7 @@
|
||||
|
||||
var/atom/movable/AM = WF.resolve()
|
||||
if(isnull(AM))
|
||||
log_debug("DEBUG: HasProximity called without reference on [src].")
|
||||
log_runtime("DEBUG: HasProximity called without reference on [src].")
|
||||
return
|
||||
|
||||
if(!anchored || (last_pulse && world.time < last_pulse + 150))
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
/obj/effect/step_trigger/teleporter/deathfall/Trigger(var/atom/movable/A)
|
||||
var/turf/simulated/T = locate(teleport_x, teleport_y, teleport_z)
|
||||
if(!istype(T))
|
||||
log_debug("[src] failed to find destination turf.")
|
||||
log_mapping("[src] failed to find destination turf.")
|
||||
return
|
||||
if(A.hovering)//Flying people dont fall
|
||||
return
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
vents += temp_vent
|
||||
|
||||
if(prob(50)) //50/50 chance on spiders or metroids.
|
||||
log_debug("Hord event, spiders selected.")
|
||||
log_game("Hord event, spiders selected.")
|
||||
spawncount = rand(4 * severity, 10 * severity)
|
||||
sent_spiders_to_station = 0
|
||||
spiders = TRUE
|
||||
|
||||
else
|
||||
log_debug("Horde event, metroids selected.")
|
||||
log_game("Horde event, metroids selected.")
|
||||
spawncount = rand(2 * severity, 4 * severity)
|
||||
metroids = TRUE
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
for(var/i in 1 to 10)
|
||||
var/area/A = pick(affected_area)
|
||||
if(is_area_occupied(A))
|
||||
log_debug("infectedroom event: Rejected [A] because it is occupied.")
|
||||
log_game("infectedroom event: Rejected [A] because it is occupied.")
|
||||
continue
|
||||
|
||||
var/list/turfs = list()
|
||||
@@ -41,17 +41,17 @@
|
||||
if(!F.check_density())
|
||||
turfs += F
|
||||
if(turfs.len == 0)
|
||||
log_debug("infectedroom event: Rejected [A] because it has no clear turfs.")
|
||||
log_game("infectedroom event: Rejected [A] because it has no clear turfs.")
|
||||
continue
|
||||
target_area = A
|
||||
target_turfs = turfs
|
||||
|
||||
if(!target_area)
|
||||
log_debug("infectedroom event: Giving up after too many failures to pick target area")
|
||||
log_game("infectedroom event: Giving up after too many failures to pick target area")
|
||||
kill()
|
||||
return
|
||||
else
|
||||
log_debug("infectedroom event: [target_area] was chosen. Infecting...")
|
||||
log_game("infectedroom event: [target_area] was chosen. Infecting...")
|
||||
log_admin("Infected room event started; Virus: [chosen_disease.name]")
|
||||
message_admins("Infected room event started; Virus: [chosen_disease.name]")
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
current_page["[user]"] = home
|
||||
D = current_page["[user]"]
|
||||
if(!istype(D))
|
||||
log_debug("Codex_tree failed to failed to load for [user].")
|
||||
log_runtime("Codex_tree failed to failed to load for [user].")
|
||||
return
|
||||
var/list/H_init = list()
|
||||
H_init.Add(home)
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
for(var/Rp in subtypesof(/datum/recipe))
|
||||
var/datum/recipe/R = new Rp() // Datums must be initialized to read list vars
|
||||
if(!istype(R))
|
||||
log_debug("Recipe generation failed, recipe datum is [R].")
|
||||
log_runtime("Recipe generation failed, recipe datum is [R].")
|
||||
qdel(R)
|
||||
continue
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
/obj/machinery/photocopier/faxmachine/message_chat_admins(var/mob/sender, var/faxname, var/obj/item/sent, var/faxid, font_colour="#006100")
|
||||
var/faxmsg
|
||||
if(faxid && fexists("[CONFIG_GET(string/fax_export_dir)]/fax_[faxid].html"))
|
||||
faxmsg = return_file_text("[CONFIG_GET(string/fax_export_dir)]/fax_[faxid].html")
|
||||
faxmsg = file2text("[CONFIG_GET(string/fax_export_dir)]/fax_[faxid].html")
|
||||
|
||||
if(faxmsg)
|
||||
fax_discord_message("A fax; '[faxname]' was sent.\nSender: [sender.name]\nFax name: [sent.name]\nFax ID: **[faxid]**\nFax: ```[strip_html_properly(faxmsg)]```")
|
||||
|
||||
Reference in New Issue
Block a user