diff --git a/assets/items/campfire_pit.tscn b/assets/items/campfire_pit.tscn index db6f40c..2dc2045 100644 --- a/assets/items/campfire_pit.tscn +++ b/assets/items/campfire_pit.tscn @@ -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="Script" path="res://objects/built_structure.gd" id="1_asprp"] [sub_resource type="CylinderShape3D" id="CylinderShape3D_ui8hn"] height = 0.4 radius = 0.25 -[node name="Node3D" type="StaticBody3D"] +[node name="CampfirePit" type="StaticBody3D"] collision_layer = 33 +script = ExtResource("1_asprp") [node name="CollisionShape3D" type="CollisionShape3D" parent="."] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.193627, 0) diff --git a/assets/items/fence_fortified.tscn b/assets/items/fence_fortified.tscn index 9191d3c..95ab946 100644 --- a/assets/items/fence_fortified.tscn +++ b/assets/items/fence_fortified.tscn @@ -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="Script" path="res://objects/built_structure.gd" id="1_mgd5t"] [sub_resource type="BoxShape3D" id="BoxShape3D_kha47"] size = Vector3(0.52, 0.52, 0.1) [node name="Fence" type="StaticBody3D"] collision_layer = 33 +script = ExtResource("1_mgd5t") [node name="CollisionShape3D" type="CollisionShape3D" parent="."] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.25949, 0) diff --git a/assets/items/floor.tscn b/assets/items/floor.tscn index 7e46e55..04f8230 100644 --- a/assets/items/floor.tscn +++ b/assets/items/floor.tscn @@ -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="Script" path="res://objects/built_structure.gd" id="1_ugnjg"] [sub_resource type="BoxShape3D" id="BoxShape3D_huqhw"] size = Vector3(0.52, 0.034, 0.52) [node name="Floor" type="StaticBody3D"] collision_layer = 33 +script = ExtResource("1_ugnjg") [node name="Geometry" parent="." instance=ExtResource("1_1rqyd")] diff --git a/assets/items/workbench.tscn b/assets/items/workbench.tscn index d1e90aa..c3b9dc1 100644 --- a/assets/items/workbench.tscn +++ b/assets/items/workbench.tscn @@ -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"] [sub_resource type="BoxShape3D" id="BoxShape3D_lq0et"] @@ -7,6 +8,7 @@ size = Vector3(0.3, 0.25, 0.3) [node name="Workbench" type="StaticBody3D"] collision_layer = 33 +script = ExtResource("1_8rsir") [node name="workbench" parent="." instance=ExtResource("1_nfc4u")] diff --git a/data/items/axe.tres b/data/items/axe.tres index d9822c9..a7e6d9e 100644 --- a/data/items/axe.tres +++ b/data/items/axe.tres @@ -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="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"] [resource] diff --git a/data/items/campfire_pit.tres b/data/items/campfire_pit.tres index 46e90ef..334618c 100644 --- a/data/items/campfire_pit.tres +++ b/data/items/campfire_pit.tres @@ -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="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"] [resource] @@ -12,3 +12,4 @@ icon = ExtResource("1_6eclp") max_stack_size = 1 is_tool = false is_buildable = true +tool_action = 0 diff --git a/data/items/dagger.tres b/data/items/dagger.tres index ff16c92..b5fddf4 100644 --- a/data/items/dagger.tres +++ b/data/items/dagger.tres @@ -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="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"] [resource] diff --git a/data/items/fence_fortified.tres b/data/items/fence_fortified.tres index f7bd639..cd47d6f 100644 --- a/data/items/fence_fortified.tres +++ b/data/items/fence_fortified.tres @@ -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="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"] [resource] diff --git a/data/items/floor.tres b/data/items/floor.tres index 2fd0573..a829076 100644 --- a/data/items/floor.tres +++ b/data/items/floor.tres @@ -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="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"] [resource] diff --git a/data/items/hammer.tres b/data/items/hammer.tres index 3b98939..3639fc2 100644 --- a/data/items/hammer.tres +++ b/data/items/hammer.tres @@ -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="PackedScene" uid="uid://bimt3mc3d7th2" path="res://assets/tools/Hammer.tscn" id="2_pwblf"] diff --git a/data/items/pickaxe.tres b/data/items/pickaxe.tres index 9b53b3b..b9f13be 100644 --- a/data/items/pickaxe.tres +++ b/data/items/pickaxe.tres @@ -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="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_name = "Pickaxe" diff --git a/data/items/shovel.tres b/data/items/shovel.tres index 24943f5..35a478c 100644 --- a/data/items/shovel.tres +++ b/data/items/shovel.tres @@ -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="Texture2D" uid="uid://bpdo7iq3saec5" path="res://assets/3rdparty/kenney/survival-kit/Previews/toolShovel.png" id="1_oaqa4"] diff --git a/data/items/stick.tres b/data/items/stick.tres index 53fefa6..9b0cc23 100644 --- a/data/items/stick.tres +++ b/data/items/stick.tres @@ -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="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_name = "Stick" diff --git a/data/items/stone.tres b/data/items/stone.tres index 44c07cf..d981452 100644 --- a/data/items/stone.tres +++ b/data/items/stone.tres @@ -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="PackedScene" uid="uid://lp0bgqyd2pnr" path="res://assets/items/stone.tscn" id="2_6nus0"] diff --git a/data/items/sword.tres b/data/items/sword.tres index 3d11907..863a950 100644 --- a/data/items/sword.tres +++ b/data/items/sword.tres @@ -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="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"] [resource] diff --git a/data/items/treelog.tres b/data/items/treelog.tres index 62c16aa..4357963 100644 --- a/data/items/treelog.tres +++ b/data/items/treelog.tres @@ -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="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"] [resource] diff --git a/data/items/woodplanks.tres b/data/items/woodplanks.tres index db2c35b..a9e917e 100644 --- a/data/items/woodplanks.tres +++ b/data/items/woodplanks.tres @@ -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="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] script = ExtResource("3_c8yxb") diff --git a/data/items/workbench.tres b/data/items/workbench.tres index 55cb07a..4a6de87 100644 --- a/data/items/workbench.tres +++ b/data/items/workbench.tres @@ -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="PackedScene" uid="uid://da8vh0auq4p3l" path="res://assets/items/workbench.tscn" id="2_ucmwx"] diff --git a/data/items/wrench.tres b/data/items/wrench.tres index 5ce8f9e..5c09348 100644 --- a/data/items/wrench.tres +++ b/data/items/wrench.tres @@ -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="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_name = "Pickaxe" diff --git a/data/recipes/campfire.tres b/data/recipes/campfire.tres index 0468faa..45c2613 100644 --- a/data/recipes/campfire.tres +++ b/data/recipes/campfire.tres @@ -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="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"] [resource] script = ExtResource("1_q0xgv") name = "Campfire" -ingredients = Array[Resource("res://model/item.gd")]([ExtResource("1_c6ol1"), ExtResource("1_c6ol1"), ExtResource("1_c6ol1")]) -results = Array[Resource("res://model/item.gd")]([ExtResource("2_xeckb")]) +ingredients = Array[Resource("res://model/item_resource.gd")]([ExtResource("1_c6ol1"), ExtResource("1_c6ol1"), ExtResource("1_c6ol1")]) +results = Array[Resource("res://model/item_resource.gd")]([ExtResource("2_xeckb")]) diff --git a/data/recipes/fence_fortified.tres b/data/recipes/fence_fortified.tres index 761ed30..35f7a49 100644 --- a/data/recipes/fence_fortified.tres +++ b/data/recipes/fence_fortified.tres @@ -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://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"] @@ -8,5 +8,5 @@ [resource] script = ExtResource("1_h0rj4") name = "Fence Fortified" -ingredients = Array[Resource("res://model/item.gd")]([ExtResource("1_i6g7d"), ExtResource("1_i6g7d"), ExtResource("2_d54b6")]) -results = Array[Resource("res://model/item.gd")]([ExtResource("3_bsd6g")]) +ingredients = Array[Resource("res://model/item_resource.gd")]([ExtResource("1_i6g7d"), ExtResource("1_i6g7d"), ExtResource("2_d54b6")]) +results = Array[Resource("res://model/item_resource.gd")]([ExtResource("3_bsd6g")]) diff --git a/data/recipes/floor.tres b/data/recipes/floor.tres index 0882333..23b0865 100644 --- a/data/recipes/floor.tres +++ b/data/recipes/floor.tres @@ -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://cepy03xrewibs" path="res://data/items/floor.tres" id="2_m3y1r"] [resource] script = ExtResource("1_sqajm") name = "Floor" -ingredients = Array[Resource("res://model/item.gd")]([ExtResource("1_y7d3a"), ExtResource("1_y7d3a")]) -results = Array[Resource("res://model/item.gd")]([ExtResource("2_m3y1r")]) +ingredients = Array[Resource("res://model/item_resource.gd")]([ExtResource("1_y7d3a"), ExtResource("1_y7d3a")]) +results = Array[Resource("res://model/item_resource.gd")]([ExtResource("2_m3y1r")]) diff --git a/data/recipes/shovel.tres b/data/recipes/shovel.tres index 2eca736..3049a59 100644 --- a/data/recipes/shovel.tres +++ b/data/recipes/shovel.tres @@ -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://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"] @@ -8,5 +8,5 @@ [resource] script = ExtResource("1_eqskp") name = "Shovel" -ingredients = Array[Resource("res://model/item.gd")]([ExtResource("1_w20uq"), ExtResource("1_w20uq"), ExtResource("3_x6ond")]) -results = Array[Resource("res://model/item.gd")]([ExtResource("4_j1aun")]) +ingredients = Array[Resource("res://model/item_resource.gd")]([ExtResource("1_w20uq"), ExtResource("1_w20uq"), ExtResource("3_x6ond")]) +results = Array[Resource("res://model/item_resource.gd")]([ExtResource("4_j1aun")]) diff --git a/data/recipes/stick.tres b/data/recipes/stick.tres index b9662e4..d12b579 100644 --- a/data/recipes/stick.tres +++ b/data/recipes/stick.tres @@ -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://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] script = ExtResource("2_rsitf") name = "Stick" -ingredients = Array[Resource("res://model/item.gd")]([ExtResource("1_7pctr")]) -results = Array[Resource("res://model/item.gd")]([ExtResource("2_6dang"), ExtResource("2_6dang"), ExtResource("2_6dang"), ExtResource("2_6dang")]) +ingredients = Array[Resource("res://model/item_resource.gd")]([ExtResource("1_7pctr")]) +results = Array[Resource("res://model/item_resource.gd")]([ExtResource("2_6dang"), ExtResource("2_6dang"), ExtResource("2_6dang"), ExtResource("2_6dang")]) diff --git a/data/recipes/woodplank.tres b/data/recipes/woodplank.tres index 821d5bf..8489f10 100644 --- a/data/recipes/woodplank.tres +++ b/data/recipes/woodplank.tres @@ -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://dmjr6pmb17l2y" path="res://data/items/woodplanks.tres" id="2_17d0x"] [resource] script = ExtResource("1_8rbqv") name = "Woodplank" -ingredients = Array[Resource("res://model/item.gd")]([ExtResource("1_lfwgj")]) -results = Array[Resource("res://model/item.gd")]([ExtResource("2_17d0x"), ExtResource("2_17d0x"), ExtResource("2_17d0x"), ExtResource("2_17d0x")]) +ingredients = Array[Resource("res://model/item_resource.gd")]([ExtResource("1_lfwgj")]) +results = Array[Resource("res://model/item_resource.gd")]([ExtResource("2_17d0x"), ExtResource("2_17d0x"), ExtResource("2_17d0x"), ExtResource("2_17d0x")]) diff --git a/data/recipes/workbench.tres b/data/recipes/workbench.tres index c049259..6bce37a 100644 --- a/data/recipes/workbench.tres +++ b/data/recipes/workbench.tres @@ -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="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"] [resource] script = ExtResource("1_d10rq") name = "Workbench" -ingredients = Array[Resource("res://model/item.gd")]([ExtResource("1_2e1bt"), ExtResource("1_2e1bt"), ExtResource("1_2e1bt"), ExtResource("1_2e1bt")]) -results = Array[Resource("res://model/item.gd")]([ExtResource("2_a5ecf")]) +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_resource.gd")]([ExtResource("2_a5ecf")]) diff --git a/game_ui.gd b/game_ui.gd index 1f278ca..43d968c 100644 --- a/game_ui.gd +++ b/game_ui.gd @@ -14,12 +14,12 @@ var picked_up_level_items:Array[NodePath] = [] var _game_scene:Game var _player:Player -var _all_recipes:Array[Recipe] = [] +var _all_recipes:Array[RecipeResource] = [] func _ready(): for file in DirAccess.get_files_at("res://data/recipes"): 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) tool_container.connect("item_selected", _on_tool_select) diff --git a/inventory.gd b/inventory.gd index 822d8f1..23573a1 100644 --- a/inventory.gd +++ b/inventory.gd @@ -21,7 +21,7 @@ func get_free_item_stack_index() -> int: return -1 -func add_item(item:Item) -> bool: +func add_item(item:ItemResource) -> bool: for item_stack:ItemStack in _content: if item_stack.count == 0: continue @@ -47,7 +47,7 @@ func add_item(item:Item) -> bool: return false -func remove_item(item:Item): +func remove_item(item:ItemResource): for i in range(_content.size() - 1, -1, -1): var item_stack:ItemStack = _content[i] if item_stack.count == 0: @@ -76,8 +76,8 @@ func clear() -> void: _content[i] = ItemStack.new() -func has_all(items:Array[Item]) -> bool: - var needed:Array[Item] = items.duplicate() +func has_all(items:Array[ItemResource]) -> bool: + var needed:Array[ItemResource] = items.duplicate() for item_stack:ItemStack in _content: if item_stack.count == 0: diff --git a/model/built_structure_resource.gd b/model/built_structure_resource.gd new file mode 100644 index 0000000..03575b8 --- /dev/null +++ b/model/built_structure_resource.gd @@ -0,0 +1,5 @@ +class_name BuiltStructureResource +extends Resource + +@export var item:ItemResource +@export var global_transform:Transform3D diff --git a/model/game_profile.gd b/model/game_profile_resource.gd similarity index 64% rename from model/game_profile.gd rename to model/game_profile_resource.gd index 2f391dc..6a5c541 100644 --- a/model/game_profile.gd +++ b/model/game_profile_resource.gd @@ -1,6 +1,7 @@ -class_name GameProfile +class_name GameProfileResource extends Resource @export var game_name:String +@export var created:String @export var last_played:String @export var directory:String diff --git a/model/item.gd b/model/item_resource.gd similarity index 91% rename from model/item.gd rename to model/item_resource.gd index 475490b..a27895d 100644 --- a/model/item.gd +++ b/model/item_resource.gd @@ -1,4 +1,4 @@ -class_name Item +class_name ItemResource extends Resource @export var name:String diff --git a/model/recipe.gd b/model/recipe.gd deleted file mode 100644 index 2be00cb..0000000 --- a/model/recipe.gd +++ /dev/null @@ -1,6 +0,0 @@ -class_name Recipe -extends Resource - -@export var name:String -@export var ingredients:Array[Item] = [] -@export var results:Array[Item] = [] diff --git a/model/recipe_resource.gd b/model/recipe_resource.gd new file mode 100644 index 0000000..c398e17 --- /dev/null +++ b/model/recipe_resource.gd @@ -0,0 +1,6 @@ +class_name RecipeResource +extends Resource + +@export var name:String +@export var ingredients:Array[ItemResource] = [] +@export var results:Array[ItemResource] = [] diff --git a/model/save_game.gd b/model/save_game_resource.gd similarity index 76% rename from model/save_game.gd rename to model/save_game_resource.gd index e0f950c..fcf4d7e 100644 --- a/model/save_game.gd +++ b/model/save_game_resource.gd @@ -1,4 +1,4 @@ -class_name SaveGame +class_name SaveGameResource extends Resource @export var level:String @@ -7,3 +7,4 @@ extends Resource @export var player_transform:Transform3D @export var inventory:Array @export var level_pickup_items:Array[NodePath] +@export var built_structures:Dictionary diff --git a/objects/built_structure.gd b/objects/built_structure.gd new file mode 100644 index 0000000..160fd9e --- /dev/null +++ b/objects/built_structure.gd @@ -0,0 +1,4 @@ +class_name BuiltStructure +extends StaticBody3D + +@export var item:ItemResource = null diff --git a/objects/pickup_item.gd b/objects/pickup_item.gd index b117ef2..037c924 100644 --- a/objects/pickup_item.gd +++ b/objects/pickup_item.gd @@ -6,7 +6,7 @@ signal item_picked_up(node_path:NodePath) @onready var world_item_node = %WorldItemNode -@export var item:Item: +@export var item:ItemResource: get: return item set(value): diff --git a/objects/player.gd b/objects/player.gd index 5093d2d..ecdf690 100644 --- a/objects/player.gd +++ b/objects/player.gd @@ -14,7 +14,7 @@ const JUMP_VELOCITY = 3.5 var gravity = ProjectSettings.get_setting("physics/3d/default_gravity") var inventory:Inventory = Inventory.new() 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_damper:SpringDamper = SpringDamper.new(Vector3.ZERO) @@ -59,7 +59,7 @@ func _physics_process(delta): elif direction.length_squared() > 0.1 * 0.1: 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/idle", not is_moving) @@ -72,7 +72,7 @@ func set_tool_slot_index(value:int) -> void: selected_tool_slot_index = value 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) inventory.add_item(item) @@ -81,7 +81,7 @@ func get_actionable_global_transform() -> Vector3: 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(): child.queue_free() diff --git a/project.godot b/project.godot index 9e710a8..a03b751 100644 --- a/project.godot +++ b/project.godot @@ -31,6 +31,12 @@ project/assembly_name="UIAndInteractionTests" enabled=PackedStringArray("res://addons/dialogue_manager/plugin.cfg") +[global_group] + +built_structure="" +pickup_item="" +quest_state="" + [gui] theme/custom="res://ui/ui_theme.tres" diff --git a/quests/builder_missing_tool_quest.gd b/quests/builder_missing_tool_quest.gd index 4d4ddb1..588ecc4 100644 --- a/quests/builder_missing_tool_quest.gd +++ b/quests/builder_missing_tool_quest.gd @@ -37,7 +37,7 @@ func _process(_delta): if is_completed: 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]): is_hammer_found = true diff --git a/root_ui.gd b/root_ui.gd index 052bfb0..f176f81 100644 --- a/root_ui.gd +++ b/root_ui.gd @@ -13,9 +13,11 @@ enum ROOT_UI_STATE { UNDEFINED, MENU, GAME } var _root_ui_state:ROOT_UI_STATE = ROOT_UI_STATE.UNDEFINED var current_level_resource:String -var current_game_profile:GameProfile = null +var current_game_profile:GameProfileResource = null var current_game_profile_directory:String = "" +var _game_build_system:BuildSystem = null + func _ready(): if autostart_game_scene: load_scene(game_scene) @@ -44,6 +46,8 @@ func load_scene(scene_resource:PackedScene): print("Loading level '" + scene_resource.resource_path + "'") scene.add_child(scene_resource .instantiate()) current_level_resource = scene_resource.resource_path + + _game_build_system = scene.find_child("BuildSystem", true, false) as BuildSystem func save_game(): @@ -53,7 +57,7 @@ func save_game(): push_error("Cannot load game: no player found!") return - var save_data:SaveGame = SaveGame.new() + var save_data:SaveGameResource = SaveGameResource.new() save_data.level = current_level_resource 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(): 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") ResourceSaver.save(save_data, current_game_profile_directory + "/savegame.tres") activate_ui_panel(%GameUI) @@ -79,7 +95,7 @@ func load_game(): %GameUI.picked_up_level_items.clear() 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) load_scene(level_resource) @@ -115,6 +131,12 @@ func load_game(): %GameUI.picked_up_level_items.append(item_path) 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) @@ -142,6 +164,10 @@ func _on_start_game_profile(profile_path:String) -> void: push_error("Error loading game profile " + profile_path) 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() if not _is_savegame_available(): @@ -165,6 +191,7 @@ func _on_start_game_button_pressed(): set_root_ui_state(ROOT_UI_STATE.GAME) func _on_quit_game_scene(): + save_game() set_root_ui_state(ROOT_UI_STATE.MENU) func _on_quit_button_pressed(): diff --git a/root_ui.tscn b/root_ui.tscn index a4e793f..6d2e3f2 100644 --- a/root_ui.tscn +++ b/root_ui.tscn @@ -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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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="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"] @@ -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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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@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@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@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@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@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@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@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@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@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@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@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@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@33956" to="GameUI/BuildDialog/Panel/MarginContainer/VBoxContainer/BuildItemResourcesContainer/@Panel@33956" method="_on_mouse_entered"] diff --git a/systems/BuildSystem.gd b/systems/BuildSystem.gd index d5ca5d5..38c0d57 100644 --- a/systems/BuildSystem.gd +++ b/systems/BuildSystem.gd @@ -11,7 +11,7 @@ const COLLISION_MASK_STRUCTURES = 32 @onready var camera:Camera3D = %Camera -@export var build_item:Item = null +@export var build_item:ItemResource = null var camera_velocity:Vector3 = Vector3.ZERO var is_active:bool = false @@ -93,6 +93,17 @@ func _physics_process(_delta): 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: if not is_active: build_preview.hide() @@ -111,9 +122,7 @@ func _unhandled_input(event: InputEvent) -> void: return if build_item != null and event.is_action_pressed("interaction"): - var new_structure:Node3D = build_item.scene.instantiate() - new_structure.transform = build_preview.transform - built_structures.add_child(new_structure) + build_structure(build_item, build_preview.transform) get_viewport().set_input_as_handled() return diff --git a/ui/build_dialog.gd b/ui/build_dialog.gd index b740b1f..8a67011 100644 --- a/ui/build_dialog.gd +++ b/ui/build_dialog.gd @@ -5,12 +5,12 @@ class_name BuildDialog @onready var build_item_resources_container:ItemGrid = %BuildItemResourcesContainer var _inventory:Inventory = null -var _build_item_slots:Array[Item] = [] -var _build_item_resources:Array[Item] = [] -var _recipes:Array[Recipe] = [] +var _build_item_slots:Array[ItemResource] = [] +var _build_item_resources:Array[ItemResource] = [] +var _recipes:Array[RecipeResource] = [] var _recipe_for_item:Dictionary = {} -func open(recipes:Array[Recipe], inventory:Inventory): +func open(recipes:Array[RecipeResource], inventory:Inventory): _inventory = inventory _recipes = recipes @@ -20,7 +20,7 @@ func open(recipes:Array[Recipe], inventory:Inventory): build_items_container.select_slot(0) _build_item_slots.clear() - for recipe:Recipe in recipes: + for recipe:RecipeResource in recipes: if not recipe.results[0].is_buildable: continue @@ -33,7 +33,7 @@ func open(recipes:Array[Recipe], inventory:Inventory): 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) diff --git a/ui/create_game_ui.gd b/ui/create_game_ui.gd index 77d484e..fd29ad8 100644 --- a/ui/create_game_ui.gd +++ b/ui/create_game_ui.gd @@ -35,8 +35,9 @@ func create_game_directory() -> String: 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.created = 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") diff --git a/ui/game_profile_item.gd b/ui/game_profile_item.gd index fdf4f45..bb046e3 100644 --- a/ui/game_profile_item.gd +++ b/ui/game_profile_item.gd @@ -4,7 +4,7 @@ extends HBoxContainer @onready var name_label: Label = %NameLabel @onready var start_button: Button = %StartButton -var game_profile:GameProfile = null +var game_profile:GameProfileResource = null func _ready() -> void: if game_profile == null: diff --git a/ui/inventory_dialog.gd b/ui/inventory_dialog.gd index f99b12a..7469db6 100644 --- a/ui/inventory_dialog.gd +++ b/ui/inventory_dialog.gd @@ -11,10 +11,10 @@ extends MarginContainer @onready var inventory_container:ItemGrid = %InventoryContainer 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 show() @@ -41,7 +41,7 @@ func _unhandled_key_input(event:InputEvent): hide() -func update_crafting_widgets(recipe:Recipe): +func update_crafting_widgets(recipe:RecipeResource): ingredients_container.display(recipe.ingredients) results_container.display(recipe.results) @@ -49,7 +49,7 @@ func update_crafting_widgets(recipe:Recipe): 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 print("Selected recipe is: " + str(recipe) + " with index " + str(index)) diff --git a/ui/item_grid.gd b/ui/item_grid.gd index 28d424a..a9bae6b 100644 --- a/ui/item_grid.gd +++ b/ui/item_grid.gd @@ -41,7 +41,7 @@ func resize_grid() -> void: _slots.clear() while get_child_count() < rows * columns: - var slot_instance = slot_scene.instantiate() + var slot_instance = slot_scene.instantiate() as ItemSlot if allow_drag_drop: slot_instance.set_drag_drop_flags(ItemSlot.ALLOW_DRAG | ItemSlot.ALLOW_DROP) add_child(slot_instance) @@ -103,7 +103,7 @@ func displayStacks(item_stacks:Array[ItemStack]): item_stack_index = item_stack_index + 1 -func display(item_stacks:Array[Item]): +func display(item_stacks:Array[ItemResource]): var item_stack_index = 0 for slot:ItemSlot in _slots: diff --git a/ui/item_slot.gd b/ui/item_slot.gd index 8f50285..cd47ea9 100644 --- a/ui/item_slot.gd +++ b/ui/item_slot.gd @@ -30,7 +30,7 @@ func _set_selected(new_state): func set_drag_drop_flags(flags:int) -> void: drag_drop_flags = flags -func get_item() -> Item: +func get_item() -> ItemResource: if _item_stack == null: return null diff --git a/ui/item_stack.gd b/ui/item_stack.gd index f6f90e1..56aff9f 100644 --- a/ui/item_stack.gd +++ b/ui/item_stack.gd @@ -1,5 +1,5 @@ class_name ItemStack extends Node -var item:Item = null +var item:ItemResource = null var count:int = 0 diff --git a/ui/start_game_menu_ui.gd b/ui/start_game_menu_ui.gd index 787356e..cf42ccc 100644 --- a/ui/start_game_menu_ui.gd +++ b/ui/start_game_menu_ui.gd @@ -6,7 +6,7 @@ signal start_game(game_path:String) 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. func _ready() -> void: @@ -21,7 +21,7 @@ func update_game_profile_list() -> void: return 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: push_warning("Warning: could not open game profile " + profile_directory) continue @@ -34,7 +34,7 @@ func update_game_profiles_widget() -> void: game_profile_v_box_container.remove_child(profile_entry) 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() game_profile_item.game_profile = profile game_profile_v_box_container.add_child(game_profile_item) diff --git a/world/level.tscn b/world/level.tscn index 24bb017..d3c9e77 100644 --- a/world/level.tscn +++ b/world/level.tscn @@ -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="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://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="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="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"] @@ -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://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://cl7dkbxsdhmvm" path="res://assets/buildings/castle_0.tscn" id="23_g2ojm"] [sub_resource type="CylinderShape3D" id="CylinderShape3D_0soe6"] 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) 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="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")] 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="."] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.239327, 0) mesh = SubResource("PlaneMesh_6aebw") [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) - -[editable path="Quests/BuilderMissingTool/Merchant"] diff --git a/world/water_simple_warping.tres b/world/water_simple_warping.tres index fa557a5..bd00026 100644 --- a/world/water_simple_warping.tres +++ b/world/water_simple_warping.tres @@ -91,7 +91,6 @@ void fragment() { } " -graph_offset = Vector2(-535.526, -182.815) nodes/fragment/0/position = Vector2(720, 140) nodes/fragment/2/node = SubResource("VisualShaderNodeTexture_l6sy6") nodes/fragment/2/position = Vector2(520, 140)