Added loading/saving of built structures.

main
Martin Felis 2024-10-18 12:01:15 +02:00
parent 6b43d383fb
commit f20150d225
52 changed files with 243 additions and 174 deletions

View File

@ -1,13 +1,15 @@
[gd_scene load_steps=3 format=3 uid="uid://cofd468cwkntk"] [gd_scene load_steps=4 format=3 uid="uid://cofd468cwkntk"]
[ext_resource type="PackedScene" uid="uid://ei8n2wngiry4" path="res://assets/3rdparty/kenney/survival-kit/Models/campfire.glb" id="1_6jb5g"] [ext_resource type="PackedScene" uid="uid://ei8n2wngiry4" path="res://assets/3rdparty/kenney/survival-kit/Models/campfire.glb" id="1_6jb5g"]
[ext_resource type="Script" path="res://objects/built_structure.gd" id="1_asprp"]
[sub_resource type="CylinderShape3D" id="CylinderShape3D_ui8hn"] [sub_resource type="CylinderShape3D" id="CylinderShape3D_ui8hn"]
height = 0.4 height = 0.4
radius = 0.25 radius = 0.25
[node name="Node3D" type="StaticBody3D"] [node name="CampfirePit" type="StaticBody3D"]
collision_layer = 33 collision_layer = 33
script = ExtResource("1_asprp")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."] [node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.193627, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.193627, 0)

View File

@ -1,12 +1,14 @@
[gd_scene load_steps=3 format=3 uid="uid://dv60qx8nqw3vg"] [gd_scene load_steps=4 format=3 uid="uid://dv60qx8nqw3vg"]
[ext_resource type="PackedScene" uid="uid://cg5cy35mk8nba" path="res://assets/3rdparty/kenney/survival-kit/Models/fence-fortified.glb" id="1_dy1c1"] [ext_resource type="PackedScene" uid="uid://cg5cy35mk8nba" path="res://assets/3rdparty/kenney/survival-kit/Models/fence-fortified.glb" id="1_dy1c1"]
[ext_resource type="Script" path="res://objects/built_structure.gd" id="1_mgd5t"]
[sub_resource type="BoxShape3D" id="BoxShape3D_kha47"] [sub_resource type="BoxShape3D" id="BoxShape3D_kha47"]
size = Vector3(0.52, 0.52, 0.1) size = Vector3(0.52, 0.52, 0.1)
[node name="Fence" type="StaticBody3D"] [node name="Fence" type="StaticBody3D"]
collision_layer = 33 collision_layer = 33
script = ExtResource("1_mgd5t")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."] [node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.25949, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.25949, 0)

View File

@ -1,12 +1,14 @@
[gd_scene load_steps=3 format=3 uid="uid://bfn60u0e11o8u"] [gd_scene load_steps=4 format=3 uid="uid://bfn60u0e11o8u"]
[ext_resource type="PackedScene" uid="uid://putll6r03s1i" path="res://assets/3rdparty/kenney/survival-kit/Models/floor.glb" id="1_1rqyd"] [ext_resource type="PackedScene" uid="uid://putll6r03s1i" path="res://assets/3rdparty/kenney/survival-kit/Models/floor.glb" id="1_1rqyd"]
[ext_resource type="Script" path="res://objects/built_structure.gd" id="1_ugnjg"]
[sub_resource type="BoxShape3D" id="BoxShape3D_huqhw"] [sub_resource type="BoxShape3D" id="BoxShape3D_huqhw"]
size = Vector3(0.52, 0.034, 0.52) size = Vector3(0.52, 0.034, 0.52)
[node name="Floor" type="StaticBody3D"] [node name="Floor" type="StaticBody3D"]
collision_layer = 33 collision_layer = 33
script = ExtResource("1_ugnjg")
[node name="Geometry" parent="." instance=ExtResource("1_1rqyd")] [node name="Geometry" parent="." instance=ExtResource("1_1rqyd")]

View File

@ -1,5 +1,6 @@
[gd_scene load_steps=3 format=3 uid="uid://da8vh0auq4p3l"] [gd_scene load_steps=4 format=3 uid="uid://da8vh0auq4p3l"]
[ext_resource type="Script" path="res://objects/built_structure.gd" id="1_8rsir"]
[ext_resource type="PackedScene" uid="uid://b80niojlha8e" path="res://assets/3rdparty/kenney/survival-kit/Models/workbench.glb" id="1_nfc4u"] [ext_resource type="PackedScene" uid="uid://b80niojlha8e" path="res://assets/3rdparty/kenney/survival-kit/Models/workbench.glb" id="1_nfc4u"]
[sub_resource type="BoxShape3D" id="BoxShape3D_lq0et"] [sub_resource type="BoxShape3D" id="BoxShape3D_lq0et"]
@ -7,6 +8,7 @@ size = Vector3(0.3, 0.25, 0.3)
[node name="Workbench" type="StaticBody3D"] [node name="Workbench" type="StaticBody3D"]
collision_layer = 33 collision_layer = 33
script = ExtResource("1_8rsir")
[node name="workbench" parent="." instance=ExtResource("1_nfc4u")] [node name="workbench" parent="." instance=ExtResource("1_nfc4u")]

View File

@ -1,7 +1,7 @@
[gd_resource type="Resource" script_class="Item" load_steps=4 format=3 uid="uid://cktn5p1wetkve"] [gd_resource type="Resource" script_class="ItemResource" load_steps=4 format=3 uid="uid://cktn5p1wetkve"]
[ext_resource type="Texture2D" uid="uid://myyurouw1kui" path="res://assets/tools/Axe.png" id="1_dlqed"] [ext_resource type="Texture2D" uid="uid://myyurouw1kui" path="res://assets/tools/Axe.png" id="1_dlqed"]
[ext_resource type="Script" path="res://model/item.gd" id="1_tec3u"] [ext_resource type="Script" path="res://model/item_resource.gd" id="1_tec3u"]
[ext_resource type="PackedScene" uid="uid://d2m3w0egvoh22" path="res://assets/tools/Axe.tscn" id="2_ju1vu"] [ext_resource type="PackedScene" uid="uid://d2m3w0egvoh22" path="res://assets/tools/Axe.tscn" id="2_ju1vu"]
[resource] [resource]

View File

@ -1,7 +1,7 @@
[gd_resource type="Resource" script_class="Item" load_steps=4 format=3 uid="uid://qelpkmqsqo5r"] [gd_resource type="Resource" script_class="ItemResource" load_steps=4 format=3 uid="uid://qelpkmqsqo5r"]
[ext_resource type="Texture2D" uid="uid://brf5tnxgpd771" path="res://assets/3rdparty/kenney/survival-kit/Previews/campfire.png" id="1_6eclp"] [ext_resource type="Texture2D" uid="uid://brf5tnxgpd771" path="res://assets/3rdparty/kenney/survival-kit/Previews/campfire.png" id="1_6eclp"]
[ext_resource type="Script" path="res://model/item.gd" id="1_ib1kl"] [ext_resource type="Script" path="res://model/item_resource.gd" id="1_ib1kl"]
[ext_resource type="PackedScene" uid="uid://cofd468cwkntk" path="res://assets/items/campfire_pit.tscn" id="2_pyecx"] [ext_resource type="PackedScene" uid="uid://cofd468cwkntk" path="res://assets/items/campfire_pit.tscn" id="2_pyecx"]
[resource] [resource]
@ -12,3 +12,4 @@ icon = ExtResource("1_6eclp")
max_stack_size = 1 max_stack_size = 1
is_tool = false is_tool = false
is_buildable = true is_buildable = true
tool_action = 0

View File

@ -1,7 +1,7 @@
[gd_resource type="Resource" script_class="Item" load_steps=4 format=3 uid="uid://bob26ycbled6r"] [gd_resource type="Resource" script_class="ItemResource" load_steps=4 format=3 uid="uid://bob26ycbled6r"]
[ext_resource type="Texture2D" uid="uid://b7ip5162fo6jc" path="res://assets/tools/Dagger.png" id="1_afk8v"] [ext_resource type="Texture2D" uid="uid://b7ip5162fo6jc" path="res://assets/tools/Dagger.png" id="1_afk8v"]
[ext_resource type="Script" path="res://model/item.gd" id="1_p2ipn"] [ext_resource type="Script" path="res://model/item_resource.gd" id="1_p2ipn"]
[ext_resource type="PackedScene" uid="uid://d0gvv2ddnk8gf" path="res://assets/tools/Dagger.tscn" id="2_xqhva"] [ext_resource type="PackedScene" uid="uid://d0gvv2ddnk8gf" path="res://assets/tools/Dagger.tscn" id="2_xqhva"]
[resource] [resource]

View File

@ -1,7 +1,7 @@
[gd_resource type="Resource" script_class="Item" load_steps=4 format=3 uid="uid://c714vj3s6cnqg"] [gd_resource type="Resource" script_class="ItemResource" load_steps=4 format=3 uid="uid://c714vj3s6cnqg"]
[ext_resource type="Texture2D" uid="uid://d4cjmc3svg7ie" path="res://assets/items/fence_fortified.png" id="1_hyv8l"] [ext_resource type="Texture2D" uid="uid://d4cjmc3svg7ie" path="res://assets/items/fence_fortified.png" id="1_hyv8l"]
[ext_resource type="Script" path="res://model/item.gd" id="1_u43c0"] [ext_resource type="Script" path="res://model/item_resource.gd" id="1_u43c0"]
[ext_resource type="PackedScene" uid="uid://dv60qx8nqw3vg" path="res://assets/items/fence_fortified.tscn" id="2_8ttdv"] [ext_resource type="PackedScene" uid="uid://dv60qx8nqw3vg" path="res://assets/items/fence_fortified.tscn" id="2_8ttdv"]
[resource] [resource]

