public void Add(FurnitureStack stack) { FurnitureStack existing = FindStackMatching(stack); if (existing != null) { existing.IncrementCount(stack.Count); } else { furnitureStacks.Add(stack); } }
public void SubtractOne(uint fid) { FurnitureStack existing = FindStackMatching(fid); if (existing != null) { existing.IncrementCount(-1); if (existing.Count <= 0) { RemoveStacksWithID(existing.FurnitureID); } } else { Debug.LogError("Trying to subtract from a stack that doesn't exist!"); } }