Makes the floors in the CI room indestructable (#96909)

## About The Pull Request

Switches the floors in the CI room to be indestructible. They're not,
apparently.

## Why It's Good For The Game

The walls are indestructible and not the floors. I feel like these
should be indestructible too.

## Changelog

not player facing

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
This commit is contained in:
The Sharkening
2026-07-11 12:42:06 -06:00
committed by GitHub
co-authored by Ghom
parent 50f9132078
commit 5d5d68b87b
6 changed files with 23 additions and 7 deletions
+4 -1
View File
@@ -1,4 +1,4 @@
#define EXPECTED_FLOOR_TYPE /turf/open/floor/iron
#define EXPECTED_FLOOR_TYPE /turf/open/floor
// Do this instead of just ChangeTurf to guarantee that baseturfs is completely default on-init behavior
#define RESET_TO_EXPECTED(turf) \
turf.ChangeTurf(EXPECTED_FLOOR_TYPE);\
@@ -6,6 +6,7 @@
/// Validates that unmodified baseturfs tear down properly
/datum/unit_test/maptest_baseturfs_unmodified_scrape
normal_floor_required = TRUE
/datum/unit_test/maptest_baseturfs_unmodified_scrape/Run()
// What this is specifically doesn't matter, just as long as the test is built for it
@@ -27,6 +28,7 @@
/// Validates that specially placed baseturfs tear down properly
/datum/unit_test/maptest_baseturfs_placed_on_top
normal_floor_required = TRUE
/datum/unit_test/maptest_baseturfs_placed_on_top/Run()
TEST_ASSERT_EQUAL(run_loc_floor_bottom_left.type, EXPECTED_FLOOR_TYPE, "run_loc_floor_bottom_left should be an iron floor")
@@ -46,6 +48,7 @@
/// Validates that specially placed baseturfs BELOW tear down properly
/datum/unit_test/maptest_baseturfs_placed_on_bottom
normal_floor_required = TRUE
/datum/unit_test/maptest_baseturfs_placed_on_bottom/Run()
TEST_ASSERT_EQUAL(run_loc_floor_bottom_left.type, EXPECTED_FLOOR_TYPE, "run_loc_floor_bottom_left should be an iron floor")
@@ -1,5 +1,6 @@
/// Unit Test to ensure that a mouse bites a cable, gets shocked, and dies.
/datum/unit_test/mouse_bite_cable
normal_floor_required = TRUE
/datum/unit_test/mouse_bite_cable/Run()
// use dummy subtype that will bypass the probability check to bite on a cable
+3
View File
@@ -8,6 +8,9 @@
* the test again on our turf containing our single frame, deconstructing the machines! This should also not spawn
* any stacked machine frames.
*/
/datum/unit_test/frame_stacking
normal_floor_required = TRUE
/datum/unit_test/frame_stacking/Run()
// First test - RCDs stacking frames.
var/obj/item/construction/rcd/rcd = allocate(/obj/item/construction/rcd/combat/admin)
+1
View File
@@ -1,5 +1,6 @@
/// Tests spray painting the ground to create graffiti.
/datum/unit_test/spraypainting
normal_floor_required = TRUE
/datum/unit_test/spraypainting/Run()
var/mob/living/carbon/human/consistent/artist = EASY_ALLOCATE()
+11 -3
View File
@@ -59,6 +59,8 @@ GLOBAL_VAR_INIT(focused_tests, focused_tests())
var/static/list/uncreatables = null
/// Reference to the blank z-level containing our testing enviroment
var/static/datum/space_level/reservation
/// If this unit test requires a normal turf to run.
var/normal_floor_required = FALSE
/proc/cmp_unit_test_priority(datum/unit_test/a, datum/unit_test/b)
return initial(a.priority) - initial(b.priority)
@@ -69,7 +71,7 @@ GLOBAL_VAR_INIT(focused_tests, focused_tests())
reservation = template.load_new_z()
if(test_flags & UNIT_TEST_FOCUS)
warning("[src] has UNIT_TEST_FOCUS present inside var/test_flags.")
log_world("::error::[src] has UNIT_TEST_FOCUS present inside var/test_flags. This is a reminder to remove it from your commit!") // So CI fails.
uncreatables ||= build_list_of_uncreatables()
allocated = list()
@@ -81,8 +83,11 @@ GLOBAL_VAR_INIT(focused_tests, focused_tests())
return
//Make sure that the top and bottom locations in the diagonal are floors. Anything else may get in the way of several tests.
TEST_ASSERT(isfloorturf(run_loc_floor_bottom_left), "run_loc_floor_bottom_left was not a floor ([run_loc_floor_bottom_left])")
TEST_ASSERT(isfloorturf(run_loc_floor_top_right), "run_loc_floor_top_right was not a floor ([run_loc_floor_top_right])")
TEST_ASSERT(isindestructiblefloor(run_loc_floor_bottom_left), "run_loc_floor_bottom_left was not an indestructable floor ([run_loc_floor_bottom_left])")
TEST_ASSERT(isindestructiblefloor(run_loc_floor_top_right), "run_loc_floor_top_right was not an indestructable floor ([run_loc_floor_top_right])")
if(normal_floor_required)
for(var/turf/open/turf in get_area_turfs(run_loc_floor_bottom_left.loc))
turf.ChangeTurf(/turf/open/floor)
/datum/unit_test/Destroy()
QDEL_LIST(allocated)
@@ -92,6 +97,9 @@ GLOBAL_VAR_INIT(focused_tests, focused_tests())
if (istype(content, /obj/effect/landmark))
continue
qdel(content)
if(normal_floor_required)
for(var/turf/open/turf in get_area_turfs(run_loc_floor_bottom_left.loc))
turf.ChangeTurf(/turf/open/indestructible)
return ..()
/datum/unit_test/proc/Run()