feat: add battlepass slider and quest list tabs to lobby HUD
This commit is contained in:
+14
-14
@@ -117,6 +117,7 @@ var can_finish: bool:
|
||||
|
||||
# Modifier for Turn based
|
||||
var has_performed_action: bool = false
|
||||
@warning_ignore("unused_private_class_variable") # read/written by player_action_manager.gd
|
||||
var _is_processing_action: bool = false
|
||||
var selected_gridmap_position = Vector2i(-1, -1)
|
||||
var selected_playerboard_slot = -1
|
||||
@@ -157,6 +158,7 @@ var spawn_point_selected = false
|
||||
|
||||
# Action for hilighter
|
||||
var highlighted_spawn_points = []
|
||||
@warning_ignore("unused_private_class_variable") # read/written by player_movement_manager.gd
|
||||
var _is_highlighting: bool = false
|
||||
|
||||
# Character selection and animation
|
||||
@@ -579,7 +581,7 @@ const COSMETIC_MAPPING = {
|
||||
}
|
||||
}
|
||||
|
||||
func apply_loadout(character_node: Node3D) -> void:
|
||||
func apply_loadout(_character_node: Node3D) -> void:
|
||||
"""Apply equipped cosmetics via SkinManager — the single source of truth.
|
||||
Uses _player_loadout (synced from the owning client via sync_loadout RPC)
|
||||
so all peers render the same skin regardless of their own loadout."""
|
||||
@@ -928,14 +930,14 @@ func _refresh_player_visuals():
|
||||
if active_character:
|
||||
apply_loadout(active_character)
|
||||
|
||||
func update_rank_visuals(rank: int, score: int = -1):
|
||||
func update_rank_visuals(rank: int, player_score: int = -1):
|
||||
var pos_label = get_node_or_null("Position")
|
||||
if not pos_label:
|
||||
return
|
||||
|
||||
# Hide rank until the player has actually scored, so the match doesn't
|
||||
# start with everyone showing a position (e.g. all "1st").
|
||||
if score == 0:
|
||||
if player_score == 0:
|
||||
pos_label.visible = false
|
||||
return
|
||||
|
||||
@@ -1110,7 +1112,6 @@ func drop_all_tiles():
|
||||
|
||||
for i in range(playerboard.size()):
|
||||
if playerboard[i] != -1:
|
||||
var item_id = playerboard[i]
|
||||
playerboard[i] = -1
|
||||
|
||||
# Find a spot to drop? Or just destroy?
|
||||
@@ -1603,7 +1604,7 @@ func _find_random_spawn_position() -> Vector2i:
|
||||
|
||||
# Special handling for Stop n Go mode (22x10 Grid)
|
||||
if LobbyManager.game_mode == "Stop n Go":
|
||||
var available_positions = []
|
||||
var stop_n_go_positions = []
|
||||
# Scan the 22x10 grid
|
||||
for x in range(22):
|
||||
for z in range(10):
|
||||
@@ -1616,12 +1617,12 @@ func _find_random_spawn_position() -> Vector2i:
|
||||
# Assuming 4 is obstacle, and -1 is void. 0 is walkable, 2 is safe zone.
|
||||
if item != -1 and item != 4:
|
||||
if not is_position_occupied(pos):
|
||||
available_positions.append(pos)
|
||||
|
||||
if available_positions.size() > 0:
|
||||
stop_n_go_positions.append(pos)
|
||||
|
||||
if stop_n_go_positions.size() > 0:
|
||||
var rng = RandomNumberGenerator.new()
|
||||
rng.randomize()
|
||||
return available_positions[rng.randi() % available_positions.size()]
|
||||
return stop_n_go_positions[rng.randi() % stop_n_go_positions.size()]
|
||||
return Vector2i(10, 5) # Fallback center
|
||||
|
||||
|
||||
@@ -1651,6 +1652,7 @@ func _find_random_spawn_position() -> Vector2i:
|
||||
|
||||
# Better fallback center instead of 0,0 which is often a wall/border
|
||||
print("[Player] Warning: No available spawn positions found! Using fallback.")
|
||||
@warning_ignore("integer_division") # grid center is intentionally an integer cell
|
||||
return Vector2i(cols / 2, rs / 2)
|
||||
|
||||
func find_random_valid_position_in_range() -> Vector2i:
|
||||
@@ -1690,8 +1692,8 @@ func raycast_to_grid(from: Vector3, to: Vector3) -> Vector2i:
|
||||
|
||||
return Vector2i(-1, -1)
|
||||
|
||||
func is_within_movement_range(target_position: Vector2i) -> bool:
|
||||
return movement_manager.is_within_movement_range(target_position)
|
||||
func is_within_movement_range(check_position: Vector2i) -> bool:
|
||||
return movement_manager.is_within_movement_range(check_position)
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# Movement
|
||||
@@ -1777,9 +1779,7 @@ func start_movement_along_path(path: Array, clear_visual: bool = true, force: bo
|
||||
var current_finish_locs = race_manager.get_current_finish_locations() if race_manager else finish_locations
|
||||
if current_position in current_finish_locs and can_finish:
|
||||
finish_race()
|
||||
|
||||
var main = get_tree().get_root().get_node_or_null("Main")
|
||||
|
||||
|
||||
# Clear visuals for everyone including bots
|
||||
if clear_visual:
|
||||
if enhanced_gridmap:
|
||||
|
||||
Reference in New Issue
Block a user