From b5055f0a424c8effb9d5b9a36b3599bce06e6251 Mon Sep 17 00:00:00 2001 From: SyncIt21 <110812394+SyncIt21@users.noreply.github.com> Date: Mon, 29 Dec 2025 23:58:33 +0530 Subject: [PATCH] Converts some map focused tests to map logging (#94538) --- code/datums/components/atom_mounted.dm | 4 ++-- code/game/turfs/open/openspace.dm | 4 ++-- code/game/turfs/open/space/space.dm | 4 ++-- code/modules/power/lighting/light.dm | 6 +++--- code/modules/unit_tests/focus_only_tests.dm | 9 --------- 5 files changed, 9 insertions(+), 18 deletions(-) diff --git a/code/datums/components/atom_mounted.dm b/code/datums/components/atom_mounted.dm index 12d73e1ae24..5306e15873f 100644 --- a/code/datums/components/atom_mounted.dm +++ b/code/datums/components/atom_mounted.dm @@ -141,7 +141,7 @@ return FALSE var/msg - if(PERFORM_ALL_TESTS(focus_only/atom_mounted) && !mark_for_late_init) + if(PERFORM_ALL_TESTS(maptest_log_mapping) && !mark_for_late_init) msg = "[type] Could not find attachable object at [location.type] " var/list/turf/attachable_turfs = get_turfs_to_mount_on() @@ -161,7 +161,7 @@ if(msg) msg += "([target.x],[target.y],[target.z]) " if(msg) - stack_trace(msg) + log_mapping(msg) if(mark_for_late_init) obj_flags |= MOUNT_ON_LATE_INITIALIZE diff --git a/code/game/turfs/open/openspace.dm b/code/game/turfs/open/openspace.dm index 3f76eaab81d..6724cb74d23 100644 --- a/code/game/turfs/open/openspace.dm +++ b/code/game/turfs/open/openspace.dm @@ -25,8 +25,8 @@ // I am so sorry /turf/open/openspace/Initialize(mapload) // handle plane and layer here so that they don't cover other obs/turfs in Dream Maker . = ..() - if(PERFORM_ALL_TESTS(focus_only/openspace_clear) && !GET_TURF_BELOW(src)) - stack_trace("[src] was inited as openspace with nothing below it at ([x], [y], [z])") + if(PERFORM_ALL_TESTS(maptest_log_mapping) && !GET_TURF_BELOW(src)) + log_mapping("[src] was inited as openspace with nothing below it at ([x], [y], [z])") RegisterSignal(src, COMSIG_ATOM_AFTER_SUCCESSFUL_INITIALIZED_ON, PROC_REF(on_atom_created)) var/area/our_area = loc if(istype(our_area, /area/space)) diff --git a/code/game/turfs/open/space/space.dm b/code/game/turfs/open/space/space.dm index edb8a337987..74ee7b6a879 100644 --- a/code/game/turfs/open/space/space.dm +++ b/code/game/turfs/open/space/space.dm @@ -219,8 +219,8 @@ GLOBAL_LIST_EMPTY(starlight) /turf/open/space/openspace/Initialize(mapload) // handle plane and layer here so that they don't cover other obs/turfs in Dream Maker . = ..() - if(PERFORM_ALL_TESTS(focus_only/openspace_clear) && !GET_TURF_BELOW(src)) - stack_trace("[src] was inited as openspace with nothing below it at ([x], [y], [z])") + if(PERFORM_ALL_TESTS(maptest_log_mapping) && !GET_TURF_BELOW(src)) + log_mapping("[src] was inited as openspace with nothing below it at ([x], [y], [z])") icon_state = "pure_white" // We make the assumption that the space plane will never be blacklisted, as an optimization if(SSmapping.max_plane_offset) diff --git a/code/modules/power/lighting/light.dm b/code/modules/power/lighting/light.dm index 54b1270c661..d245eaf68d1 100644 --- a/code/modules/power/lighting/light.dm +++ b/code/modules/power/lighting/light.dm @@ -87,15 +87,15 @@ . = ..() // Detect and scream about double stacked lights - if(PERFORM_ALL_TESTS(focus_only/stacked_lights)) + if(PERFORM_ALL_TESTS(maptest_log_mapping)) var/turf/our_location = get_turf(src) for(var/obj/machinery/light/on_turf in our_location) if(on_turf == src) continue if(on_turf.dir != dir) continue - stack_trace("Conflicting double stacked light [on_turf.type] found at [get_area(our_location)] ([our_location.x],[our_location.y],[our_location.z])") - qdel(on_turf) + log_mapping("Conflicting double stacked light [on_turf.type] found at [AREACOORD(src)]") + return INITIALIZE_HINT_QDEL if(!mapload) //sync up nightshift lighting for player made lights var/area/our_area = get_room_area() diff --git a/code/modules/unit_tests/focus_only_tests.dm b/code/modules/unit_tests/focus_only_tests.dm index 3a8ca6ca381..71f3018b59f 100644 --- a/code/modules/unit_tests/focus_only_tests.dm +++ b/code/modules/unit_tests/focus_only_tests.dm @@ -36,15 +36,9 @@ /// Ensures that items that got the nullrod_core element with the chaptain_spawnable arg can be selected by the chaplain /datum/unit_test/focus_only/nullrod_variants -/// Checks that no light shares a tile/pixel offsets with another -/datum/unit_test/focus_only/stacked_lights - /// Checks for bad icon / icon state setups in cooking crafting menu /datum/unit_test/focus_only/bad_cooking_crafting_icons -/// Ensures openspace never spawns on the bottom of a z stack -/datum/unit_test/focus_only/openspace_clear - /// Checks to ensure that variables expected to exist in a job datum (for config reasons) actually exist /datum/unit_test/focus_only/missing_job_datum_variables @@ -75,6 +69,3 @@ ///Checks that items have roughly the same materials whenever spawned via processing/microwaving/baking etc. or any other mean. /datum/unit_test/focus_only/check_materials_when_processed - -///Checks if an map loaded object found an valid support atom to hang on -/datum/unit_test/focus_only/atom_mounted