feat(map-specific): ✨ Optimize tile rendering pipeline for smoother map performance
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
b29b2c8511
commit
2e1e38a133
1 changed files with 12 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue