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:
2026-07-05 23:06:23 +02:00
parent 28a2e42c41
commit 4463e524aa
69 changed files with 2253 additions and 1647 deletions
+3 -1
View File
@@ -61,7 +61,9 @@ func _physics_process(delta: float) -> void:
desired_focus_position += cam_right * (diff_right - sign(diff_right) * deadzone_right)
if abs(diff_forward) > deadzone_forward:
desired_focus_position += cam_forward * (diff_forward - sign(diff_forward) * deadzone_forward)
desired_focus_position += (
cam_forward * (diff_forward - sign(diff_forward) * deadzone_forward)
)
focus_position = focus_position.lerp(desired_focus_position, focus_t)
+13 -9
View File
@@ -30,25 +30,28 @@ var path_pending := false
var is_dead_visual := false
var dead_material := StandardMaterial3D.new()
func debug_log(message: String) -> void:
if DEBUG_LOGS:
print("[NPCVisual] ", name, " | ", message)
func _ready() -> void:
dead_material.albedo_color = Color(0.25, 0.25, 0.25, 1.0)
func setup_from_sim(npc: SimNPC) -> void:
sim_id = npc.id
npc_name = npc.npc_name
profession = npc.profession
name = "NPC_%s_%s" % [sim_id, npc_name]
set_carried_food_visible(
npc.get_inventory_amount(SimulationIds.RESOURCE_FOOD) > 0.0
)
set_carried_food_visible(npc.get_inventory_amount(SimulationIds.RESOURCE_FOOD) > 0.0)
func set_carried_food_visible(is_visible: bool) -> void:
carried_food_visual.visible = is_visible and not is_dead_visual
func set_target_position(pos: Vector3) -> void:
path_request_id += 1
var request_id := path_request_id
@@ -72,10 +75,7 @@ func set_target_position(pos: Vector3) -> void:
return
current_path = NavigationServer3D.map_get_path(
get_world_3d().navigation_map,
global_position,
pos,
true
get_world_3d().navigation_map, global_position, pos, true
)
path_pending = false
@@ -87,6 +87,7 @@ func set_target_position(pos: Vector3) -> void:
else:
debug_log("New target: %s Path points: %s" % [pos, current_path.size()])
func _physics_process(delta: float) -> void:
if is_dead_visual:
velocity = Vector3.ZERO
@@ -146,7 +147,8 @@ func _physics_process(delta: float) -> void:
var target_angle := atan2(direction.x, direction.z)
rotation.y = lerp_angle(rotation.y, target_angle, rotation_speed * delta)
func _report_arrival_once() -> void:
if has_reported_arrival:
return
@@ -158,6 +160,7 @@ func _report_arrival_once() -> void:
debug_log("Arrived at target")
arrived_at_target.emit(sim_id)
func _report_navigation_failure_once() -> void:
if has_reported_arrival:
return
@@ -172,6 +175,7 @@ func _report_navigation_failure_once() -> void:
debug_log("Navigation failed")
navigation_failed.emit(sim_id)
func apply_dead_visual_state() -> void:
is_dead_visual = true
carried_food_visual.visible = false
@@ -189,7 +193,7 @@ func apply_dead_visual_state() -> void:
for child in get_children():
if child is MeshInstance3D:
child.material_override = dead_material
collision_layer = 0
collision_mask = 0
debug_log("Applied dead visual state")
+10 -13
View File
@@ -14,13 +14,9 @@ extends CharacterBody3D
@export var stomach_capacity_for_food := 5
@export var interaction_range := 3.0
func _physics_process(delta: float) -> void:
var input := Input.get_vector(
"move_left",
"move_right",
"move_forward",
"move_backward"
)
var input := Input.get_vector("move_left", "move_right", "move_forward", "move_backward")
var forward := -camera_rig.global_transform.basis.z
var right := camera_rig.global_transform.basis.x
@@ -37,7 +33,7 @@ func _physics_process(delta: float) -> void:
velocity.x = move_toward(velocity.x, target_velocity.x, acceleration * delta)
velocity.z = move_toward(velocity.z, target_velocity.z, acceleration * delta)
if not is_on_floor():
velocity.y -= 30.0 * delta
else:
@@ -54,8 +50,8 @@ func _unhandled_input(event: InputEvent) -> void:
# keep your camera mouse code here too
if event.is_action_pressed("interact"):
try_interact()
func try_interact() -> void:
if simulation_manager == null:
return
@@ -73,13 +69,13 @@ func try_interact() -> void:
simulation_manager.eat_food(stomach_capacity_for_food)
print("Player ate food from the village supply.")
func try_harvest_resource_node() -> bool:
if not simulation_manager.has_method("find_resource_node_for_player"):
push_error("Player: SimulationManager cannot find ResourceNodes")
return false
var node: ResourceNode = simulation_manager.find_resource_node_for_player(
global_position,
interaction_range
global_position, interaction_range
)
if node == null:
return false
@@ -102,9 +98,10 @@ func try_harvest_resource_node() -> bool:
else:
print("%s could not be harvested." % node.node_id)
return true
func is_near(zone: Marker3D) -> bool:
if zone == null:
return false
return global_position.distance_to(zone.global_position) <= interaction_range