//item stocked is false and inventory isnt empty and found aisle is true and moving to shelf is false public NodeVal stockItem() { Stock targetSupply = targetGrocery.Shelf; targetSupply.AddMore(inventory.currentInventory, inventory); itemStocked = true; //foundAisle = false; //check if inventory is empty if (inventory.currentInventory < 1) { inventoryEmpty = true; targetLocation = staffPoints[currentStaffPoint].transform.position; //move back to start of aisle } else { movingToStockRoom = true; } return(NodeVal.Success); }
//if item stocked is true and inventory isnt empty and found aisle is true and at stock is true public NodeVal returnStock() { Stock targetStock = targetGrocery.Supply; targetStock.AddMore(inventory.currentInventory, inventory); //check if inventory is empty if (inventory.currentInventory < 1) { inventoryEmpty = true; } else { print("Stock Full: Cant Operate"); inventory.currentInventory = 0; inventoryEmpty = false; } movingToAisle = true; return(NodeVal.Success); }