feat: add battlepass slider and quest list tabs to lobby HUD
This commit is contained in:
@@ -173,15 +173,15 @@ func send_lobby_invite(to_user_id: String, match_id: String) -> void:
|
||||
if result.get("success", false) == false:
|
||||
push_warning("[FriendManager] send_lobby_invite failed: " + str(result.get("error", "")))
|
||||
|
||||
func _on_notification_received(notification) -> void:
|
||||
print("[FriendManager] _on_notification_received: code=%d sender=%s" % [notification.code, notification.sender_id])
|
||||
match notification.code:
|
||||
func _on_notification_received(notif) -> void:
|
||||
print("[FriendManager] _on_notification_received: code=%d sender=%s" % [notif.code, notif.sender_id])
|
||||
match notif.code:
|
||||
NOTIF_LOBBY_INVITE:
|
||||
var content = JSON.parse_string(notification.content)
|
||||
var content = JSON.parse_string(notif.content)
|
||||
if content:
|
||||
var from_name: String = content.get("from_name", "Someone")
|
||||
var match_id: String = content.get("match_id", "")
|
||||
emit_signal("lobby_invite_received", notification.sender_id, from_name, match_id)
|
||||
emit_signal("lobby_invite_received", notif.sender_id, from_name, match_id)
|
||||
NOTIF_FRIEND_REQUEST:
|
||||
# Refresh friends list so the incoming request appears immediately
|
||||
print("[FriendManager] friend request notification received, reloading friends...")
|
||||
|
||||
@@ -32,11 +32,6 @@ func pull(banner_id: String, count: int) -> Array:
|
||||
push_error("[GachaManager] Not authenticated")
|
||||
return []
|
||||
|
||||
var payload = JSON.stringify({
|
||||
"banner_id": banner_id,
|
||||
"count": count
|
||||
})
|
||||
|
||||
var result = await BackendService.perform_gacha_pull(banner_id, count)
|
||||
|
||||
if result.get("success", false) == false:
|
||||
|
||||
@@ -44,7 +44,7 @@ func initialize(main: Node):
|
||||
if LobbyManager:
|
||||
LobbyManager.enable_cycle_timer_changed.connect(_on_enable_cycle_timer_changed)
|
||||
|
||||
func _on_enable_cycle_timer_changed(enabled: bool):
|
||||
func _on_enable_cycle_timer_changed(_enabled: bool):
|
||||
# If disabled mid-cycle, the timer will just freeze in _process
|
||||
# If enabled mid-cycle, it will resume
|
||||
pass
|
||||
@@ -69,9 +69,7 @@ func _process(delta):
|
||||
return
|
||||
|
||||
# Skip countdown if timer is disabled
|
||||
var lobby_manager = get_tree().get_root().get_node_or_null("Main/LobbyManager")
|
||||
# Note: LobbyManager is an Autoload, so we can access it directly via 'LobbyManager'
|
||||
|
||||
if LobbyManager and not LobbyManager.get_enable_cycle_timer():
|
||||
# If timer is disabled, we just don't decrement.
|
||||
# But we still keep is_cycle_active = true so the phase is "active" (allowing actions)
|
||||
|
||||
@@ -2,15 +2,12 @@ extends Node
|
||||
|
||||
# PlayerManager - Handles player and bot lifecycle management
|
||||
|
||||
signal player_added(peer_id, player_node)
|
||||
signal player_removed(peer_id)
|
||||
signal bot_created(bot_id, bot_node)
|
||||
signal bot_removed(bot_id)
|
||||
|
||||
var player_scene = preload("res://scenes/player.tscn")
|
||||
var connected_peer_ids = []
|
||||
|
||||
func add_player_character(peer_id: int, position: Vector2i = Vector2i.ZERO) -> Node:
|
||||
func add_player_character(peer_id: int, _position: Vector2i = Vector2i.ZERO) -> Node:
|
||||
var player_character = player_scene.instantiate()
|
||||
player_character.set_multiplayer_authority(peer_id)
|
||||
player_character.name = str(peer_id)
|
||||
|
||||
Reference in New Issue
Block a user