public void UpdateSlot(InventoryKey key, AggregateSlot slot) { if (_aggregates.ContainsKey(key)) { _aggregates[key] = slot; } else { _aggregates.Add(key, slot); } OnInventoryChanged?.Invoke(key); }
public bool RetrieveSlot(InventoryKey key, out AggregateSlot slot) { return(_aggregates.TryGetValue(key, out slot)); }