diff --git a/src/game/engine/scenes/tests/city_proof.gd b/src/game/engine/scenes/tests/city_proof.gd index 46f0bf49..76de9fe3 100644 --- a/src/game/engine/scenes/tests/city_proof.gd +++ b/src/game/engine/scenes/tests/city_proof.gd @@ -21,28 +21,8 @@ const WATER_BIOMES: Dictionary = { "ocean": true, "deep_ocean": true, "coast": true, "inland_sea": true, "lake": true, } -const TERRAIN_COLORS: Dictionary = { - "ocean": Color(0.05, 0.10, 0.35), - "deep_ocean": Color(0.02, 0.05, 0.25), - "coast": Color(0.25, 0.45, 0.75), - "lake": Color(0.15, 0.65, 0.75), - "inland_sea": Color(0.10, 0.30, 0.60), - "grassland": Color(0.30, 0.65, 0.20), - "plains": Color(0.60, 0.70, 0.25), - "forest": Color(0.10, 0.40, 0.10), - "jungle": Color(0.20, 0.70, 0.15), - "boreal_forest": Color(0.15, 0.40, 0.35), - "enchanted_forest": Color(0.30, 0.55, 0.60), - "desert": Color(0.85, 0.75, 0.40), - "tundra": Color(0.70, 0.75, 0.72), - "snow": Color(0.92, 0.94, 0.96), - "ice": Color(0.80, 0.88, 0.95), - "mountains": Color(0.45, 0.42, 0.40), - "hills": Color(0.55, 0.45, 0.30), - "swamp": Color(0.30, 0.35, 0.15), - "volcano": Color(0.75, 0.15, 0.10), - "land": Color(0.50, 0.50, 0.30), -} +## Biome colour comes from the single source (biome_colors.json) via +## DataLoader.get_biome_color() — no local palette copy (p2-87). var _game_map: RefCounted = null var _player: RefCounted = null @@ -203,7 +183,7 @@ func _draw_map_panel(px: float) -> void: if offset.x & 1: y += CELL_H * 0.5 - var base: Color = TERRAIN_COLORS.get(tile.biome_id, Color(0.5, 0.0, 0.5)) + var base: Color = DataLoader.get_biome_color(tile.biome_id) draw_rect(Rect2(x, y, CELL_W - 1, CELL_H - 1), base) if pos in owned: diff --git a/src/game/engine/scenes/tests/world_gen_lab/world_gen_lab_proof.gd b/src/game/engine/scenes/tests/world_gen_lab/world_gen_lab_proof.gd index 7b4cfbc5..701ff316 100644 --- a/src/game/engine/scenes/tests/world_gen_lab/world_gen_lab_proof.gd +++ b/src/game/engine/scenes/tests/world_gen_lab/world_gen_lab_proof.gd @@ -12,28 +12,8 @@ const CELL_H: int = 10 const MARGIN: Vector2i = Vector2i(20, 40) const OUTPUT_DIR: String = "user://screenshots/world_gen_lab" -const TERRAIN_COLORS: Dictionary = { - "ocean": Color(0.05, 0.10, 0.35), - "deep_ocean": Color(0.02, 0.05, 0.25), - "coast": Color(0.25, 0.45, 0.75), - "lake": Color(0.15, 0.65, 0.75), - "inland_sea": Color(0.10, 0.30, 0.60), - "grassland": Color(0.30, 0.65, 0.20), - "plains": Color(0.60, 0.70, 0.25), - "forest": Color(0.10, 0.40, 0.10), - "jungle": Color(0.20, 0.70, 0.15), - "boreal_forest": Color(0.15, 0.40, 0.35), - "enchanted_forest": Color(0.30, 0.55, 0.60), - "desert": Color(0.85, 0.75, 0.40), - "tundra": Color(0.70, 0.75, 0.72), - "snow": Color(0.92, 0.94, 0.96), - "ice": Color(0.80, 0.88, 0.95), - "mountains": Color(0.45, 0.42, 0.40), - "hills": Color(0.55, 0.45, 0.30), - "swamp": Color(0.30, 0.35, 0.15), - "volcano": Color(0.75, 0.15, 0.10), - "land": Color(0.50, 0.50, 0.30), -} +## Biome colour comes from the single source (biome_colors.json) via +## DataLoader.get_biome_color() — no local palette copy (p2-87). var _game_map: RefCounted = null var _captured: bool = false @@ -108,7 +88,7 @@ func _draw() -> void: if offset.x & 1: y += CELL_H * 0.5 draw_rect(Rect2(x, y, CELL_W - 1, CELL_H - 1), - TERRAIN_COLORS.get(tile.biome_id, Color(0.5, 0.0, 0.5))) + DataLoader.get_biome_color(tile.biome_id)) if not tile.river_edges.is_empty(): draw_rect(Rect2(x + CELL_W * 0.3, y + CELL_H * 0.3, 2, 2), Color(0.3, 0.6, 1.0))