Add food dispensers to shop.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
[gd_scene format=3 uid="uid://bodj8op527o2c"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://d1cefhe3yyyds" path="res://scenes/multiplayer_world.gd" id="1_6uucx"]
|
||||
[ext_resource type="Script" uid="uid://d1cefhe3yyyds" path="res://Net/multiplayer_world.gd" id="1_6uucx"]
|
||||
[ext_resource type="PackedScene" uid="uid://j5s5wus7tuhb" path="res://prefabs/XROrigin.tscn" id="2_j7vd1"]
|
||||
[ext_resource type="Material" uid="uid://cmia50cfqxxo4" path="res://textures/dev_material_3d.tres" id="3_ssbaf"]
|
||||
[ext_resource type="Sky" uid="uid://c1abtpwhdm2d5" path="res://textures/sky/NightSkyHDRI009_16K.tres" id="4_081u3"]
|
||||
@@ -34,7 +34,6 @@ size = Vector3(15, 20, 0.1)
|
||||
|
||||
[node name="Main" type="Node3D" unique_id=1312265607]
|
||||
script = ExtResource("1_6uucx")
|
||||
populate_from_layout = true
|
||||
|
||||
[node name="XROrigin3D" parent="." unique_id=2055526621 groups=["local_xr_origin"] instance=ExtResource("2_j7vd1")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.36171648, 0, 0.81835127)
|
||||
@@ -85,10 +84,10 @@ transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 7.50
|
||||
shape = SubResource("BoxShape3D_arao0")
|
||||
|
||||
[node name="Hob" parent="." unique_id=1687971542 instance=ExtResource("5_t1fa7")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.014911681, 0)
|
||||
|
||||
[node name="Sink" parent="." unique_id=2055277359 instance=ExtResource("6_6jhmh")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0.5, 0)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0.014911681, 0)
|
||||
|
||||
[node name="Plate" parent="." unique_id=190487773 instance=ExtResource("7_bowes")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.4050963, 1.1702834, 0.049627244)
|
||||
@@ -106,7 +105,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.28692234, 1.0149999, 1.1)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.40037438, 1.0094403, 1.1)
|
||||
|
||||
[node name="Counter" parent="." unique_id=1487893288 instance=ExtResource("12_j5uvh")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1, 0.5, 0)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1, 0.014911681, 0)
|
||||
|
||||
[node name="Counter2" parent="." unique_id=860178119 instance=ExtResource("12_j5uvh")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 0.5, 0)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 0.014911681, 0)
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
extends Node
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
print(get_stations())
|
||||
print(get_items())
|
||||
|
||||
|
||||
|
||||
func get_node_data(node):
|
||||
# {"scene": "res://Stations/Hob.tscn", "name": "Hob",
|
||||
# "xform": Transform3D(Basis(), Vector3(0.29336345, 0.8981018, -1.484)), "props": {}},
|
||||
var data = {}
|
||||
data["scene"] = node.scene_file_path
|
||||
data["name"] = node.name
|
||||
data["xform"] = node.transform
|
||||
data["props"] = {}
|
||||
var scrip = node.get_script()
|
||||
if scrip:
|
||||
for i in scrip.get_script_property_list():
|
||||
if i.usage & PROPERTY_USAGE_STORAGE:
|
||||
data["props"][i["name"]] = node.get(i["name"])
|
||||
return data
|
||||
|
||||
|
||||
func get_stations() -> Array[Dictionary]:
|
||||
var Stations = ResourceLoader.list_directory("res://Stations/")
|
||||
|
||||
var Stations2 = []
|
||||
for i in Stations:
|
||||
Stations2.append("res://Stations/" + i)
|
||||
Stations = Stations2
|
||||
|
||||
var Stations_nodes = []
|
||||
for i in get_tree().root.find_children("*", "StaticBody3D", true, false):
|
||||
if i.scene_file_path in Stations:
|
||||
Stations_nodes.append(i)
|
||||
|
||||
var data: Array[Dictionary] = []
|
||||
for i in Stations_nodes:
|
||||
data.append(get_node_data(i))
|
||||
return data
|
||||
|
||||
|
||||
func get_items() -> Array[Dictionary]:
|
||||
var Items = ResourceLoader.list_directory("res://Items/")
|
||||
|
||||
var Items2 = []
|
||||
for i in Items:
|
||||
Items2.append("res://Items/" + i)
|
||||
Items = Items2
|
||||
|
||||
var Items_nodes = []
|
||||
for i in get_tree().root.find_children("*", "XRToolsPickable", true, false):
|
||||
if i.scene_file_path in Items:
|
||||
Items_nodes.append(i)
|
||||
|
||||
var data: Array[Dictionary] = []
|
||||
for i in Items_nodes:
|
||||
data.append(get_node_data(i))
|
||||
return data
|
||||
@@ -0,0 +1 @@
|
||||
uid://k8ywnvlhcic4
|
||||
Reference in New Issue
Block a user