From aae57c63bd0d66e71ce5f8ef62b40c143ee0cc65 Mon Sep 17 00:00:00 2001 From: Shawn Date: Wed, 1 Jul 2026 21:41:36 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20TeamManager=20signal=20type=20hints=20?= =?UTF-8?q?=E2=80=94=20use=20int=20instead=20of=20TeamData.Team=20(export?= =?UTF-8?q?=20parse=20order=20issue)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/teams/team_manager.gd | 4 ++-- server/scripts/plugin_api/plugin_manager.gd | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/teams/team_manager.gd b/scripts/teams/team_manager.gd index 5f0d4cc..7c4fe85 100644 --- a/scripts/teams/team_manager.gd +++ b/scripts/teams/team_manager.gd @@ -25,10 +25,10 @@ class_name TeamManager # --------------------------------------------------------------------------- ## Emitted when a player is assigned to a team (including on team switch). -signal player_joined_team(player_id: int, team: TeamData.Team) +signal player_joined_team(player_id: int, team: int) ## Emitted when a player leaves a team (disconnected or switched). -signal player_left_team(player_id: int, team: TeamData.Team) +signal player_left_team(player_id: int, team: int) ## Emitted when scores for any team change. signal team_scores_updated(team_scores: Dictionary) diff --git a/server/scripts/plugin_api/plugin_manager.gd b/server/scripts/plugin_api/plugin_manager.gd index 6c92e62..5d581af 100644 --- a/server/scripts/plugin_api/plugin_manager.gd +++ b/server/scripts/plugin_api/plugin_manager.gd @@ -240,6 +240,9 @@ func _load_plugin_from_manifest(name: String, manifest: PluginManifest) -> bool: log_warn("Plugin '%s' does not extend PluginBase — some features may be unavailable" % name) # Inject manifest metadata into the instance + if not instance: + push_error("[PluginManager] Plugin '%s' failed to instantiate (null)" % name) + return false if instance.has_method(&"set_plugin_meta"): instance.set_plugin_meta(name, manifest.version, manifest.author) elif instance.has_method(&"set") or true: @@ -251,9 +254,6 @@ func _load_plugin_from_manifest(name: String, manifest: PluginManifest) -> bool: if "plugin_author" in instance: instance.plugin_author = manifest.author - if instance == null: - push_error("[PluginManager] Failed to instantiate plugin: %s" % name) - return instance.name = "Plugin_%s" % name add_child(instance) loaded_plugins[name] = instance