From a9475aaaf93f14af3e50ca068250b468cee5b4f6 Mon Sep 17 00:00:00 2001 From: Nicola Date: Wed, 6 May 2026 20:13:54 +0200 Subject: [PATCH] Added decorations to main menu, added data for research and buildings --- Assets/Buildings.json | 159 ++++++++++++++++++++++++++++++++++++++++++ Assets/Research.json | 72 +++++++++++++++++++ Scenes/MainMenu.tscn | 48 +++++++++++++ 3 files changed, 279 insertions(+) create mode 100644 Assets/Buildings.json create mode 100644 Assets/Research.json diff --git a/Assets/Buildings.json b/Assets/Buildings.json new file mode 100644 index 0000000..60956fc --- /dev/null +++ b/Assets/Buildings.json @@ -0,0 +1,159 @@ +[ + { + "id": "workbench", + "inputs": [ + { "item": "stone", "amount": 1 } + ], + "research": "basics", + "texture": "res://Assets/Images/Buildings/Workbench.png", + "crafttime": 1.0, + "stacksize": 1 + }, + { + "id": "furnace", + "inputs": [ + { "item": "stone", "amount": 1 }, + { "item": "heating_element_v1", "amount": 1 } + ], + "research": "stoneage", + "texture": "res://Assets/Images/Buildings/Furnace.png", + "crafttime": 1.0, + "stacksize": 1 + }, + { + "id": "crusher", + "inputs": [ + { "item": "stone_gear", "amount": 1 }, + { "item": "rope", "amount": 1 }, + { "item": "stone", "amount": 1 } + ], + "research": "stoneage", + "texture": "res://Assets/Images/Buildings/Crusher.png", + "crafttime": 1.0, + "stacksize": 1 + }, + { + "id": "press", + "inputs": [ + { "item": "stone", "amount": 1 }, + { "item": "rope", "amount": 1 } + ], + "research": "stoneage", + "texture": "res://Assets/Images/Buildings/Press.png", + "crafttime": 1.0, + "stacksize": 1 + }, + { + "id": "anvil", + "inputs": [ + { "item": "stone", "amount": 1 }, + { "item": "rope", "amount": 1 } + ], + "research": "stoneage", + "texture": "res://Assets/Images/Buildings/Anvil.png", + "crafttime": 1.0, + "stacksize": 1 + }, + { + "id": "loom", + "inputs": [ + { "item": "copper_gear", "amount": 1 }, + { "item": "rope", "amount": 1 } + ], + "research": "copperage", + "texture": "res://Assets/Images/Buildings/Loom.png", + "crafttime": 1.0, + "stacksize": 1 + }, + { + "id": "steam_generator_v1", + "inputs": [ + { "item": "dynamo_v1", "amount": 1 }, + { "item": "battery_v1", "amount": 1 }, + { "item": "heating_element_v1", "amount": 1 } + ], + "research": "copperage", + "texture": "res://Assets/Images/Buildings/SteamGeneratorv1.png", + "crafttime": 1.0, + "stacksize": 1 + }, + { + "id": "stone_chest", + "inputs": [ + { "item": "stone_plate", "amount": 1 }, + { "item": "rope", "amount": 1 } + ], + "research": "stoneage", + "texture": "res://Assets/Images/Buildings/StoneChest.png", + "crafttime": 1.0, + "stacksize": 1 + }, + { + "id": "copper_chest", + "inputs": [ + { "item": "copper_plate", "amount": 1 }, + { "item": "rope", "amount": 1 } + ], + "research": "copperage", + "texture": "res://Assets/Images/Buildings/CopperChest.png", + "crafttime": 1.0, + "stacksize": 1 + }, + { + "id": "bronze_chest", + "inputs": [ + { "item": "bronze_plate", "amount": 1 }, + { "item": "rope", "amount": 1 } + ], + "research": "bronzeage", + "texture": "res://Assets/Images/Buildings/BronzeChest.png", + "crafttime": 1.0, + "stacksize": 1 + }, + { + "id": "iron_chest", + "inputs": [ + { "item": "iron_plate", "amount": 1 }, + { "item": "rope", "amount": 1 } + ], + "research": "ironage", + "texture": "res://Assets/Images/Buildings/IronChest.png", + "crafttime": 1.0, + "stacksize": 1 + }, + { + "id": "steam_generator_v2", + "inputs": [ + { "item": "dynamo_v2", "amount": 1 }, + { "item": "battery_v2", "amount": 1 }, + { "item": "heating_element_v1", "amount": 1 } + ], + "research": "ironage", + "texture": "res://Assets/Images/Buildings/SteamGeneratorv2.png", + "crafttime": 1.0, + "stacksize": 1 + }, + { + "id": "water_purifier", + "inputs": [ + { "item": "heating_element_v1", "amount": 1 }, + { "item": "glass_bottles", "amount": 1 } + ], + "research": "stoneage", + "texture": "res://Assets/Images/Buildings/WaterPurifier.png", + "crafttime": 1.0, + "stacksize": 1 + }, + { + "id": "glassblower", + "inputs": [ + { "item": "heating_element_v1", "amount": 1 }, + { "item": "stone", "amount": 1 }, + { "item": "copper_rod", "amount": 1 } + ], + "research": "stoneage", + "texture": "res://Assets/Images/Buildings/Glassblower.png", + "crafttime": 1.0, + "stacksize": 1 + } +] \ No newline at end of file diff --git a/Assets/Research.json b/Assets/Research.json new file mode 100644 index 0000000..fc66925 --- /dev/null +++ b/Assets/Research.json @@ -0,0 +1,72 @@ +[ + { + "id": "basics", + "inputs": [], + "research": "", + "crafttime": 1.0 + }, + { + "id": "stoneage", + "inputs": [ + { + "item": "stone", + "amount": 1 + }, + { + "item": "coal", + "amount": 1 + } + ], + "research": "basics", + "crafttime": 1.0 + }, + { + "id": "copperage", + "inputs": [ + { + "item": "copper_ore", + "amount": 1 + }, + { + "item": "rope", + "amount": 1 + } + ], + "research": "stoneage", + "crafttime": 1.0 + }, + { + "id": "bronzeage", + "inputs": [ + { + "item": "copper_ingot", + "amount": 1 + }, + { + "item": "tin_ingot", + "amount": 1 + } + ], + "research": "copperage", + "crafttime": 1.0 + }, + { + "id": "ironage", + "inputs": [ + { + "item": "bronze_ingot", + "amount": 1 + }, + { + "item": "dynamo_v1", + "amount": 1 + }, + { + "item": "battery_v1", + "amount": 1 + } + ], + "research": "bronzeage", + "crafttime": 1.0 + } +] \ No newline at end of file diff --git a/Scenes/MainMenu.tscn b/Scenes/MainMenu.tscn index 2e5f9ce..fb11d9e 100644 --- a/Scenes/MainMenu.tscn +++ b/Scenes/MainMenu.tscn @@ -1,6 +1,10 @@ [gd_scene format=3 uid="uid://dlommaelbbw2b"] [ext_resource type="Script" uid="uid://dda0bhhqspbr0" path="res://Scripts/Menus/MainMenu.cs" id="1_tt5f1"] +[ext_resource type="Texture2D" uid="uid://ban872p4eh4gi" path="res://Assets/Images/RobotSymbol.png" id="2_853f1"] +[ext_resource type="Texture2D" uid="uid://dt84awx33mulb" path="res://Assets/Images/ResearchSymbol.png" id="3_df05h"] +[ext_resource type="Texture2D" uid="uid://dm0w2gtcsa5l4" path="res://Assets/Images/Items/Batteryv1Symbol.png" id="4_8um5k"] +[ext_resource type="Texture2D" uid="uid://qqprre8xl8gv" path="res://Assets/Images/Items/Dynamov2Symbol.png" id="5_xim88"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_bnhvo"] bg_color = Color(0.24115604, 0.24115607, 0.24115595, 1) @@ -87,5 +91,49 @@ theme_override_styles/normal = SubResource("StyleBoxFlat_bnhvo") theme_override_styles/hover = SubResource("StyleBoxFlat_tt5f1") text = "Exit Game" +[node name="Decoration" type="Control" parent="." unique_id=252748481] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="TextureRect" type="TextureRect" parent="Decoration" unique_id=175718935] +layout_mode = 0 +offset_left = 19.0 +offset_top = 960.0 +offset_right = 51.0 +offset_bottom = 992.0 +scale = Vector2(3, 3) +texture = ExtResource("2_853f1") + +[node name="TextureRect2" type="TextureRect" parent="Decoration" unique_id=1274351412] +layout_mode = 0 +offset_left = 1730.0001 +offset_top = 51.0 +offset_right = 1770.0001 +offset_bottom = 91.0 +scale = Vector2(3, 3) +texture = ExtResource("3_df05h") + +[node name="TextureRect3" type="TextureRect" parent="Decoration" unique_id=1496393482] +layout_mode = 0 +offset_left = 517.0 +offset_top = 264.0 +offset_right = 557.0 +offset_bottom = 304.0 +scale = Vector2(3, 3) +texture = ExtResource("4_8um5k") + +[node name="TextureRect4" type="TextureRect" parent="Decoration" unique_id=606748204] +layout_mode = 0 +offset_left = 1443.0 +offset_top = 538.0 +offset_right = 1483.0 +offset_bottom = 578.0 +scale = Vector2(3, 3) +texture = ExtResource("5_xim88") + [connection signal="button_up" from="CenterContainer/VBoxContainer/btnPlay" to="." method="OnPlayPressed"] [connection signal="button_up" from="CenterContainer/VBoxContainer/btnExit" to="." method="OnQuitPressed"]