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:
parent
1db1a5b754
commit
3b84bfe3a0
97 changed files with 7869 additions and 982 deletions
|
|
@ -8,6 +8,8 @@ const MAX_REEL_SPEED: float = 10.0
|
|||
const MAX_BARRIER_DAMAGE: int = 128
|
||||
const INPUT_CHANNEL: int = 3
|
||||
const SNAPSHOT_CHANNEL: int = 4
|
||||
const OBSERVER_SNAPSHOT_CHANNEL: int = 10
|
||||
const RELIABLE_CHANNEL: int = NetworkProtocol.FISHING_RELIABLE_CHANNEL
|
||||
const INPUT_RATE: float = 1.0 / 30.0
|
||||
const SNAPSHOT_RATE: float = 1.0 / 20.0
|
||||
|
||||
|
|
@ -35,6 +37,7 @@ static func validate_cast_request(data: Variant) -> String:
|
|||
"rarity_multipliers",
|
||||
"discovered_fish_ids",
|
||||
"capacity_available",
|
||||
"movement_sequence",
|
||||
]:
|
||||
if not payload.has(key):
|
||||
return "Malformed fishing request."
|
||||
|
|
@ -51,11 +54,16 @@ static func validate_cast_request(data: Variant) -> String:
|
|||
or typeof(payload["rarity_multipliers"]) != TYPE_ARRAY
|
||||
or typeof(payload["discovered_fish_ids"]) != TYPE_ARRAY
|
||||
or typeof(payload["capacity_available"]) != TYPE_BOOL
|
||||
or typeof(payload["movement_sequence"]) != TYPE_INT
|
||||
):
|
||||
return "Malformed fishing request."
|
||||
if payload.has("bait_id") and typeof(payload["bait_id"]) not in [TYPE_STRING, TYPE_STRING_NAME]:
|
||||
if payload.has("bait_id") and typeof(payload["bait_id"]) not in [
|
||||
TYPE_STRING, TYPE_STRING_NAME
|
||||
]:
|
||||
return "Malformed fishing request."
|
||||
if payload.has("lure_id") and typeof(payload["lure_id"]) not in [TYPE_STRING, TYPE_STRING_NAME]:
|
||||
if payload.has("lure_id") and typeof(payload["lure_id"]) not in [
|
||||
TYPE_STRING, TYPE_STRING_NAME
|
||||
]:
|
||||
return "Malformed fishing request."
|
||||
var request_id: String = payload["request_id"]
|
||||
var session_id: String = payload["session_id"]
|
||||
|
|
@ -92,6 +100,8 @@ static func validate_cast_request(data: Variant) -> String:
|
|||
or str(payload["rod_id"]).is_empty()
|
||||
or str(payload["rod_id"]).length() > 96
|
||||
or str(payload.get("lure_id", "")).length() > 96
|
||||
or int(payload["movement_sequence"]) < 0
|
||||
or int(payload["movement_sequence"]) > 2147483647
|
||||
):
|
||||
return "Fishing request values are outside allowed limits."
|
||||
for value: Variant in rarity:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue