feat: skin update
This commit is contained in:
@@ -1,4 +1,14 @@
|
||||
extends Node
|
||||
|
||||
# ---------------
|
||||
# Old vs New Name
|
||||
# ---------------
|
||||
# Masbro is Dabro
|
||||
# Bob is Pip
|
||||
# Gatot is Gatot
|
||||
# Oldpop is Copper
|
||||
# ---------------
|
||||
|
||||
## UserProfileManager - Manages user profile data with Nakama storage
|
||||
|
||||
signal profile_loaded(profile: Dictionary)
|
||||
@@ -129,7 +139,8 @@ func load_inventory() -> void:
|
||||
|
||||
if not result.is_exception() and result.objects:
|
||||
for obj in result.objects:
|
||||
inventory.append(obj.key)
|
||||
if not inventory.has(obj.key):
|
||||
inventory.append(obj.key)
|
||||
|
||||
func load_stats() -> Dictionary:
|
||||
# Reset stats first to ensure fresh data for new logins
|
||||
@@ -334,6 +345,21 @@ func fetch_shop_catalog() -> void:
|
||||
shop_catalog = payload.catalog
|
||||
emit_signal("profile_updated")
|
||||
|
||||
## Admin-only: grants a large amount of gold via a server-authoritative RPC.
|
||||
## The Nakama function requireAdmin() on the server prevents non-admin abuse.
|
||||
func admin_topup_gold() -> bool:
|
||||
if not NakamaManager.session: return false
|
||||
var result = await NakamaManager.client.rpc_async(
|
||||
NakamaManager.session,
|
||||
"admin_topup_gold",
|
||||
"{}"
|
||||
)
|
||||
if result.is_exception():
|
||||
push_error("[UserProfileManager] Topup failed: ", result.get_exception().message)
|
||||
return false
|
||||
await _reload_wallet()
|
||||
return true
|
||||
|
||||
func buy_currency(package_id: String) -> bool:
|
||||
if not NakamaManager.session: return false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user