feat: complete file-based heightmap migration — tEXt sea_level, client relief, drop BLOB (#963)
- heightmap.rs: read sea_level from the PNG tEXt chunk (bake writes it), default-fallback param; new test reads_sea_level_from_text_chunk. - client atlas_viewer.gd: load reliefmap.png (color display) instead of heightmap.png (now 16-bit grayscale elevation, cascade-only). - drop atlas_body_heightmaps: removed from systems-schema.sql; DROP TABLE in import_economics MIGRATION_SQL (the PNG is the store now). - D-202 amendment: implementation-status note (consumer + producer done), resolving the review's 'reads done but producer pending' point. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -262,12 +262,15 @@ func _load_heightmap() -> void:
|
||||
var ref: Variant = _body.get("terrain_reference")
|
||||
if ref == null or str(ref).is_empty():
|
||||
return
|
||||
var path: String = str(ref)
|
||||
# terrain_reference points at <body>/heightmap.png — now the canonical
|
||||
# 16-bit GRAYSCALE elevation (D-202 amended, #963). For display we load the
|
||||
# color reliefmap.png that sits beside it.
|
||||
var path: String = str(ref).get_base_dir() + "/reliefmap.png"
|
||||
if not path.begins_with("/"):
|
||||
var project_root: String = ProjectSettings.globalize_path("res://").get_base_dir().get_base_dir()
|
||||
path = project_root + "/" + path
|
||||
if not FileAccess.file_exists(path):
|
||||
push_warning("AtlasViewer: terrain_reference not found at %s" % path)
|
||||
push_warning("AtlasViewer: reliefmap not found at %s" % path)
|
||||
return
|
||||
var img := Image.load_from_file(path)
|
||||
if img != null:
|
||||
|
||||
Reference in New Issue
Block a user