Beispiel #1
0
    public bool notifyWhenWorkInventoryRunningLow()
    {
        if (work)
        {
            if (work.getItemCurrentlyProduced() != null)
            {
                Dictionary <string, int> itemsNeeded = work.getListOfProductionItemsBasedOnTransferThresholds();

                if (!work.getBuildingInventory().checkIfListOfItemsAreInInventory(itemsNeeded))
                {
                    return(true);
                }
            }
        }
        return(false);
    }
Beispiel #2
0
    public bool putItemInBuildingInventory(BuildingAttributes targetBuilding, string itemName, int amount)
    {
        bool result = false;

        if (buildingInsideOf)
        {
            result = getCitizenInventory().sendItemFromThisToOther(targetBuilding.getBuildingInventory(), itemName, amount);
        }
        else
        {
            gameManager.getMessageLogText().addMessageToLog("Citizen is not inside a building");
        }
        return(result);
    }