View File

@ -1,7 +1,7 @@
[gd_resource type="Resource" script_class="Item" load_steps=4 format=3 uid="uid://cepy03xrewibs"] [gd_resource type="Resource" script_class="ItemResource" load_steps=4 format=3 uid="uid://cepy03xrewibs"]
[ext_resource type="Texture2D" uid="uid://cwplac1y0x13c" path="res://assets/items/floor.png" id="1_fe6dh"] [ext_resource type="Texture2D" uid="uid://cwplac1y0x13c" path="res://assets/items/floor.png" id="1_fe6dh"]
[ext_resource type="Script" path="res://model/item.gd" id="1_piayo"] [ext_resource type="Script" path="res://model/item_resource.gd" id="1_piayo"]
[ext_resource type="PackedScene" uid="uid://bfn60u0e11o8u" path="res://assets/items/floor.tscn" id="2_1360y"] [ext_resource type="PackedScene" uid="uid://bfn60u0e11o8u" path="res://assets/items/floor.tscn" id="2_1360y"]
[resource] [resource]

View File

@ -1,6 +1,6 @@
[gd_resource type="Resource" script_class="Item" load_steps=4 format=3 uid="uid://cwerasgcfgx2p"] [gd_resource type="Resource" script_class="ItemResource" load_steps=4 format=3 uid="uid://cwerasgcfgx2p"]
[ext_resource type="Script" path="res://model/item.gd" id="1_l1bb7"] [ext_resource type="Script" path="res://model/item_resource.gd" id="1_l1bb7"]
[ext_resource type="Texture2D" uid="uid://dscbd8iuo4jhs" path="res://assets/tools/Hammer.png" id="1_qwgnj"] [ext_resource type="Texture2D" uid="uid://dscbd8iuo4jhs" path="res://assets/tools/Hammer.png" id="1_qwgnj"]
[ext_resource type="PackedScene" uid="uid://bimt3mc3d7th2" path="res://assets/tools/Hammer.tscn" id="2_pwblf"] [ext_resource type="PackedScene" uid="uid://bimt3mc3d7th2" path="res://assets/tools/Hammer.tscn" id="2_pwblf"]

View File

@ -1,8 +1,8 @@
[gd_resource type="Resource" script_class="Item" load_steps=4 format=3 uid="uid://det51k1t422rq"] [gd_resource type="Resource" script_class="ItemResource" load_steps=4 format=3 uid="uid://det51k1t422rq"]
[ext_resource type="PackedScene" uid="uid://ca2l61b2j3y5b" path="res://assets/tools/Pickaxe.tscn" id="1_hcgy2"] [ext_resource type="PackedScene" uid="uid://ca2l61b2j3y5b" path="res://assets/tools/Pickaxe.tscn" id="1_hcgy2"]
[ext_resource type="Texture2D" uid="uid://ojsbkfjeu088" path="res://assets/3rdparty/kenney/survival-kit/Previews/toolPickaxe.png" id="1_n8kbr"] [ext_resource type="Texture2D" uid="uid://ojsbkfjeu088" path="res://assets/3rdparty/kenney/survival-kit/Previews/toolPickaxe.png" id="1_n8kbr"]
[ext_resource type="Script" path="res://model/item.gd" id="1_pmsv1"] [ext_resource type="Script" path="res://model/item_resource.gd" id="1_pmsv1"]
[resource] [resource]
resource_name = "Pickaxe" resource_name = "Pickaxe"

View File

@ -1,6 +1,6 @@
[gd_resource type="Resource" script_class="Item" load_steps=4 format=3 uid="uid://mkj3oeaxvltq"] [gd_resource type="Resource" script_class="ItemResource" load_steps=4 format=3 uid="uid://mkj3oeaxvltq"]
[ext_resource type="Script" path="res://model/item.gd" id="1_0t4oi"] [ext_resource type="Script" path="res://model/item_resource.gd" id="1_0t4oi"]
[ext_resource type="PackedScene" uid="uid://dmvl0igyslm80" path="res://assets/tools/Shovel.tscn" id="1_fne3r"] [ext_resource type="PackedScene" uid="uid://dmvl0igyslm80" path="res://assets/tools/Shovel.tscn" id="1_fne3r"]
[ext_resource type="Texture2D" uid="uid://bpdo7iq3saec5" path="res://assets/3rdparty/kenney/survival-kit/Previews/toolShovel.png" id="1_oaqa4"] [ext_resource type="Texture2D" uid="uid://bpdo7iq3saec5" path="res://assets/3rdparty/kenney/survival-kit/Previews/toolShovel.png" id="1_oaqa4"]

View File

@ -1,8 +1,8 @@
[gd_resource type="Resource" script_class="Item" load_steps=4 format=3 uid="uid://bn5j38jbwlj1f"] [gd_resource type="Resource" script_class="ItemResource" load_steps=4 format=3 uid="uid://bn5j38jbwlj1f"]
[ext_resource type="Texture2D" uid="uid://c3jmpy6x5m4gj" path="res://assets/3rdparty/kenney/survival-kit/Previews/resourceWood.png" id="1_c3g8n"] [ext_resource type="Texture2D" uid="uid://c3jmpy6x5m4gj" path="res://assets/3rdparty/kenney/survival-kit/Previews/resourceWood.png" id="1_c3g8n"]
[ext_resource type="PackedScene" uid="uid://dtd7p4wjaumae" path="res://assets/items/stick.tscn" id="2_mrxum"] [ext_resource type="PackedScene" uid="uid://dtd7p4wjaumae" path="res://assets/items/stick.tscn" id="2_mrxum"]
[ext_resource type="Script" path="res://model/item.gd" id="3_45lxd"] [ext_resource type="Script" path="res://model/item_resource.gd" id="3_45lxd"]
[resource] [resource]
resource_name = "Stick" resource_name = "Stick"

View File

@ -1,6 +1,6 @@
[gd_resource type="Resource" script_class="Item" load_steps=4 format=3 uid="uid://fsfgxiy8ynye"] [gd_resource type="Resource" script_class="ItemResource" load_steps=4 format=3 uid="uid://fsfgxiy8ynye"]
[ext_resource type="Script" path="res://model/item.gd" id="1_dao2u"] [ext_resource type="Script" path="res://model/item_resource.gd" id="1_dao2u"]
[ext_resource type="Texture2D" uid="uid://g3681g7x22eg" path="res://assets/3rdparty/kenney/survival-kit/Previews/resourceStone.png" id="1_t2qva"] [ext_resource type="Texture2D" uid="uid://g3681g7x22eg" path="res://assets/3rdparty/kenney/survival-kit/Previews/resourceStone.png" id="1_t2qva"]
[ext_resource type="PackedScene" uid="uid://lp0bgqyd2pnr" path="res://assets/items/stone.tscn" id="2_6nus0"] [ext_resource type="PackedScene" uid="uid://lp0bgqyd2pnr" path="res://assets/items/stone.tscn" id="2_6nus0"]

View File

@ -1,7 +1,7 @@
[gd_resource type="Resource" script_class="Item" load_steps=4 format=3 uid="uid://cbitlk81jxwfa"] [gd_resource type="Resource" script_class="ItemResource" load_steps=4 format=3 uid="uid://cbitlk81jxwfa"]
[ext_resource type="Texture2D" uid="uid://dudsmx6hrni7v" path="res://assets/tools/Sword.png" id="1_gprhx"] [ext_resource type="Texture2D" uid="uid://dudsmx6hrni7v" path="res://assets/tools/Sword.png" id="1_gprhx"]
[ext_resource type="Script" path="res://model/item.gd" id="1_pr3as"] [ext_resource type="Script" path="res://model/item_resource.gd" id="1_pr3as"]
[ext_resource type="PackedScene" uid="uid://b0hxoadcvbumx" path="res://assets/tools/Sword.tscn" id="2_ym223"] [ext_resource type="PackedScene" uid="uid://b0hxoadcvbumx" path="res://assets/tools/Sword.tscn" id="2_ym223"]
[resource] [resource]

View File

@ -1,7 +1,7 @@
[gd_resource type="Resource" script_class="Item" load_steps=4 format=3 uid="uid://c1ll2snhgv3m1"] [gd_resource type="Resource" script_class="ItemResource" load_steps=4 format=3 uid="uid://c1ll2snhgv3m1"]
[ext_resource type="Texture2D" uid="uid://16ro4vt2obea" path="res://assets/items/tree_log.png" id="1_ak0y2"] [ext_resource type="Texture2D" uid="uid://16ro4vt2obea" path="res://assets/items/tree_log.png" id="1_ak0y2"]
[ext_resource type="Script" path="res://model/item.gd" id="1_tlj5a"] [ext_resource type="Script" path="res://model/item_resource.gd" id="1_tlj5a"]
[ext_resource type="PackedScene" uid="uid://bbmt7xom1j84b" path="res://assets/items/tree_log.tscn" id="2_ufvdy"] [ext_resource type="PackedScene" uid="uid://bbmt7xom1j84b" path="res://assets/items/tree_log.tscn" id="2_ufvdy"]
[resource] [resource]

