fix(core): remove class_name from autoload scripts to prevent singleton conflict
Godot 4 throws "Class hides an autoload singleton" when a script declares class_name with the same name as its registered autoload. Removed class_name from AudioManager and RoomNavigator — both are accessible globally via their autoload name without it. Also ignores Godot-generated *.uid files. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,6 +3,7 @@
|
|||||||
# Godot generated files
|
# Godot generated files
|
||||||
.godot/
|
.godot/
|
||||||
.import/
|
.import/
|
||||||
|
*.uid
|
||||||
|
|
||||||
# Godot-specific ignores
|
# Godot-specific ignores
|
||||||
export.cfg
|
export.cfg
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
## AudioManager — music playback with cross-fade, SFX playback, volume control.
|
## AudioManager — music playback with cross-fade, SFX playback, volume control.
|
||||||
class_name AudioManager extends Node
|
extends Node
|
||||||
|
|
||||||
const DEFAULT_MUSIC_VOLUME: float = 0.6
|
const DEFAULT_MUSIC_VOLUME: float = 0.6
|
||||||
const CROSSFADE_DURATION: float = 1.0
|
const CROSSFADE_DURATION: float = 1.0
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
## RoomNavigator — autoload that moves the Camera2D smoothly between hospital floors.
|
## RoomNavigator — autoload that moves the Camera2D smoothly between hospital floors.
|
||||||
class_name RoomNavigator extends Node
|
extends Node
|
||||||
|
|
||||||
signal room_changed(floor_index: int)
|
signal room_changed(floor_index: int)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user