Cleaned up project with better structure.

This commit is contained in:
2026-05-09 11:29:48 +02:00
parent 1ad3454f6a
commit 6708aa277f
95 changed files with 711 additions and 700 deletions
+4 -2
View File
@@ -1,4 +1,3 @@
using System.Linq;
using Godot;
public class CraftNode : ProgramNode
@@ -16,11 +15,13 @@ public class CraftNode : ProgramNode
lastExecutionMessage = "No Item selected";
return NodeResult.FAILURE;
}
if (amount <= 0)
{
lastExecutionMessage = "Amount has to be atleast 1";
return NodeResult.FAILURE;
}
if (!GameData.inventory.CanCraft(selectedItem.data.Inputs, amount))
{
lastExecutionMessage = "Not enough items to craft this";
@@ -67,12 +68,13 @@ public class CraftNode : ProgramNode
options.AddItem("Select item...");
foreach (ItemData item in GameData.availableItems.Values)
{
if(GameData.availableResearch[item.Research].state != ResearchState.RESEARCHED) continue;
if (GameData.availableResearch[item.Research].state != ResearchState.RESEARCHED) continue;
if (item.Inputs.Count > 0)
{
options.AddItem(item.GetCraftingDisplay());
}
}
if (selectedItem != null)
{
for (int i = 0; i < options.ItemCount; i++)