mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Move map errors to their own log file (#43376)
In interest of getting things fixed without having to constantly crawl through game.log to find map issues, moved them to their own log file.
This commit is contained in:
committed by
yogstation13-bot
parent
3fa084cc2f
commit
cacec75e83
@@ -181,6 +181,8 @@
|
||||
WRITE_LOG(GLOB.config_error_log, text)
|
||||
SEND_TEXT(world.log, text)
|
||||
|
||||
/proc/log_mapping(text)
|
||||
WRITE_LOG(GLOB.world_map_error_log, text)
|
||||
|
||||
/* For logging round startup. */
|
||||
/proc/start_log(log)
|
||||
|
||||
@@ -34,6 +34,8 @@ GLOBAL_VAR(world_asset_log)
|
||||
GLOBAL_PROTECT(world_asset_log)
|
||||
GLOBAL_VAR(world_cloning_log)
|
||||
GLOBAL_PROTECT(world_cloning_log)
|
||||
GLOBAL_VAR(world_map_error_log)
|
||||
GLOBAL_PROTECT(world_map_error_log)
|
||||
|
||||
GLOBAL_LIST_EMPTY(bombers)
|
||||
GLOBAL_PROTECT(bombers)
|
||||
|
||||
@@ -303,7 +303,7 @@ SUBSYSTEM_DEF(air)
|
||||
var/starting_ats = active_turfs.len
|
||||
sleep(world.tick_lag)
|
||||
var/timer = world.timeofday
|
||||
warning("There are [starting_ats] active turfs at roundstart, this is a mapping error caused by a difference of the air between the adjacent turfs. You can see its coordinates using \"Mapping -> Show roundstart AT list\" verb (debug verbs required)")
|
||||
log_mapping("There are [starting_ats] active turfs at roundstart caused by a difference of the air between the adjacent turfs. You can see its coordinates using \"Mapping -> Show roundstart AT list\" verb (debug verbs required).")
|
||||
for(var/turf/T in active_turfs)
|
||||
GLOB.active_turfs_startlist += T
|
||||
|
||||
|
||||
@@ -179,7 +179,7 @@
|
||||
limit--
|
||||
while(!FoundDoor && limit)
|
||||
if (!FoundDoor)
|
||||
log_world("### MAP WARNING, [src] at [AREACOORD(src)] failed to find a valid airlock to cyclelink with!")
|
||||
log_mapping("[src] at [AREACOORD(src)] failed to find a valid airlock to cyclelink with!")
|
||||
return
|
||||
FoundDoor.cyclelinkedairlock = src
|
||||
cyclelinkedairlock = FoundDoor
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
. = ..()
|
||||
if(preload_cell_type)
|
||||
if(!ispath(preload_cell_type,/obj/item/stock_parts/cell))
|
||||
log_world("### MAP WARNING, [src] at [AREACOORD(src)] had an invalid preload_cell_type: [preload_cell_type].")
|
||||
log_mapping("[src] at [AREACOORD(src)] had an invalid preload_cell_type: [preload_cell_type].")
|
||||
else
|
||||
cell = new preload_cell_type(src)
|
||||
update_icon()
|
||||
|
||||
@@ -118,6 +118,7 @@ GLOBAL_VAR(restart_counter)
|
||||
GLOB.world_href_log = "[GLOB.log_directory]/hrefs.log"
|
||||
GLOB.sql_error_log = "[GLOB.log_directory]/sql.log"
|
||||
GLOB.world_qdel_log = "[GLOB.log_directory]/qdel.log"
|
||||
GLOB.world_map_error_log = "[GLOB.log_directory]/map_errors.log"
|
||||
GLOB.world_runtime_log = "[GLOB.log_directory]/runtime.log"
|
||||
GLOB.query_debug_log = "[GLOB.log_directory]/query_debug.log"
|
||||
GLOB.world_job_debug_log = "[GLOB.log_directory]/job_debug.log"
|
||||
@@ -275,21 +276,21 @@ GLOBAL_VAR(restart_counter)
|
||||
s += "Default" //Replace this with something else. Or ever better, delete it and uncomment the game version.
|
||||
s += "</a>"
|
||||
s += ")"
|
||||
|
||||
|
||||
var/players = GLOB.clients.len
|
||||
|
||||
|
||||
var/popcaptext = ""
|
||||
var/popcap = max(CONFIG_GET(number/extreme_popcap), CONFIG_GET(number/hard_popcap), CONFIG_GET(number/soft_popcap))
|
||||
if (popcap)
|
||||
popcaptext = "/[popcap]"
|
||||
|
||||
|
||||
if (players > 1)
|
||||
features += "[players][popcaptext] players"
|
||||
else if (players > 0)
|
||||
features += "[players][popcaptext] player"
|
||||
|
||||
|
||||
game_state = (CONFIG_GET(number/extreme_popcap) && players >= CONFIG_GET(number/extreme_popcap)) //tells the hub if we are full
|
||||
|
||||
|
||||
if (!host && hostedby)
|
||||
features += "hosted by <b>[hostedby]</b>"
|
||||
|
||||
|
||||
@@ -55,10 +55,10 @@
|
||||
if(item.parent)
|
||||
var/static/pipenetwarnings = 10
|
||||
if(pipenetwarnings > 0)
|
||||
warning("build_pipeline(): [item.type] added to a pipenet while still having one. (pipes leading to the same spot stacking in one turf) around [AREACOORD(item)]")
|
||||
log_mapping("build_pipeline(): [item.type] added to a pipenet while still having one. (pipes leading to the same spot stacking in one turf) around [AREACOORD(item)].")
|
||||
pipenetwarnings--
|
||||
if(pipenetwarnings == 0)
|
||||
warning("build_pipeline(): further messages about pipenets will be suppressed")
|
||||
log_mapping("build_pipeline(): further messages about pipenets will be suppressed")
|
||||
members += item
|
||||
possible_expansions += item
|
||||
|
||||
|
||||
@@ -59,9 +59,7 @@
|
||||
return
|
||||
var/area/AS = get_area(src)
|
||||
if(istype(AS, /area/holodeck))
|
||||
log_world("### MAPPING ERROR")
|
||||
log_world("Holodeck computer cannot be in a holodeck.")
|
||||
log_world("This would cause circular power dependency.")
|
||||
log_mapping("Holodeck computer cannot be in a holodeck, This would cause circular power dependency.")
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
|
||||
@@ -104,11 +104,11 @@
|
||||
/obj/effect/mapping_helpers/airlock/Initialize(mapload)
|
||||
. = ..()
|
||||
if(!mapload)
|
||||
log_world("### MAP WARNING, [src] spawned outside of mapload!")
|
||||
log_mapping("[src] spawned outside of mapload!")
|
||||
return
|
||||
var/obj/machinery/door/airlock/airlock = locate(/obj/machinery/door/airlock) in loc
|
||||
if(!airlock)
|
||||
log_world("### MAP WARNING, [src] failed to find an airlock at [AREACOORD(src)]")
|
||||
log_mapping("[src] failed to find an airlock at [AREACOORD(src)]")
|
||||
else
|
||||
payload(airlock)
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
|
||||
/obj/effect/mapping_helpers/airlock/cyclelink_helper/payload(obj/machinery/door/airlock/airlock)
|
||||
if(airlock.cyclelinkeddir)
|
||||
log_world("### MAP WARNING, [src] at [AREACOORD(src)] tried to set [airlock] cyclelinkeddir, but it's already set!")
|
||||
log_mapping("[src] at [AREACOORD(src)] tried to set [airlock] cyclelinkeddir, but it's already set!")
|
||||
else
|
||||
airlock.cyclelinkeddir = dir
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
|
||||
/obj/effect/mapping_helpers/airlock/locked/payload(obj/machinery/door/airlock/airlock)
|
||||
if(airlock.locked)
|
||||
log_world("### MAP WARNING, [src] at [AREACOORD(src)] tried to bolt [airlock] but it's already locked!")
|
||||
log_mapping("[src] at [AREACOORD(src)] tried to bolt [airlock] but it's already locked!")
|
||||
else
|
||||
airlock.locked = TRUE
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
|
||||
/obj/effect/mapping_helpers/airlock/abandoned/payload(obj/machinery/door/airlock/airlock)
|
||||
if(airlock.abandoned)
|
||||
log_world("### MAP WARNING, [src] at [AREACOORD(src)] tried to make [airlock] abandoned but it's already abandoned!")
|
||||
log_mapping("[src] at [AREACOORD(src)] tried to make [airlock] abandoned but it's already abandoned!")
|
||||
else
|
||||
airlock.abandoned = TRUE
|
||||
|
||||
@@ -204,4 +204,4 @@ INITIALIZE_IMMEDIATE(/obj/effect/mapping_helpers/no_lava)
|
||||
if(!ispath(disease_type,/datum/disease))
|
||||
CRASH("Wrong disease type passed in.")
|
||||
var/datum/disease/D = new disease_type()
|
||||
return list(component_type,D)
|
||||
return list(component_type,D)
|
||||
|
||||
@@ -22,7 +22,9 @@ GLOBAL_DATUM_INIT(_preloader, /datum/map_preloader, new)
|
||||
value = deepCopyList(value)
|
||||
#ifdef TESTING
|
||||
if(what.vars[attribute] == value)
|
||||
GLOB.dirty_vars += "<font color=green>[what.type]</font> at [AREACOORD(what)] - <b>VAR:</b> <font color=red>[attribute] = [isnull(value) ? "null" : (isnum(value) ? value : "\"[value]\"")]</font>"
|
||||
var/message = "<font color=green>[what.type]</font> at [AREACOORD(what)] - <b>VAR:</b> <font color=red>[attribute] = [isnull(value) ? "null" : (isnum(value) ? value : "\"[value]\"")]</font>"
|
||||
log_mapping("DIRTY VAR: [message]")
|
||||
GLOB.dirty_vars += message
|
||||
#endif
|
||||
what.vars[attribute] = value
|
||||
|
||||
|
||||
@@ -170,12 +170,20 @@
|
||||
|
||||
switch(tdir)
|
||||
if(NORTH)
|
||||
if((pixel_y != initial(pixel_y)) && (pixel_y != 23))
|
||||
log_mapping("APC: ([src]) at [AREACOORD(src)] with dir ([tdir] | [uppertext(dir2text(tdir))]) has pixel_y value ([pixel_y] - should be 23.)")
|
||||
pixel_y = 23
|
||||
if(SOUTH)
|
||||
if((pixel_y != initial(pixel_y)) && (pixel_y != -23))
|
||||
log_mapping("APC: ([src]) at [AREACOORD(src)] with dir ([tdir] | [uppertext(dir2text(tdir))]) has pixel_y value ([pixel_y] - should be -23.)")
|
||||
pixel_y = -23
|
||||
if(EAST)
|
||||
if((pixel_y != initial(pixel_x)) && (pixel_x != 24))
|
||||
log_mapping("APC: ([src]) at [AREACOORD(src)] with dir ([tdir] | [uppertext(dir2text(tdir))]) has pixel_x value ([pixel_x] - should be 24.)")
|
||||
pixel_x = 24
|
||||
if(WEST)
|
||||
if((pixel_y != initial(pixel_x)) && (pixel_x != -25))
|
||||
log_mapping("APC: ([src]) at [AREACOORD(src)] with dir ([tdir] | [uppertext(dir2text(tdir))]) has pixel_x value ([pixel_x] - should be -25.)")
|
||||
pixel_x = -25
|
||||
if (building)
|
||||
area = get_area(src)
|
||||
|
||||
@@ -31,7 +31,7 @@ GLOBAL_LIST_EMPTY(conveyors_by_id)
|
||||
/obj/machinery/conveyor/inverted/Initialize(mapload)
|
||||
. = ..()
|
||||
if(mapload && !(dir in GLOB.diagonals))
|
||||
log_game("### MAPPING ERROR: [src] at [AREACOORD(src)] spawned without using a diagonal dir. Please replace with a normal version.")
|
||||
log_mapping("[src] at [AREACOORD(src)] spawned without using a diagonal dir. Please replace with a normal version.")
|
||||
|
||||
// Auto conveyour is always on unless unpowered
|
||||
|
||||
|
||||
Reference in New Issue
Block a user