Added research state to harvest and crafting
This commit is contained in:
@@ -37,6 +37,6 @@ public class GameResource
|
||||
|
||||
public bool CanExtract()
|
||||
{
|
||||
return isEndless || currentAmount > 0;
|
||||
return (isEndless || currentAmount > 0) && GameData.availableResearch[item.Research].state == ResearchState.RESEARCHED;
|
||||
}
|
||||
}
|
||||
@@ -67,6 +67,7 @@ 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 (item.Inputs.Count > 0)
|
||||
{
|
||||
options.AddItem(item.GetReadableName());
|
||||
|
||||
@@ -19,7 +19,7 @@ public class HarvestNode : ProgramNode
|
||||
|
||||
if (!tile.resource.CanExtract())
|
||||
{
|
||||
lastExecutionMessage = "Resource is depleted and not endless";
|
||||
lastExecutionMessage = "Resource is depleted and not endless or you haven't unlocked it yet";
|
||||
return NodeResult.SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user