From a66bf885f284ef7f34a663d300f65991acc3bd15 Mon Sep 17 00:00:00 2001 From: VinPropane Date: Fri, 10 Apr 2026 00:50:29 -0400 Subject: [PATCH] NEON-16: apply repo-local gdformat Apply the repo-local gdformat output to the touched GDScript files so the pre-push formatting hook passes. This is a formatting-only follow-up to the lint-hook cleanup. --- client/scripts/player.gd | 26 ++++++++++++++++---------- client/test/player_test.gd | 33 +++++---------------------------- 2 files changed, 21 insertions(+), 38 deletions(-) diff --git a/client/scripts/player.gd b/client/scripts/player.gd index edecf6e..0341bf7 100644 --- a/client/scripts/player.gd +++ b/client/scripts/player.gd @@ -376,18 +376,24 @@ func _maybe_idle_bump_proximity_escape() -> bool: var wall_band_outer: float = col_r + PLAYER_CAPSULE_RADIUS + 0.22 var should_escape: bool = d > r_mesh * 0.9 and d < col_r + 0.32 # On / above the disc, hugging the **visual** rim — step onto open slab. - should_escape = should_escape or ( - feet_y >= bottom_y - 0.06 - and feet_y <= top_y + 0.1 - and d >= r_mesh * 0.86 - and d <= r_mesh + 0.14 + should_escape = ( + should_escape + or ( + feet_y >= bottom_y - 0.06 + and feet_y <= top_y + 0.1 + and d >= r_mesh * 0.86 + and d <= r_mesh + 0.14 + ) ) # Beside vertical cylinder: axis distance may exceed **`col_r`** while capsule still touches wall. - should_escape = should_escape or ( - feet_y <= top_y + 0.14 - and d > r_mesh * 0.82 - and d < wall_band_outer - and (is_on_wall() or _idle_ridged_floor_contacts()) + should_escape = ( + should_escape + or ( + feet_y <= top_y + 0.14 + and d > r_mesh * 0.82 + and d < wall_band_outer + and (is_on_wall() or _idle_ridged_floor_contacts()) + ) ) if not should_escape: continue diff --git a/client/test/player_test.gd b/client/test/player_test.gd index 80a7793..50aee13 100644 --- a/client/test/player_test.gd +++ b/client/test/player_test.gd @@ -50,56 +50,33 @@ func test_clear_nav_goal_clears_velocity_and_nav_target() -> void: func test_idle_support_is_stable_on_flat_floor_without_wall_contacts() -> void: var slide_normals: Array[Vector3] = [Vector3.UP] - var stable: bool = PLAYER_SCRIPT.idle_support_is_stable( - true, - Vector3.UP, - slide_normals, - 0 - ) + var stable: bool = PLAYER_SCRIPT.idle_support_is_stable(true, Vector3.UP, slide_normals, 0) assert_that(stable).is_true() func test_idle_support_is_stable_false_when_floor_is_not_flat_enough() -> void: var slide_normals: Array[Vector3] = [Vector3.UP] var stable: bool = PLAYER_SCRIPT.idle_support_is_stable( - true, - Vector3(0.02, 0.995, 0.0).normalized(), - slide_normals, - 0 + true, Vector3(0.02, 0.995, 0.0).normalized(), slide_normals, 0 ) assert_that(stable).is_false() func test_idle_support_is_stable_true_when_flat_floor_has_extra_contacts() -> void: var slide_normals: Array[Vector3] = [Vector3.UP, Vector3(0.0, 0.6, 0.8).normalized()] - var stable: bool = PLAYER_SCRIPT.idle_support_is_stable( - true, - Vector3.UP, - slide_normals, - 0 - ) + var stable: bool = PLAYER_SCRIPT.idle_support_is_stable(true, Vector3.UP, slide_normals, 0) assert_that(stable).is_true() func test_idle_support_is_stable_false_when_loose_ticks_active() -> void: var slide_normals: Array[Vector3] = [Vector3.UP] - var stable: bool = PLAYER_SCRIPT.idle_support_is_stable( - true, - Vector3.UP, - slide_normals, - 12 - ) + var stable: bool = PLAYER_SCRIPT.idle_support_is_stable(true, Vector3.UP, slide_normals, 12) assert_that(stable).is_false() func test_idle_support_is_stable_false_when_not_on_floor() -> void: var slide_normals: Array[Vector3] = [Vector3.UP] - var stable: bool = PLAYER_SCRIPT.idle_support_is_stable( - false, - Vector3.UP, - slide_normals, - 0 - ) + var stable: bool = PLAYER_SCRIPT.idle_support_is_stable(false, Vector3.UP, slide_normals, 0) assert_that(stable).is_false()