From 2e1e38a1339f59db53c5ba3a5ffb186fb84df0fd Mon Sep 17 00:00:00 2001 From: Claude Code Date: Thu, 26 Mar 2026 00:29:34 -0700 Subject: [PATCH] =?UTF-8?q?feat(map-specific):=20=E2=9C=A8=20Optimize=20ti?= =?UTF-8?q?le=20rendering=20pipeline=20for=20smoother=20map=20performance?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- engine/src/map/tile.gd | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/engine/src/map/tile.gd b/engine/src/map/tile.gd index 80c6708b..fcd5eee3 100644 --- a/engine/src/map/tile.gd +++ b/engine/src/map/tile.gd @@ -8,8 +8,11 @@ const ImprovementScript: GDScript = preload("res://engine/src/entities/improveme var biome_id: String = "" # biome classification result var substrate_id: String = "" # geological substrate from elevation var water_body_id: int = -1 # water body index (-1 if land) +var water_body_type: String = "" # pond/river/lake/large_lake/ocean var depth_from_coast: int = -1 # BFS distance from land (-1 if land) var soil_type: String = "" # rocky/sandy/clay/loam/peat/volcanic_ash/permafrost +var is_river_mouth: bool = false # true if water tile adjacent to both river and ocean +var has_cave: bool = false # true if cave system present (mountain/highland with geology marker) ## Axial coordinates (q, r) — primary position key var position: Vector2i = Vector2i.ZERO @@ -361,10 +364,16 @@ func to_dict() -> Dictionary: data["substrate_id"] = substrate_id if water_body_id != -1: data["water_body_id"] = water_body_id + if water_body_type != "": + data["water_body_type"] = water_body_type if depth_from_coast != -1: data["depth_from_coast"] = depth_from_coast if soil_type != "": data["soil_type"] = soil_type + if is_river_mouth: + data["is_river_mouth"] = true + if has_cave: + data["has_cave"] = true if resource_id != "": data["resource_id"] = resource_id if improvement != "": @@ -478,8 +487,11 @@ static func from_dict(data: Dictionary) -> Resource: # Tile var tile: Resource = SelfScript.new(pos, data.get("biome_id", "")) tile.substrate_id = data.get("substrate_id", "") tile.water_body_id = data.get("water_body_id", -1) + tile.water_body_type = data.get("water_body_type", "") tile.depth_from_coast = data.get("depth_from_coast", -1) tile.soil_type = data.get("soil_type", "") + tile.is_river_mouth = data.get("is_river_mouth", false) + tile.has_cave = data.get("has_cave", false) tile.resource_id = data.get("resource_id", "") tile.improvement = data.get("improvement", "") tile.owner = data.get("owner", -1)