minetest / minetest_game

Minetest Game - A lightweight and well-maintained base for modding [https://github.com/minetest/minetest/]
http://minetest.net/
Other
1.41k stars 567 forks source link

asserting biomes #3124

Open wsor4035 opened 1 month ago

wsor4035 commented 1 month ago

in commit https://github.com/minetest/minetest_game/commit/c60d8e4da0d55014c06ee78b366be23152da35e0#diff-af50c8d9df841c61743d2750a38461853b07c7d34b7bb7e174ab3268f3f68d1aR37 the biomes where hardcoded, and then asserted that they exist. two issue with this

  1. mtg derivates may not have all the biomes
  2. mods can clear registered biomes

my suggestion is to change that code so that it the loop checks if the biome exists, then registers it, so that the assert should pass

for my reference: https://github.com/mt-historical/aftermath/issues/3

appgurueu commented 1 month ago

If I understand you correctly, your suggestion is to just not register biomes as "suitable for spawning" if they don't exist (but to check for the existence outside of add_suitable_biome). I would agree with that. @sfan5