Integrate per-save identity and interaction UI

This commit is contained in:
Alexander Sellite 2026-09-01 17:30:50 -04:00
parent ac82a28f3b
commit 4fda6e97f6
58 changed files with 3471 additions and 461 deletions

View file

@ -3,10 +3,11 @@ extends RefCounted
const WorldLayoutType = preload("res://world/world_layout.gd")
const PROTOCOL_VERSION: int = 12
const PROTOCOL_VERSION: int = 13
const GAME_BUILD: String = "prealpha"
const MAX_GAME_VERSION_LENGTH: int = 64
const MAX_DISPLAY_NAME_LENGTH: int = 24
const MAX_PLAYER_TITLE_LENGTH: int = 24
const MAX_PROFILE_ID_LENGTH: int = 96
const MAX_NONCE_LENGTH: int = 96
const MAX_PUBLIC_KEY_LENGTH: int = 8192
@ -183,6 +184,7 @@ static func make_client_hello(
cosmetic_snapshot: Dictionary = {},
identity_fingerprint: String = "",
identity_signature: PackedByteArray = PackedByteArray(),
player_title: String = NetworkProfilePreferences.DEFAULT_TITLE,
) -> Dictionary:
return {
"protocol_version": PROTOCOL_VERSION,
@ -190,6 +192,7 @@ static func make_client_hello(
"game_build": GAME_BUILD,
"local_profile_id": profile_id,
"display_name": display_name,
"player_title": player_title,
"client_nonce": client_nonce,
"capability_flags": PackedStringArray([
FISH_QUALITY_CAPABILITY,
@ -224,6 +227,7 @@ static func validate_client_hello(data: Variant) -> String:
"game_build",
"local_profile_id",
"display_name",
"player_title",
"client_nonce",
"capability_flags",
"cosmetic_snapshot",
@ -246,6 +250,11 @@ static func validate_client_hello(data: Variant) -> String:
return "Profile ID is invalid."
if typeof(payload["display_name"]) != TYPE_STRING:
return "Display name is invalid."
if (
typeof(payload["player_title"]) != TYPE_STRING
or not NetworkProfilePreferences.is_valid_title(payload["player_title"])
):
return "Player title is invalid."
if typeof(payload["client_nonce"]) != TYPE_STRING:
return "Client nonce is invalid."
if typeof(payload["capability_flags"]) not in [
@ -295,6 +304,7 @@ static func client_profile_fields(data: Dictionary) -> Array:
str(data.get("identity_fingerprint", "")),
str(data.get("local_profile_id", "")),
str(data.get("display_name", "")),
str(data.get("player_title", "")),
]
result.append_array(
CharacterCustomizationCatalog.appearance_signature_values(appearance)