Add host-validated multiplayer shop purchases

This commit is contained in:
Alexander Sellite 2026-07-29 18:51:51 -04:00
parent f7044669a8
commit 5e04b70609
12 changed files with 932 additions and 52 deletions

View file

@ -226,7 +226,7 @@ func can_open_system_menu() -> bool:
func can_open_fishing_shop() -> bool:
return (
_can_use_shared_gameplay()
_can_use_shop_gameplay()
and
_gameplay_input_enabled
and not _external_input_blocked
@ -237,7 +237,7 @@ func can_open_fishing_shop() -> bool:
func is_ready_for_shop_transaction() -> bool:
return (
_can_use_shared_gameplay()
_can_use_shop_gameplay()
and
_gameplay_input_enabled
and not _external_input_blocked
@ -502,6 +502,17 @@ func _can_use_shared_gameplay() -> bool:
return _network_session == null or _network_session.can_use_host_gameplay()
func _can_use_shop_gameplay() -> bool:
return (
_network_session == null
or _network_session.is_host()
or (
_network_session.is_joined_client()
and _network_session.supports_server_capability(&"shop_v1")
)
)
func has_active_fishing_rod() -> bool:
if (
_local_bag == null