mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 20:20:33 +01:00
## About The Pull Request Somehow, we can teleport on away missions when we used not to be able to a long time ago. I'm not against it, however it can end quite badly with people getting stuck in indestructible walls or stuff like that, or end up somewhere with cordon turfs decoupled from the cordon area (museum cough cough), which doto your spaceman what Dr. Manhattan did to Rorschach btw. I'm totally fine with spacemen getting stuck on destructible turfs, rocks that can be mined, machinery and other destructible or movable structures, areas that are hard to access in and out, behind shutters and puzzle doors or even at the rims of indestructible walls if they're connected to any of the aforementioned things. It isn't a rigid standard, using random teleportation to cheese away levels should be a risky endeavor, but I also don't believe that you should end up teleported somewhere that you cannot otherwise escape on your own or be hypothetically freed from by another spaceman without more teleportation having to be involved 100% of the times (or admins if they feel merciful). That's where I draw the line. Beside, more than a few maps didn't use cordon turfs and/or turfs or had these massive portions of indestructible walls. Oh, by the by, a little unrelated but I'm bringing the visuals of indestructible "rock" walls up to date with the visuals for rock turfs that can be mined. Included are also icon-states so that the two can be easily distinguished during mapping. Feedback welcome. ## Why It's Good For The Game I'm not against using teleportation for away missions. Right now there are a couple easter egg areas that can only be accessed that way. However the risks of getting GBJ'd are immense if done randomly. Also for some reason, despite having the secret z-trait injector for the museum stops phasing/jaunting, the museum areas are not of the secret type, so they don't block teleportation. WHATEVER, IT ISN'T LIKE IT HAS SOME OMEGA LOOT WORTH THE TROUBLE ## Changelog 🆑 map: Made it a bit harder to get stuck on away missions if you willingly or unwillingly use teleportation techniques. You still definitely can, but usually only on sections of the map that can be reached one way or another, including rock walls that can be mined, just not those that cannot. image: Updated the visuals for indestructible rock walls to match the destructible ones. balance: RNG teleportation should work marginally better around areas and turfs where teleportation is restricted by skipping them instead of having a chance to fumble because of that. /🆑
41 lines
2.2 KiB
Plaintext
41 lines
2.2 KiB
Plaintext
/// Verifies that an area's perception of their "turfs" is correct, and no other area overlaps with them
|
|
/// Quite slow, but needed
|
|
/datum/unit_test/maptest_area_contents
|
|
test_flags = UNIT_TEST_MAP_TEST
|
|
priority = TEST_LONGER
|
|
|
|
/datum/unit_test/maptest_area_contents/Run()
|
|
// First, we check that there are no entries in more then one area
|
|
// That or duplicate entries
|
|
for (var/area/area_to_test in GLOB.areas)
|
|
area_to_test.cannonize_contained_turfs()
|
|
for (var/i in 1 to area_to_test.turfs_by_zlevel.len)
|
|
if (!islist(area_to_test.turfs_by_zlevel[i]))
|
|
var/zlevel_name = SSmapping.get_level(i)?.name
|
|
TEST_FAIL("zlevel index [i] (zlevel name: [zlevel_name]) in [area_to_test.type] is not a list.")
|
|
|
|
for (var/turf/turf_to_check as anything in area_to_test.turfs_by_zlevel[i])
|
|
if (!isturf(turf_to_check))
|
|
var/zlevel_name = SSmapping.get_level(i)?.name
|
|
TEST_FAIL("Found a [turf_to_check.type] (zlevel name: [zlevel_name]) in [area_to_test.type]'s turf listing")
|
|
|
|
if (turf_to_check.in_contents_of)
|
|
var/zlevel_name = SSmapping.get_level(i)?.name
|
|
var/area/existing = turf_to_check.in_contents_of
|
|
if (existing == turf_to_check.loc)
|
|
TEST_FAIL("Found a duplicate turf [turf_to_check.type] [COORD(turf_to_check)] (zlevel name: [zlevel_name]) inside [area_to_test.type]'s turf listing")
|
|
else
|
|
TEST_FAIL("Found a shared turf [turf_to_check.type] [COORD(turf_to_check)] (zlevel name: [zlevel_name]) between [area_to_test.type] and [existing.type]'s turf listings")
|
|
|
|
var/area/turfs_actual_area = turf_to_check.loc
|
|
if (turfs_actual_area != area_to_test)
|
|
var/zlevel_name = SSmapping.get_level(i)?.name
|
|
TEST_FAIL("Found a turf [turf_to_check.type] [COORD(turf_to_check)] (zlevel name: [zlevel_name]) which is IN [turfs_actual_area.type], but is registered as being in [area_to_test.type]")
|
|
|
|
turf_to_check.in_contents_of = turfs_actual_area
|
|
|
|
for(var/turf/position in ALL_TURFS())
|
|
if(!position.in_contents_of)
|
|
var/zlevel_name = position.z ? SSmapping.get_level(position.z)?.name : null
|
|
TEST_FAIL("Found a turf [position.type] [COORD(position)][zlevel_name ? " ([zlevel_name])" : ""] inside [position.loc.type] that is NOT stored in any area's turf listing")
|