View File

@ -1,8 +1,8 @@
[gd_resource type="Resource" script_class="Item" load_steps=4 format=3 uid="uid://dmjr6pmb17l2y"] [gd_resource type="Resource" script_class="ItemResource" load_steps=4 format=3 uid="uid://dmjr6pmb17l2y"]
[ext_resource type="Texture2D" uid="uid://52wdejv20ogj" path="res://assets/items/wood_planks.png" id="1_plody"] [ext_resource type="Texture2D" uid="uid://52wdejv20ogj" path="res://assets/items/wood_planks.png" id="1_plody"]
[ext_resource type="PackedScene" uid="uid://ysfnsrvgemi6" path="res://assets/items/wood_planks.tscn" id="2_4oehn"] [ext_resource type="PackedScene" uid="uid://ysfnsrvgemi6" path="res://assets/items/wood_planks.tscn" id="2_4oehn"]
[ext_resource type="Script" path="res://model/item.gd" id="3_c8yxb"] [ext_resource type="Script" path="res://model/item_resource.gd" id="3_c8yxb"]
[resource] [resource]
script = ExtResource("3_c8yxb") script = ExtResource("3_c8yxb")

View File

@ -1,6 +1,6 @@
[gd_resource type="Resource" script_class="Item" load_steps=4 format=3 uid="uid://kywjkeu5tnjp"] [gd_resource type="Resource" script_class="ItemResource" load_steps=4 format=3 uid="uid://kywjkeu5tnjp"]
[ext_resource type="Script" path="res://model/item.gd" id="1_1ujll"] [ext_resource type="Script" path="res://model/item_resource.gd" id="1_1ujll"]
[ext_resource type="Texture2D" uid="uid://ch086r5ba07yn" path="res://assets/3rdparty/kenney/survival-kit/Previews/workbench.png" id="1_fxuxp"] [ext_resource type="Texture2D" uid="uid://ch086r5ba07yn" path="res://assets/3rdparty/kenney/survival-kit/Previews/workbench.png" id="1_fxuxp"]
[ext_resource type="PackedScene" uid="uid://da8vh0auq4p3l" path="res://assets/items/workbench.tscn" id="2_ucmwx"] [ext_resource type="PackedScene" uid="uid://da8vh0auq4p3l" path="res://assets/items/workbench.tscn" id="2_ucmwx"]

View File

@ -1,8 +1,8 @@
[gd_resource type="Resource" script_class="Item" load_steps=4 format=3 uid="uid://egkatj1ci0ga"] [gd_resource type="Resource" script_class="ItemResource" load_steps=4 format=3 uid="uid://egkatj1ci0ga"]
[ext_resource type="Texture2D" uid="uid://bfvn4i4ftg4bu" path="res://assets/tools/Wrench.png" id="1_b5epx"] [ext_resource type="Texture2D" uid="uid://bfvn4i4ftg4bu" path="res://assets/tools/Wrench.png" id="1_b5epx"]
[ext_resource type="PackedScene" uid="uid://cum7lrtovcvk3" path="res://assets/tools/Wrench.tscn" id="2_8uss6"] [ext_resource type="PackedScene" uid="uid://cum7lrtovcvk3" path="res://assets/tools/Wrench.tscn" id="2_8uss6"]
[ext_resource type="Script" path="res://model/item.gd" id="3_gt0gt"] [ext_resource type="Script" path="res://model/item_resource.gd" id="3_gt0gt"]
[resource] [resource]
resource_name = "Pickaxe" resource_name = "Pickaxe"

View File

@ -1,11 +1,11 @@
[gd_resource type="Resource" script_class="Recipe" load_steps=4 format=3 uid="uid://cj1poskbv5n4g"] [gd_resource type="Resource" script_class="RecipeResource" load_steps=4 format=3 uid="uid://cj1poskbv5n4g"]
[ext_resource type="Resource" uid="uid://bn5j38jbwlj1f" path="res://data/items/stick.tres" id="1_c6ol1"] [ext_resource type="Resource" uid="uid://bn5j38jbwlj1f" path="res://data/items/stick.tres" id="1_c6ol1"]
[ext_resource type="Script" path="res://model/recipe.gd" id="1_q0xgv"] [ext_resource type="Script" path="res://model/recipe_resource.gd" id="1_q0xgv"]
[ext_resource type="Resource" uid="uid://qelpkmqsqo5r" path="res://data/items/campfire_pit.tres" id="2_xeckb"] [ext_resource type="Resource" uid="uid://qelpkmqsqo5r" path="res://data/items/campfire_pit.tres" id="2_xeckb"]
[resource] [resource]
script = ExtResource("1_q0xgv") script = ExtResource("1_q0xgv")
name = "Campfire" name = "Campfire"
ingredients = Array[Resource("res://model/item.gd")]([ExtResource("1_c6ol1"), ExtResource("1_c6ol1"), ExtResource("1_c6ol1")]) ingredients = Array[Resource("res://model/item_resource.gd")]([ExtResource("1_c6ol1"), ExtResource("1_c6ol1"), ExtResource("1_c6ol1")])
results = Array[Resource("res://model/item.gd")]([ExtResource("2_xeckb")]) results = Array[Resource("res://model/item_resource.gd")]([ExtResource("2_xeckb")])

View File

@ -1,6 +1,6 @@
[gd_resource type="Resource" script_class="Recipe" load_steps=5 format=3 uid="uid://dtlb5wp5shlm3"] [gd_resource type="Resource" script_class="RecipeResource" load_steps=5 format=3 uid="uid://dtlb5wp5shlm3"]
[ext_resource type="Script" path="res://model/recipe.gd" id="1_h0rj4"] [ext_resource type="Script" path="res://model/recipe_resource.gd" id="1_h0rj4"]
[ext_resource type="Resource" uid="uid://bn5j38jbwlj1f" path="res://data/items/stick.tres" id="1_i6g7d"] [ext_resource type="Resource" uid="uid://bn5j38jbwlj1f" path="res://data/items/stick.tres" id="1_i6g7d"]
[ext_resource type="Resource" uid="uid://dmjr6pmb17l2y" path="res://data/items/woodplanks.tres" id="2_d54b6"] [ext_resource type="Resource" uid="uid://dmjr6pmb17l2y" path="res://data/items/woodplanks.tres" id="2_d54b6"]
[ext_resource type="Resource" uid="uid://c714vj3s6cnqg" path="res://data/items/fence_fortified.tres" id="3_bsd6g"] [ext_resource type="Resource" uid="uid://c714vj3s6cnqg" path="res://data/items/fence_fortified.tres" id="3_bsd6g"]
@ -8,5 +8,5 @@
[resource] [resource]
script = ExtResource("1_h0rj4") script = ExtResource("1_h0rj4")
name = "Fence Fortified" name = "Fence Fortified"
ingredients = Array[Resource("res://model/item.gd")]([ExtResource("1_i6g7d"), ExtResource("1_i6g7d"), ExtResource("2_d54b6")]) ingredients = Array[Resource("res://model/item_resource.gd")]([ExtResource("1_i6g7d"), ExtResource("1_i6g7d"), ExtResource("2_d54b6")])
results = Array[Resource("res://model/item.gd")]([ExtResource("3_bsd6g")]) results = Array[Resource("res://model/item_resource.gd")]([ExtResource("3_bsd6g")])

View File

@ -1,11 +1,11 @@
[gd_resource type="Resource" script_class="Recipe" load_steps=4 format=3 uid="uid://dbij72n3ia8te"] [gd_resource type="Resource" script_class="RecipeResource" load_steps=4 format=3 uid="uid://dbij72n3ia8te"]
[ext_resource type="Script" path="res://model/recipe.gd" id="1_sqajm"] [ext_resource type="Script" path="res://model/recipe_resource.gd" id="1_sqajm"]
[ext_resource type="Resource" uid="uid://dmjr6pmb17l2y" path="res://data/items/woodplanks.tres" id="1_y7d3a"] [ext_resource type="Resource" uid="uid://dmjr6pmb17l2y" path="res://data/items/woodplanks.tres" id="1_y7d3a"]
[ext_resource type="Resource" uid="uid://cepy03xrewibs" path="res://data/items/floor.tres" id="2_m3y1r"] [ext_resource type="Resource" uid="uid://cepy03xrewibs" path="res://data/items/floor.tres" id="2_m3y1r"]
[resource] [resource]
script = ExtResource("1_sqajm") script = ExtResource("1_sqajm")
name = "Floor" name = "Floor"
ingredients = Array[Resource("res://model/item.gd")]([ExtResource("1_y7d3a"), ExtResource("1_y7d3a")]) ingredients = Array[Resource("res://model/item_resource.gd")]([ExtResource("1_y7d3a"), ExtResource("1_y7d3a")])
results = Array[Resource("res://model/item.gd")]([ExtResource("2_m3y1r")]) results = Array[Resource("res://model/item_resource.gd")]([ExtResource("2_m3y1r")])

View File

