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 main_scene: Node = load("res://main.tscn").instantiate()
|
||||
root.add_child(main_scene)
|
||||
@@ -19,26 +21,21 @@ func _run() -> void:
|
||||
main_scene.has_node("JajceWorld/TerrainRoot/Terrain3D"),
|
||||
"Playable runtime should instance the Jajce Terrain3D world"
|
||||
)
|
||||
var terrain: Terrain3D = main_scene.get_node(
|
||||
"JajceWorld/TerrainRoot/Terrain3D"
|
||||
)
|
||||
var terrain: Terrain3D = main_scene.get_node("JajceWorld/TerrainRoot/Terrain3D")
|
||||
_check(
|
||||
terrain.get_camera() == main_scene.get_node("CameraRig/Camera3D"),
|
||||
"Runtime Terrain3D should bind to the gameplay camera"
|
||||
)
|
||||
_check(
|
||||
not main_scene.has_node("World")
|
||||
and not main_scene.has_node("ResourceNodes")
|
||||
and not main_scene.has_node("ActivityMarkers"),
|
||||
(
|
||||
not main_scene.has_node("World")
|
||||
and not main_scene.has_node("ResourceNodes")
|
||||
and not main_scene.has_node("ActivityMarkers")
|
||||
),
|
||||
"Runtime should not retain duplicate flat-world objects"
|
||||
)
|
||||
var resource_root := main_scene.get_node(
|
||||
"JajceWorld/WorldObjects/ResourceNodes"
|
||||
)
|
||||
_check(
|
||||
resource_root.get_child_count() == 4,
|
||||
"Runtime should contain four Jajce ResourceNodes"
|
||||
)
|
||||
var resource_root := main_scene.get_node("JajceWorld/WorldObjects/ResourceNodes")
|
||||
_check(resource_root.get_child_count() == 4, "Runtime should contain four Jajce ResourceNodes")
|
||||
_check(
|
||||
simulation_manager.resource_states.size() == 4,
|
||||
"Simulation authority should bind all four Jajce resources"
|
||||
@@ -48,11 +45,7 @@ func _run() -> void:
|
||||
await _wait_for_navigation_map(navigation_map)
|
||||
NavigationServer3D.map_force_update(navigation_map)
|
||||
|
||||
var fixed_origins := [
|
||||
Vector3(-6.0, 0.0, -4.0),
|
||||
Vector3(0.0, 0.0, 0.0),
|
||||
Vector3(6.0, 0.0, 4.0)
|
||||
]
|
||||
var fixed_origins := [Vector3(-6.0, 0.0, -4.0), Vector3(0.0, 0.0, 0.0), Vector3(6.0, 0.0, 4.0)]
|
||||
var destinations: Array[Vector3] = []
|
||||
for marker_path in [
|
||||
"JajceWorld/LegacyActivityMarkers/PantryMarker",
|
||||
@@ -67,25 +60,14 @@ func _run() -> void:
|
||||
|
||||
for origin in fixed_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(),
|
||||
"Navigation path should exist from %s to %s" % [origin, destination]
|
||||
)
|
||||
|
||||
var village := SimVillage.new()
|
||||
var worker := SimNPC.new(
|
||||
100,
|
||||
"BaselineWorker",
|
||||
SimulationIds.PROFESSION_SCHOLAR,
|
||||
5.0,
|
||||
5.0
|
||||
)
|
||||
var worker := SimNPC.new(100, "BaselineWorker", SimulationIds.PROFESSION_SCHOLAR, 5.0, 5.0)
|
||||
worker.set_task(SimulationIds.ACTION_STUDY, 2.0)
|
||||
worker.start_working()
|
||||
var executor := ActionExecutionSystem.new()
|
||||
@@ -93,13 +75,7 @@ func _run() -> void:
|
||||
executor.advance_npc(worker, village)
|
||||
_check(worker.task_complete, "A two-tick working task should complete")
|
||||
|
||||
var starving := SimNPC.new(
|
||||
101,
|
||||
"BaselineStarving",
|
||||
SimulationIds.PROFESSION_WANDERER,
|
||||
5.0,
|
||||
5.0
|
||||
)
|
||||
var starving := SimNPC.new(101, "BaselineStarving", SimulationIds.PROFESSION_WANDERER, 5.0, 5.0)
|
||||
starving.hunger = 100.0
|
||||
starving.starvation_death_threshold = 1
|
||||
executor.advance_npc(starving, village)
|
||||
@@ -114,6 +90,7 @@ func _run() -> void:
|
||||
push_error("[TEST] " + failure)
|
||||
quit(1)
|
||||
|
||||
|
||||
func _wait_for_navigation_map(navigation_map: RID) -> void:
|
||||
for attempt in 30:
|
||||
if (
|
||||
@@ -125,6 +102,7 @@ func _wait_for_navigation_map(navigation_map: RID) -> void:
|
||||
await physics_frame
|
||||
_check(false, "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