feat: add nearby social interactions

This commit is contained in:
ANG-Server
2026-07-21 22:19:41 +08:00
parent 0bab768b14
commit 9dee47492c
43 changed files with 1499 additions and 77 deletions

View File

@@ -32,6 +32,7 @@ var _session_generation: int = 0
var _account_generation: int = 0
var _refresh_in_flight: bool = false
var _auth_config_path: String = DEFAULT_AUTH_CONFIG_PATH
var _show_welcome_after_registration: bool = false
func _ready() -> void:
_load_cached_session()
@@ -70,6 +71,11 @@ func get_account_generation() -> int:
func get_auth_config_path() -> String:
return _auth_config_path
func consume_registration_welcome() -> bool:
var should_show: bool = _show_welcome_after_registration
_show_welcome_after_registration = false
return should_show
func login(identifier: String, password: String) -> void:
var normalized_identifier := identifier.strip_edges()
if normalized_identifier.is_empty():
@@ -297,6 +303,7 @@ func _on_register_response(success: bool, data: Dictionary, error_info: Dictiona
register_failed.emit("注册响应缺少 access_token")
return
_show_welcome_after_registration = true
_emit_event(EventNames.AUTH_REGISTER_SUCCESS, {
"user": get_current_user()
})