public void PutItem(StandardItemType itemType, int count) { foreach (var component in _components) { if (component.Complete) { continue; } if (component.ItemType != itemType) { continue; } var countToTransfere = Math.Min(component.RemainingCount, count); count -= countToTransfere; component.ActualCount += countToTransfere; if (count == 0) { return; } } }
public BlockBlueprintComponent(int count, StandardItemType itemType, float integrityValue) { Count = count; ItemType = itemType; IntegrityValue = integrityValue; }