refactor: enhance test framework with automated resource tracking and scripted error capture capabilities
This commit is contained in:
+9
-9
@@ -252,8 +252,8 @@ func _init_managers():
|
||||
add_child(portal_mode_manager)
|
||||
portal_mode_manager.initialize(self , $EnhancedGridMap)
|
||||
|
||||
# Gauntlet manager for Candy Cannon Survival mode
|
||||
if LobbyManager.game_mode == "Candy Cannon Survival":
|
||||
# Gauntlet manager for Candy Pump Survival mode
|
||||
if LobbyManager.game_mode == "Candy Pump Survival":
|
||||
gauntlet_manager = load("res://scripts/managers/gauntlet_manager.gd").new()
|
||||
gauntlet_manager.name = "GauntletManager"
|
||||
add_child(gauntlet_manager)
|
||||
@@ -621,7 +621,7 @@ func _setup_host_game():
|
||||
stop_n_go_manager._setup_arena()
|
||||
elif LobbyManager.game_mode == "Tekton Doors" and portal_mode_manager:
|
||||
portal_mode_manager.setup_arena_locally()
|
||||
elif LobbyManager.game_mode == "Candy Cannon Survival" and gauntlet_manager:
|
||||
elif LobbyManager.game_mode == "Candy Pump Survival" and gauntlet_manager:
|
||||
gauntlet_manager._setup_arena()
|
||||
else:
|
||||
# Randomize grid first to ensure Floor 0 is walkable for pre-calculation
|
||||
@@ -729,8 +729,8 @@ func _setup_client_game():
|
||||
if LobbyManager.game_mode == "Tekton Doors" and portal_mode_manager:
|
||||
portal_mode_manager.setup_arena_locally()
|
||||
|
||||
# Initialize arena locally for Candy Cannon Survival
|
||||
if LobbyManager.game_mode == "Candy Cannon Survival" and gauntlet_manager:
|
||||
# Initialize arena locally for Candy Pump Survival
|
||||
if LobbyManager.game_mode == "Candy Pump Survival" and gauntlet_manager:
|
||||
gauntlet_manager._apply_arena_setup()
|
||||
|
||||
# Ensure local player setup (UI, controls) is verified
|
||||
@@ -829,12 +829,12 @@ func _start_game():
|
||||
stop_n_go_manager.spawn_initial_powerups() # Ensure power-ups exist before 1,2,3 Go
|
||||
|
||||
# Gauntlet: Spawn mission tiles across 20x20 arena BEFORE countdown
|
||||
if LobbyManager.game_mode == "Candy Cannon Survival" and gauntlet_manager:
|
||||
if LobbyManager.game_mode == "Candy Pump Survival" and gauntlet_manager:
|
||||
gauntlet_manager.setup_mission_tiles()
|
||||
|
||||
# Spawn Static Tektons and random tiles BEFORE countdown (Free Mode Only)
|
||||
# Exclude for Stop n Go and Tekton Doors
|
||||
if LobbyManager.game_mode != "Stop n Go" and LobbyManager.game_mode != "Tekton Doors" and LobbyManager.game_mode != "Candy Cannon Survival":
|
||||
if LobbyManager.game_mode != "Stop n Go" and LobbyManager.game_mode != "Tekton Doors" and LobbyManager.game_mode != "Candy Pump Survival":
|
||||
spawn_static_tektons()
|
||||
|
||||
# Tekton Doors: Randomize connections BEFORE countdown so colors show
|
||||
@@ -873,7 +873,7 @@ func _start_game():
|
||||
if goals_cycle_manager:
|
||||
var match_duration = LobbyManager.get_match_duration()
|
||||
goals_cycle_manager.start_match(float(match_duration))
|
||||
elif LobbyManager.game_mode == "Candy Cannon Survival":
|
||||
elif LobbyManager.game_mode == "Candy Pump Survival":
|
||||
if gauntlet_manager:
|
||||
gauntlet_manager.start_game_mode()
|
||||
|
||||
@@ -1860,7 +1860,7 @@ func randomize_item_at_position(grid_position: Vector2i):
|
||||
|
||||
if is_ground:
|
||||
var get_mode_specific_tile = func():
|
||||
if LobbyManager.game_mode != "Stop n Go" and LobbyManager.game_mode != "Tekton Doors" and LobbyManager.game_mode != "Candy Cannon Survival":
|
||||
if LobbyManager.game_mode != "Stop n Go" and LobbyManager.game_mode != "Tekton Doors" and LobbyManager.game_mode != "Candy Pump Survival":
|
||||
# 60% Chance for Common (7-10), 40% for PowerUp
|
||||
if randf() <= 0.6:
|
||||
return [7, 8, 9, 10].pick_random()
|
||||
|
||||
Reference in New Issue
Block a user