Improve generated river terrain

This commit is contained in:
Alexander Sellite 2026-08-24 20:21:49 -04:00
parent 8456093f8c
commit e6f46dcad9
21 changed files with 586 additions and 18 deletions

View file

@ -1,6 +1,11 @@
extends SceneTree
const POLICY := preload("res://main/texture_sampling_policy.gd")
const PROJECTED_TERRAIN_TEXTURE_IMPORTS: Array[String] = [
"res://world/generation/chunks/assets/chunk_0000_grass_lite.png.import",
"res://world/generation/chunks/assets/chunk_0001_sand.png.import",
"res://world/generation/chunks/assets/chunk_0031_dirt.png.import",
]
var failures: Array[String] = []
@ -83,9 +88,14 @@ func _validate_repository_files(path: String) -> void:
func _validate_import_file(path: String) -> void:
var source := FileAccess.get_file_as_string(path)
var expects_mipmaps := path in PROJECTED_TERRAIN_TEXTURE_IMPORTS
_check(
"mipmaps/generate=true" not in source,
"Texture import generates mipmaps: %s" % path,
("mipmaps/generate=true" in source) == expects_mipmaps,
(
"Projected terrain mipmap policy mismatch: %s"
if expects_mipmaps
else "Texture import generates unapproved mipmaps: %s"
) % path,
)