feat: add battlepass slider and quest list tabs to lobby HUD
This commit is contained in:
@@ -204,9 +204,7 @@ func get_unneeded_tile_slot() -> int:
|
||||
"""Find a slot containing a tile that is not needed for the goal."""
|
||||
if not actor or actor.playerboard.size() == 0:
|
||||
return -1
|
||||
|
||||
var needed_tiles = get_tiles_needed()
|
||||
|
||||
|
||||
# Check center 3x3 for misplaced tiles
|
||||
for i in range(3):
|
||||
for j in range(3):
|
||||
@@ -252,7 +250,6 @@ func get_unneeded_tile_slot() -> int:
|
||||
var center_indices = [6, 7, 8, 11, 12, 13, 16, 17, 18]
|
||||
for i in range(actor.playerboard.size()):
|
||||
if not i in center_indices and actor.playerboard[i] != -1:
|
||||
var item = actor.playerboard[i]
|
||||
# Only keep if we strictly need it and can't find it easily?
|
||||
# Actually, generally dump outer ring tiles to keep board clean
|
||||
# unless we are about to move it to a valid spot.
|
||||
@@ -263,8 +260,6 @@ func get_unneeded_tile_slot() -> int:
|
||||
|
||||
return -1
|
||||
|
||||
return -1
|
||||
|
||||
func get_unneeded_tile_slot_panic() -> int:
|
||||
"""Aggressively find ANY tile that doesn't match a goal perfectly."""
|
||||
if not actor or actor.playerboard.size() == 0:
|
||||
@@ -439,33 +434,31 @@ func find_optimal_move_target() -> Vector2i:
|
||||
var time_left = gc_manager.get_global_time_remaining() if gc_manager else 999.0
|
||||
var is_match_running = gc_manager.is_match_running() if gc_manager else false
|
||||
var is_late_game = is_sng and is_match_running and time_left > 0.0 and time_left <= 30.0
|
||||
|
||||
# 1. STOP N GO: Reach the finish line if goals are complete
|
||||
if is_sng and main:
|
||||
var sng_manager = main.get_node_or_null("StopNGoManager")
|
||||
if sng_manager and sng_manager.is_mission_complete(actor.name.to_int()):
|
||||
# MISSION COMPLETE: We CAN finish, but should we?
|
||||
|
||||
if not is_late_game:
|
||||
# CHAOS MODE: Allow falling through to target holo tiles, but we'll limit the target X later
|
||||
# print("[BotStrategicPlanner] %s mission complete (Chaos Phase %.1fs). Roaming field." % [actor.name, time_left])
|
||||
pass
|
||||
else:
|
||||
# Late game: go to finish
|
||||
var finish_target = Vector2i(21, actor.current_position.y)
|
||||
|
||||
# Ensure finish_target is walkable
|
||||
if not _is_valid_move_target(finish_target):
|
||||
for dy in [1, -1, 2, -2]:
|
||||
var alt = Vector2i(21, actor.current_position.y + dy)
|
||||
if _is_valid_move_target(alt):
|
||||
finish_target = alt
|
||||
break
|
||||
|
||||
print("[BotStrategicPlanner] %s mission complete (Late Game %.1fs)! Heading to finish: %s" % [actor.name, time_left, finish_target])
|
||||
return finish_target
|
||||
|
||||
var sng_manager = main.get_node_or_null("StopNGoManager") if main else null
|
||||
|
||||
# 1. STOP N GO: Reach the finish line if goals are complete
|
||||
if is_sng and sng_manager and sng_manager.is_mission_complete(actor.name.to_int()):
|
||||
# MISSION COMPLETE: We CAN finish, but should we?
|
||||
|
||||
if not is_late_game:
|
||||
# CHAOS MODE: Allow falling through to target holo tiles, but we'll limit the target X later
|
||||
# print("[BotStrategicPlanner] %s mission complete (Chaos Phase %.1fs). Roaming field." % [actor.name, time_left])
|
||||
pass
|
||||
else:
|
||||
# Late game: go to finish
|
||||
var finish_target = Vector2i(21, actor.current_position.y)
|
||||
|
||||
# Ensure finish_target is walkable
|
||||
if not _is_valid_move_target(finish_target):
|
||||
for dy in [1, -1, 2, -2]:
|
||||
var alt = Vector2i(21, actor.current_position.y + dy)
|
||||
if _is_valid_move_target(alt):
|
||||
finish_target = alt
|
||||
break
|
||||
|
||||
print("[BotStrategicPlanner] %s mission complete (Late Game %.1fs)! Heading to finish: %s" % [actor.name, time_left, finish_target])
|
||||
return finish_target
|
||||
|
||||
var is_mission_complete = sng_manager.is_mission_complete(actor.name.to_int()) if sng_manager else false
|
||||
|
||||
var needed_tiles = get_tiles_needed()
|
||||
|
||||
Reference in New Issue
Block a user