Improve generated river terrain
This commit is contained in:
parent
8456093f8c
commit
e6f46dcad9
21 changed files with 586 additions and 18 deletions
|
|
@ -31,6 +31,11 @@ const FACIAL_FEATURE_IMPORT_PATH: String = (
|
|||
"art/exported/characters/faces/"
|
||||
)
|
||||
const FACIAL_FEATURE_SIZE_LIMIT: int = 512
|
||||
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 apply_changes: bool = false
|
||||
var verbose: bool = false
|
||||
|
|
@ -153,6 +158,8 @@ func _handle_import_file(import_path: String) -> void:
|
|||
var desired: Variant = section_data[section_key]
|
||||
if section_key == "process/size_limit":
|
||||
desired = _size_limit_for(import_path)
|
||||
elif section_key == "mipmaps/generate":
|
||||
desired = _generates_mipmaps(import_path)
|
||||
var existing: Variant = null
|
||||
if cfg.has_section(section_name) and cfg.has_section_key(section_name, section_key):
|
||||
existing = cfg.get_value(section_name, section_key)
|
||||
|
|
@ -187,6 +194,11 @@ func _size_limit_for(import_path: String) -> int:
|
|||
return int(DEFAULT_PROFILE["params"]["process/size_limit"])
|
||||
|
||||
|
||||
func _generates_mipmaps(import_path: String) -> bool:
|
||||
var normalized_path := import_path.replace("\\", "/")
|
||||
return normalized_path in PROJECTED_TERRAIN_TEXTURE_IMPORTS
|
||||
|
||||
|
||||
func print_summary() -> void:
|
||||
if apply_changes:
|
||||
_print(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue