This commit is contained in:
JonShard
2026-07-28 09:24:28 +02:00
6 changed files with 340 additions and 62 deletions
+2 -1
View File
@@ -46,7 +46,7 @@ script = ExtResource("1_57ppd")
environment = SubResource("Environment_bvwq1") environment = SubResource("Environment_bvwq1")
[node name="XROrigin3D" parent="." unique_id=2055526621 instance=ExtResource("2_o1b3t")] [node name="XROrigin3D" parent="." unique_id=2055526621 instance=ExtResource("2_o1b3t")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.36171648, 0, 0.81835127) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.9667189, 0)
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="." unique_id=1376644384] [node name="DirectionalLight3D" type="DirectionalLight3D" parent="." unique_id=1376644384]
transform = Transform3D(-0.8660254, -0.43301278, 0.24999999, 0.3022632, -0.05510214, 0.9516306, -0.39829266, 0.8997021, 0.17860365, 0, 0, 0) transform = Transform3D(-0.8660254, -0.43301278, 0.24999999, 0.3022632, -0.05510214, 0.9516306, -0.39829266, 0.8997021, 0.17860365, 0, 0, 0)
@@ -81,6 +81,7 @@ shape = SubResource("BoxShape3D_24d3s")
[node name="Table" parent="." unique_id=1863572470 instance=ExtResource("16_di04w")] [node name="Table" parent="." unique_id=1863572470 instance=ExtResource("16_di04w")]
transform = Transform3D(-1, 0, 8.742277e-08, 0, 1, 0, -8.742277e-08, 0, -1, 3.6294794, 0.54177135, 0.0973109) transform = Transform3D(-1, 0, 8.742277e-08, 0, 1, 0, -8.742277e-08, 0, -1, 3.6294794, 0.54177135, 0.0973109)
thinking_duration = 35.0
primary_duration = 5.0 primary_duration = 5.0
[node name="Hob" parent="." unique_id=1687971542 instance=ExtResource("4_ctden")] [node name="Hob" parent="." unique_id=1687971542 instance=ExtResource("4_ctden")]
+110
View File
@@ -10,6 +10,9 @@ size = Vector3(0.6, 1, 0.6)
[sub_resource type="BoxShape3D" id="BoxShape3D_7uuqv"] [sub_resource type="BoxShape3D" id="BoxShape3D_7uuqv"]
size = Vector3(0.6, 0.12802735, 0.6) size = Vector3(0.6, 0.12802735, 0.6)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_di04w"]
albedo_color = Color(0, 0, 0, 1)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_gkb3v"] [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_gkb3v"]
[sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_np_hob"] [sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_np_hob"]
@@ -20,6 +23,107 @@ properties/1/path = NodePath(".:cooking_result_time")
properties/1/spawn = true properties/1/spawn = true
properties/1/replication_mode = 1 properties/1/replication_mode = 1
[sub_resource type="Animation" id="Animation_7uuqv"]
length = 0.001
tracks/0/type = "bezier"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("CSGCombiner3D/CSGTorus3D:material:albedo_color:r")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"handle_modes": PackedInt32Array(0),
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0),
"times": PackedFloat32Array(0)
}
tracks/1/type = "bezier"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("CSGCombiner3D/CSGTorus3D:material:albedo_color:g")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"handle_modes": PackedInt32Array(0),
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0),
"times": PackedFloat32Array(0)
}
tracks/2/type = "bezier"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("CSGCombiner3D/CSGTorus3D:material:albedo_color:b")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"handle_modes": PackedInt32Array(0),
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0),
"times": PackedFloat32Array(0)
}
tracks/3/type = "bezier"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("CSGCombiner3D/CSGTorus3D:material:albedo_color:a")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"handle_modes": PackedInt32Array(0),
"points": PackedFloat32Array(1, -0.25, 0, 0.25, 0),
"times": PackedFloat32Array(0)
}
[sub_resource type="Animation" id="Animation_6oyg1"]
resource_name = "hob"
loop_mode = 1
tracks/0/type = "bezier"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("CSGCombiner3D/CSGTorus3D:material:albedo_color:r")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"handle_modes": PackedInt32Array(0, 2, 2),
"points": PackedFloat32Array(0.5, -0.25, 0, 0.25, 0, 0.8, -0.083333336, 0, 0, 0, 0.5, -0.083333336, 0, 0, 0),
"times": PackedFloat32Array(0, 0.5, 1)
}
tracks/1/type = "bezier"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("CSGCombiner3D/CSGTorus3D:material:albedo_color:g")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"handle_modes": PackedInt32Array(0, 2, 2),
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0, 0, -0.083333336, 0, 0, 0, 0, -0.083333336, 0, 0, 0),
"times": PackedFloat32Array(0, 0.5, 1)
}
tracks/2/type = "bezier"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("CSGCombiner3D/CSGTorus3D:material:albedo_color:b")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"handle_modes": PackedInt32Array(0, 2, 2),
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0, 0, -0.083333336, 0, 0, 0, 0, -0.083333336, 0, 0, 0),
"times": PackedFloat32Array(0, 0.5, 1)
}
tracks/3/type = "bezier"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("CSGCombiner3D/CSGTorus3D:material:albedo_color:a")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"handle_modes": PackedInt32Array(0, 2, 2),
"points": PackedFloat32Array(1, -0.25, 0, 0.25, 0, 1, -0.083333336, 0, 0, 0, 1, -0.083333336, 0, 0, 0),
"times": PackedFloat32Array(0, 0.5, 1)
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_ac5f3"]
_data = {
&"RESET": SubResource("Animation_7uuqv"),
&"hob": SubResource("Animation_6oyg1")
}
[node name="Hob" type="StaticBody3D" unique_id=1687971542 groups=["station"]] [node name="Hob" type="StaticBody3D" unique_id=1687971542 groups=["station"]]
script = ExtResource("1_7jc4g") script = ExtResource("1_7jc4g")
@@ -56,18 +160,21 @@ transform = Transform3D(0.8943019, 0, 0, 0, 0.8943019, 0, 0, 0, 0.8943019, 0, 0.
inner_radius = 0.09153879 inner_radius = 0.09153879
outer_radius = 0.120084204 outer_radius = 0.120084204
sides = 32 sides = 32
material = SubResource("StandardMaterial3D_di04w")
[node name="CSGTorus3D" type="CSGTorus3D" parent="CSGCombiner3D" unique_id=1901978664] [node name="CSGTorus3D" type="CSGTorus3D" parent="CSGCombiner3D" unique_id=1901978664]
transform = Transform3D(0.8943019, 0, 0, 0, 0.8943019, 0, 0, 0, 0.8943019, 0, 0.5003869, -7.827557e-05) transform = Transform3D(0.8943019, 0, 0, 0, 0.8943019, 0, 0, 0, 0.8943019, 0, 0.5003869, -7.827557e-05)
inner_radius = 0.20426142 inner_radius = 0.20426142
outer_radius = 0.2321898 outer_radius = 0.2321898
sides = 32 sides = 32
material = SubResource("StandardMaterial3D_di04w")
[node name="CSGTorus3D2" type="CSGTorus3D" parent="CSGCombiner3D" unique_id=24541894] [node name="CSGTorus3D2" type="CSGTorus3D" parent="CSGCombiner3D" unique_id=24541894]
transform = Transform3D(0.8943019, 0, 0, 0, 0.8943019, 0, 0, 0, 0.8943019, 0, 0.5003869, -7.827557e-05) transform = Transform3D(0.8943019, 0, 0, 0, 0.8943019, 0, 0, 0, 0.8943019, 0, 0.5003869, -7.827557e-05)
inner_radius = 0.15036294 inner_radius = 0.15036294
outer_radius = 0.17592031 outer_radius = 0.17592031
sides = 32 sides = 32
material = SubResource("StandardMaterial3D_di04w")
[node name="CSGCylinder3D" type="CSGCylinder3D" parent="CSGCombiner3D" unique_id=1107239311] [node name="CSGCylinder3D" type="CSGCylinder3D" parent="CSGCombiner3D" unique_id=1107239311]
transform = Transform3D(0.8943019, 0, 0, 0, 0.8943019, 0, 0, 0, 0.8943019, 0, 0.4498226, -7.827557e-05) transform = Transform3D(0.8943019, 0, 0, 0, 0.8943019, 0, 0, 0, 0.8943019, 0, 0.4498226, -7.827557e-05)
@@ -121,3 +228,6 @@ replication_config = SubResource("SceneReplicationConfig_np_hob")
[node name="ProgressBar3D" parent="." unique_id=654673176 instance=ExtResource("3_7uuqv")] [node name="ProgressBar3D" parent="." unique_id=654673176 instance=ExtResource("3_7uuqv")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.74736404, -0.09216304) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.74736404, -0.09216304)
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=1525460719]
libraries/ = SubResource("AnimationLibrary_ac5f3")
+4
View File
@@ -45,10 +45,12 @@ func _on_object_picked_up(_item) -> void:
cooking_result_time = RECIPE_MANAGER.get_cooking_time(_food_item.id) cooking_result_time = RECIPE_MANAGER.get_cooking_time(_food_item.id)
print("Hob: set cooking_result ", cooking_result) print("Hob: set cooking_result ", cooking_result)
_refresh_progress_bar() _refresh_progress_bar()
$AnimationPlayer.play("hob")
func _on_object_dropped() -> void: func _on_object_dropped() -> void:
print("Hob: object drop ") print("Hob: object drop ")
$AnimationPlayer.play("RESET")
time_cooked = 0 time_cooked = 0
cooking_result = "" cooking_result = ""
cooking_result_time = 0 cooking_result_time = 0
@@ -59,6 +61,8 @@ func convert_held_to_item(_item: String) -> void:
if not NetworkManager.owns_world(): if not NetworkManager.owns_world():
return return
print("Hob converting ", _item) print("Hob converting ", _item)
$AnimationPlayer.play("RESET")
var old_pickable = snap_zone.picked_up_object var old_pickable = snap_zone.picked_up_object
if not old_pickable: if not old_pickable:
+9
View File
@@ -30,6 +30,11 @@ func _on_object_picked_up(_item) -> void:
plate = _item.get_node_or_null("PlateController") as PlateController plate = _item.get_node_or_null("PlateController") as PlateController
if plate: if plate:
is_washing = plate.is_dirty is_washing = plate.is_dirty
if is_washing:
$AnimationPlayer.play("working")
$bubbles.show()
$water.show()
$GPUParticles3D.show()
func _on_object_dropped() -> void: func _on_object_dropped() -> void:
@@ -41,6 +46,10 @@ func _reset_sink():
time_washed = 0 time_washed = 0
is_washing = false is_washing = false
plate = null plate = null
$AnimationPlayer.play("RESET")
$water.hide()
$bubbles.hide()
$GPUParticles3D.hide()
_refresh_progress_bar() _refresh_progress_bar()
func complete_washing(): func complete_washing():
+210 -25
View File
File diff suppressed because one or more lines are too long
+5 -36
View File
@@ -14,10 +14,7 @@
"854c7e1e-7521-4bcd-83ff-bb3fecec3142", "854c7e1e-7521-4bcd-83ff-bb3fecec3142",
"4e2ca8d1-84e1-4913-ad8f-834007d52160", "4e2ca8d1-84e1-4913-ad8f-834007d52160",
"dd822d14-88e5-4790-808e-7d2cf7f79133", "dd822d14-88e5-4790-808e-7d2cf7f79133",
"784d5cd3-333a-40a9-b35f-3d0c73f00761", "784d5cd3-333a-40a9-b35f-3d0c73f00761"
"21bc19f1-ee3c-4bbb-ab9a-07ec6123a823",
"d93a31cd-d475-4c5a-87fc-983174b2594f",
"9d7ecbc4-db2a-4d09-9f40-ceed3cf98c00"
] ]
}, },
{ {
@@ -30,10 +27,7 @@
{ {
"uuid": "fab8a81b-7ca9-4026-96bb-ed66ea58ef2e", "uuid": "fab8a81b-7ca9-4026-96bb-ed66ea58ef2e",
"title": "Doing", "title": "Doing",
"tasks": [ "tasks": []
"f8073eb2-8786-47b7-b63f-fa70c3f7115a",
"caf459e5-bb88-47dd-bf15-254a3d70c30f"
]
}, },
{ {
"uuid": "0d743057-955a-473a-8123-a3f805505d5d", "uuid": "0d743057-955a-473a-8123-a3f805505d5d",
@@ -41,6 +35,9 @@
"tasks": [ "tasks": [
"0dd511cd-592c-4334-afd8-c511bd36b7d0", "0dd511cd-592c-4334-afd8-c511bd36b7d0",
"6942c45a-53a4-484f-9885-4f249cb4572b", "6942c45a-53a4-484f-9885-4f249cb4572b",
"f8073eb2-8786-47b7-b63f-fa70c3f7115a",
"21bc19f1-ee3c-4bbb-ab9a-07ec6123a823",
"d93a31cd-d475-4c5a-87fc-983174b2594f",
"a4dd35ae-dc8e-42a3-9044-bf1cb1af281a", "a4dd35ae-dc8e-42a3-9044-bf1cb1af281a",
"7883d015-f065-4b18-a2ab-e2a0daa9dc81", "7883d015-f065-4b18-a2ab-e2a0daa9dc81",
"1c3b9543-cb67-431d-bf71-c8753e816776", "1c3b9543-cb67-431d-bf71-c8753e816776",
@@ -246,34 +243,6 @@
"description": "", "description": "",
"category": "bf4ec62e-526e-4027-876f-0b22bd17f79a", "category": "bf4ec62e-526e-4027-876f-0b22bd17f79a",
"steps": [] "steps": []
},
{
"uuid": "9d7ecbc4-db2a-4d09-9f40-ceed3cf98c00",
"title": "Add test that a hob can chain cook",
"description": "",
"category": "bf4ec62e-526e-4027-876f-0b22bd17f79a",
"steps": []
},
{
"uuid": "0dd511cd-592c-4334-afd8-c511bd36b7d0",
"title": "Plates should snap onto Meals in a station",
"description": "Trowing a plate onto a hamburger on a hob should result in a plated hamburger",
"category": "bf4ec62e-526e-4027-876f-0b22bd17f79a",
"steps": []
},
{
"uuid": "7883d015-f065-4b18-a2ab-e2a0daa9dc81",
"title": "Snap_zones should abosrb any item in range",
"description": "",
"category": "bf4ec62e-526e-4027-876f-0b22bd17f79a",
"steps": []
},
{
"uuid": "caf459e5-bb88-47dd-bf15-254a3d70c30f",
"title": "Station Snap_zones should cover the whole station",
"description": "",
"category": "bf4ec62e-526e-4027-876f-0b22bd17f79a",
"steps": []
} }
], ],
"layout": { "layout": {