diff --git a/Stations/Hob.tscn b/Stations/Hob.tscn index af2f57a..a308d99 100644 --- a/Stations/Hob.tscn +++ b/Stations/Hob.tscn @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://bsn8vhv5adxdo" path="res://stations/hob.gd" id="1_7jc4g"] [ext_resource type="PackedScene" uid="uid://cvucwxibtol5f" path="res://stations/StationMovement.tscn" id="1_pydjp"] [ext_resource type="Script" uid="uid://cquqe4f1m1sw6" path="res://addons/godot-xr-tools/objects/snap_zone.gd" id="2_er1dp"] -[ext_resource type="AudioStream" uid="uid://bqtk1adk8umbx" path="res://sounds/220197__gameaudio__click-basic.wav" id="3_6oyg1"] +[ext_resource type="AudioStream" uid="uid://dmyuqe5058sv3" path="res://sounds/220197__gameaudio__click-basic.wav" id="3_6oyg1"] [ext_resource type="PackedScene" uid="uid://bxbocxdaayvwx" path="res://UI/progress_bar.tscn" id="3_7uuqv"] [ext_resource type="Material" uid="uid://d1djvskv4n4m3" path="res://textures/hob_off.tres" id="4_8qpxk"] [ext_resource type="Material" uid="uid://db7c7w4apwti7" path="res://textures/hob_on.tres" id="6_m7l4u"] @@ -27,9 +27,6 @@ properties/4/replication_mode = 1 properties/5/path = NodePath("Hob:visible") properties/5/spawn = false properties/5/replication_mode = 1 -properties/6/path = NodePath("Hob/XRToolsSnapZone:picked_up_ranged") -properties/6/spawn = false -properties/6/replication_mode = 1 [sub_resource type="BoxShape3D" id="BoxShape3D_kdxnr"] size = Vector3(0.6, 1, 0.6) @@ -202,6 +199,7 @@ shape = SubResource("BoxShape3D_7uuqv") [node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="Hob/XRToolsSnapZone" unique_id=1991627595] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.022546828, -0.5270121, 0.36528283) +stream = ExtResource("3_6oyg1") [node name="ProgressBar3D" parent="Hob" unique_id=654673176 instance=ExtResource("3_7uuqv")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.2621956, -0.09216304) diff --git a/Stations/table.gd b/Stations/table.gd index c0f5110..d7ba330 100644 --- a/Stations/table.gd +++ b/Stations/table.gd @@ -57,6 +57,11 @@ func place_order() -> void: _unsatisfied_orders = new_orders _original_orders = _unsatisfied_orders.duplicate() +@rpc("any_peer", "call_remote", "reliable") +func server_place_order() -> void: + if NetworkManager.owns_world(): + place_order() + func absorb_items(): SweetLogger.debug("absorb_items()") @@ -379,6 +384,9 @@ func _refresh_display() -> void: func _process(delta: float) -> void: _refresh_display() + if not NetworkManager.owns_world(): + return + if GameManager.game_state == GameManager.GameState.GAME_OVER: return _place_order_if_player() diff --git a/Stations/table.tscn b/Stations/table.tscn index 1db26c6..eacd333 100644 --- a/Stations/table.tscn +++ b/Stations/table.tscn @@ -3,8 +3,8 @@ [ext_resource type="Script" uid="uid://caeikc7e3igkd" path="res://stations/table.gd" id="1_2vcpj"] [ext_resource type="PackedScene" uid="uid://cvucwxibtol5f" path="res://stations/StationMovement.tscn" id="1_5mi7y"] [ext_resource type="Script" uid="uid://cquqe4f1m1sw6" path="res://addons/godot-xr-tools/objects/snap_zone.gd" id="1_8j1nt"] -[ext_resource type="AudioStream" uid="uid://clkjwcawdqvta" path="res://sounds/money.mp3" id="2_jslhm"] -[ext_resource type="AudioStream" uid="uid://daiv8ubwdbidf" path="res://sounds/220195__gameaudio__click-wooden-1.wav" id="3_0s6ir"] +[ext_resource type="AudioStream" uid="uid://ck72h06t8hyyk" path="res://sounds/money.mp3" id="2_jslhm"] +[ext_resource type="AudioStream" uid="uid://dllgyc8jh83an" path="res://sounds/220195__gameaudio__click-wooden-1.wav" id="3_0s6ir"] [ext_resource type="PackedScene" uid="uid://bxbocxdaayvwx" path="res://UI/progress_bar.tscn" id="3_kjf1i"] [sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_np_table"] @@ -29,12 +29,9 @@ properties/5/replication_mode = 1 properties/6/path = NodePath(".:_unsatisfied_orders") properties/6/spawn = false properties/6/replication_mode = 1 -properties/7/path = NodePath("Seats/Seat:visible") +properties/7/path = NodePath("Customers:visible") properties/7/spawn = false properties/7/replication_mode = 1 -properties/8/path = NodePath("Customers/Customer:visible") -properties/8/spawn = false -properties/8/replication_mode = 1 [sub_resource type="BoxShape3D" id="BoxShape3D_24d3s"] size = Vector3(0.7983472, 0.060000002, 0.59873295) diff --git a/Textures/dev_material_3d.tres b/Textures/dev_material_3d.tres index 85f8d56..c094aba 100644 --- a/Textures/dev_material_3d.tres +++ b/Textures/dev_material_3d.tres @@ -1,6 +1,6 @@ [gd_resource type="StandardMaterial3D" format=3 uid="uid://cmia50cfqxxo4"] -[ext_resource type="Texture2D" uid="uid://eqp04wybmg" path="res://Textures/devTex.svg" id="1_3jxsn"] +[ext_resource type="Texture2D" uid="uid://di387qcr5vmsp" path="res://Textures/devTex.svg" id="1_3jxsn"] [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_0gbf8"] transparency = 1 diff --git a/Textures/sky/NightSkyHDRI009_16K.tres b/Textures/sky/NightSkyHDRI009_16K.tres index eaa2922..353f006 100644 --- a/Textures/sky/NightSkyHDRI009_16K.tres +++ b/Textures/sky/NightSkyHDRI009_16K.tres @@ -1,6 +1,6 @@ [gd_resource type="Sky" format=3 uid="uid://c1abtpwhdm2d5"] -[ext_resource type="Texture2D" uid="uid://ci0hjoabnf8nu" path="res://Textures/sky/NightSkyHDRI009_16K_HDR.exr" id="acg_mft3ic9d"] +[ext_resource type="Texture2D" uid="uid://bsuhedl8ltapa" path="res://Textures/sky/NightSkyHDRI009_16K_HDR.exr" id="acg_mft3ic9d"] [sub_resource type="PanoramaSkyMaterial" id="acg_025sfqr4"] panorama = ExtResource("acg_mft3ic9d") diff --git a/documentation/Notes.md b/documentation/Notes.md index 1fbb5c8..72ace58 100644 --- a/documentation/Notes.md +++ b/documentation/Notes.md @@ -4,8 +4,8 @@ - in build mode, snap zones off, stations disabled - players can steal from each others hands - pickables being picked up is not RELIABLY synced +- sounds played on pickable in new script / node, when collides or picked_up or dropped, server tells clinetns with RPC to play sound -- frame couinter in log