about summary refs log tree commit diff stats
path: root/Archipelago
diff options
context:
space:
mode:
Diffstat (limited to 'Archipelago')
-rw-r--r--Archipelago/multiplayer.gd23
1 files changed, 23 insertions, 0 deletions
diff --git a/Archipelago/multiplayer.gd b/Archipelago/multiplayer.gd index 07b63b8..2704af7 100644 --- a/Archipelago/multiplayer.gd +++ b/Archipelago/multiplayer.gd
@@ -18,3 +18,26 @@ func _on_lobby_created(result: int, lobby_id: int) -> void:
18 var _ignore = Steam.setLobbyData(lobby_id, "archipelago", apclient._seed) 18 var _ignore = Steam.setLobbyData(lobby_id, "archipelago", apclient._seed)
19 19
20 ._on_lobby_created(result, lobby_id) 20 ._on_lobby_created(result, lobby_id)
21
22
23func _on_lobby_joined(lobby_id: int, permissions: int, locked: bool, result: int) -> void:
24 if result != Steam.RESULT_OK:
25 return
26
27 var apclient = global.get_node("Archipelago")
28 Steam.setLobbyMemberData(lobby_id, "slot_name", apclient.ap_user)
29
30 ._on_lobby_joined(lobby_id, permissions, locked, result)
31
32
33func _update_lobby_members():
34 ._update_lobby_members()
35
36 if active_lobby_id == 0:
37 return
38 var lobby_size: int = Steam.getNumLobbyMembers(active_lobby_id)
39 for i in range(0, lobby_size):
40 var member_id: int = Steam.getLobbyMemberByIndex(active_lobby_id, i)
41 if member_id != player_steam_id and member_id in active_lobby_members:
42 var slot_name = Steam.getLobbyMemberData(active_lobby_id, member_id, "slot_name")
43 active_lobby_members[member_id].steam_name = slot_name