using System.Collections.Generic;

public sealed class SpaceStantionType
{
    public readonly string Id;
    public readonly int Stock;
    public readonly Dictionary<string, int> Consumption;
    public readonly EconomyParameters Economy;

    public SpaceStantionType(string id, int stock, Dictionary<string, int> consumption, EconomyParameters economy) {
        Id = id;
        Stock = stock;
        Consumption = consumption ?? new Dictionary<string, int>();
        Economy = economy;
    }

    public int GetConsumption(string resourceId) {
        if (Consumption.TryGetValue(resourceId, out var consumptionCount)) {
            return consumptionCount;
        }
        return 0;
    }
}
