using Microsoft.Xna.Framework; using System.Collections.Generic; namespace CalamityMod.Schematics { public class ColorTileMap { internal readonly Dictionary Map = new Dictionary(); public ColorTileMap(Dictionary colorTileMap) { Map = colorTileMap; } // For general convenience and as a means of mitigating the key check every time. public TileDefinitionStructure this[Color key] => Map.ContainsKey(key) ? Map[key] : TileDefinitionStructure.AirDefinition; } }