@ -1,6 +1,6 @@
[gd_resource type="Resource" script_class="Recipe" load_steps=5 format=3 uid="uid://kf44bfypgx32"] [gd_resource type="Resource" script_class="RecipeResource" load_steps=5 format=3 uid="uid://kf44bfypgx32"]
[ext_resource type="Script" path="res://model/recipe.gd" id="1_eqskp"] [ext_resource type="Script" path="res://model/recipe_resource.gd" id="1_eqskp"]
[ext_resource type="Resource" uid="uid://bn5j38jbwlj1f" path="res://data/items/stick.tres" id="1_w20uq"] [ext_resource type="Resource" uid="uid://bn5j38jbwlj1f" path="res://data/items/stick.tres" id="1_w20uq"]
[ext_resource type="Resource" uid="uid://dmjr6pmb17l2y" path="res://data/items/woodplanks.tres" id="3_x6ond"] [ext_resource type="Resource" uid="uid://dmjr6pmb17l2y" path="res://data/items/woodplanks.tres" id="3_x6ond"]
[ext_resource type="Resource" uid="uid://mkj3oeaxvltq" path="res://data/items/shovel.tres" id="4_j1aun"] [ext_resource type="Resource" uid="uid://mkj3oeaxvltq" path="res://data/items/shovel.tres" id="4_j1aun"]
@ -8,5 +8,5 @@
[resource] [resource]
script = ExtResource("1_eqskp") script = ExtResource("1_eqskp")
name = "Shovel" name = "Shovel"
ingredients = Array[Resource("res://model/item.gd")]([ExtResource("1_w20uq"), ExtResource("1_w20uq"), ExtResource("3_x6ond")]) ingredients = Array[Resource("res://model/item_resource.gd")]([ExtResource("1_w20uq"), ExtResource("1_w20uq"), ExtResource("3_x6ond")])
results = Array[Resource("res://model/item.gd")]([ExtResource("4_j1aun")]) results = Array[Resource("res://model/item_resource.gd")]([ExtResource("4_j1aun")])

View File

@ -1,11 +1,11 @@
[gd_resource type="Resource" script_class="Recipe" load_steps=4 format=3 uid="uid://mju8wym58143"] [gd_resource type="Resource" script_class="RecipeResource" load_steps=4 format=3 uid="uid://mju8wym58143"]
[ext_resource type="Resource" uid="uid://dmjr6pmb17l2y" path="res://data/items/woodplanks.tres" id="1_7pctr"] [ext_resource type="Resource" uid="uid://dmjr6pmb17l2y" path="res://data/items/woodplanks.tres" id="1_7pctr"]
[ext_resource type="Resource" uid="uid://bn5j38jbwlj1f" path="res://data/items/stick.tres" id="2_6dang"] [ext_resource type="Resource" uid="uid://bn5j38jbwlj1f" path="res://data/items/stick.tres" id="2_6dang"]
[ext_resource type="Script" path="res://model/recipe.gd" id="2_rsitf"] [ext_resource type="Script" path="res://model/recipe_resource.gd" id="2_rsitf"]
[resource] [resource]
script = ExtResource("2_rsitf") script = ExtResource("2_rsitf")
name = "Stick" name = "Stick"
ingredients = Array[Resource("res://model/item.gd")]([ExtResource("1_7pctr")]) ingredients = Array[Resource("res://model/item_resource.gd")]([ExtResource("1_7pctr")])
results = Array[Resource("res://model/item.gd")]([ExtResource("2_6dang"), ExtResource("2_6dang"), ExtResource("2_6dang"), ExtResource("2_6dang")]) results = Array[Resource("res://model/item_resource.gd")]([ExtResource("2_6dang"), ExtResource("2_6dang"), ExtResource("2_6dang"), ExtResource("2_6dang")])

View File

@ -1,11 +1,11 @@
[gd_resource type="Resource" script_class="Recipe" load_steps=4 format=3 uid="uid://civyfxvfbs06w"] [gd_resource type="Resource" script_class="RecipeResource" load_steps=4 format=3 uid="uid://civyfxvfbs06w"]
[ext_resource type="Script" path="res://model/recipe.gd" id="1_8rbqv"] [ext_resource type="Script" path="res://model/recipe_resource.gd" id="1_8rbqv"]
[ext_resource type="Resource" uid="uid://c1ll2snhgv3m1" path="res://data/items/treelog.tres" id="1_lfwgj"] [ext_resource type="Resource" uid="uid://c1ll2snhgv3m1" path="res://data/items/treelog.tres" id="1_lfwgj"]
[ext_resource type="Resource" uid="uid://dmjr6pmb17l2y" path="res://data/items/woodplanks.tres" id="2_17d0x"] [ext_resource type="Resource" uid="uid://dmjr6pmb17l2y" path="res://data/items/woodplanks.tres" id="2_17d0x"]
[resource] [resource]
script = ExtResource("1_8rbqv") script = ExtResource("1_8rbqv")
name = "Woodplank" name = "Woodplank"
ingredients = Array[Resource("res://model/item.gd")]([ExtResource("1_lfwgj")]) ingredients = Array[Resource("res://model/item_resource.gd")]([ExtResource("1_lfwgj")])
results = Array[Resource("res://model/item.gd")]([ExtResource("2_17d0x"), ExtResource("2_17d0x"), ExtResource("2_17d0x"), ExtResource("2_17d0x")]) results = Array[Resource("res://model/item_resource.gd")]([ExtResource("2_17d0x"), ExtResource("2_17d0x"), ExtResource("2_17d0x"), ExtResource("2_17d0x")])

View File

@ -1,11 +1,11 @@
[gd_resource type="Resource" script_class="Recipe" load_steps=4 format=3 uid="uid://dvgxtg3oau0f3"] [gd_resource type="Resource" script_class="RecipeResource" load_steps=4 format=3 uid="uid://dvgxtg3oau0f3"]
[ext_resource type="Resource" uid="uid://dmjr6pmb17l2y" path="res://data/items/woodplanks.tres" id="1_2e1bt"] [ext_resource type="Resource" uid="uid://dmjr6pmb17l2y" path="res://data/items/woodplanks.tres" id="1_2e1bt"]
[ext_resource type="Script" path="res://model/recipe.gd" id="1_d10rq"] [ext_resource type="Script" path="res://model/recipe_resource.gd" id="1_d10rq"]
[ext_resource type="Resource" uid="uid://kywjkeu5tnjp" path="res://data/items/workbench.tres" id="2_a5ecf"] [ext_resource type="Resource" uid="uid://kywjkeu5tnjp" path="res://data/items/workbench.tres" id="2_a5ecf"]
[resource] [resource]
script = ExtResource("1_d10rq") script = ExtResource("1_d10rq")
name = "Workbench" name = "Workbench"
ingredients = Array[Resource("res://model/item.gd")]([ExtResource("1_2e1bt"), ExtResource("1_2e1bt"), ExtResource("1_2e1bt"), ExtResource("1_2e1bt")]) ingredients = Array[Resource("res://model/item_resource.gd")]([ExtResource("1_2e1bt"), ExtResource("1_2e1bt"), ExtResource("1_2e1bt"), ExtResource("1_2e1bt")])
results = Array[Resource("res://model/item.gd")]([ExtResource("2_a5ecf")]) results = Array[Resource("res://model/item_resource.gd")]([ExtResource("2_a5ecf")])

View File

@ -14,12 +14,12 @@ var picked_up_level_items:Array[NodePath] = []
var _game_scene:Game var _game_scene:Game
var _player:Player var _player:Player
var _all_recipes:Array[Recipe] = [] var _all_recipes:Array[RecipeResource] = []
func _ready(): func _ready():
for file in DirAccess.get_files_at("res://data/recipes"): for file in DirAccess.get_files_at("res://data/recipes"):
var resource_file = "res://data/recipes/" + file var resource_file = "res://data/recipes/" + file
var recipe:Recipe = load(resource_file) as Recipe var recipe:RecipeResource = load(resource_file) as RecipeResource
_all_recipes.append(recipe) _all_recipes.append(recipe)
tool_container.connect("item_selected", _on_tool_select) tool_container.connect("item_selected", _on_tool_select)

View File

@ -21,7 +21,7 @@ func get_free_item_stack_index() -> int:
return -1 return -1
func add_item(item:Item) -> bool: func add_item(item:ItemResource) -> bool:
for item_stack:ItemStack in _content: for item_stack:ItemStack in _content:
if item_stack.count == 0: if item_stack.count == 0:
continue continue
@ -47,7 +47,7 @@ func add_item(item:Item) -> bool:
return false return false
func remove_item(item:Item): func remove_item(item:ItemResource):
for i in range(_content.size() - 1, -1, -1): for i in range(_content.size() - 1, -1, -1):
var item_stack:ItemStack = _content[i] var item_stack:ItemStack = _content[i]
if item_stack.count == 0: if item_stack.count == 0:
@ -76,8 +76,8 @@ func clear() -> void:
_content[i] = ItemStack.new() _content[i] = ItemStack.new()
func has_all(items:Array[Item]) -> bool: func has_all(items:Array[ItemResource]) -> bool:
var needed:Array[Item] = items.duplicate() var needed:Array[ItemResource] = items.duplicate()
for item_stack:ItemStack in _content: for item_stack:ItemStack in _content:
if item_stack.count == 0: if item_stack.count == 0:

