phase 9: biome expansion — 3 biomes, 40 elements, 119 reactions, 9 species
Expand beyond vertical slice with two new biomes and massive chemistry expansion: Chemistry: +20 real elements (Li→U), +39 compounds (acids/salts/oxides/organics), +85 reactions (Haber process, thermite variants, smelting, fermentation, etc.) Biomes: Kinetic Mountains (physics/mechanics themed) and Verdant Forests (biology/ecology themed), each with 8 tile types and unique generation rules. Creatures: 6 new species — Pendulums/Mechanoids/Resonators (mountains), Symbiotes/Mimics/Spore-bearers (forests). Species filtered by biome. Infrastructure: CradleScene biome selector UI, generic world generator (tile lookup by property instead of hardcoded names), actinide element category. 487 tests passing (32 new). Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -47,21 +47,27 @@ function determineTile(elevation: number, detail: number, biome: BiomeData): num
|
||||
}
|
||||
}
|
||||
|
||||
// Geyser overlay: on acid-shallow + very high detail noise
|
||||
// Interactive overlay (geysers / steam vents / hollow stumps) on specific base tile + high detail noise
|
||||
if (baseTileId === gen.geyserOnTile && detail > gen.geyserThreshold) {
|
||||
return findTileIdByName(biome, 'geyser');
|
||||
return findInteractiveTileId(biome);
|
||||
}
|
||||
|
||||
// Mineral overlay: on walkable ground + high detail noise
|
||||
// Resource overlay (mineral veins / ore deposits / herb patches) on walkable ground + high detail noise
|
||||
if (gen.mineralOnTiles.includes(baseTileId) && detail > gen.mineralThreshold) {
|
||||
return findTileIdByName(biome, 'mineral-vein');
|
||||
return findResourceTileId(biome);
|
||||
}
|
||||
|
||||
return baseTileId;
|
||||
}
|
||||
|
||||
/** Find tile ID by name, falling back to 0 if not found */
|
||||
function findTileIdByName(biome: BiomeData, name: string): number {
|
||||
const tile = biome.tiles.find(t => t.name === name);
|
||||
/** Find the interactive tile (geyser/steam-vent/hollow-stump), falling back to 0 */
|
||||
function findInteractiveTileId(biome: BiomeData): number {
|
||||
const tile = biome.tiles.find(t => t.interactive);
|
||||
return tile ? tile.id : 0;
|
||||
}
|
||||
|
||||
/** Find the resource tile (mineral-vein/ore-deposit/herb-patch), falling back to 0 */
|
||||
function findResourceTileId(biome: BiomeData): number {
|
||||
const tile = biome.tiles.find(t => t.resource);
|
||||
return tile ? tile.id : 0;
|
||||
}
|
||||
|
||||
@@ -39,9 +39,9 @@ export function spawnResources(
|
||||
): Map<number, ResourceInfo> {
|
||||
const resourceData = new Map<number, ResourceInfo>();
|
||||
|
||||
// Find tile IDs for resource types
|
||||
const mineralTile = biome.tiles.find(t => t.name === 'mineral-vein');
|
||||
const geyserTile = biome.tiles.find(t => t.name === 'geyser');
|
||||
// Find tile IDs for resource types (generic: resource + interactive tiles)
|
||||
const mineralTile = biome.tiles.find(t => t.resource);
|
||||
const geyserTile = biome.tiles.find(t => t.interactive);
|
||||
|
||||
const configs: ResourceTileConfig[] = [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user