Improved recipes and added resources to it. Changed how ingredients and items work.

This commit is contained in:
=
2026-05-05 19:26:31 +02:00
parent fc26fa2a75
commit a320a86a2f
9 changed files with 248 additions and 135 deletions
+6 -1
View File
@@ -1,11 +1,14 @@
using Godot;
public class GameResource : Ingredient
public class GameResource
{
public string name;
int currentAmount;
int maxAmount;
bool isEndless;
float extractionSpeed;
double timeSinceLastExtraction;
ItemData item;
public GameResource(string name)
{
@@ -14,6 +17,7 @@ public class GameResource : Ingredient
currentAmount = maxAmount;
isEndless = false;
extractionSpeed = 1f;
item = GameData.availableItems[name];
}
public bool Extract(double delta)
@@ -25,6 +29,7 @@ public class GameResource : Ingredient
if (currentAmount > 0)
{
currentAmount--;
return true;
}
return false;