View File

@ -0,0 +1,5 @@
class_name BuiltStructureResource
extends Resource
@export var item:ItemResource
@export var global_transform:Transform3D

View File

@ -1,6 +1,7 @@
class_name GameProfile class_name GameProfileResource
extends Resource extends Resource
@export var game_name:String @export var game_name:String
@export var created:String
@export var last_played:String @export var last_played:String
@export var directory:String @export var directory:String

View File

@ -1,4 +1,4 @@
class_name Item class_name ItemResource
extends Resource extends Resource
@export var name:String @export var name:String

View File

@ -1,6 +0,0 @@
class_name Recipe
extends Resource
@export var name:String
@export var ingredients:Array[Item] = []
@export var results:Array[Item] = []

6
model/recipe_resource.gd Normal file
View File

@ -0,0 +1,6 @@
class_name RecipeResource
extends Resource
@export var name:String
@export var ingredients:Array[ItemResource] = []
@export var results:Array[ItemResource] = []

View File

@ -1,4 +1,4 @@
class_name SaveGame class_name SaveGameResource
extends Resource extends Resource
@export var level:String @export var level:String
@ -7,3 +7,4 @@ extends Resource
@export var player_transform:Transform3D @export var player_transform:Transform3D
@export var inventory:Array @export var inventory:Array
@export var level_pickup_items:Array[NodePath] @export var level_pickup_items:Array[NodePath]
@export var built_structures:Dictionary

View File

@ -0,0 +1,4 @@
class_name BuiltStructure
extends StaticBody3D
@export var item:ItemResource = null

View File

@ -6,7 +6,7 @@ signal item_picked_up(node_path:NodePath)
@onready var world_item_node = %WorldItemNode @onready var world_item_node = %WorldItemNode
@export var item:Item: @export var item:ItemResource:
get: get:
return item return item
set(value): set(value):

View File

@ -14,7 +14,7 @@ const JUMP_VELOCITY = 3.5
var gravity = ProjectSettings.get_setting("physics/3d/default_gravity") var gravity = ProjectSettings.get_setting("physics/3d/default_gravity")
var inventory:Inventory = Inventory.new() var inventory:Inventory = Inventory.new()
var selected_tool_slot_index:int = 0 var selected_tool_slot_index:int = 0
var current_tool:Item = null var current_tool:ItemResource = null
var look_direction:Vector3 = Vector3.BACK var look_direction:Vector3 = Vector3.BACK
var look_direction_damper:SpringDamper = SpringDamper.new(Vector3.ZERO) var look_direction_damper:SpringDamper = SpringDamper.new(Vector3.ZERO)
@ -59,7 +59,7 @@ func _physics_process(delta):
elif direction.length_squared() > 0.1 * 0.1: elif direction.length_squared() > 0.1 * 0.1:
look_direction = direction look_direction = direction
var damped_look_direction = look_direction_damper.calc(geometry.global_basis.z, look_direction, delta) var damped_look_direction = look_direction_damper.calc(global_basis.z, look_direction, delta)
animation_tree.set("parameters/conditions/running", is_moving) animation_tree.set("parameters/conditions/running", is_moving)
animation_tree.set("parameters/conditions/idle", not is_moving) animation_tree.set("parameters/conditions/idle", not is_moving)
@ -72,7 +72,7 @@ func set_tool_slot_index(value:int) -> void:
selected_tool_slot_index = value selected_tool_slot_index = value
set_right_hand_item(inventory.get_tool_item_stacks()[selected_tool_slot_index].item) set_right_hand_item(inventory.get_tool_item_stacks()[selected_tool_slot_index].item)
func on_item_picked_up(item:Item): func on_item_picked_up(item:ItemResource):
trigger_message.emit("Picked up a " + item.name) trigger_message.emit("Picked up a " + item.name)
inventory.add_item(item) inventory.add_item(item)
@ -81,7 +81,7 @@ func get_actionable_global_transform() -> Vector3:
return build_location.global_position return build_location.global_position
func set_right_hand_item(item:Item) -> void: func set_right_hand_item(item:ItemResource) -> void:
for child in right_hand_attachement.get_children(): for child in right_hand_attachement.get_children():
child.queue_free() child.queue_free()

View File

@ -31,6 +31,12 @@ project/assembly_name="UIAndInteractionTests"
enabled=PackedStringArray("res://addons/dialogue_manager/plugin.cfg") enabled=PackedStringArray("res://addons/dialogue_manager/plugin.cfg")
[global_group]
built_structure=""
pickup_item=""
quest_state=""
[gui] [gui]
theme/custom="res://ui/ui_theme.tres" theme/custom="res://ui/ui_theme.tres"

View File

@ -37,7 +37,7 @@ func _process(_delta):
if is_completed: if is_completed:
return return
var hammer_item:Item = load("res://data/items/hammer.tres") var hammer_item:ItemResource = load("res://data/items/hammer.tres")
if _player.inventory.has_all([hammer_item]): if _player.inventory.has_all([hammer_item]):
is_hammer_found = true is_hammer_found = true

View File

@ -13,9 +13,11 @@ enum ROOT_UI_STATE { UNDEFINED, MENU, GAME }
var _root_ui_state:ROOT_UI_STATE = ROOT_UI_STATE.UNDEFINED var _root_ui_state:ROOT_UI_STATE = ROOT_UI_STATE.UNDEFINED
var current_level_resource:String var current_level_resource:String
var current_game_profile:GameProfile = null var current_game_profile:GameProfileResource = null
var current_game_profile_directory:String = "" var current_game_profile_directory:String = ""
var _game_build_system:BuildSystem = null
func _ready(): func _ready():
if autostart_game_scene: if autostart_game_scene:
load_scene(game_scene) load_scene(game_scene)
@ -44,6 +46,8 @@ func load_scene(scene_resource:PackedScene):
print("Loading level '" + scene_resource.resource_path + "'") print("Loading level '" + scene_resource.resource_path + "'")
scene.add_child(scene_resource .instantiate()) scene.add_child(scene_resource .instantiate())
current_level_resource = scene_resource.resource_path current_level_resource = scene_resource.resource_path
_game_build_system = scene.find_child("BuildSystem", true, false) as BuildSystem
func save_game(): func save_game():
@ -53,7 +57,7 @@ func save_game():
push_error("Cannot load game: no player found!") push_error("Cannot load game: no player found!")
return return
var save_data:SaveGame = SaveGame.new() var save_data:SaveGameResource = SaveGameResource.new()
save_data.level = current_level_resource save_data.level = current_level_resource
save_data.level_pickup_items = %GameUI.picked_up_level_items save_data.level_pickup_items = %GameUI.picked_up_level_items
@ -69,6 +73,18 @@ func save_game():
for item_stack in player.inventory.get_item_stacks(): for item_stack in player.inventory.get_item_stacks():
save_data.inventory.append({"item": item_stack.item, "count": item_stack.count}) save_data.inventory.append({"item": item_stack.item, "count": item_stack.count})
for structure:BuiltStructure in get_tree().get_nodes_in_group("built_structure"):
var built_structure_resource = BuiltStructureResource.new()
built_structure_resource.global_transform = structure.global_transform
built_structure_resource.item = structure.item
var item_array = save_data.built_structures.find_key(structure.item)
if item_array == null:
item_array = []
save_data.built_structures[structure.item] = item_array
item_array.append(structure.global_transform)
print("Saving game: " + current_game_profile_directory + "/savegame.tres") print("Saving game: " + current_game_profile_directory + "/savegame.tres")
ResourceSaver.save(save_data, current_game_profile_directory + "/savegame.tres") ResourceSaver.save(save_data, current_game_profile_directory + "/savegame.tres")
activate_ui_panel(%GameUI) activate_ui_panel(%GameUI)
@ -79,7 +95,7 @@ func load_game():
%GameUI.picked_up_level_items.clear() %GameUI.picked_up_level_items.clear()
print("Loading game: " + current_game_profile_directory + "/savegame.tres") print("Loading game: " + current_game_profile_directory + "/savegame.tres")
var save_data:SaveGame = load(current_game_profile_directory + "/savegame.tres") as SaveGame var save_data:SaveGameResource = load(current_game_profile_directory + "/savegame.tres") as SaveGameResource
var level_resource:PackedScene = load(save_data.level) var level_resource:PackedScene = load(save_data.level)
load_scene(level_resource) load_scene(level_resource)
@ -115,6 +131,12 @@ func load_game():
%GameUI.picked_up_level_items.append(item_path) %GameUI.picked_up_level_items.append(item_path)
item_node.queue_free() item_node.queue_free()
# Built structures
for item:ItemResource in save_data.built_structures.keys():
var item_transform_array = save_data.built_structures[item] as Array[Transform3D]
for structure_transform in item_transform_array:
_game_build_system.build_structure(item, structure_transform)
set_root_ui_state(RootUI.ROOT_UI_STATE.GAME) set_root_ui_state(RootUI.ROOT_UI_STATE.GAME)
@ -142,6 +164,10 @@ func _on_start_game_profile(profile_path:String) -> void:
push_error("Error loading game profile " + profile_path) push_error("Error loading game profile " + profile_path)
return return
# Update last_played timestamp
current_game_profile.last_played = Time.get_datetime_string_from_system()
ResourceSaver.save(current_game_profile, profile_path)
current_game_profile_directory = profile_path.get_base_dir() current_game_profile_directory = profile_path.get_base_dir()
if not _is_savegame_available(): if not _is_savegame_available():
@ -165,6 +191,7 @@ func _on_start_game_button_pressed():
set_root_ui_state(ROOT_UI_STATE.GAME) set_root_ui_state(ROOT_UI_STATE.GAME)
func _on_quit_game_scene(): func _on_quit_game_scene():
save_game()
set_root_ui_state(ROOT_UI_STATE.MENU) set_root_ui_state(ROOT_UI_STATE.MENU)
func _on_quit_button_pressed(): func _on_quit_button_pressed():

