mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-22 15:41:41 +00:00
## About The Pull Request So, there's some bullshit with the map loader(?) sometimes where it'll let space turfs spawn in spots where we REALLY don't want space turfs. Or, it could also just be a mapper screwing up. Anyways, we might miss these, so let's set up a broad Unit Test that checks and verifies that these round-ruining snagglers do _not_ exist. In order to help me to do this, I standardized and fixed the nomenclature such that `/area/ruin/space` is default for any map file in `_maps/RandomRuins/SpaceRuins`, as well as it's subtypes. I also touched up how we handle shuttle areas in these scenarios. This got a lot of Unit Test noise filtered out, and is crucial for its functioning. It should also be how we did it from the start anyways. I added in an UpdatePaths for any compatible change, but it was completely non-workable for some of the area type updates. I also fixed any organic bugs that didn't require an areas type update. Cool. Placing space turfs on IceBox:  Organically found issues:  I also added a `planetary` variable to `/datum/map_config` because I didn't like the hack I was using to see if we had a planetary map, and I'd rather it just be an explicit variable in the map's JSON. ## Why It's Good For The Game The less times we get Space Turfs showing up on IceBoxStation, the better. It also standardizes areas a bit more, which I like (we were using some incorrect ones in the wrong spots, so those were touched up in this PR as well). Like, if it's a space ruin, we don't need to use the lengthy `/area/ruin/unpowered/no_grav` when `/area/ruin/space` does the same thing. ## Changelog Nothing in here should concern a player (unless I broke something) Expect a few commits as I spam unit tests a few times and play whack-a-mole with bugs.
21 lines
843 B
Plaintext
21 lines
843 B
Plaintext
/// Conveys all log_mapping messages as unit test failures, as they all indicate mapping problems.
|
|
/datum/unit_test/log_mapping
|
|
// Happen before all other tests, to make sure we only capture normal mapping logs.
|
|
priority = TEST_PRE
|
|
|
|
/datum/unit_test/log_mapping/Run()
|
|
var/static/regex/test_areacoord_regex = regex(@"\(-?\d+,-?\d+,(-?\d+)\)")
|
|
|
|
for(var/log_entry in GLOB.unit_test_mapping_logs)
|
|
// Only fail if AREACOORD was conveyed, and it's a station or mining z-level.
|
|
// This is due to mapping errors don't have coords being impossible to diagnose as a unit test,
|
|
// and various ruins frequently intentionally doing non-standard things.
|
|
if(!test_areacoord_regex.Find(log_entry))
|
|
continue
|
|
var/z = text2num(test_areacoord_regex.group[1])
|
|
if(!is_station_level(z) && !is_mining_level(z))
|
|
continue
|
|
|
|
TEST_FAIL(log_entry)
|
|
|