From 6cfa4a15ebd9c5ab3961699e9d02591c55db3fe8 Mon Sep 17 00:00:00 2001 From: Mark Suckerberg Date: Thu, 14 Sep 2023 17:52:48 -0500 Subject: [PATCH] waogogus --- .../datums/mapgen/planetary/WasteGenerator.dm | 42 +++++++++---------- code/modules/unit_tests/_unit_tests.dm | 1 + code/modules/unit_tests/biome_lists.dm | 13 ++++++ 3 files changed, 35 insertions(+), 21 deletions(-) create mode 100644 code/modules/unit_tests/biome_lists.dm diff --git a/code/datums/mapgen/planetary/WasteGenerator.dm b/code/datums/mapgen/planetary/WasteGenerator.dm index f0cef0c16d2a..e773cbddcc2d 100644 --- a/code/datums/mapgen/planetary/WasteGenerator.dm +++ b/code/datums/mapgen/planetary/WasteGenerator.dm @@ -96,36 +96,36 @@ flora_spawn_list = list( //mech spawners - /obj/effect/spawner/lootdrop/waste/mechwreck = 10, - /obj/effect/spawner/lootdrop/waste/mechwreck/rare = 2, + /obj/effect/spawner/lootdrop/waste/mechwreck = 100, + /obj/effect/spawner/lootdrop/waste/mechwreck/rare = 20.1, //decals and fluff structures - /obj/effect/spawner/lootdrop/waste/trash = 180, - /obj/effect/spawner/lootdrop/waste/radiation = 8, - /obj/effect/spawner/lootdrop/waste/radiation/more_rads = 1, + /obj/effect/spawner/lootdrop/waste/trash = 1800, + /obj/effect/spawner/lootdrop/waste/radiation = 80, + /obj/effect/spawner/lootdrop/waste/radiation/more_rads = 10, //stuff you can actually use - /obj/effect/spawner/lootdrop/waste/girder = 60, - /obj/structure/reagent_dispensers/fueltank = 10, - /obj/structure/reagent_dispensers/watertank = 20, - /obj/item/stack/cable_coil/cut = 50, - /obj/structure/closet/crate/secure/loot = 3, - /obj/effect/spawner/lootdrop/waste/atmos_can = 5, - /obj/effect/spawner/lootdrop/waste/atmos_can/rare = 0.1, - /obj/effect/spawner/lootdrop/waste/salvageable = 30, - /obj/effect/spawner/lootdrop/waste/grille_or_trash = 20, - /obj/effect/spawner/lootdrop/maintenance = 20, - /obj/effect/spawner/lootdrop/maintenance/two = 10, - /obj/effect/spawner/lootdrop/maintenance/three = 5, - /obj/effect/spawner/lootdrop/maintenance/four = 2, + /obj/effect/spawner/lootdrop/waste/girder = 600, + /obj/structure/reagent_dispensers/fueltank = 100, + /obj/structure/reagent_dispensers/watertank = 200, + /obj/item/stack/cable_coil/cut = 500, + /obj/structure/closet/crate/secure/loot = 30, + /obj/effect/spawner/lootdrop/waste/atmos_can = 50, + /obj/effect/spawner/lootdrop/waste/atmos_can/rare = 1, + /obj/effect/spawner/lootdrop/waste/salvageable = 300, + /obj/effect/spawner/lootdrop/waste/grille_or_trash = 200, + /obj/effect/spawner/lootdrop/maintenance = 200, + /obj/effect/spawner/lootdrop/maintenance/two = 100, + /obj/effect/spawner/lootdrop/maintenance/three = 50, + /obj/effect/spawner/lootdrop/maintenance/four = 20, //plants - /obj/structure/flora/ash/garden/waste = 7, - /obj/structure/flora/ash/glowshroom = 20, //more common in caves + /obj/structure/flora/ash/garden/waste = 70, + /obj/structure/flora/ash/glowshroom = 200, //more common in caves //the illusive shrapnel plant - /obj/effect/mine/shrapnel/human_only = 1 + /obj/effect/mine/shrapnel/human_only = 10 ) feature_spawn_list = list( diff --git a/code/modules/unit_tests/_unit_tests.dm b/code/modules/unit_tests/_unit_tests.dm index c901e486a1f6..cc12fe0c638f 100644 --- a/code/modules/unit_tests/_unit_tests.dm +++ b/code/modules/unit_tests/_unit_tests.dm @@ -70,6 +70,7 @@ #include "component_tests.dm" #include "connect_loc.dm" #include "create_and_destroy.dm" +#include "biome_lists.dm" #include "emoting.dm" #include "keybinding_init.dm" #include "machine_disassembly.dm" diff --git a/code/modules/unit_tests/biome_lists.dm b/code/modules/unit_tests/biome_lists.dm new file mode 100644 index 000000000000..24d931bbd7fa --- /dev/null +++ b/code/modules/unit_tests/biome_lists.dm @@ -0,0 +1,13 @@ +/datum/unit_test/biome_lists/Run() + 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") + +/datum/unit_test/biome_lists/proc/validate_chance(list/to_check, name) + 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])")