diff --git a/Scenes/JonScene.tscn b/Scenes/JonScene.tscn index a347432..12c0a7a 100644 --- a/Scenes/JonScene.tscn +++ b/Scenes/JonScene.tscn @@ -25,6 +25,7 @@ [ext_resource type="PackedScene" uid="uid://dgk88esxip5xi" path="res://items/knife.tscn" id="23_qxyk8"] [ext_resource type="PackedScene" uid="uid://drwuhqb3pjtiy" path="res://items/potato.tscn" id="24_u5c1m"] [ext_resource type="PackedScene" uid="uid://bpvp20hiagxxb" path="res://items/chopped_potato.tscn" id="25_y7baw"] +[ext_resource type="PackedScene" uid="uid://cmxe1av5nsxyq" path="res://UI/shop_menu_3d.tscn" id="26_qxyk8"] [sub_resource type="Environment" id="Environment_bvwq1"] background_mode = 2 @@ -73,7 +74,7 @@ script = ExtResource("1_57ppd") environment = SubResource("Environment_bvwq1") [node name="XROrigin3D" parent="." unique_id=2055526621 groups=["local_xr_origin"] instance=ExtResource("2_o1b3t")] -transform = Transform3D(-1, 0, 8.742278e-08, 0, 1, 0, -8.742278e-08, 0, -1, -1.8943893, 0.9667189, -4.301105) +transform = Transform3D(1.3113416e-07, 0, 1, 0, 1, 0, -1, 0, 1.3113416e-07, -1.2943892, 0.9667189, 4.698895) [node name="WorldContent" type="Node3D" parent="." unique_id=262398468] @@ -489,3 +490,6 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.96, 1.1400001, 1.6800001) [node name="Chips2" parent="." unique_id=2054749156 instance=ExtResource("22_2ndvi")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.9600003, 1.1400001, 1.08) + +[node name="ShopMenu3D" parent="." unique_id=331240263 instance=ExtResource("26_qxyk8")] +transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, -3.9984353, 1.0982544, 4.0508556) diff --git a/Scenes/test_small.tscn b/Scenes/test_small.tscn index 32970b6..38c7fa8 100644 --- a/Scenes/test_small.tscn +++ b/Scenes/test_small.tscn @@ -11,6 +11,7 @@ [ext_resource type="Script" uid="uid://bsdpd18i1i17s" path="res://prefabs/build_mode_controller.gd" id="9_atgwk"] [ext_resource type="PackedScene" uid="uid://dvrk268s7gkxh" path="res://stations/sink.tscn" id="10_dhas4"] [ext_resource type="PackedScene" uid="uid://caf0xanmxbshy" path="res://stations/table.tscn" id="11_gaw43"] +[ext_resource type="PackedScene" uid="uid://cmxe1av5nsxyq" path="res://UI/shop_menu_3d.tscn" id="12_o0gyi"] [sub_resource type="Environment" id="Environment_bvwq1"] background_mode = 2 @@ -34,6 +35,9 @@ size = Vector3(20, 0.1, 20) [sub_resource type="BoxShape3D" id="BoxShape3D_24d3s"] size = Vector3(20, 10, 0.1) +[sub_resource type="ViewportTexture" id="ViewportTexture_o0gyi"] +viewport_path = NodePath("SubViewport") + [node name="Main" type="Node3D" unique_id=1312265607] script = ExtResource("1_atgwk") @@ -41,7 +45,7 @@ script = ExtResource("1_atgwk") environment = SubResource("Environment_bvwq1") [node name="XROrigin3D" parent="." unique_id=2055526621 instance=ExtResource("3_bryd6")] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.9667189, 1.2) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.9667189, 2.4) [node name="DirectionalLight3D" type="DirectionalLight3D" parent="." unique_id=1376644384] transform = Transform3D(-0.8660254, -0.43301278, 0.24999999, 0.3022632, -0.05510214, 0.9516306, -0.39829266, 0.8997021, 0.17860365, 0, 0, 0) @@ -107,7 +111,17 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.6, 0, 0) script = ExtResource("9_atgwk") [node name="Sink" parent="." unique_id=1559059799 instance=ExtResource("10_dhas4")] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.6, 0.5, 0.6) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.4, 0.5, 0.6) [node name="Table" parent="." unique_id=1863572470 instance=ExtResource("11_gaw43")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.4, 0.5, 1.8) + +[node name="Shopmenu" parent="." unique_id=938821446 instance=ExtResource("12_o0gyi")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.2, 1.1818607, 0.4109261) +texture = SubResource("ViewportTexture_o0gyi") + +[node name="Counter2" parent="." unique_id=672880121 instance=ExtResource("7_jnxsa")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6.6000004, 0.6, -1.2) + +[node name="Hob2" parent="." unique_id=172418174 instance=ExtResource("5_gfdi7")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4.8, 0.6, -1.2) diff --git a/Stations/table.tscn b/Stations/table.tscn index 87b6325..4ac6342 100644 --- a/Stations/table.tscn +++ b/Stations/table.tscn @@ -37,6 +37,8 @@ station = NodePath("../Table") [node name="Table" type="StaticBody3D" parent="." unique_id=1863572470 groups=["station", "table"]] script = ExtResource("1_2vcpj") +thinking_duration = 1.0 +ordering_duration = 4.0 money_sound = ExtResource("2_jslhm") [node name="CollisionShape3D" type="CollisionShape3D" parent="Table" unique_id=228053941] diff --git a/Textures/shop/counter.png b/Textures/shop/counter.png new file mode 100644 index 0000000..b159a48 Binary files /dev/null and b/Textures/shop/counter.png differ diff --git a/Textures/shop/counter.png.import b/Textures/shop/counter.png.import new file mode 100644 index 0000000..bddbdde --- /dev/null +++ b/Textures/shop/counter.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c0nd4nh4vja73" +path="res://.godot/imported/counter.png-34b9e7d123a9cc4ef081254e27f4cf64.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://textures/shop/counter.png" +dest_files=["res://.godot/imported/counter.png-34b9e7d123a9cc4ef081254e27f4cf64.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Textures/shop/hob.png b/Textures/shop/hob.png new file mode 100644 index 0000000..012dbd6 Binary files /dev/null and b/Textures/shop/hob.png differ diff --git a/Textures/shop/hob.png.import b/Textures/shop/hob.png.import new file mode 100644 index 0000000..928a10b --- /dev/null +++ b/Textures/shop/hob.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ejby14dl1svr" +path="res://.godot/imported/hob.png-d5f291318e31b8c1fd380973ba2b3e5f.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://textures/shop/hob.png" +dest_files=["res://.godot/imported/hob.png-d5f291318e31b8c1fd380973ba2b3e5f.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Textures/shop/sink.png b/Textures/shop/sink.png new file mode 100644 index 0000000..c6ddd58 Binary files /dev/null and b/Textures/shop/sink.png differ diff --git a/Textures/shop/sink.png.import b/Textures/shop/sink.png.import new file mode 100644 index 0000000..d16cd97 --- /dev/null +++ b/Textures/shop/sink.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ecdu0qqhib4" +path="res://.godot/imported/sink.png-b4ba3b467f19b9cacd807739403f133b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://textures/shop/sink.png" +dest_files=["res://.godot/imported/sink.png-b4ba3b467f19b9cacd807739403f133b.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/UI/game_over_panel.tscn b/UI/game_over_panel.tscn index 8f8362f..4edaa14 100644 --- a/UI/game_over_panel.tscn +++ b/UI/game_over_panel.tscn @@ -74,4 +74,5 @@ unique_name_in_owner = true custom_minimum_size = Vector2(0, 64) layout_mode = 2 theme_override_font_sizes/font_size = 26 -text = "Restasrt?" +text = "Restart +" diff --git a/UI/shop.tscn b/UI/shop.tscn new file mode 100644 index 0000000..13970c9 --- /dev/null +++ b/UI/shop.tscn @@ -0,0 +1,294 @@ +[gd_scene format=3 uid="uid://dihdlvlebtp5j"] + +[ext_resource type="Script" uid="uid://xrfp03b32j1t" path="res://UI/shop_ui.gd" id="1_2k6ie"] +[ext_resource type="PackedScene" uid="uid://u7rpukx5ebqo" path="res://UI/shop_station_panel.tscn" id="1_pogqh"] +[ext_resource type="PackedScene" uid="uid://efaec6ymgabo" path="res://stations/Counter.tscn" id="2_35otv"] +[ext_resource type="Texture2D" uid="uid://c0nd4nh4vja73" path="res://textures/shop/counter.png" id="3_74fni"] +[ext_resource type="PackedScene" uid="uid://j7caslh27nor" path="res://stations/Hob.tscn" id="4_l3qkl"] +[ext_resource type="Texture2D" uid="uid://ejby14dl1svr" path="res://textures/shop/hob.png" id="5_2k6ie"] +[ext_resource type="PackedScene" uid="uid://dvrk268s7gkxh" path="res://stations/sink.tscn" id="6_rktus"] +[ext_resource type="Texture2D" uid="uid://ecdu0qqhib4" path="res://textures/shop/sink.png" id="7_4titf"] + +[sub_resource type="LabelSettings" id="LabelSettings_vlqg6"] +font_size = 35 +outline_size = 10 +outline_color = Color(0.1, 0.1, 0.1, 1) + +[node name="Shop" type="Panel" unique_id=783244304] +offset_right = 540.0 +offset_bottom = 546.0 +script = ExtResource("1_2k6ie") + +[node name="Title" type="Label" parent="." unique_id=502212741] +layout_mode = 1 +anchors_preset = -1 +offset_left = 20.0 +offset_top = 20.0 +text = "Shop" +label_settings = SubResource("LabelSettings_vlqg6") + +[node name="Money" type="Label" parent="." unique_id=273879940] +layout_mode = 1 +anchors_preset = -1 +anchor_left = 1.0 +anchor_right = 1.0 +offset_top = 20.0 +offset_right = -20.0 +grow_horizontal = 0 +pivot_offset_ratio = Vector2(1, 0) +text = "X $" +label_settings = SubResource("LabelSettings_vlqg6") +horizontal_alignment = 2 + +[node name="TabContainer" type="TabContainer" parent="." unique_id=783976311] +layout_mode = 1 +anchors_preset = -1 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = 20.0 +offset_top = 80.0 +offset_right = -20.0 +offset_bottom = -20.0 +current_tab = 0 + +[node name="Stations" type="GridContainer" parent="TabContainer" unique_id=189446761] +layout_mode = 2 +columns = 6 +metadata/_tab_index = 0 + +[node name="StationButton" parent="TabContainer/Stations" unique_id=2079583080 instance=ExtResource("1_pogqh")] +layout_mode = 2 +station_scene = ExtResource("2_35otv") +icon_texture = ExtResource("3_74fni") +station_name = "Counter" +cost = 30 + +[node name="Panel2" parent="TabContainer/Stations" unique_id=467593590 instance=ExtResource("1_pogqh")] +layout_mode = 2 +station_scene = ExtResource("4_l3qkl") +icon_texture = ExtResource("5_2k6ie") +station_name = "Hob" +cost = 50 + +[node name="Panel3" parent="TabContainer/Stations" unique_id=1096388793 instance=ExtResource("1_pogqh")] +layout_mode = 2 +station_scene = ExtResource("6_rktus") +icon_texture = ExtResource("7_4titf") +station_name = "Sink" +cost = 40 + +[node name="StationButton2" parent="TabContainer/Stations" unique_id=1037758002 instance=ExtResource("1_pogqh")] +layout_mode = 2 +station_scene = ExtResource("2_35otv") +icon_texture = ExtResource("3_74fni") +station_name = "Counter" +cost = 30 + +[node name="Panel4" parent="TabContainer/Stations" unique_id=1667497770 instance=ExtResource("1_pogqh")] +layout_mode = 2 +station_scene = ExtResource("4_l3qkl") +icon_texture = ExtResource("5_2k6ie") +station_name = "Hob" +cost = 50 + +[node name="Panel5" parent="TabContainer/Stations" unique_id=1982065975 instance=ExtResource("1_pogqh")] +layout_mode = 2 +station_scene = ExtResource("6_rktus") +icon_texture = ExtResource("7_4titf") +station_name = "Sink" +cost = 40 + +[node name="StationButton3" parent="TabContainer/Stations" unique_id=1301410231 instance=ExtResource("1_pogqh")] +layout_mode = 2 +station_scene = ExtResource("2_35otv") +icon_texture = ExtResource("3_74fni") +station_name = "Counter" +cost = 30 + +[node name="Panel6" parent="TabContainer/Stations" unique_id=1995120839 instance=ExtResource("1_pogqh")] +layout_mode = 2 +station_scene = ExtResource("4_l3qkl") +icon_texture = ExtResource("5_2k6ie") +station_name = "Hob" +cost = 50 + +[node name="Panel7" parent="TabContainer/Stations" unique_id=761089034 instance=ExtResource("1_pogqh")] +layout_mode = 2 +station_scene = ExtResource("6_rktus") +icon_texture = ExtResource("7_4titf") +station_name = "Sink" +cost = 40 + +[node name="StationButton4" parent="TabContainer/Stations" unique_id=1417297413 instance=ExtResource("1_pogqh")] +layout_mode = 2 +station_scene = ExtResource("2_35otv") +icon_texture = ExtResource("3_74fni") +station_name = "Counter" +cost = 30 + +[node name="Panel8" parent="TabContainer/Stations" unique_id=1691237963 instance=ExtResource("1_pogqh")] +layout_mode = 2 +station_scene = ExtResource("4_l3qkl") +icon_texture = ExtResource("5_2k6ie") +station_name = "Hob" +cost = 50 + +[node name="Panel9" parent="TabContainer/Stations" unique_id=1365829405 instance=ExtResource("1_pogqh")] +layout_mode = 2 +station_scene = ExtResource("6_rktus") +icon_texture = ExtResource("7_4titf") +station_name = "Sink" +cost = 40 + +[node name="StationButton5" parent="TabContainer/Stations" unique_id=2041495798 instance=ExtResource("1_pogqh")] +layout_mode = 2 +station_scene = ExtResource("2_35otv") +icon_texture = ExtResource("3_74fni") +station_name = "Counter" +cost = 30 + +[node name="Panel10" parent="TabContainer/Stations" unique_id=1193707247 instance=ExtResource("1_pogqh")] +layout_mode = 2 +station_scene = ExtResource("4_l3qkl") +icon_texture = ExtResource("5_2k6ie") +station_name = "Hob" +cost = 50 + +[node name="Panel11" parent="TabContainer/Stations" unique_id=1812217593 instance=ExtResource("1_pogqh")] +layout_mode = 2 +station_scene = ExtResource("6_rktus") +icon_texture = ExtResource("7_4titf") +station_name = "Sink" +cost = 40 + +[node name="StationButton6" parent="TabContainer/Stations" unique_id=495155208 instance=ExtResource("1_pogqh")] +layout_mode = 2 +station_scene = ExtResource("2_35otv") +icon_texture = ExtResource("3_74fni") +station_name = "Counter" +cost = 30 + +[node name="Panel12" parent="TabContainer/Stations" unique_id=773081956 instance=ExtResource("1_pogqh")] +layout_mode = 2 +station_scene = ExtResource("4_l3qkl") +icon_texture = ExtResource("5_2k6ie") +station_name = "Hob" +cost = 50 + +[node name="Panel13" parent="TabContainer/Stations" unique_id=1722465236 instance=ExtResource("1_pogqh")] +layout_mode = 2 +station_scene = ExtResource("6_rktus") +icon_texture = ExtResource("7_4titf") +station_name = "Sink" +cost = 40 + +[node name="StationButton7" parent="TabContainer/Stations" unique_id=920721283 instance=ExtResource("1_pogqh")] +layout_mode = 2 +station_scene = ExtResource("2_35otv") +icon_texture = ExtResource("3_74fni") +station_name = "Counter" +cost = 30 + +[node name="Panel14" parent="TabContainer/Stations" unique_id=280005981 instance=ExtResource("1_pogqh")] +layout_mode = 2 +station_scene = ExtResource("4_l3qkl") +icon_texture = ExtResource("5_2k6ie") +station_name = "Hob" +cost = 50 + +[node name="Panel15" parent="TabContainer/Stations" unique_id=1032476128 instance=ExtResource("1_pogqh")] +layout_mode = 2 +station_scene = ExtResource("6_rktus") +icon_texture = ExtResource("7_4titf") +station_name = "Sink" +cost = 40 + +[node name="StationButton8" parent="TabContainer/Stations" unique_id=1596739090 instance=ExtResource("1_pogqh")] +layout_mode = 2 +station_scene = ExtResource("2_35otv") +icon_texture = ExtResource("3_74fni") +station_name = "Counter" +cost = 30 + +[node name="Panel16" parent="TabContainer/Stations" unique_id=1045125889 instance=ExtResource("1_pogqh")] +layout_mode = 2 +station_scene = ExtResource("4_l3qkl") +icon_texture = ExtResource("5_2k6ie") +station_name = "Hob" +cost = 50 + +[node name="Panel17" parent="TabContainer/Stations" unique_id=85646771 instance=ExtResource("1_pogqh")] +layout_mode = 2 +station_scene = ExtResource("6_rktus") +icon_texture = ExtResource("7_4titf") +station_name = "Sink" +cost = 40 + +[node name="StationButton9" parent="TabContainer/Stations" unique_id=883484649 instance=ExtResource("1_pogqh")] +layout_mode = 2 +station_scene = ExtResource("2_35otv") +icon_texture = ExtResource("3_74fni") +station_name = "Counter" +cost = 30 + +[node name="Panel18" parent="TabContainer/Stations" unique_id=259381012 instance=ExtResource("1_pogqh")] +layout_mode = 2 +station_scene = ExtResource("4_l3qkl") +icon_texture = ExtResource("5_2k6ie") +station_name = "Hob" +cost = 50 + +[node name="Panel19" parent="TabContainer/Stations" unique_id=1701937266 instance=ExtResource("1_pogqh")] +layout_mode = 2 +station_scene = ExtResource("6_rktus") +icon_texture = ExtResource("7_4titf") +station_name = "Sink" +cost = 40 + +[node name="StationButton10" parent="TabContainer/Stations" unique_id=381125476 instance=ExtResource("1_pogqh")] +layout_mode = 2 +station_scene = ExtResource("2_35otv") +icon_texture = ExtResource("3_74fni") +station_name = "Counter" +cost = 30 + +[node name="Panel20" parent="TabContainer/Stations" unique_id=1573978940 instance=ExtResource("1_pogqh")] +layout_mode = 2 +station_scene = ExtResource("4_l3qkl") +icon_texture = ExtResource("5_2k6ie") +station_name = "Hob" +cost = 50 + +[node name="Panel21" parent="TabContainer/Stations" unique_id=555544070 instance=ExtResource("1_pogqh")] +layout_mode = 2 +station_scene = ExtResource("6_rktus") +icon_texture = ExtResource("7_4titf") +station_name = "Sink" +cost = 40 + +[node name="Food" type="GridContainer" parent="TabContainer" unique_id=422899445] +visible = false +layout_mode = 2 +columns = 6 +metadata/_tab_index = 1 + +[node name="StationButton" parent="TabContainer/Food" unique_id=586692243 instance=ExtResource("1_pogqh")] +layout_mode = 2 +station_scene = ExtResource("2_35otv") +icon_texture = ExtResource("3_74fni") +station_name = "Counter" +cost = 30 + +[node name="Panel2" parent="TabContainer/Food" unique_id=918076583 instance=ExtResource("1_pogqh")] +layout_mode = 2 +station_scene = ExtResource("4_l3qkl") +icon_texture = ExtResource("5_2k6ie") +station_name = "Hob" +cost = 50 + +[node name="Panel3" parent="TabContainer/Food" unique_id=387664331 instance=ExtResource("1_pogqh")] +layout_mode = 2 +station_scene = ExtResource("6_rktus") +icon_texture = ExtResource("7_4titf") +station_name = "Sink" +cost = 40 diff --git a/UI/shop_menu_3d.tscn b/UI/shop_menu_3d.tscn new file mode 100644 index 0000000..91eca8a --- /dev/null +++ b/UI/shop_menu_3d.tscn @@ -0,0 +1,13 @@ +[gd_scene format=3 uid="uid://cmxe1av5nsxyq"] + +[ext_resource type="PackedScene" uid="uid://dihdlvlebtp5j" path="res://UI/shop.tscn" id="1_e5js8"] +[ext_resource type="PackedScene" uid="uid://clujaf3u776a3" path="res://addons/godot-xr-tools/objects/viewport_2d_in_3d.tscn" id="1_qtkxm"] + +[node name="ShopMenu3D" type="Node3D" unique_id=331240263] +transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 0, 0, 0) + +[node name="Viewport2Din3D" parent="." unique_id=651579338 instance=ExtResource("1_qtkxm")] +scene = ExtResource("1_e5js8") +viewport_size = Vector2(1185.485, 733.795) +transparent = 1 +scene_properties_keys = PackedStringArray("shop_ui.gd") diff --git a/UI/shop_station_button.gd b/UI/shop_station_button.gd new file mode 100644 index 0000000..2f8693c --- /dev/null +++ b/UI/shop_station_button.gd @@ -0,0 +1,21 @@ +extends Panel + +@export var station_scene: PackedScene +@export var icon_texture: Texture2D +@export var station_name: String = "Station" +@export var cost: int = 100 + +@export var name_label: Label +@export var cost_label: Label +@export var button: Button + + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + name_label.text = station_name + cost_label.text = str(cost) + "$" + button.icon = icon_texture + + +func _on_button_pressed() -> void: + print("ShopStationButton buy ", station_name) diff --git a/UI/shop_station_button.gd.uid b/UI/shop_station_button.gd.uid new file mode 100644 index 0000000..64099ef --- /dev/null +++ b/UI/shop_station_button.gd.uid @@ -0,0 +1 @@ +uid://bkal73wu2ajoi diff --git a/UI/shop_station_panel.tscn b/UI/shop_station_panel.tscn new file mode 100644 index 0000000..4769c36 --- /dev/null +++ b/UI/shop_station_panel.tscn @@ -0,0 +1,91 @@ +[gd_scene format=3 uid="uid://u7rpukx5ebqo"] + +[ext_resource type="Script" uid="uid://bkal73wu2ajoi" path="res://UI/shop_station_button.gd" id="1_5sumr"] +[ext_resource type="Texture2D" uid="uid://dw71nomipotqu" path="res://icon.svg" id="2_e1k4i"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_k4f0j"] +content_margin_left = 0.0 +content_margin_top = 0.0 +content_margin_right = 0.0 +content_margin_bottom = 0.0 +bg_color = Color(0.44921166, 0.47363085, 0.49934196, 0.6) +corner_radius_top_left = 3 +corner_radius_top_right = 3 +corner_radius_bottom_right = 3 +corner_radius_bottom_left = 3 +corner_detail = 5 + +[sub_resource type="LabelSettings" id="LabelSettings_24d3s"] +font_size = 18 + +[node name="Panel" type="Panel" unique_id=2079583080 node_paths=PackedStringArray("name_label", "cost_label", "button")] +custom_minimum_size = Vector2(80, 80) +size_flags_horizontal = 4 +size_flags_vertical = 4 +theme_override_styles/panel = SubResource("StyleBoxFlat_k4f0j") +script = ExtResource("1_5sumr") +name_label = NodePath("PanelName/Name") +cost_label = NodePath("PanelCost/Cost") +button = NodePath("Button") + +[node name="Button" type="Button" parent="." unique_id=1482490300] +layout_mode = 1 +anchors_preset = -1 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = 3.0 +offset_top = 3.0 +offset_right = -3.0 +offset_bottom = -3.0 +grow_horizontal = 2 +grow_vertical = 2 +icon = ExtResource("2_e1k4i") +icon_alignment = 1 +expand_icon = true + +[node name="PanelName" type="Panel" parent="." unique_id=580016879] +layout_mode = 1 +anchors_preset = -1 +anchor_right = 1.0 +anchor_bottom = 0.391 + +[node name="Name" type="Label" parent="PanelName" unique_id=455863013] +layout_mode = 1 +anchors_preset = -1 +offset_left = 4.0 +offset_top = 6.0 +offset_right = 122.0 +offset_bottom = 32.0 +grow_horizontal = 2 +grow_vertical = 2 +text = "Station" +label_settings = SubResource("LabelSettings_24d3s") + +[node name="PanelCost" type="Panel" parent="." unique_id=1959621473] +custom_maximum_size = Vector2(60, -1) +layout_mode = 1 +anchors_preset = -1 +anchor_left = 0.411 +anchor_top = 0.65 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 0 +grow_vertical = 0 + +[node name="Cost" type="Label" parent="PanelCost" unique_id=924064438] +layout_mode = 1 +anchors_preset = -1 +anchor_left = 1.0 +anchor_top = 1.0 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = -34.0 +offset_top = -29.0 +offset_right = -6.0 +offset_bottom = -6.0 +grow_horizontal = 0 +grow_vertical = 0 +text = "999$" +horizontal_alignment = 2 + +[connection signal="pressed" from="Button" to="." method="_on_button_pressed"] diff --git a/UI/shop_ui.gd b/UI/shop_ui.gd new file mode 100644 index 0000000..898150c --- /dev/null +++ b/UI/shop_ui.gd @@ -0,0 +1,12 @@ +extends Panel + +@onready var money_label: Label = $Money + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta: float) -> void: + money_label.text = str(GameManager.money) + "$" diff --git a/UI/shop_ui.gd.uid b/UI/shop_ui.gd.uid new file mode 100644 index 0000000..5a743c8 --- /dev/null +++ b/UI/shop_ui.gd.uid @@ -0,0 +1 @@ +uid://xrfp03b32j1t diff --git a/documentation/Notes.md b/documentation/Notes.md new file mode 100644 index 0000000..588b8b6 --- /dev/null +++ b/documentation/Notes.md @@ -0,0 +1,52 @@ +## Stations +counter +hob +sink +table +extra knife +extre rolling pin +mop +bin + +## Food dispensers +burger +buns +potato +tomato +onion +flour +pasta plates +meat +cheese + +## Automation +belt +inserter +splitter +mixer +blender +dishwasher + +## Storage +shelf +freezer +frozen prep station equivilant + +## Control +Phone +Napkins (no mess consumable) +sharp cutlery (eat faster consumable) +Self order terminal + + + + +inserter + filer + output min empty space slider + +belts share inventory + +tables share + + diff --git a/global/GameManager.gd b/global/GameManager.gd index e67182b..0ee738e 100644 --- a/global/GameManager.gd +++ b/global/GameManager.gd @@ -1,7 +1,7 @@ class_name GameManager extends Node -static var money: int +static var money: int = 20 static var meals_in_play: Array[String] static var sides_in_play: Array[String] diff --git a/recipes.yaml.uid b/recipes.yaml.uid deleted file mode 100644 index 26c7014..0000000 --- a/recipes.yaml.uid +++ /dev/null @@ -1 +0,0 @@ -uid://be8o8m6xpp3kc