Checkpoint initial implementation

This commit is contained in:
Andrew Miner
2025-10-06 17:41:18 -06:00
parent 773e0a3d85
commit a8b6e6b15e
106 changed files with 3012 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
from tungston.core.ecology.biome import Biome
from tungston.core.ecology.biomefilter import BiomeFilter
# Classes ##########################################################################################
class BiomeCatalog:
"""
A comprehensive list of all available biomes in the modpack.
"""
def __init__(self, biomes):
self.biomes = sorted(biomes, key=lambda b: b.city)
def all(self) -> list[Biome]:
return list(self.biomes)
def matching(self, biomeFilter:BiomeFilter) -> list[Biome]:
result = []
for biome in self.biomes:
if biomeFilter.accepts(biome):
result.append(biome)
return result