Updated data with sub-researches to have a more advanced Tech-tree and purpose to research.

This commit is contained in:
2026-05-09 11:54:25 +02:00
parent 6708aa277f
commit 8a79a3474e
5 changed files with 689 additions and 295 deletions
+251 -251
View File
@@ -1,252 +1,252 @@
[
{
"id": "workbench",
"inputs": [
{
"item": "stone",
"amount": 4
}
],
"research": "basics",
"texture": "res://Assets/Images/Buildings/Workbench.png",
"crafttime": 1.0,
"stacksize": 1
},
{
"id": "furnace",
"inputs": [
{
"item": "stone",
"amount": 12
},
{
"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": 2
},
{
"item": "rope",
"amount": 2
},
{
"item": "stone",
"amount": 8
}
],
"research": "stoneage",
"texture": "res://Assets/Images/Buildings/Crusher.png",
"crafttime": 1.0,
"stacksize": 1
},
{
"id": "press",
"inputs": [
{
"item": "stone",
"amount": 8
},
{
"item": "rope",
"amount": 2
}
],
"research": "stoneage",
"texture": "res://Assets/Images/Buildings/Press.png",
"crafttime": 1.0,
"stacksize": 1
},
{
"id": "anvil",
"inputs": [
{
"item": "stone",
"amount": 10
},
{
"item": "rope",
"amount": 3
}
],
"research": "stoneage",
"texture": "res://Assets/Images/Buildings/Anvil.png",
"crafttime": 1.0,
"stacksize": 1
},
{
"id": "loom",
"inputs": [
{
"item": "copper_gear",
"amount": 2
},
{
"item": "rope",
"amount": 4
}
],
"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": 2
},
{
"item": "heating_element_v1",
"amount": 2
}
],
"research": "copperage",
"texture": "res://Assets/Images/Buildings/SteamGeneratorv1.png",
"crafttime": 1.0,
"stacksize": 1
},
{
"id": "stone_chest",
"inputs": [
{
"item": "stone_plate",
"amount": 4
},
{
"item": "rope",
"amount": 2
}
],
"research": "stoneage",
"texture": "res://Assets/Images/Buildings/StoneChest.png",
"crafttime": 1.0,
"stacksize": 1
},
{
"id": "copper_chest",
"inputs": [
{
"item": "copper_plate",
"amount": 4
},
{
"item": "rope",
"amount": 3
}
],
"research": "copperage",
"texture": "res://Assets/Images/Buildings/CopperChest.png",
"crafttime": 1.0,
"stacksize": 1
},
{
"id": "bronze_chest",
"inputs": [
{
"item": "bronze_plate",
"amount": 4
},
{
"item": "rope",
"amount": 4
}
],
"research": "bronzeage",
"texture": "res://Assets/Images/Buildings/BronzeChest.png",
"crafttime": 1.0,
"stacksize": 1
},
{
"id": "iron_chest",
"inputs": [
{
"item": "iron_plate",
"amount": 4
},
{
"item": "rope",
"amount": 5
}
],
"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": 2
},
{
"item": "heating_element_v1",
"amount": 3
}
],
"research": "ironage",
"texture": "res://Assets/Images/Buildings/SteamGeneratorv2.png",
"crafttime": 1.0,
"stacksize": 1
},
{
"id": "water_purifier",
"inputs": [
{
"item": "heating_element_v1",
"amount": 2
},
{
"item": "glass_bottles",
"amount": 3
}
],
"research": "stoneage",
"texture": "res://Assets/Images/Buildings/WaterPurifier.png",
"crafttime": 1.0,
"stacksize": 1
},
{
"id": "glassblower",
"inputs": [
{
"item": "heating_element_v1",
"amount": 2
},
{
"item": "stone",
"amount": 8
},
{
"item": "copper_rod",
"amount": 2
}
],
"research": "stoneage",
"texture": "res://Assets/Images/Buildings/Glassblower.png",
"crafttime": 1.0,
"stacksize": 1
}
]
{
"id": "workbench",
"inputs": [
{
"item": "stone",
"amount": 4
}
],
"research": "basics",
"texture": "res://Assets/Images/Buildings/Workbench.png",
"crafttime": 1.0,
"stacksize": 1
},
{
"id": "furnace",
"inputs": [
{
"item": "stone",
"amount": 12
},
{
"item": "heating_element_v1",
"amount": 1
}
],
"research": "heat_control",
"texture": "res://Assets/Images/Buildings/Furnace.png",
"crafttime": 1.0,
"stacksize": 1
},
{
"id": "crusher",
"inputs": [
{
"item": "stone_gear",
"amount": 2
},
{
"item": "rope",
"amount": 2
},
{
"item": "stone",
"amount": 8
}
],
"research": "basic_machines",
"texture": "res://Assets/Images/Buildings/Crusher.png",
"crafttime": 1.0,
"stacksize": 1
},
{
"id": "press",
"inputs": [
{
"item": "stone",
"amount": 8
},
{
"item": "rope",
"amount": 2
}
],
"research": "basic_machines",
"texture": "res://Assets/Images/Buildings/Press.png",
"crafttime": 1.0,
"stacksize": 1
},
{
"id": "anvil",
"inputs": [
{
"item": "stone",
"amount": 10
},
{
"item": "rope",
"amount": 3
}
],
"research": "basic_machines",
"texture": "res://Assets/Images/Buildings/Anvil.png",
"crafttime": 1.0,
"stacksize": 1
},
{
"id": "loom",
"inputs": [
{
"item": "copper_gear",
"amount": 2
},
{
"item": "rope",
"amount": 4
}
],
"research": "textiles",
"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": 2
},
{
"item": "heating_element_v1",
"amount": 2
}
],
"research": "basic_electricity",
"texture": "res://Assets/Images/Buildings/SteamGeneratorv1.png",
"crafttime": 1.0,
"stacksize": 1
},
{
"id": "stone_chest",
"inputs": [
{
"item": "stone_plate",
"amount": 4
},
{
"item": "rope",
"amount": 2
}
],
"research": "stone_storage",
"texture": "res://Assets/Images/Buildings/StoneChest.png",
"crafttime": 1.0,
"stacksize": 1
},
{
"id": "copper_chest",
"inputs": [
{
"item": "copper_plate",
"amount": 4
},
{
"item": "rope",
"amount": 3
}
],
"research": "metalworking",
"texture": "res://Assets/Images/Buildings/CopperChest.png",
"crafttime": 1.0,
"stacksize": 1
},
{
"id": "bronze_chest",
"inputs": [
{
"item": "bronze_plate",
"amount": 4
},
{
"item": "rope",
"amount": 4
}
],
"research": "bronze_storage",
"texture": "res://Assets/Images/Buildings/BronzeChest.png",
"crafttime": 1.0,
"stacksize": 1
},
{
"id": "iron_chest",
"inputs": [
{
"item": "iron_plate",
"amount": 4
},
{
"item": "rope",
"amount": 5
}
],
"research": "iron_machining",
"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": 2
},
{
"item": "heating_element_v1",
"amount": 3
}
],
"research": "advanced_power",
"texture": "res://Assets/Images/Buildings/SteamGeneratorv2.png",
"crafttime": 1.0,
"stacksize": 1
},
{
"id": "water_purifier",
"inputs": [
{
"item": "heating_element_v1",
"amount": 2
},
{
"item": "glass_bottles",
"amount": 3
}
],
"research": "glass_work",
"texture": "res://Assets/Images/Buildings/WaterPurifier.png",
"crafttime": 1.0,
"stacksize": 1
},
{
"id": "glassblower",
"inputs": [
{
"item": "heating_element_v1",
"amount": 2
},
{
"item": "stone",
"amount": 8
},
{
"item": "copper_rod",
"amount": 2
}
],
"research": "glass_work",
"texture": "res://Assets/Images/Buildings/Glassblower.png",
"crafttime": 1.0,
"stacksize": 1
}
]
+38 -38
View File
@@ -8,7 +8,7 @@
},
"workstation": "",
"texture": "res://Assets/Images/Resources/IronSymbol.png",
"research": "bronzeage",
"research": "iron_smelting",
"crafttime": 1.0,
"stacksize": 99
},
@@ -21,7 +21,7 @@
},
"workstation": "",
"texture": "res://Assets/Images/Resources/TinSymbol.png",
"research": "copperage",
"research": "tin_working",
"crafttime": 1.0,
"stacksize": 99
},
@@ -117,7 +117,7 @@
},
"workstation": "crusher",
"texture": "res://Assets/Images/Items/SandSymbol.png",
"research": "stoneage",
"research": "basic_machines",
"crafttime": 1.0,
"stacksize": 99
},
@@ -135,7 +135,7 @@
},
"workstation": "workbench",
"texture": "res://Assets/Images/Items/StoneGearSymbol.png",
"research": "stoneage",
"research": "stone_tools",
"crafttime": 1.0,
"stacksize": 99
},
@@ -153,7 +153,7 @@
},
"workstation": "anvil",
"texture": "res://Assets/Images/Items/CopperGearSymbol.png",
"research": "copperage",
"research": "metalworking",
"crafttime": 1.0,
"stacksize": 99
},
@@ -171,7 +171,7 @@
},
"workstation": "anvil",
"texture": "res://Assets/Images/Items/TinGearSymbol.png",
"research": "copperage",
"research": "metalworking",
"crafttime": 1.0,
"stacksize": 99
},
@@ -189,7 +189,7 @@
},
"workstation": "anvil",
"texture": "res://Assets/Images/Items/BronzeGearSymbol.png",
"research": "bronzeage",
"research": "bronze_machining",
"crafttime": 1.0,
"stacksize": 99
},
@@ -215,7 +215,7 @@
},
"workstation": "furnace",
"texture": "res://Assets/Images/Items/BronzeIngotSymbol.png",
"research": "bronzeage",
"research": "bronze_smelting",
"crafttime": 1.0,
"stacksize": 99
},
@@ -233,7 +233,7 @@
},
"workstation": "anvil",
"texture": "res://Assets/Images/Items/IronGearSymbol.png",
"research": "ironage",
"research": "iron_machining",
"crafttime": 1.0,
"stacksize": 99
},
@@ -255,7 +255,7 @@
},
"workstation": "furnace",
"texture": "res://Assets/Images/Items/IronIngotSymbol.png",
"research": "ironage",
"research": "iron_smelting",
"crafttime": 1.0,
"stacksize": 99
},
@@ -277,7 +277,7 @@
},
"workstation": "furnace",
"texture": "res://Assets/Images/Items/TinIngotSymbol.png",
"research": "copperage",
"research": "tin_working",
"crafttime": 1.0,
"stacksize": 99
},
@@ -299,7 +299,7 @@
},
"workstation": "furnace",
"texture": "res://Assets/Images/Items/CopperIngotSymbol.png",
"research": "copperage",
"research": "copper_smelting",
"crafttime": 1.0,
"stacksize": 99
},
@@ -317,7 +317,7 @@
},
"workstation": "workbench",
"texture": "res://Assets/Images/Items/RopeSymbol.png",
"research": "stoneage",
"research": "stone_tools",
"crafttime": 1.0,
"stacksize": 99
},
@@ -343,7 +343,7 @@
},
"workstation": "workbench",
"texture": "res://Assets/Images/Items/StoneRobotSymbol.png",
"research": "stoneage",
"research": "stone_robotics",
"crafttime": 1.0,
"stacksize": 99
},
@@ -373,7 +373,7 @@
},
"workstation": "anvil",
"texture": "res://Assets/Images/Items/CopperRobotSymbol.png",
"research": "copperage",
"research": "copper_robotics",
"crafttime": 1.0,
"stacksize": 99
},
@@ -403,7 +403,7 @@
},
"workstation": "anvil",
"texture": "res://Assets/Images/Items/TinRobotSymbol.png",
"research": "copperage",
"research": "copper_robotics",
"crafttime": 1.0,
"stacksize": 99
},
@@ -433,7 +433,7 @@
},
"workstation": "anvil",
"texture": "res://Assets/Images/Items/BronzeRobotSymbol.png",
"research": "bronzeage",
"research": "bronze_robotics",
"crafttime": 1.0,
"stacksize": 99
},
@@ -463,7 +463,7 @@
},
"workstation": "anvil",
"texture": "res://Assets/Images/Items/IronRobotSymbol.png",
"research": "ironage",
"research": "iron_robotics",
"crafttime": 1.0,
"stacksize": 99
},
@@ -485,7 +485,7 @@
},
"workstation": "furnace",
"texture": "res://Assets/Images/Items/GlassSymbol.png",
"research": "stoneage",
"research": "glass_work",
"crafttime": 1.0,
"stacksize": 99
},
@@ -507,7 +507,7 @@
},
"workstation": "loom",
"texture": "res://Assets/Images/Items/RopeSymbol.png",
"research": "copperage",
"research": "textiles",
"crafttime": 1.0,
"stacksize": 99
},
@@ -525,7 +525,7 @@
},
"workstation": "anvil",
"texture": "res://Assets/Images/Items/CopperRodSymbol.png",
"research": "copperage",
"research": "metalworking",
"crafttime": 1.0,
"stacksize": 99
},
@@ -543,7 +543,7 @@
},
"workstation": "anvil",
"texture": "res://Assets/Images/Items/TinRodSymbol.png",
"research": "copperage",
"research": "metalworking",
"crafttime": 1.0,
"stacksize": 99
},
@@ -561,7 +561,7 @@
},
"workstation": "anvil",
"texture": "res://Assets/Images/Items/BronzeRodSymbol.png",
"research": "bronzeage",
"research": "bronze_machining",
"crafttime": 1.0,
"stacksize": 99
},
@@ -579,7 +579,7 @@
},
"workstation": "anvil",
"texture": "res://Assets/Images/Items/IronRodSymbol.png",
"research": "ironage",
"research": "iron_machining",
"crafttime": 1.0,
"stacksize": 99
},
@@ -605,7 +605,7 @@
},
"workstation": "workbench",
"texture": "res://Assets/Images/Items/Batteryv1Symbol.png",
"research": "copperage",
"research": "basic_electricity",
"crafttime": 1.0,
"stacksize": 99
},
@@ -631,7 +631,7 @@
},
"workstation": "anvil",
"texture": "res://Assets/Images/Items/Dynamov1Symbol.png",
"research": "copperage",
"research": "basic_electricity",
"crafttime": 1.0,
"stacksize": 99
},
@@ -649,7 +649,7 @@
},
"workstation": "anvil",
"texture": "res://Assets/Images/Items/CopperWireSymbol.png",
"research": "copperage",
"research": "metalworking",
"crafttime": 1.0,
"stacksize": 99
},
@@ -667,7 +667,7 @@
},
"workstation": "workbench",
"texture": "res://Assets/Images/Items/Heaterv1Symbol.png",
"research": "stoneage",
"research": "heat_control",
"crafttime": 1.0,
"stacksize": 99
},
@@ -685,7 +685,7 @@
},
"workstation": "workbench",
"texture": "res://Assets/Images/Items/StonePlateSymbol.png",
"research": "stoneage",
"research": "basic_machines",
"crafttime": 1.0,
"stacksize": 99
},
@@ -703,7 +703,7 @@
},
"workstation": "anvil",
"texture": "res://Assets/Images/Items/CopperPlateSymbol.png",
"research": "copperage",
"research": "metalworking",
"crafttime": 1.0,
"stacksize": 99
},
@@ -721,7 +721,7 @@
},
"workstation": "anvil",
"texture": "res://Assets/Images/Items/IronPlateSymbol.png",
"research": "ironage",
"research": "iron_machining",
"crafttime": 1.0,
"stacksize": 99
},
@@ -739,7 +739,7 @@
},
"workstation": "anvil",
"texture": "res://Assets/Images/Items/BronzePlateSymbol.png",
"research": "bronzeage",
"research": "bronze_machining",
"crafttime": 1.0,
"stacksize": 99
},
@@ -757,7 +757,7 @@
},
"workstation": "anvil",
"texture": "res://Assets/Images/Items/TinPlateSymbol.png",
"research": "copperage",
"research": "metalworking",
"crafttime": 1.0,
"stacksize": 99
},
@@ -783,7 +783,7 @@
},
"workstation": "workbench",
"texture": "res://Assets/Images/Items/Batteryv2Symbol.png",
"research": "ironage",
"research": "advanced_power",
"crafttime": 1.0,
"stacksize": 99
},
@@ -813,7 +813,7 @@
},
"workstation": "anvil",
"texture": "res://Assets/Images/Items/Dynamov2Symbol.png",
"research": "ironage",
"research": "advanced_power",
"crafttime": 1.0,
"stacksize": 99
},
@@ -835,7 +835,7 @@
},
"workstation": "steam_generator_v1",
"texture": "res://Assets/Images/Items/SteamSymbol.png",
"research": "copperage",
"research": "basic_electricity",
"crafttime": 1.0,
"stacksize": 99
},
@@ -857,8 +857,8 @@
},
"workstation": "glassblower",
"texture": "res://Assets/Images/Items/GlassBottleSymbol.png",
"research": "stoneage",
"research": "glass_work",
"crafttime": 1.0,
"stacksize": 99
}
]
]
+368 -4
View File
@@ -22,6 +22,110 @@
"crafttime": 1.0,
"texture": "res://Assets/Images/Research/StoneageSymbol.png"
},
{
"id": "stone_tools",
"inputs": [
{
"item": "stone",
"amount": 10
},
{
"item": "spider_silk",
"amount": 4
}
],
"research": "stoneage",
"crafttime": 1.0,
"texture": "res://Assets/Images/Items/StoneGearSymbol.png"
},
{
"id": "basic_machines",
"inputs": [
{
"item": "stone_gear",
"amount": 3
},
{
"item": "rope",
"amount": 3
},
{
"item": "stone",
"amount": 10
}
],
"research": "stone_tools",
"crafttime": 1.0,
"texture": "res://Assets/Images/Items/StoneGearSymbol.png"
},
{
"id": "heat_control",
"inputs": [
{
"item": "stone_gear",
"amount": 2
},
{
"item": "coal",
"amount": 8
}
],
"research": "basic_machines",
"crafttime": 1.0,
"texture": "res://Assets/Images/Items/Heaterv1Symbol.png"
},
{
"id": "glass_work",
"inputs": [
{
"item": "sand",
"amount": 6
},
{
"item": "heating_element_v1",
"amount": 2
},
{
"item": "coal",
"amount": 4
}
],
"research": "heat_control",
"crafttime": 1.0,
"texture": "res://Assets/Images/Items/GlassSymbol.png"
},
{
"id": "stone_storage",
"inputs": [
{
"item": "stone_plate",
"amount": 4
},
{
"item": "rope",
"amount": 2
}
],
"research": "basic_machines",
"crafttime": 1.0,
"texture": "res://Assets/Images/Items/StonePlateSymbol.png"
},
{
"id": "stone_robotics",
"inputs": [
{
"item": "stone_gear",
"amount": 4
},
{
"item": "rope",
"amount": 4
}
],
"research": "stone_tools",
"crafttime": 1.0,
"texture": "res://Assets/Images/Items/StoneRobotSymbol.png"
},
{
"id": "copperage",
"inputs": [
@@ -34,10 +138,126 @@
"amount": 4
}
],
"research": "stoneage",
"research": "heat_control",
"crafttime": 1.0,
"texture": "res://Assets/Images/Research/CopperageSymbol.png"
},
{
"id": "copper_smelting",
"inputs": [
{
"item": "copper_ore",
"amount": 12
},
{
"item": "coal",
"amount": 6
}
],
"research": "copperage",
"crafttime": 1.0,
"texture": "res://Assets/Images/Items/CopperIngotSymbol.png"
},
{
"id": "tin_working",
"inputs": [
{
"item": "copper_ingot",
"amount": 4
},
{
"item": "coal",
"amount": 4
}
],
"research": "copper_smelting",
"crafttime": 1.0,
"texture": "res://Assets/Images/Items/TinIngotSymbol.png"
},
{
"id": "metalworking",
"inputs": [
{
"item": "copper_ingot",
"amount": 6
},
{
"item": "tin_ingot",
"amount": 4
},
{
"item": "stone_gear",
"amount": 2
}
],
"research": "tin_working",
"crafttime": 1.0,
"texture": "res://Assets/Images/Items/CopperGearSymbol.png"
},
{
"id": "textiles",
"inputs": [
{
"item": "rope",
"amount": 8
},
{
"item": "spider_silk",
"amount": 8
},
{
"item": "copper_gear",
"amount": 2
}
],
"research": "metalworking",
"crafttime": 1.0,
"texture": "res://Assets/Images/Items/RopeSymbol.png"
},
{
"id": "basic_electricity",
"inputs": [
{
"item": "copper_wire",
"amount": 6
},
{
"item": "copper_rod",
"amount": 3
},
{
"item": "tin_rod",
"amount": 2
},
{
"item": "water",
"amount": 4
}
],
"research": "metalworking",
"crafttime": 1.0,
"texture": "res://Assets/Images/Items/Batteryv1Symbol.png"
},
{
"id": "copper_robotics",
"inputs": [
{
"item": "battery_v1",
"amount": 2
},
{
"item": "copper_gear",
"amount": 2
},
{
"item": "tin_gear",
"amount": 2
}
],
"research": "basic_electricity",
"crafttime": 1.0,
"texture": "res://Assets/Images/Items/CopperRobotSymbol.png"
},
{
"id": "bronzeage",
"inputs": [
@@ -50,10 +270,82 @@
"amount": 4
}
],
"research": "copperage",
"research": "basic_electricity",
"crafttime": 1.0,
"texture": "res://Assets/Images/Research/BronzeageSymbol.png"
},
{
"id": "bronze_smelting",
"inputs": [
{
"item": "copper_ingot",
"amount": 8
},
{
"item": "tin_ingot",
"amount": 4
},
{
"item": "coal",
"amount": 6
}
],
"research": "bronzeage",
"crafttime": 1.0,
"texture": "res://Assets/Images/Items/BronzeIngotSymbol.png"
},
{
"id": "bronze_machining",
"inputs": [
{
"item": "bronze_ingot",
"amount": 8
},
{
"item": "copper_gear",
"amount": 2
}
],
"research": "bronze_smelting",
"crafttime": 1.0,
"texture": "res://Assets/Images/Items/BronzeGearSymbol.png"
},
{
"id": "bronze_storage",
"inputs": [
{
"item": "bronze_plate",
"amount": 4
},
{
"item": "rope",
"amount": 6
}
],
"research": "bronze_machining",
"crafttime": 1.0,
"texture": "res://Assets/Images/Items/BronzePlateSymbol.png"
},
{
"id": "bronze_robotics",
"inputs": [
{
"item": "bronze_gear",
"amount": 3
},
{
"item": "bronze_plate",
"amount": 3
},
{
"item": "battery_v1",
"amount": 2
}
],
"research": "bronze_machining",
"crafttime": 1.0,
"texture": "res://Assets/Images/Items/BronzeRobotSymbol.png"
},
{
"id": "ironage",
"inputs": [
@@ -70,8 +362,80 @@
"amount": 3
}
],
"research": "bronzeage",
"research": "bronze_robotics",
"crafttime": 1.0,
"texture": "res://Assets/Images/Research/IronageSymbol.png"
},
{
"id": "iron_smelting",
"inputs": [
{
"item": "bronze_ingot",
"amount": 6
},
{
"item": "coal",
"amount": 10
}
],
"research": "ironage",
"crafttime": 1.0,
"texture": "res://Assets/Images/Items/IronIngotSymbol.png"
},
{
"id": "iron_machining",
"inputs": [
{
"item": "iron_ingot",
"amount": 8
},
{
"item": "bronze_gear",
"amount": 3
}
],
"research": "iron_smelting",
"crafttime": 1.0,
"texture": "res://Assets/Images/Items/IronGearSymbol.png"
},
{
"id": "advanced_power",
"inputs": [
{
"item": "battery_v1",
"amount": 3
},
{
"item": "iron_rod",
"amount": 4
},
{
"item": "copper_wire",
"amount": 6
}
],
"research": "iron_machining",
"crafttime": 1.0,
"texture": "res://Assets/Images/Items/Batteryv2Symbol.png"
},
{
"id": "iron_robotics",
"inputs": [
{
"item": "battery_v2",
"amount": 2
},
{
"item": "iron_gear",
"amount": 3
},
{
"item": "iron_plate",
"amount": 4
}
],
"research": "advanced_power",
"crafttime": 1.0,
"texture": "res://Assets/Images/Items/IronRobotSymbol.png"
}
]
]
+6
View File
@@ -31,4 +31,10 @@ public class Research
return ResearchResult.RESEARCHING;
}
public static string GetReadableName(string input)
{
string noUnderscore = input.Replace("_", " ").ToLower();
return char.ToUpper(noUnderscore[0]) + noUnderscore.Substring(1);
}
}
+26 -2
View File
@@ -4,6 +4,8 @@ using Godot.Collections;
public partial class ResearchList : PanelContainer
{
[Export] private GraphEdit researchGraph;
private System.Collections.Generic.Dictionary<string, Vector2> nodePositions = new System.Collections.Generic.Dictionary<string, Vector2>();
private bool hasArrangedNodes = false;
public override void _Ready()
{
@@ -13,10 +15,27 @@ public partial class ResearchList : PanelContainer
public void SetupGraph()
{
RememberNodePositions();
ClearGraph();
CreateResearchNodes();
CreateResearchConnections();
researchGraph.ArrangeNodes();
if (!hasArrangedNodes)
{
researchGraph.ArrangeNodes();
hasArrangedNodes = true;
}
}
private void RememberNodePositions()
{
foreach (Node child in researchGraph.GetChildren())
{
GraphNode node = child as GraphNode;
if (node == null) continue;
nodePositions[node.Name] = node.PositionOffset;
}
}
private void ClearGraph()
@@ -99,10 +118,15 @@ public partial class ResearchList : PanelContainer
GraphNode node = new GraphNode
{
Name = id,
Title = id,
Title = Research.GetReadableName(id),
SelfModulate = stateColor
};
if (nodePositions.ContainsKey(id))
{
node.PositionOffset = nodePositions[id];
}
node.SetSlot(
0,
true,