gate plugin on Godot 4.6+; drop stale gd-options autoload registrations
plugin.gd now checks Engine.get_version_info() in _enter_tree and pushes a loud error if the engine is older than 4.6. Doesn't actually disable the addon's class_names (Godot parses those independently of EditorPlugin), but gives users a clear "this is the cause" signal before any cryptic downstream errors land. Also removes four add_autoload_singleton calls for gd-options-owned scripts (GameSettings, InputSettings, GraphicsSettings, AudioSettings). They were copy-paste leftovers from when this addon was forked; gd-options/plugin.gd already registers them, so this addon was double-registering — gd-dynamic- sound has no business owning those autoloads. README documents the 4.6 requirement near the top. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
59f1d93c6f
commit
5758106b1e
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
A Godot 4 audio addon for **dynamic music** (intensity-layered, seamless playlist transitions, fade in/out) and **overlapping one-shot SFX** — both built on `AudioStreamPolyphonic`.
|
A Godot 4 audio addon for **dynamic music** (intensity-layered, seamless playlist transitions, fade in/out) and **overlapping one-shot SFX** — both built on `AudioStreamPolyphonic`.
|
||||||
|
|
||||||
|
**Requires Godot 4.6 or newer.** Older versions will load the addon but log an error from `plugin.gd` on enable; some `class_name`s may also fail to parse on engines lacking 4.6 GDScript features.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
1. Copy the `addons/gd-dynamic-sound/` folder into your project's `addons/` directory.
|
1. Copy the `addons/gd-dynamic-sound/` folder into your project's `addons/` directory.
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,13 @@
|
||||||
@tool
|
@tool
|
||||||
extends EditorPlugin
|
extends EditorPlugin
|
||||||
|
|
||||||
|
const MIN_MAJOR : int = 4
|
||||||
|
const MIN_MINOR : int = 6
|
||||||
|
|
||||||
func _enter_tree() -> void:
|
func _enter_tree() -> void:
|
||||||
add_autoload_singleton("GameSettings", "res://addons/gd-options/src/common/game_settings.gd")
|
var v : Dictionary = Engine.get_version_info()
|
||||||
add_autoload_singleton("InputSettings", "res://addons/gd-options/src/common/input_settings.gd")
|
if v.major < MIN_MAJOR or (v.major == MIN_MAJOR and v.minor < MIN_MINOR):
|
||||||
add_autoload_singleton("GraphicsSettings", "res://addons/gd-options/src/common/graphics_settings.gd")
|
push_error("gd-dynamic-sound requires Godot %d.%d+ (running %s). Some classes may fail to load or behave incorrectly." % [MIN_MAJOR, MIN_MINOR, v.string])
|
||||||
add_autoload_singleton("AudioSettings", "res://addons/gd-options/src/common/audio_settings.gd")
|
|
||||||
|
|
||||||
func _exit_tree() -> void:
|
func _exit_tree() -> void:
|
||||||
pass
|
pass
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue