Skip to content

Commit

Permalink
oops
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkSuckerberg committed Sep 14, 2023
1 parent 6cfa4a1 commit 0c42f63
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions code/modules/unit_tests/biome_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Check failure on line 11 in code/modules/unit_tests/biome_lists.dm

View workflow job for this annotation

GitHub Actions / Integration Tests

/datum/unit_test/biome_lists

Biome /datum/biome/cave has invalid mob spawn list

Check failure on line 11 in code/modules/unit_tests/biome_lists.dm

View workflow job for this annotation

GitHub Actions / Integration Tests

/datum/unit_test/biome_lists

Biome /datum/biome/cave has invalid flora spawn list

Check failure on line 11 in code/modules/unit_tests/biome_lists.dm

View workflow job for this annotation

GitHub Actions / Integration Tests

/datum/unit_test/biome_lists

Biome /datum/biome/cave has invalid feature spawn list

Check failure on line 11 in code/modules/unit_tests/biome_lists.dm

View workflow job for this annotation

GitHub Actions / Integration Tests

/datum/unit_test/biome_lists

Biome /datum/biome/cave/asteroid has invalid mob spawn list

Check failure on line 11 in code/modules/unit_tests/biome_lists.dm

View workflow job for this annotation

GitHub Actions / Integration Tests

/datum/unit_test/biome_lists

Biome /datum/biome/cave/asteroid has invalid flora spawn list

Check failure on line 11 in code/modules/unit_tests/biome_lists.dm

View workflow job for this annotation

GitHub Actions / Integration Tests

/datum/unit_test/biome_lists

Biome /datum/biome/cave/asteroid has invalid feature spawn list

Check failure on line 11 in code/modules/unit_tests/biome_lists.dm

View workflow job for this annotation

GitHub Actions / Integration Tests

/datum/unit_test/biome_lists

Biome /datum/biome/cave/asteroid/ice has invalid flora spawn list

Check failure on line 11 in code/modules/unit_tests/biome_lists.dm

View workflow job for this annotation

GitHub Actions / Integration Tests

/datum/unit_test/biome_lists

Biome /datum/biome/cave/asteroid/ice has invalid feature spawn list

Check failure on line 11 in code/modules/unit_tests/biome_lists.dm

View workflow job for this annotation

GitHub Actions / Integration Tests

/datum/unit_test/biome_lists

Biome /datum/biome/cave/beach has invalid feature spawn list

Check failure on line 11 in code/modules/unit_tests/biome_lists.dm

View workflow job for this annotation

GitHub Actions / Integration Tests

/datum/unit_test/biome_lists

Biome /datum/biome/cave/beach/cove has invalid feature spawn 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])")

0 comments on commit 0c42f63

Please sign in to comment.