fix: TeamManager signal type hints — use int instead of TeamData.Team (export parse order issue)
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user