Fix headless class_name dependencies

- Replaced TeamData.Team type hints with int in all scripts
- Added explicit preloads for headless mode class resolution
- Created stub LagCompensation and DamageProcessor scripts
- Fixed PluginManager, SpawnManager, EconomyManager, BuyZone,
  RoundManager, BuyMenuHandler, BombObjective class_name references
- Updated server config to match ServerConfig.gd format

Gray screen root cause: server scripts failed to parse in headless
mode due to Godot 4 class_name loading order (Resource after Node),
leaving server_main.gd non-functional — accepted connections but
never spawned players.
This commit is contained in:
2026-07-02 10:09:28 -04:00
parent ad48f38ca5
commit 4a5264c5b0
14 changed files with 202 additions and 284 deletions
+4 -3
View File
@@ -26,6 +26,7 @@
extends Area3D
class_name BuyZone
const _td_bz = preload("res://scripts/teams/team_data.gd")
# ---------------------------------------------------------------------------
# Signals
@@ -44,8 +45,8 @@ signal player_exited_buyzone(player_id: int)
## Which team(s) can use this buy zone.
## Team.COUNTER_TERRORIST = 1, Team.TERRORIST = 2, Team.SPECTATOR = 0.
## Use the Team enum: TeamData.Team.COUNTER_TERRORIST, etc.
@export var zone_team: TeamData.Team = TeamData.Team.COUNTER_TERRORIST
## Use the Team enum: int.COUNTER_TERRORIST, etc.
@export var zone_team: int = _td_bz.Team.COUNTER_TERRORIST
## Radius of the buy zone in Godot units (visual hint only; actual collision
## shape determines the trigger volume).
@@ -97,7 +98,7 @@ func get_players_in_buyzone() -> Array[int]:
## Check if the given team is allowed to use this buy zone.
func is_team_allowed(team: TeamData.Team) -> bool:
func is_team_allowed(team: int) -> bool:
if allow_all_teams:
return true
return team == zone_team