Working on inventory and crafting system. Translated Excel-Itemlist to .json.

This commit is contained in:
2026-05-05 15:35:42 +02:00
parent 02ba36b665
commit fc26fa2a75
11 changed files with 829 additions and 10 deletions
+6 -4
View File
@@ -1,12 +1,11 @@
using Godot;
public class GameResource
public class GameResource : Ingredient
{
int maxAmount;
int currentAmount;
bool isEndless;
float extractionSpeed;
public string name;
double timeSinceLastExtraction;
public GameResource(string name)
{
@@ -17,8 +16,11 @@ public class GameResource
extractionSpeed = 1f;
}
public bool Extract()
public bool Extract(double delta)
{
timeSinceLastExtraction += delta;
if (timeSinceLastExtraction < extractionSpeed) return false;
timeSinceLastExtraction = 0;
if(isEndless) return true;
if (currentAmount > 0)
{