feat: expand progression and multiplayer systems

Add named save slots, progression import/export, and a unified play flow. Add live friend requests, presence, invitations, and relationship controls without durable discovery-server social storage. Advance the network protocol with isolated channels, movement reconciliation, late-join recovery, fishing replication, and animation synchronization. Preserve per-species catch totals, refine generated-world startup and water recovery, and complete the related input and interface improvements.
This commit is contained in:
Alexander Sellite 2026-08-23 20:48:38 -04:00
parent 1db1a5b754
commit 3b84bfe3a0
97 changed files with 7869 additions and 982 deletions

View file

@ -22,6 +22,25 @@ func connect_to_route(_route: ConnectionRoute) -> Error:
func disconnect_transport() -> void:
if _peer != null:
# Give ENet one poll cycle to emit its graceful disconnect packets before
# closing the socket. This keeps a host from retaining a departed player
# until the extended generated-world liveness timeout expires.
if (
_peer is ENetMultiplayerPeer
and _peer.get_connection_status()
== MultiplayerPeer.CONNECTION_CONNECTED
):
var enet_peer := _peer as ENetMultiplayerPeer
# A host explicitly notifies each still-live client before closing.
# Clients rely on ENetMultiplayerPeer.close(); their cached SceneTree
# peer list can briefly outlive the underlying ENet peer after a remote
# disconnect, making disconnect_peer() race and report an engine error.
if enet_peer.get_unique_id() == 1:
for peer_id: int in multiplayer.get_peers():
if enet_peer.get_peer(peer_id) != null:
enet_peer.disconnect_peer(peer_id, false)
if enet_peer.host != null:
enet_peer.host.flush()
_peer.close()
_peer = null
_route_description = ""