private void InitRoomList() { if (IncursionRooms.Count == 0) { IncursionRooms = GetDefaultRoomList(); } else { var defaultRooms = GetDefaultRoomList(); foreach (var dEntry in defaultRooms) { var jEntry = IncursionRooms.Find(r => r.Name == dEntry.Name); if (jEntry != null) { dEntry.PriorityAction = jEntry.PriorityAction; dEntry.NoChange = jEntry.NoChange; dEntry.NoUpgrade = jEntry.NoUpgrade; } } IncursionRooms = defaultRooms; } }
private Settings() : base(GetSettingsFilePath(Configuration.Instance.Name, "Incursion.json")) { InitRoomList(); IncursionRooms.Sort((r1, r2) => string.CompareOrdinal(r1.Name, r2.Name)); }