diff --git a/code/modules/unit_tests/biome_lists.dm b/code/modules/unit_tests/biome_lists.dm index 24d931bbd7fa..8f29a4109a37 100644 --- a/code/modules/unit_tests/biome_lists.dm +++ b/code/modules/unit_tests/biome_lists.dm @@ -2,12 +2,14 @@ for(var/biome_type as anything in SSmapping.biomes) var/datum/biome/biome = SSmapping.biomes[biome_type] - validate_chance(biome.mob_spawn_chance, "mob spawn") - validate_chance(biome.flora_spawn_chance, "flora spawn") - validate_chance(biome.feature_spawn_chance, "feature spawn") + validate_chance(biome.mob_spawn_list, "mob spawn", biome_type) + validate_chance(biome.flora_spawn_list, "flora spawn", biome_type) + validate_chance(biome.feature_spawn_list, "feature spawn", biome_type) -/datum/unit_test/biome_lists/proc/validate_chance(list/to_check, name) +/datum/unit_test/biome_lists/proc/validate_chance(list/to_check, name, biome) + if(!islist(to_check)) + TEST_FAIL("Biome [biome] has invalid [name] list") for(var/type in to_check) var/value = to_check[type] if(!isnum(value) || value < 1 || value != round(value)) - TEST_FAIL("Biome [name] has invalid [name] chance for [type] ([value])") + TEST_FAIL("Biome [biome] has invalid [name] chance for [type] ([value])")