using System;
using System.Collections.Generic;
using UnityEngine;

[Serializable]
public sealed class SpaceStantionPreset
{
    [SerializeField]
    public string id = string.Empty;
    [SerializeField]
    public ResourceCount[] resourceConsumption = Array.Empty<ResourceCount>();

    private Dictionary<string, int> cached = null;
    public Dictionary<string, int> GetResourceConsumption()
    {
        if (cached == null)
        {
            cached = new Dictionary<string, int>();
            foreach (var res in resourceConsumption) {
                cached.Add(res.Id, res.Count);
            }
        }
        return cached;
    }
}
