public bool HasInStockpile()
    {
        bool hasTrees    = HomesteadStockpile.GetTreesCountAtGrade(treeGrade) >= trees;
        bool hasLogs     = HomesteadStockpile.GetLogsCountAtGrade(logGrade) >= logs;
        bool hasFirewood = HomesteadStockpile.GetFirewoodCountAtGrade(firewoodGrade) >= firewood;

        return(hasTrees && hasLogs && hasFirewood);
    }
Пример #2
0
 void PhaseOutLogs()
 {
     if (HomesteadStockpile.GetTreesCountAtGrade(maxQualityGrade) > 0)
     {
         Invoke("ResetInteractableFelledTree", 1.0f);
     }
     else
     {
         transform.parent.GetComponentInChildren <LoggingActivityInteractPrompt>().HideUI();
     }
     associatedLogPile.UpdateLogPile();
     gameObject.SetActive(false);
 }
        public void UpdateFelledTreePile()
        {
            int treesCount = HomesteadStockpile.GetTreesCountAtGrade(qualityGrade);

            interactableFelledTree.SetActive(treesCount > 0);

            felledTreePileGroup.GetChild(0).gameObject.SetActive(treesCount > 6);
            felledTreePileGroup.GetChild(1).gameObject.SetActive(treesCount > 5);
            felledTreePileGroup.GetChild(2).gameObject.SetActive(treesCount > 4);
            felledTreePileGroup.GetChild(3).gameObject.SetActive(treesCount > 3);
            felledTreePileGroup.GetChild(4).gameObject.SetActive(treesCount > 2);
            felledTreePileGroup.GetChild(5).gameObject.SetActive(treesCount > 1);
        }