Reorganize project into folder structure

This commit is contained in:
JonShard
2026-07-16 15:09:12 +02:00
parent 4b8e017d64
commit e27ddfe3f1
33 changed files with 156 additions and 70 deletions
+60
View File
@@ -0,0 +1,60 @@
extends Node3D
@export var target_group : String # Items with this tag can be added to the container
@export var meal_positions: Array[Node3D] = []
@export var side_positions: Array[Node3D] = []
@onready var area_3d: Area3D = $Area3D
@onready var xr_pickable: XRToolsPickable = get_parent() as XRToolsPickable
@onready var _meal_container: Node3D = $MealContainer
@onready var _sides_container: Node3D = $SidesContainer
var contained_items: Array[FoodItem]
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
area_3d.body_entered.connect(_on_body_entered)
if not area_3d:
push_error("Area3D node not found in container.gd")
if not xr_pickable:
push_error("XRPickable node not found in container.gd")
func _on_body_entered (body) -> void:
if not body.is_in_group(target_group):
return
print("Body is platable: %s" % body.name)
var picked_by = xr_pickable.get_picked_up_by()
if picked_by and picked_by.is_in_group("station"):
print("Container in station")
var food_item = body.get_node("FoodItem")
if food_item.type == FoodItem.Type.MEAL or food_item.type == FoodItem.Type.SIDE:
print("Food is meal or side!")
# if we're full of that type:
# return
# body disble pickable
# container parent to self
# body set position to apropriate slot
pass
#plate (Pickalbe)
#XRGrapPoints
#container (script) (meal positions[1], side positions[4])
#area
#meals
#meal - burger
#sides
#side - chips
#side - onion rings
#tray (Pickalbe)
#XRGrapPoints
#container (script) (meal positions[4], side positions[0])
#food items
#meals
#meal - cookie
#meal - cookie
#meal - cookie
#meal - cookie
+1
View File
@@ -0,0 +1 @@
uid://6lyhyial1fh5
+21
View File
@@ -0,0 +1,21 @@
[gd_scene format=3 uid="uid://du31pqeytu8as"]
[ext_resource type="Script" uid="uid://6lyhyial1fh5" path="res://Containers/container.gd" id="1_r4cle"]
[sub_resource type="SphereShape3D" id="SphereShape3D_vlqg6"]
radius = 0.2
[node name="Container" type="Node3D" unique_id=377793422 node_paths=PackedStringArray("meal_positions")]
script = ExtResource("1_r4cle")
meal_positions = [null]
[node name="Area3D" type="Area3D" parent="." unique_id=126983781]
collision_layer = 2
collision_mask = 65540
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D" unique_id=286964882]
shape = SubResource("SphereShape3D_vlqg6")
[node name="MealContainer" type="Node3D" parent="." unique_id=258551044]
[node name="SidesContainer" type="Node3D" parent="." unique_id=1464979199]
+85
View File
@@ -0,0 +1,85 @@
[gd_scene format=3 uid="uid://bp3v1jl8pctro"]
[ext_resource type="Script" uid="uid://bfrlpbsqg5lqr" path="res://addons/godot-xr-tools/objects/pickable.gd" id="1_nq5sa"]
[ext_resource type="PackedScene" uid="uid://du31pqeytu8as" path="res://Containers/container.tscn" id="1_s5yhh"]
[ext_resource type="PackedScene" uid="uid://c25yxb0vt53vc" path="res://addons/godot-xr-tools/objects/grab_points/grab_point_hand_left.tscn" id="2_3bkoa"]
[ext_resource type="Animation" uid="uid://db62hs5s4n2b3" path="res://addons/godot-xr-tools/hands/animations/left/Grip 4.res" id="3_6v47p"]
[ext_resource type="Script" uid="uid://dvobm6vcfnqe8" path="res://addons/godot-xr-tools/hands/poses/hand_pose_settings.gd" id="4_dhtvl"]
[ext_resource type="PackedScene" uid="uid://ctw7nbntd5pcj" path="res://addons/godot-xr-tools/objects/grab_points/grab_point_hand_right.tscn" id="5_vlcpl"]
[ext_resource type="Animation" uid="uid://d1xnpyc08njjx" path="res://addons/godot-xr-tools/hands/animations/right/Grip 4.res" id="6_el51w"]
[sub_resource type="CylinderShape3D" id="CylinderShape3D_kek77"]
height = 0.0635376
radius = 0.20996094
[sub_resource type="Resource" id="Resource_2hcq0"]
script = ExtResource("4_dhtvl")
closed_pose = ExtResource("3_6v47p")
metadata/_custom_type_script = "uid://dvobm6vcfnqe8"
[sub_resource type="Resource" id="Resource_dlngj"]
script = ExtResource("4_dhtvl")
closed_pose = ExtResource("6_el51w")
metadata/_custom_type_script = "uid://dvobm6vcfnqe8"
[node name="Plate" type="RigidBody3D" unique_id=190487773]
collision_layer = 4
collision_mask = 196615
freeze_mode = 1
script = ExtResource("1_nq5sa")
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=1365637864]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.007171631, 0)
shape = SubResource("CylinderShape3D_kek77")
[node name="CSGCombiner3D" type="CSGCombiner3D" parent="." unique_id=1767596918]
autosmooth = true
smoothing_angle = 103.9
[node name="CSGCylinder3D" type="CSGCylinder3D" parent="CSGCombiner3D" unique_id=410722205]
radius = 0.2
height = 0.03
sides = 16
[node name="CSGCylinder3D" type="CSGCylinder3D" parent="CSGCombiner3D/CSGCylinder3D" unique_id=1041060379]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.010312311, 0)
operation = 2
radius = 0.15
height = 0.03
sides = 16
[node name="CSGCylinder3D2" type="CSGCylinder3D" parent="CSGCombiner3D" unique_id=1827566539]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.027119078, 0)
radius = 0.15
height = 0.02
[node name="GrabPointHandLeft" parent="." unique_id=317886291 instance=ExtResource("2_3bkoa")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.1699356, 0.04601878, -0.08606844)
hand_pose = SubResource("Resource_2hcq0")
[node name="GrabPointHandRight" parent="." unique_id=248026585 instance=ExtResource("5_vlcpl")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.16517048, 0.042291984, -0.08604182)
hand_pose = SubResource("Resource_dlngj")
[node name="Container" parent="." unique_id=377793422 node_paths=PackedStringArray("meal_positions", "side_positions") instance=ExtResource("1_s5yhh")]
target_group = "platalbe_item"
meal_positions = [NodePath("MealPositions/Slot1")]
side_positions = [NodePath("SidePositions/Slot1"), NodePath("SidePositions/Slot2"), NodePath("SidePositions/Slot3"), NodePath("SidePositions/Slot4")]
[node name="MealPositions" type="Node3D" parent="Container" unique_id=1682052877]
[node name="Slot1" type="Node3D" parent="Container/MealPositions" unique_id=306927548]
[node name="SidePositions" type="Node3D" parent="Container" unique_id=1112098031]
[node name="Slot1" type="Node3D" parent="Container/SidePositions" unique_id=1314895915]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.05862564, 0, -0.098608926)
[node name="Slot2" type="Node3D" parent="Container/SidePositions" unique_id=46117678]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.090641126, 0, -0.08815916)
[node name="Slot3" type="Node3D" parent="Container/SidePositions" unique_id=1994697744]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.08457637, 0, 0.08950478)
[node name="Slot4" type="Node3D" parent="Container/SidePositions" unique_id=379534402]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.06938871, 0, 0.072598234)