public static DoorMapPair GetLinkedDoor(EntityPreset door) { if (_doorPairs.TryGetValue(door.Frame, out DoorPair pair)) { return(pair.GetLinkedDoor(door)); } else { DebugLogger.AddCritical($"Could not find door pair with id {door.Frame}"); return(null); } }
private static TileMap LoadMap(string path, string defaultCSV, bool crit = true) { string CSV = defaultCSV; using (Stream stream = AssemblyReaderUtil.GetStream(path)) { if (stream == null) { if (crit) { DebugLogger.AddCritical($"Unable to find map at {path}"); } return(new TileMap(CSV)); } using StreamReader reader = new StreamReader(stream); CSV = reader.ReadToEnd(); } return(new TileMap(CSV)); }