View File

@ -917,22 +917,22 @@ unique_name_in_owner = true
[connection signal="item_selected" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/Recipes/RecipeList" to="GameUI/InventoryDialog" method="_on_recipe_list_item_selected"] [connection signal="item_selected" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/Recipes/RecipeList" to="GameUI/InventoryDialog" method="_on_recipe_list_item_selected"]
[connection signal="gui_input" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/ItemSlot" to="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/ItemSlot" method="_on_gui_input"] [connection signal="gui_input" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/ItemSlot" to="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/ItemSlot" method="_on_gui_input"]
[connection signal="mouse_entered" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/ItemSlot" to="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/ItemSlot" method="_on_mouse_entered"] [connection signal="mouse_entered" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/ItemSlot" to="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/ItemSlot" method="_on_mouse_entered"]
[connection signal="gui_input" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@18040" to="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@18040" method="_on_gui_input"] [connection signal="gui_input" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@33927" to="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@33927" method="_on_gui_input"]
[connection signal="mouse_entered" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@18040" to="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@18040" method="_on_mouse_entered"] [connection signal="mouse_entered" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@33927" to="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@33927" method="_on_mouse_entered"]
[connection signal="gui_input" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@18041" to="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@18041" method="_on_gui_input"] [connection signal="gui_input" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@33928" to="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@33928" method="_on_gui_input"]
[connection signal="mouse_entered" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@18041" to="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@18041" method="_on_mouse_entered"] [connection signal="mouse_entered" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@33928" to="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@33928" method="_on_mouse_entered"]
[connection signal="gui_input" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@18042" to="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@18042" method="_on_gui_input"] [connection signal="gui_input" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@33929" to="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@33929" method="_on_gui_input"]
[connection signal="mouse_entered" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@18042" to="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@18042" method="_on_mouse_entered"] [connection signal="mouse_entered" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@33929" to="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@33929" method="_on_mouse_entered"]
[connection signal="gui_input" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@18043" to="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@18043" method="_on_gui_input"] [connection signal="gui_input" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@33930" to="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@33930" method="_on_gui_input"]
[connection signal="mouse_entered" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@18043" to="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@18043" method="_on_mouse_entered"] [connection signal="mouse_entered" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@33930" to="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@33930" method="_on_mouse_entered"]
[connection signal="gui_input" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@18044" to="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@18044" method="_on_gui_input"] [connection signal="gui_input" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@33931" to="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@33931" method="_on_gui_input"]
[connection signal="mouse_entered" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@18044" to="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@18044" method="_on_mouse_entered"] [connection signal="mouse_entered" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@33931" to="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@33931" method="_on_mouse_entered"]
[connection signal="gui_input" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@18045" to="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@18045" method="_on_gui_input"] [connection signal="gui_input" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@33932" to="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@33932" method="_on_gui_input"]
[connection signal="mouse_entered" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@18045" to="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@18045" method="_on_mouse_entered"] [connection signal="mouse_entered" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@33932" to="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@33932" method="_on_mouse_entered"]
[connection signal="gui_input" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@18046" to="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@18046" method="_on_gui_input"] [connection signal="gui_input" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@33933" to="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@33933" method="_on_gui_input"]
[connection signal="mouse_entered" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@18046" to="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@18046" method="_on_mouse_entered"] [connection signal="mouse_entered" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@33933" to="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@33933" method="_on_mouse_entered"]
[connection signal="gui_input" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@18047" to="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@18047" method="_on_gui_input"] [connection signal="gui_input" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@33934" to="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@33934" method="_on_gui_input"]
[connection signal="mouse_entered" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@18047" to="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@18047" method="_on_mouse_entered"] [connection signal="mouse_entered" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@33934" to="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftIngredients/Panel/CenterContainer/IngredientsContainer/@Panel@33934" method="_on_mouse_entered"]
[connection signal="gui_input" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftResult/Panel/CenterContainer/ResultsContainer/ItemSlot" to="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftResult/Panel/CenterContainer/ResultsContainer/ItemSlot" method="_on_gui_input"] [connection signal="gui_input" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftResult/Panel/CenterContainer/ResultsContainer/ItemSlot" to="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftResult/Panel/CenterContainer/ResultsContainer/ItemSlot" method="_on_gui_input"]
[connection signal="mouse_entered" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftResult/Panel/CenterContainer/ResultsContainer/ItemSlot" to="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftResult/Panel/CenterContainer/ResultsContainer/ItemSlot" method="_on_mouse_entered"] [connection signal="mouse_entered" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftResult/Panel/CenterContainer/ResultsContainer/ItemSlot" to="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftResult/Panel/CenterContainer/ResultsContainer/ItemSlot" method="_on_mouse_entered"]
[connection signal="pressed" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftResult/HBoxContainer/CraftButton" to="GameUI/InventoryDialog" method="_on_craft_button_pressed"] [connection signal="pressed" from="GameUI/InventoryDialog/Panel/PanelContainer/CraftingUI/HBoxContainer/CraftResult/HBoxContainer/CraftButton" to="GameUI/InventoryDialog" method="_on_craft_button_pressed"]
@ -945,49 +945,49 @@ unique_name_in_owner = true
[connection signal="item_selected" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer" to="GameUI/BuildDialog" method="_on_build_items_container_item_selected"] [connection signal="item_selected" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer" to="GameUI/BuildDialog" method="_on_build_items_container_item_selected"]
[connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/ItemSlot" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/ItemSlot" method="_on_gui_input"] [connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/ItemSlot" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/ItemSlot" method="_on_gui_input"]
[connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/ItemSlot" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/ItemSlot" method="_on_mouse_entered"] [connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/ItemSlot" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/ItemSlot" method="_on_mouse_entered"]
[connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18048" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18048" method="_on_gui_input"] [connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33935" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33935" method="_on_gui_input"]
[connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18048" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18048" method="_on_mouse_entered"] [connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33935" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33935" method="_on_mouse_entered"]
[connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18049" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18049" method="_on_gui_input"] [connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33936" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33936" method="_on_gui_input"]
[connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18049" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18049" method="_on_mouse_entered"] [connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33936" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33936" method="_on_mouse_entered"]
[connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18050" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18050" method="_on_gui_input"] [connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33937" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33937" method="_on_gui_input"]
[connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18050" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18050" method="_on_mouse_entered"] [connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33937" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33937" method="_on_mouse_entered"]
[connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18051" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18051" method="_on_gui_input"] [connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33938" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33938" method="_on_gui_input"]
[connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18051" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18051" method="_on_mouse_entered"] [connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33938" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33938" method="_on_mouse_entered"]
[connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18052" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18052" method="_on_gui_input"] [connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33939" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33939" method="_on_gui_input"]
[connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18052" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18052" method="_on_mouse_entered"] [connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33939" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33939" method="_on_mouse_entered"]
[connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18053" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18053" method="_on_gui_input"] [connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33940" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33940" method="_on_gui_input"]
[connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18053" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18053" method="_on_mouse_entered"] [connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33940" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33940" method="_on_mouse_entered"]
[connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18054" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18054" method="_on_gui_input"] [connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33941" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33941" method="_on_gui_input"]
[connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18054" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18054" method="_on_mouse_entered"] [connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33941" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33941" method="_on_mouse_entered"]
[connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18055" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18055" method="_on_gui_input"] [connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33942" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33942" method="_on_gui_input"]
[connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18055" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18055" method="_on_mouse_entered"] [connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33942" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33942" method="_on_mouse_entered"]
[connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18056" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18056" method="_on_gui_input"] [connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33943" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33943" method="_on_gui_input"]
[connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18056" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18056" method="_on_mouse_entered"] [connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33943" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33943" method="_on_mouse_entered"]
[connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18057" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18057" method="_on_gui_input"] [connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33944" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33944" method="_on_gui_input"]
[connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18057" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18057" method="_on_mouse_entered"] [connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33944" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33944" method="_on_mouse_entered"]
[connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18058" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18058" method="_on_gui_input"] [connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33945" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33945" method="_on_gui_input"]
[connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18058" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18058" method="_on_mouse_entered"] [connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33945" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33945" method="_on_mouse_entered"]
[connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18059" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18059" method="_on_gui_input"] [connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33946" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33946" method="_on_gui_input"]
[connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18059" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18059" method="_on_mouse_entered"] [connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33946" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33946" method="_on_mouse_entered"]
[connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18060" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18060" method="_on_gui_input"] [connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33947" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33947" method="_on_gui_input"]
[connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18060" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18060" method="_on_mouse_entered"] [connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33947" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33947" method="_on_mouse_entered"]
[connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18061" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18061" method="_on_gui_input"] [connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33948" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33948" method="_on_gui_input"]
[connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18061" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18061" method="_on_mouse_entered"] [connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33948" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33948" method="_on_mouse_entered"]
[connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18062" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18062" method="_on_gui_input"] [connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33949" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33949" method="_on_gui_input"]
[connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18062" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@18062" method="_on_mouse_entered"] [connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33949" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemsContainer/@Panel@33949" method="_on_mouse_entered"]
[connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/ItemSlot" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/ItemSlot" method="_on_gui_input"] [connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/ItemSlot" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/ItemSlot" method="_on_gui_input"]
[connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/ItemSlot" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/ItemSlot" method="_on_mouse_entered"] [connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/ItemSlot" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/ItemSlot" method="_on_mouse_entered"]
[connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@18063" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@18063" method="_on_gui_input"] [connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@33950" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@33950" method="_on_gui_input"]
[connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@18063" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@18063" method="_on_mouse_entered"] [connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@33950" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@33950" method="_on_mouse_entered"]
[connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@18064" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@18064" method="_on_gui_input"] [connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@33951" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@33951" method="_on_gui_input"]
[connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@18064" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@18064" method="_on_mouse_entered"] [connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@33951" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@33951" method="_on_mouse_entered"]
[connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@18065" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@18065" method="_on_gui_input"] [connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@33952" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@33952" method="_on_gui_input"]
[connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@18065" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@18065" method="_on_mouse_entered"] [connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@33952" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@33952" method="_on_mouse_entered"]
[connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@18066" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@18066" method="_on_gui_input"] [connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@33953" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@33953" method="_on_gui_input"]
[connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@18066" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@18066" method="_on_mouse_entered"] [connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@33953" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@33953" method="_on_mouse_entered"]
[connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@18067" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@18067" method="_on_gui_input"] [connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@33954" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@33954" method="_on_gui_input"]
[connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@18067" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@18067" method="_on_mouse_entered"] [connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@33954" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@33954" method="_on_mouse_entered"]
[connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@18068" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@18068" method="_on_gui_input"] [connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@33955" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@33955" method="_on_gui_input"]
[connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@18068" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@18068" method="_on_mouse_entered"] [connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@33955" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@33955" method="_on_mouse_entered"]
[connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@18069" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@18069" method="_on_gui_input"] [connection signal="gui_input" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@33956" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@33956" method="_on_gui_input"]
[connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@18069" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@18069" method="_on_mouse_entered"] [connection signal="mouse_entered" from="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@33956" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@33956" method="_on_mouse_entered"]

View File

@ -11,7 +11,7 @@ const COLLISION_MASK_STRUCTURES = 32
@onready var camera:Camera3D = %Camera @onready var camera:Camera3D = %Camera
@export var build_item:Item = null @export var build_item:ItemResource = null
var camera_velocity:Vector3 = Vector3.ZERO var camera_velocity:Vector3 = Vector3.ZERO
var is_active:bool = false var is_active:bool = false
@ -93,6 +93,17 @@ func _physics_process(_delta):
update_build_preview() update_build_preview()
func build_structure(item:ItemResource, transform:Transform3D) -> void:
var new_structure:BuiltStructure = item.scene.instantiate()
if new_structure == null:
push_warning("Cannot build item " + str(item) + " as scene is not of type BuiltStructure.")
return
new_structure.global_transform = transform
new_structure.add_to_group("built_structure")
new_structure.item = item
built_structures.add_child(new_structure)
func _unhandled_input(event: InputEvent) -> void: func _unhandled_input(event: InputEvent) -> void:
if not is_active: if not is_active:
build_preview.hide() build_preview.hide()
@ -111,9 +122,7 @@ func _unhandled_input(event: InputEvent) -> void:
return return
if build_item != null and event.is_action_pressed("interaction"): if build_item != null and event.is_action_pressed("interaction"):
var new_structure:Node3D = build_item.scene.instantiate() build_structure(build_item, build_preview.transform)
new_structure.transform = build_preview.transform
built_structures.add_child(new_structure)
get_viewport().set_input_as_handled() get_viewport().set_input_as_handled()
return return

View File

@ -5,12 +5,12 @@ class_name BuildDialog
@onready var build_item_resources_container:ItemGrid = %BuildItemResourcesContainer @onready var build_item_resources_container:ItemGrid = %BuildItemResourcesContainer
var _inventory:Inventory = null var _inventory:Inventory = null
var _build_item_slots:Array[Item] = [] var _build_item_slots:Array[ItemResource] = []
var _build_item_resources:Array[Item] = [] var _build_item_resources:Array[ItemResource] = []
var _recipes:Array[Recipe] = [] var _recipes:Array[RecipeResource] = []
var _recipe_for_item:Dictionary = {} var _recipe_for_item:Dictionary = {}
func open(recipes:Array[Recipe], inventory:Inventory): func open(recipes:Array[RecipeResource], inventory:Inventory):
_inventory = inventory _inventory = inventory
_recipes = recipes _recipes = recipes
@ -20,7 +20,7 @@ func open(recipes:Array[Recipe], inventory:Inventory):
build_items_container.select_slot(0) build_items_container.select_slot(0)
_build_item_slots.clear() _build_item_slots.clear()
for recipe:Recipe in recipes: for recipe:RecipeResource in recipes:
if not recipe.results[0].is_buildable: if not recipe.results[0].is_buildable:
continue continue
@ -33,7 +33,7 @@ func open(recipes:Array[Recipe], inventory:Inventory):
build_items_container.display(_build_item_slots) build_items_container.display(_build_item_slots)
func _update_build_item_resources_container(recipe:Recipe) -> void: func _update_build_item_resources_container(recipe:RecipeResource) -> void:
build_item_resources_container.display(recipe.ingredients) build_item_resources_container.display(recipe.ingredients)

View File

@ -35,8 +35,9 @@ func create_game_directory() -> String:
game_base_directory.make_dir(sanitized_name) game_base_directory.make_dir(sanitized_name)
var game_profile = GameProfile.new() var game_profile = GameProfileResource.new()
game_profile.game_name = game_name_edit.text game_profile.game_name = game_name_edit.text
game_profile.created = Time.get_datetime_string_from_system()
game_profile.last_played = Time.get_datetime_string_from_system() game_profile.last_played = Time.get_datetime_string_from_system()
ResourceSaver.save(game_profile, "user://game_profiles/" + sanitized_name + "/game.tres") ResourceSaver.save(game_profile, "user://game_profiles/" + sanitized_name + "/game.tres")

View File

@ -4,7 +4,7 @@ extends HBoxContainer
@onready var name_label: Label = %NameLabel @onready var name_label: Label = %NameLabel
@onready var start_button: Button = %StartButton @onready var start_button: Button = %StartButton
var game_profile:GameProfile = null var game_profile:GameProfileResource = null
func _ready() -> void: func _ready() -> void:
if game_profile == null: if game_profile == null:

View File

@ -11,10 +11,10 @@ extends MarginContainer
@onready var inventory_container:ItemGrid = %InventoryContainer @onready var inventory_container:ItemGrid = %InventoryContainer
var _inventory:Inventory = null var _inventory:Inventory = null
var _selected_recipe:Recipe var _selected_recipe:RecipeResource
func open(recipes:Array[Recipe], inventory:Inventory): func open(recipes:Array[RecipeResource], inventory:Inventory):
_inventory = inventory _inventory = inventory
show() show()
@ -41,7 +41,7 @@ func _unhandled_key_input(event:InputEvent):
hide() hide()
func update_crafting_widgets(recipe:Recipe): func update_crafting_widgets(recipe:RecipeResource):
ingredients_container.display(recipe.ingredients) ingredients_container.display(recipe.ingredients)
results_container.display(recipe.results) results_container.display(recipe.results)
@ -49,7 +49,7 @@ func update_crafting_widgets(recipe:Recipe):
func _on_recipe_list_item_selected(index): func _on_recipe_list_item_selected(index):
var recipe:Recipe = recipe_list.get_item_metadata(index) var recipe:RecipeResource = recipe_list.get_item_metadata(index)
_selected_recipe = recipe _selected_recipe = recipe
print("Selected recipe is: " + str(recipe) + " with index " + str(index)) print("Selected recipe is: " + str(recipe) + " with index " + str(index))

View File

@ -41,7 +41,7 @@ func resize_grid() -> void:
_slots.clear() _slots.clear()
while get_child_count() < rows * columns: while get_child_count() < rows * columns:
var slot_instance = slot_scene.instantiate() var slot_instance = slot_scene.instantiate() as ItemSlot
if allow_drag_drop: if allow_drag_drop:
slot_instance.set_drag_drop_flags(ItemSlot.ALLOW_DRAG | ItemSlot.ALLOW_DROP) slot_instance.set_drag_drop_flags(ItemSlot.ALLOW_DRAG | ItemSlot.ALLOW_DROP)
add_child(slot_instance) add_child(slot_instance)
@ -103,7 +103,7 @@ func displayStacks(item_stacks:Array[ItemStack]):
item_stack_index = item_stack_index + 1 item_stack_index = item_stack_index + 1
func display(item_stacks:Array[Item]): func display(item_stacks:Array[ItemResource]):
var item_stack_index = 0 var item_stack_index = 0
for slot:ItemSlot in _slots: for slot:ItemSlot in _slots:

View File

@ -30,7 +30,7 @@ func _set_selected(new_state):
func set_drag_drop_flags(flags:int) -> void: func set_drag_drop_flags(flags:int) -> void:
drag_drop_flags = flags drag_drop_flags = flags
func get_item() -> Item: func get_item() -> ItemResource:
if _item_stack == null: if _item_stack == null:
return null return null

View File

@ -1,5 +1,5 @@
class_name ItemStack class_name ItemStack
extends Node extends Node
var item:Item = null var item:ItemResource = null
var count:int = 0 var count:int = 0

View File

@ -6,7 +6,7 @@ signal start_game(game_path:String)
const game_profile_item_scene = preload("res://ui/game_profile_item.tscn") const game_profile_item_scene = preload("res://ui/game_profile_item.tscn")
var game_profile_list:Array[GameProfile] = [] var game_profile_list:Array[GameProfileResource] = []
# Called when the node enters the scene tree for the first time. # Called when the node enters the scene tree for the first time.
func _ready() -> void: func _ready() -> void:
@ -21,7 +21,7 @@ func update_game_profile_list() -> void:
return return
for profile_directory in game_profiles_folder.get_directories(): for profile_directory in game_profiles_folder.get_directories():
var game_profile:GameProfile = ResourceLoader.load("user://game_profiles/" + profile_directory + "/game.tres") var game_profile:GameProfileResource = ResourceLoader.load("user://game_profiles/" + profile_directory + "/game.tres")
if not game_profile: if not game_profile:
push_warning("Warning: could not open game profile " + profile_directory) push_warning("Warning: could not open game profile " + profile_directory)
continue continue
@ -34,7 +34,7 @@ func update_game_profiles_widget() -> void:
game_profile_v_box_container.remove_child(profile_entry) game_profile_v_box_container.remove_child(profile_entry)
profile_entry.queue_free() profile_entry.queue_free()
for profile:GameProfile in game_profile_list: for profile:GameProfileResource in game_profile_list:
var game_profile_item:GameProfileItem = game_profile_item_scene.instantiate() var game_profile_item:GameProfileItem = game_profile_item_scene.instantiate()
game_profile_item.game_profile = profile game_profile_item.game_profile = profile
game_profile_v_box_container.add_child(game_profile_item) game_profile_v_box_container.add_child(game_profile_item)

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=28 format=3 uid="uid://dmagdl5pi6jdj"] [gd_scene load_steps=30 format=3 uid="uid://dmagdl5pi6jdj"]
[ext_resource type="MeshLibrary" uid="uid://dcpuitbu16j1a" path="res://assets/mesh_library.tres" id="1_q0eym"] [ext_resource type="MeshLibrary" uid="uid://dcpuitbu16j1a" path="res://assets/mesh_library.tres" id="1_q0eym"]
[ext_resource type="PackedScene" uid="uid://da5r82nvypfk4" path="res://objects/pickup_item.tscn" id="2_ccr0r"] [ext_resource type="PackedScene" uid="uid://da5r82nvypfk4" path="res://objects/pickup_item.tscn" id="2_ccr0r"]
@ -11,6 +11,7 @@
[ext_resource type="Resource" uid="uid://cktn5p1wetkve" path="res://data/items/axe.tres" id="9_xhfx0"] [ext_resource type="Resource" uid="uid://cktn5p1wetkve" path="res://data/items/axe.tres" id="9_xhfx0"]
[ext_resource type="Resource" uid="uid://cwerasgcfgx2p" path="res://data/items/hammer.tres" id="10_wch4q"] [ext_resource type="Resource" uid="uid://cwerasgcfgx2p" path="res://data/items/hammer.tres" id="10_wch4q"]
[ext_resource type="PackedScene" uid="uid://ccjcjputsddrd" path="res://assets/scene_props/tree_pine.tscn" id="11_5olon"] [ext_resource type="PackedScene" uid="uid://ccjcjputsddrd" path="res://assets/scene_props/tree_pine.tscn" id="11_5olon"]
[ext_resource type="Resource" uid="uid://cum4wf04mfuu6" path="res://data/items/BananenAxt.tres" id="11_fko4k"]
[ext_resource type="Texture2D" uid="uid://bq3b1hxl5ojh6" path="res://assets/icons/npc_emotes/attention.tres" id="12_3vn8y"] [ext_resource type="Texture2D" uid="uid://bq3b1hxl5ojh6" path="res://assets/icons/npc_emotes/attention.tres" id="12_3vn8y"]
[ext_resource type="PackedScene" uid="uid://dcvf00ymfkdkd" path="res://assets/custom/buildings/LogCabin/pole.tscn" id="12_mmbxl"] [ext_resource type="PackedScene" uid="uid://dcvf00ymfkdkd" path="res://assets/custom/buildings/LogCabin/pole.tscn" id="12_mmbxl"]
[ext_resource type="PackedScene" uid="uid://b38ixieurg6db" path="res://assets/custom/buildings/LogCabin/wall.tscn" id="13_1kigt"] [ext_resource type="PackedScene" uid="uid://b38ixieurg6db" path="res://assets/custom/buildings/LogCabin/wall.tscn" id="13_1kigt"]
@ -23,6 +24,7 @@
[ext_resource type="PackedScene" uid="uid://kpyvcyklt68g" path="res://assets/scene_props/bridge.tscn" id="18_yqn1p"] [ext_resource type="PackedScene" uid="uid://kpyvcyklt68g" path="res://assets/scene_props/bridge.tscn" id="18_yqn1p"]
[ext_resource type="PackedScene" uid="uid://2q8dhf61a7os" path="res://assets/characters/engineer.tscn" id="22_vjd6d"] [ext_resource type="PackedScene" uid="uid://2q8dhf61a7os" path="res://assets/characters/engineer.tscn" id="22_vjd6d"]
[ext_resource type="PackedScene" uid="uid://03eh1nglfg6t" path="res://objects/non_player_character.tscn" id="23_fjbgv"] [ext_resource type="PackedScene" uid="uid://03eh1nglfg6t" path="res://objects/non_player_character.tscn" id="23_fjbgv"]
[ext_resource type="PackedScene" uid="uid://cl7dkbxsdhmvm" path="res://assets/buildings/castle_0.tscn" id="23_g2ojm"]
[sub_resource type="CylinderShape3D" id="CylinderShape3D_0soe6"] [sub_resource type="CylinderShape3D" id="CylinderShape3D_0soe6"]
height = 0.6 height = 0.6
@ -94,6 +96,10 @@ item = ExtResource("9_xhfx0")
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.581866, -4.76837e-06, 1.16087) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.581866, -4.76837e-06, 1.16087)
item = ExtResource("10_wch4q") item = ExtResource("10_wch4q")
[node name="Item11" parent="Objects" instance=ExtResource("2_ccr0r")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.749356, -5.126e-06, -2.12196)
item = ExtResource("11_fko4k")
[node name="Vegetation" type="Node3D" parent="."] [node name="Vegetation" type="Node3D" parent="."]
[node name="TreePine" parent="Vegetation" instance=ExtResource("11_5olon")] [node name="TreePine" parent="Vegetation" instance=ExtResource("11_5olon")]
@ -202,11 +208,12 @@ shape = SubResource("SphereShape3D_ugkqa")
[node name="Geometry" parent="Quests/BuilderMissingTool/Merchant" instance=ExtResource("22_vjd6d")] [node name="Geometry" parent="Quests/BuilderMissingTool/Merchant" instance=ExtResource("22_vjd6d")]
transform = Transform3D(0.4, 0, 0, 0, 0.4, 0, 0, 0, 0.4, 0, 0, 0) transform = Transform3D(0.4, 0, 0, 0, 0.4, 0, 0, 0, 0.4, 0, 0, 0)
[node name="Node3D" parent="Quests/BuilderMissingTool/Merchant" instance=ExtResource("23_g2ojm")]
transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 6.79984, -3.8147e-06, -8.27225)
[node name="Water" type="MeshInstance3D" parent="."] [node name="Water" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.239327, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.239327, 0)
mesh = SubResource("PlaneMesh_6aebw") mesh = SubResource("PlaneMesh_6aebw")
[node name="NonPlayerCharacter" parent="." instance=ExtResource("23_fjbgv")] [node name="NonPlayerCharacter" parent="." instance=ExtResource("23_fjbgv")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.241553, -5.126e-06, -3.64377) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.241553, -5.126e-06, -3.64377)
[editable path="Quests/BuilderMissingTool/Merchant"]

View File

@ -91,7 +91,6 @@ void fragment() {
} }
" "
graph_offset = Vector2(-535.526, -182.815)
nodes/fragment/0/position = Vector2(720, 140) nodes/fragment/0/position = Vector2(720, 140)
nodes/fragment/2/node = SubResource("VisualShaderNodeTexture_l6sy6") nodes/fragment/2/node = SubResource("VisualShaderNodeTexture_l6sy6")
nodes/fragment/2/position = Vector2(520, 140) nodes/fragment/2/position = Vector2(520, 140)