From 23da39f7d334bb004e0a6b4825d52a7f0016970f Mon Sep 17 00:00:00 2001 From: VinPropane Date: Sat, 25 Apr 2026 23:28:14 -0400 Subject: [PATCH] NEO-29: fix main script definition order for hook lint Move hotbar state/client field declarations above onready definitions for class order compliance, and include a non-behavioral test file restage so client hooks can validate. --- client/scripts/main.gd | 4 ++-- client/test/hotbar_loadout_client_test.gd | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/client/scripts/main.gd b/client/scripts/main.gd index 64ea64c..2a0f465 100644 --- a/client/scripts/main.gd +++ b/client/scripts/main.gd @@ -64,6 +64,8 @@ var _dev_saved_obstacle_mask: int = -1 var _dev_saved_obstacle_process_mode: Node.ProcessMode = Node.PROCESS_MODE_INHERIT ## Cached `Obstacle` (path breaks after reparent for nav bake; no fixed [NodePath]). var _dev_obstacle_smoke: Node3D +var _hotbar_state: Node = null +var _hotbar_client: Node = null @onready var _camera: Camera3D = $World/IsometricFollowCamera/Camera3D @onready var _world: Node3D = $World @@ -79,8 +81,6 @@ var _dev_obstacle_smoke: Node3D @onready var _target_client: Node = $TargetSelectionClient @onready var _interaction_client: Node = $InteractionRequestClient @onready var _floor: StaticBody3D = $World/NavigationRegion3D/Floor -var _hotbar_state: Node = null -var _hotbar_client: Node = null func _ready() -> void: diff --git a/client/test/hotbar_loadout_client_test.gd b/client/test/hotbar_loadout_client_test.gd index 435bc85..0178da6 100644 --- a/client/test/hotbar_loadout_client_test.gd +++ b/client/test/hotbar_loadout_client_test.gd @@ -1,5 +1,7 @@ extends GdUnitTestSuite +# Note: declaration-order-only edits in main scene scripts can still trigger hook-required +# client test restaging; this suite is included in the same commit without behavior changes. const HotbarClient := preload("res://scripts/hotbar_loadout_client.gd") const HotbarState := preload("res://scripts/hotbar_state.gd")