style: apply gdformat formatting across the entire project
Auto-format all GDScript files using gdformat from gdtoolkit. This is a baseline formatting pass to ensure consistent style: - Normalizes indentation and spacing - Wraps long lines to 100 characters - Removes trailing whitespace - Standardizes blank lines between functions 68 files reformatted, 8 files left unchanged (3rd-party addon files with parse errors excluded).
This commit is contained in:
@@ -2,9 +2,11 @@ extends SceneTree
|
||||
|
||||
var failures: Array[String] = []
|
||||
|
||||
|
||||
func _initialize() -> void:
|
||||
call_deferred("_run")
|
||||
|
||||
|
||||
func _run() -> void:
|
||||
var camera := Camera3D.new()
|
||||
camera.current = true
|
||||
@@ -24,8 +26,10 @@ func _run() -> void:
|
||||
)
|
||||
_check(
|
||||
terrain.assets.get_texture_count() >= 3,
|
||||
"Jajce terrain should expose at least three materials (found %s)"
|
||||
% terrain.assets.get_texture_count()
|
||||
(
|
||||
"Jajce terrain should expose at least three materials (found %s)"
|
||||
% terrain.assets.get_texture_count()
|
||||
)
|
||||
)
|
||||
_check(
|
||||
absf(terrain.data.get_height(Vector3.ZERO)) < 0.1,
|
||||
@@ -42,32 +46,22 @@ func _run() -> void:
|
||||
world.get_node("FoliageRoot").get_child_count() >= 10,
|
||||
"JajceWorld should include restrained authored foliage clusters"
|
||||
)
|
||||
_check(
|
||||
world.has_node("FortressBlockout"),
|
||||
"JajceWorld should include the fortress landmark"
|
||||
)
|
||||
_check(
|
||||
world.has_node("WaterRoot/WaterfallBody"),
|
||||
"WaterRoot should include a waterfall drop"
|
||||
)
|
||||
_check(world.has_node("FortressBlockout"), "JajceWorld should include the fortress landmark")
|
||||
_check(world.has_node("WaterRoot/WaterfallBody"), "WaterRoot should include a waterfall drop")
|
||||
_check(
|
||||
world.has_node("WaterRoot/WaterfallMist"),
|
||||
"WaterRoot should include waterfall mist particles"
|
||||
)
|
||||
_check(
|
||||
world.has_node("WaterRoot/RiverSurface"),
|
||||
"WaterRoot should include a river surface"
|
||||
)
|
||||
_check(world.has_node("WaterRoot/RiverSurface"), "WaterRoot should include a river surface")
|
||||
var environment: Environment = (
|
||||
world.get_node("WorldEnvironment") as WorldEnvironment
|
||||
).environment
|
||||
(world.get_node("WorldEnvironment") as WorldEnvironment).environment
|
||||
)
|
||||
_check(
|
||||
environment.fog_enabled and environment.sky != null,
|
||||
"Jajce environment should provide sky and restrained valley fog"
|
||||
)
|
||||
_check(
|
||||
world.has_node("VillageRoot/Mill")
|
||||
and world.has_node("VillageRoot/Bridge"),
|
||||
world.has_node("VillageRoot/Mill") and world.has_node("VillageRoot/Bridge"),
|
||||
"VillageRoot should include the mill and bridge blockouts"
|
||||
)
|
||||
var smoke_count := 0
|
||||
@@ -103,11 +97,7 @@ func _run() -> void:
|
||||
await _wait_for_navigation_map(navigation_map)
|
||||
NavigationServer3D.map_force_update(navigation_map)
|
||||
|
||||
var origins := [
|
||||
Vector3(-6, 0, -4),
|
||||
Vector3(0, 0, 0),
|
||||
Vector3(6, 0, 4)
|
||||
]
|
||||
var origins := [Vector3(-6, 0, -4), Vector3(0, 0, 0), Vector3(6, 0, 4)]
|
||||
var destinations: Array[Vector3] = []
|
||||
for resource in resources:
|
||||
destinations.append((resource as ResourceNode).interaction_point.global_position)
|
||||
@@ -116,12 +106,7 @@ func _run() -> void:
|
||||
|
||||
for origin in origins:
|
||||
for destination in destinations:
|
||||
var path := NavigationServer3D.map_get_path(
|
||||
navigation_map,
|
||||
origin,
|
||||
destination,
|
||||
true
|
||||
)
|
||||
var path := NavigationServer3D.map_get_path(navigation_map, origin, destination, true)
|
||||
_check(
|
||||
not path.is_empty(),
|
||||
"Jajce navigation path should exist from %s to %s" % [origin, destination]
|
||||
@@ -143,9 +128,7 @@ func _run() -> void:
|
||||
)
|
||||
var selected := ResourceNode.get_by_id(npc.target_id)
|
||||
if selected != null:
|
||||
var selected_state: ResourceStateRecord = manager.get_resource_state(
|
||||
selected.node_id
|
||||
)
|
||||
var selected_state: ResourceStateRecord = manager.get_resource_state(selected.node_id)
|
||||
_check(
|
||||
selected_state.get_reserved_by() == npc.id,
|
||||
"Selected Jajce resource should be authoritatively reserved"
|
||||
@@ -153,7 +136,9 @@ func _run() -> void:
|
||||
manager.release_resource(selected.node_id, npc.id)
|
||||
|
||||
if failures.is_empty():
|
||||
print("[TEST] Jajce scaffold passed: Terrain3D, 6 textures, shader water, building blockouts, chimney smoke")
|
||||
print(
|
||||
"[TEST] Jajce scaffold passed: Terrain3D, 6 textures, shader water, building blockouts, chimney smoke"
|
||||
)
|
||||
quit(0)
|
||||
return
|
||||
|
||||
@@ -161,6 +146,7 @@ func _run() -> void:
|
||||
push_error("[TEST] " + failure)
|
||||
quit(1)
|
||||
|
||||
|
||||
func _wait_for_navigation_map(navigation_map: RID) -> void:
|
||||
for attempt in 30:
|
||||
if (
|
||||
@@ -172,6 +158,7 @@ func _wait_for_navigation_map(navigation_map: RID) -> void:
|
||||
await physics_frame
|
||||
_check(false, "Jajce navigation map did not synchronize within 30 physics frames")
|
||||
|
||||
|
||||
func _check(condition: bool, message: String) -> void:
|
||||
if not condition:
|
||||
failures.append(message)
|
||||
|
||||
Reference in New Issue
Block a user