diff --git a/ImperatorToCK3/CK3/Characters/Character.cs b/ImperatorToCK3/CK3/Characters/Character.cs index 9112d7f9a..3e394e6da 100644 --- a/ImperatorToCK3/CK3/Characters/Character.cs +++ b/ImperatorToCK3/CK3/Characters/Character.cs @@ -150,11 +150,11 @@ public string? DeathReason { } } - public IList Pregnancies { get; } = new List(); + public List Pregnancies { get; } = []; - public IDictionary MenAtArmsStacksPerType { get; } = new Dictionary(); + public Dictionary MenAtArmsStacksPerType { get; } = []; - public IDictionary PrisonerIds { get; } = new Dictionary(); // + public Dictionary PrisonerIds { get; } = []; // internal DNA? DNA { get; set; } diff --git a/ImperatorToCK3/CK3/Cultures/Culture.cs b/ImperatorToCK3/CK3/Cultures/Culture.cs index 6bc91c65a..7c42d9aa3 100644 --- a/ImperatorToCK3/CK3/Cultures/Culture.cs +++ b/ImperatorToCK3/CK3/Cultures/Culture.cs @@ -12,7 +12,7 @@ namespace ImperatorToCK3.CK3.Cultures; -public sealed class Culture : IIdentifiable, IPDXSerializable { +internal sealed class Culture : IIdentifiable, IPDXSerializable { public string Id { get; } public Color Color { get; } public OrderedSet ParentCultureIds { get; set; } diff --git a/ImperatorToCK3/CK3/Cultures/CultureData.cs b/ImperatorToCK3/CK3/Cultures/CultureData.cs index 6b79bdec9..3f86ca12a 100644 --- a/ImperatorToCK3/CK3/Cultures/CultureData.cs +++ b/ImperatorToCK3/CK3/Cultures/CultureData.cs @@ -5,8 +5,8 @@ namespace ImperatorToCK3.CK3.Cultures; -public record CultureData { - public IEnumerable InvalidatingCultureIds { get; set; } = new List(); +internal record CultureData { + public List InvalidatingCultureIds { get; set; } = []; public Color? Color { get; set; } public OrderedSet ParentCultureIds { get; set; } = new(); public Pillar? Heritage { get; set; } @@ -14,5 +14,5 @@ public record CultureData { public OrderedSet TraditionIds { get; set; } = new(); public OrderedSet NameLists { get; } = new(); - public IList> Attributes { get; } = new List>(); + public List> Attributes { get; } = []; } \ No newline at end of file diff --git a/ImperatorToCK3/CK3/Cultures/Pillar.cs b/ImperatorToCK3/CK3/Cultures/Pillar.cs index 39df08e8a..46979dd93 100644 --- a/ImperatorToCK3/CK3/Cultures/Pillar.cs +++ b/ImperatorToCK3/CK3/Cultures/Pillar.cs @@ -7,7 +7,7 @@ namespace ImperatorToCK3.CK3.Cultures; -public sealed class Pillar : IIdentifiable, IPDXSerializable { +internal sealed class Pillar : IIdentifiable, IPDXSerializable { public string Id { get; } public string Type { get; } public Color? Color { get; } diff --git a/ImperatorToCK3/CK3/Cultures/PillarCollection.cs b/ImperatorToCK3/CK3/Cultures/PillarCollection.cs index a1223e6a2..f21521930 100644 --- a/ImperatorToCK3/CK3/Cultures/PillarCollection.cs +++ b/ImperatorToCK3/CK3/Cultures/PillarCollection.cs @@ -9,7 +9,7 @@ namespace ImperatorToCK3.CK3.Cultures; -public sealed class PillarCollection : IdObjectCollection { +internal sealed class PillarCollection : IdObjectCollection { private readonly Dictionary mergedPillarsDict = []; public PillarCollection(ColorFactory colorFactory, OrderedDictionary ck3ModFlags) { diff --git a/ImperatorToCK3/CK3/Cultures/PillarData.cs b/ImperatorToCK3/CK3/Cultures/PillarData.cs index 7b28cbafb..3023181d2 100644 --- a/ImperatorToCK3/CK3/Cultures/PillarData.cs +++ b/ImperatorToCK3/CK3/Cultures/PillarData.cs @@ -4,10 +4,10 @@ namespace ImperatorToCK3.CK3.Cultures; -public record PillarData { - public IEnumerable InvalidatingPillarIds { get; set; } = new List(); +internal record PillarData { + public List InvalidatingPillarIds { get; set; } = []; public string? Type { get; set; } public Color? Color { get; set; } - - public IList> Attributes { get; } = new List>(); + + public List> Attributes { get; } = []; } \ No newline at end of file diff --git a/ImperatorToCK3/CK3/Religions/FaithData.cs b/ImperatorToCK3/CK3/Religions/FaithData.cs index 6cf70e882..5403f212f 100644 --- a/ImperatorToCK3/CK3/Religions/FaithData.cs +++ b/ImperatorToCK3/CK3/Religions/FaithData.cs @@ -4,12 +4,12 @@ namespace ImperatorToCK3.CK3.Religions; -public record FaithData { - public IEnumerable InvalidatingFaithIds { get; set; } = new List(); +internal record FaithData { + public List InvalidatingFaithIds { get; set; } = []; public Color? Color { get; set; } public string? ReligiousHeadTitleId { get; set; } - public IList DoctrineIds { get; } = new List(); - public IList HolySiteIds { get; init; } = new List(); + public List DoctrineIds { get; } = []; + public List HolySiteIds { get; init; } = []; - public IList> Attributes { get; init; } = new List>(); + public List> Attributes { get; init; } = []; } \ No newline at end of file diff --git a/ImperatorToCK3/CK3/Titles/Title.cs b/ImperatorToCK3/CK3/Titles/Title.cs index 31ddbbc92..fc195305d 100644 --- a/ImperatorToCK3/CK3/Titles/Title.cs +++ b/ImperatorToCK3/CK3/Titles/Title.cs @@ -721,9 +721,9 @@ public Date GetDateOfLastHolderChange() { return lastDate ?? new Date(1, 1, 1); } - public ISet GetAllHolderIds() { + public HashSet GetAllHolderIds() { if (!History.Fields.TryGetValue("holder", out var holderField)) { - return new HashSet(); + return []; } var ids = new HashSet(); @@ -980,10 +980,10 @@ public void SetDeFactoLiege(Title? newLiege, Date date) { private readonly TitleCollection deJureVassals = []; [SerializeOnlyValue] public IReadOnlyTitleCollection DeJureVassals => deJureVassals; // DIRECT de jure vassals - public IDictionary GetDeJureVassalsAndBelow() { + public Dictionary GetDeJureVassalsAndBelow() { return GetDeJureVassalsAndBelow("bcdke"); } - public IDictionary GetDeJureVassalsAndBelow(string rankFilter) { + public Dictionary GetDeJureVassalsAndBelow(string rankFilter) { var rankFilterAsArray = rankFilter.ToCharArray(); Dictionary deJureVassalsAndBelow = new(); foreach (var vassalTitle in DeJureVassals) { @@ -1003,14 +1003,14 @@ public IDictionary GetDeJureVassalsAndBelow(string rankFilter) { return deJureVassalsAndBelow; } - public IDictionary GetDeFactoVassals(Date date) { // DIRECT de facto vassals + public Dictionary GetDeFactoVassals(Date date) { // DIRECT de facto vassals return parentCollection.Where(t => t.GetDeFactoLiege(date)?.Id == Id) .ToDictionary(t => t.Id, t => t); } - public IDictionary GetDeFactoVassalsAndBelow(Date date) { + public Dictionary GetDeFactoVassalsAndBelow(Date date) { return GetDeFactoVassalsAndBelow(date, "bcdke"); } - public IDictionary GetDeFactoVassalsAndBelow(Date date, string rankFilter) { + public Dictionary GetDeFactoVassalsAndBelow(Date date, string rankFilter) { var rankFilterAsArray = rankFilter.ToCharArray(); Dictionary deFactoVassalsAndBelow = new(); foreach (var (vassalTitleName, vassalTitle) in GetDeFactoVassals(date)) { @@ -1052,9 +1052,9 @@ public IDictionary GetDeFactoVassalsAndBelow(Date date, string ra [SerializedName("always_follows_primary_heir")] public bool? AlwaysFollowsPrimaryHeir { get; set; } [SerializedName("de_jure_drift_disabled")] public bool? DeJureDriftDisabled { get; set; } [SerializedName("can_be_named_after_dynasty")] public bool? CanBeNamedAfterDynasty { get; set; } - [SerializedName("male_names")] public IList? MaleNames { get; private set; } + [SerializedName("male_names")] public List? MaleNames { get; private set; } // - [SerializedName("cultural_names")] public IDictionary? CulturalNames { get; private set; } + [SerializedName("cultural_names")] public Dictionary? CulturalNames { get; private set; } public int? GetOwnOrInheritedDevelopmentLevel(Date date) { var ownDev = GetDevelopmentLevel(date); @@ -1196,7 +1196,7 @@ public async Task OutputHistory(StreamWriter writer) { await writer.WriteAsync(sb); } - public ISet GetProvincesInCountry(Date date) { + public HashSet GetProvincesInCountry(Date date) { var holderId = GetHolderId(date); var heldCounties = new List( parentCollection.Where(t => t.GetHolderId(date) == holderId && t.Rank == TitleRank.county) diff --git a/ImperatorToCK3/CK3/Wars/War.cs b/ImperatorToCK3/CK3/Wars/War.cs index 6b02bae8b..303c2640c 100644 --- a/ImperatorToCK3/CK3/Wars/War.cs +++ b/ImperatorToCK3/CK3/Wars/War.cs @@ -15,8 +15,8 @@ internal sealed class War { public Date EndDate { get; } public OrderedSet<string> TargetedTitles { get; } = []; public string? CasusBelli { get; } - public IList<string> Attackers { get; } = []; - public IList<string> Defenders { get; } = []; + public List<string> Attackers { get; } = []; + public List<string> Defenders { get; } = []; public string Claimant { get; } public War(Imperator.Diplomacy.War irWar, Mappers.War.WarMapper warMapper, ProvinceMapper provinceMapper, Imperator.Countries.CountryCollection impCountries, StateCollection irStates, ProvinceCollection ck3Provinces, Title.LandedTitles titles, Date ck3BookmarkDate) { diff --git a/ImperatorToCK3/CK3/World.cs b/ImperatorToCK3/CK3/World.cs index 8cea3e062..883b91c1a 100644 --- a/ImperatorToCK3/CK3/World.cs +++ b/ImperatorToCK3/CK3/World.cs @@ -56,7 +56,7 @@ internal sealed class World { public ReligionCollection Religions { get; } public IdObjectCollection<string, MenAtArmsType> MenAtArmsTypes { get; } = new(); public MapData MapData { get; private set; } = null!; - public IList<Wars.War> Wars { get; } = new List<Wars.War>(); + public List<Wars.War> Wars { get; } = []; public LegendSeedCollection LegendSeeds { get; } = []; internal CoaMapper CK3CoaMapper { get; private set; } = null!; private readonly List<string> enabledDlcFlags = []; diff --git a/ImperatorToCK3/CommonUtils/Genes/AccessoryGene.cs b/ImperatorToCK3/CommonUtils/Genes/AccessoryGene.cs index 05e6a0cbd..36001a55e 100644 --- a/ImperatorToCK3/CommonUtils/Genes/AccessoryGene.cs +++ b/ImperatorToCK3/CommonUtils/Genes/AccessoryGene.cs @@ -4,7 +4,7 @@ namespace ImperatorToCK3.CommonUtils.Genes; -public sealed class AccessoryGene : Gene, IIdentifiable<string> { +internal sealed class AccessoryGene : Gene, IIdentifiable<string> { public string Id { get; } public uint? Index { get; private set; } public IdObjectCollection<string, AccessoryGeneTemplate> GeneTemplates { get; } = []; diff --git a/ImperatorToCK3/CommonUtils/Genes/AccessoryGeneTemplate.cs b/ImperatorToCK3/CommonUtils/Genes/AccessoryGeneTemplate.cs index 090fd66ed..9891a3be8 100644 --- a/ImperatorToCK3/CommonUtils/Genes/AccessoryGeneTemplate.cs +++ b/ImperatorToCK3/CommonUtils/Genes/AccessoryGeneTemplate.cs @@ -4,10 +4,10 @@ namespace ImperatorToCK3.CommonUtils.Genes; -public sealed class AccessoryGeneTemplate : IIdentifiable<string> { +internal sealed class AccessoryGeneTemplate : IIdentifiable<string> { public string Id { get; } public uint Index { get; private set; } = 0; - public IDictionary<string, WeightBlock> AgeSexWeightBlocks { get; } = new Dictionary<string, WeightBlock>(); + public Dictionary<string, WeightBlock> AgeSexWeightBlocks { get; } = []; public AccessoryGeneTemplate(string id, BufferedReader reader) { Id = id; diff --git a/ImperatorToCK3/CommonUtils/Genes/GenesDB.cs b/ImperatorToCK3/CommonUtils/Genes/GenesDB.cs index b8e992bb7..de9db447c 100644 --- a/ImperatorToCK3/CommonUtils/Genes/GenesDB.cs +++ b/ImperatorToCK3/CommonUtils/Genes/GenesDB.cs @@ -4,7 +4,7 @@ namespace ImperatorToCK3.CommonUtils.Genes; -public sealed class GenesDB { +internal sealed class GenesDB { public IdObjectCollection<string, AccessoryGene> AccessoryGenes { get; } = new(); public IdObjectCollection<string, MorphGene> MorphGenes { get; } = new(); public IdObjectCollection<string, AccessoryGene> SpecialAccessoryGenes { get; } = new(); diff --git a/ImperatorToCK3/CommonUtils/Map/MapData.cs b/ImperatorToCK3/CommonUtils/Map/MapData.cs index 9bc83a846..d46bd7f61 100644 --- a/ImperatorToCK3/CommonUtils/Map/MapData.cs +++ b/ImperatorToCK3/CommonUtils/Map/MapData.cs @@ -11,7 +11,7 @@ namespace ImperatorToCK3.CommonUtils.Map; -public sealed class MapData { +internal sealed class MapData { [StructLayout(LayoutKind.Auto)] private struct Point(int x, int y) : IEquatable<Point> { public int X { get; set; } = x; diff --git a/ImperatorToCK3/CommonUtils/Map/ProvinceDefinitions.cs b/ImperatorToCK3/CommonUtils/Map/ProvinceDefinitions.cs index 77aac5f34..7d03072c6 100644 --- a/ImperatorToCK3/CommonUtils/Map/ProvinceDefinitions.cs +++ b/ImperatorToCK3/CommonUtils/Map/ProvinceDefinitions.cs @@ -8,8 +8,8 @@ namespace ImperatorToCK3.CommonUtils.Map; -public sealed class ProvinceDefinitions : IdObjectCollection<ulong, ProvinceDefinition> { - public IDictionary<Rgb24, ulong> ColorToProvinceDict { get; } = new Dictionary<Rgb24, ulong>(); +internal sealed class ProvinceDefinitions : IdObjectCollection<ulong, ProvinceDefinition> { + public Dictionary<Rgb24, ulong> ColorToProvinceDict { get; } = []; public Dictionary<ulong, Rgb24> ProvinceToColorDict { get; } = []; public void LoadDefinitions(string definitionsFilename, ModFilesystem modFS) { diff --git a/ImperatorToCK3/Imperator/Characters/Character.cs b/ImperatorToCK3/Imperator/Characters/Character.cs index efed58f41..22a924beb 100644 --- a/ImperatorToCK3/Imperator/Characters/Character.cs +++ b/ImperatorToCK3/Imperator/Characters/Character.cs @@ -65,11 +65,11 @@ public bool LinkFamily(FamilyCollection families, SortedSet<ulong>? missingDefin public bool IsDead => DeathDate is not null; public string? DeathReason { get; set; } private HashSet<ulong> parsedSpouseIds = []; - public IDictionary<ulong, Character> Spouses { get; set; } = new Dictionary<ulong, Character>(); + public Dictionary<ulong, Character> Spouses { get; set; } = []; public OrderedSet<ulong> FriendIds { get; } = []; public OrderedSet<ulong> RivalIds { get; } = []; private HashSet<ulong> parsedChildrenIds = []; - public IDictionary<ulong, Character> Children { get; set; } = new Dictionary<ulong, Character>(); + public Dictionary<ulong, Character> Children { get; set; } = []; private ulong? parsedMotherId; public Character? Mother { get; set; } private ulong? parsedFatherId; @@ -88,7 +88,7 @@ public Family? Family { } } - public IList<string> Traits { get; set; } = []; + public List<string> Traits { get; set; } = []; public CharacterAttributes Attributes { get; private set; } = new(); public IReadOnlySet<string> Variables { get; private set; } = ImmutableHashSet<string>.Empty; public bool IsBald => Variables.Contains("bald"); diff --git a/ImperatorToCK3/Imperator/Characters/PortraitData.cs b/ImperatorToCK3/Imperator/Characters/PortraitData.cs index dead38833..82ef1d7d0 100644 --- a/ImperatorToCK3/Imperator/Characters/PortraitData.cs +++ b/ImperatorToCK3/Imperator/Characters/PortraitData.cs @@ -6,7 +6,7 @@ namespace ImperatorToCK3.Imperator.Characters; -public sealed class PortraitData { +internal sealed class PortraitData { public PaletteCoordinates HairColorPaletteCoordinates { get; } = new(); public PaletteCoordinates HairColor2PaletteCoordinates { get; } = new(); public PaletteCoordinates SkinColorPaletteCoordinates { get; } = new(); @@ -14,9 +14,8 @@ public sealed class PortraitData { public PaletteCoordinates EyeColorPaletteCoordinates { get; } = new(); public PaletteCoordinates EyeColor2PaletteCoordinates { get; } = new(); - public IDictionary<string, AccessoryGeneData> AccessoryGenesDict { get; } = - new Dictionary<string, AccessoryGeneData>(); - public IDictionary<string, MorphGeneData> MorphGenesDict { get; } = new Dictionary<string, MorphGeneData>(); + public Dictionary<string, AccessoryGeneData> AccessoryGenesDict { get; } = []; + public Dictionary<string, MorphGeneData> MorphGenesDict { get; } = []; public PortraitData(string dnaString, GenesDB genesDB, string ageSexString = "male") { var decodedDnaStr = Convert.FromBase64String(dnaString); diff --git a/ImperatorToCK3/Imperator/Diplomacy/DiplomacyDB.cs b/ImperatorToCK3/Imperator/Diplomacy/DiplomacyDB.cs index 159988479..5718f10a4 100644 --- a/ImperatorToCK3/Imperator/Diplomacy/DiplomacyDB.cs +++ b/ImperatorToCK3/Imperator/Diplomacy/DiplomacyDB.cs @@ -5,7 +5,7 @@ namespace ImperatorToCK3.Imperator.Diplomacy; -public sealed class DiplomacyDB { +internal sealed class DiplomacyDB { private readonly List<War> wars = []; public IReadOnlyList<War> Wars => wars; diff --git a/ImperatorToCK3/Imperator/Diplomacy/War.cs b/ImperatorToCK3/Imperator/Diplomacy/War.cs index c202a1cf8..a20202f8a 100644 --- a/ImperatorToCK3/Imperator/Diplomacy/War.cs +++ b/ImperatorToCK3/Imperator/Diplomacy/War.cs @@ -4,11 +4,11 @@ namespace ImperatorToCK3.Imperator.Diplomacy; -public sealed class War { +internal sealed class War { public Date StartDate { get; private set; } = new(1, 1, 1); public bool Previous { get; private set; } - public IList<ulong> AttackerCountryIds { get; } = new List<ulong>(); - public IList<ulong> DefenderCountryIds { get; } = new List<ulong>(); + public List<ulong> AttackerCountryIds { get; } = []; + public List<ulong> DefenderCountryIds { get; } = []; public string? WarGoal { get; private set; } public ulong? TargetedStateId { get; private set; } diff --git a/ImperatorToCK3/Imperator/Jobs/JobsDB.cs b/ImperatorToCK3/Imperator/Jobs/JobsDB.cs index 27652b967..7bf4099c1 100644 --- a/ImperatorToCK3/Imperator/Jobs/JobsDB.cs +++ b/ImperatorToCK3/Imperator/Jobs/JobsDB.cs @@ -9,8 +9,8 @@ namespace ImperatorToCK3.Imperator.Jobs; internal sealed class JobsDB { - public IList<Governorship> Governorships { get; } = []; - public IList<OfficeJob> OfficeJobs { get; } = []; + public List<Governorship> Governorships { get; } = []; + public List<OfficeJob> OfficeJobs { get; } = []; public JobsDB() { } public JobsDB(BufferedReader jobsReader, CharacterCollection characters, CountryCollection countries, ImperatorRegionMapper irRegionMapper) { diff --git a/ImperatorToCK3/Imperator/Provinces/Province.cs b/ImperatorToCK3/Imperator/Provinces/Province.cs index 8bd33da66..2e12f8251 100644 --- a/ImperatorToCK3/Imperator/Provinces/Province.cs +++ b/ImperatorToCK3/Imperator/Provinces/Province.cs @@ -17,7 +17,7 @@ internal sealed partial class Province : IIdentifiable<ulong> { public State? State { get; private set; } = null; public Country? OwnerCountry { get; set; } public ulong Controller { get; set; } = 0; - public IDictionary<ulong, Pop> Pops { get; } = new Dictionary<ulong, Pop>(); + public Dictionary<ulong, Pop> Pops { get; } = []; public ProvinceRank ProvinceRank { get; set; } = ProvinceRank.settlement; public bool Fort { get; set; } = false; public bool IsHolySite => HolySiteId is not null; diff --git a/ImperatorToCK3/Mappers/Gene/AccessoryGeneMapper.cs b/ImperatorToCK3/Mappers/Gene/AccessoryGeneMapper.cs index 4dd5165ca..758f82d95 100644 --- a/ImperatorToCK3/Mappers/Gene/AccessoryGeneMapper.cs +++ b/ImperatorToCK3/Mappers/Gene/AccessoryGeneMapper.cs @@ -6,8 +6,8 @@ namespace ImperatorToCK3.Mappers.Gene; public sealed class AccessoryGeneMapper { - private Dictionary<string, IList<Assignment>> ObjectToObjectMappings { get; } = []; - private Dictionary<string, IList<Assignment>> TemplateToTemplateMappings { get; } = []; + private Dictionary<string, List<Assignment>> ObjectToObjectMappings { get; } = []; + private Dictionary<string, List<Assignment>> TemplateToTemplateMappings { get; } = []; public AccessoryGeneMapper(string mappingsFilePath) { var objectToObjectMappingsParser = new Parser(); diff --git a/ImperatorToCK3/Mappers/Province/ProvinceMapper.cs b/ImperatorToCK3/Mappers/Province/ProvinceMapper.cs index c33a33bb3..d4bc88400 100644 --- a/ImperatorToCK3/Mappers/Province/ProvinceMapper.cs +++ b/ImperatorToCK3/Mappers/Province/ProvinceMapper.cs @@ -4,9 +4,9 @@ namespace ImperatorToCK3.Mappers.Province; -public sealed class ProvinceMapper { - private readonly Dictionary<ulong, IList<ulong>> imperatorToCK3ProvinceMap = new(); - private readonly Dictionary<ulong, IList<ulong>> ck3ToImperatorProvinceMap = new(); +internal sealed class ProvinceMapper { + private readonly Dictionary<ulong, List<ulong>> imperatorToCK3ProvinceMap = []; + private readonly Dictionary<ulong, List<ulong>> ck3ToImperatorProvinceMap = []; public void LoadMappings(string mappingsPath) { Logger.Info("Loading province mappings..."); @@ -50,17 +50,17 @@ private void CreateMappings(ProvinceMappingsVersion mappingsVersion) { } } - public IList<ulong> GetImperatorProvinceNumbers(ulong ck3ProvinceNumber) { + public List<ulong> GetImperatorProvinceNumbers(ulong ck3ProvinceNumber) { if (ck3ToImperatorProvinceMap.TryGetValue(ck3ProvinceNumber, out var impProvs)) { return impProvs; } - return new List<ulong>(); + return []; } - public IList<ulong> GetCK3ProvinceNumbers(ulong impProvinceNumber) { + public List<ulong> GetCK3ProvinceNumbers(ulong impProvinceNumber) { if (imperatorToCK3ProvinceMap.TryGetValue(impProvinceNumber, out var ck3Provs)) { return ck3Provs; } - return new List<ulong>(); + return []; } } \ No newline at end of file diff --git a/ImperatorToCK3/Mappers/Province/ProvinceMapping.cs b/ImperatorToCK3/Mappers/Province/ProvinceMapping.cs index 9a8cbcf49..45a72fb2e 100644 --- a/ImperatorToCK3/Mappers/Province/ProvinceMapping.cs +++ b/ImperatorToCK3/Mappers/Province/ProvinceMapping.cs @@ -4,8 +4,8 @@ namespace ImperatorToCK3.Mappers.Province; internal sealed class ProvinceMapping { - public IList<ulong> CK3Provinces { get; } = new List<ulong>(); - public IList<ulong> ImperatorProvinces { get; } = new List<ulong>(); + public List<ulong> CK3Provinces { get; } = []; + public List<ulong> ImperatorProvinces { get; } = []; private static readonly Parser parser = new(); private static ProvinceMapping tempMapping = new(); diff --git a/ImperatorToCK3/Mappers/Province/ProvinceMappingsVersion.cs b/ImperatorToCK3/Mappers/Province/ProvinceMappingsVersion.cs index 15aae8ee0..e3ececff0 100644 --- a/ImperatorToCK3/Mappers/Province/ProvinceMappingsVersion.cs +++ b/ImperatorToCK3/Mappers/Province/ProvinceMappingsVersion.cs @@ -5,7 +5,7 @@ namespace ImperatorToCK3.Mappers.Province; internal sealed class ProvinceMappingsVersion { - public IList<ProvinceMapping> Mappings { get; } = []; + public List<ProvinceMapping> Mappings { get; } = []; public ProvinceMappingsVersion() { } public ProvinceMappingsVersion(BufferedReader reader) { var referencedImperatorProvs = new HashSet<ulong>(); diff --git a/ImperatorToCK3/Mappers/Technology/InnovationMapper.cs b/ImperatorToCK3/Mappers/Technology/InnovationMapper.cs index 36add7ff8..cffff186f 100644 --- a/ImperatorToCK3/Mappers/Technology/InnovationMapper.cs +++ b/ImperatorToCK3/Mappers/Technology/InnovationMapper.cs @@ -6,7 +6,7 @@ namespace ImperatorToCK3.Mappers.Technology; -public sealed class InnovationMapper { +internal sealed class InnovationMapper { private readonly List<InnovationLink> innovationLinks = []; private readonly List<InnovationBonus> innovationBonuses = []; @@ -18,7 +18,7 @@ public void LoadLinksAndBonuses(string configurablePath) { parser.ParseFile(configurablePath); } - public IList<string> GetInnovations(IEnumerable<string> irInventions) { + public List<string> GetInnovations(IEnumerable<string> irInventions) { var ck3Innovations = new List<string>(); foreach (var irInvention in irInventions) { foreach (var link in innovationLinks) { @@ -31,7 +31,7 @@ public IList<string> GetInnovations(IEnumerable<string> irInventions) { return ck3Innovations; } - public IDictionary<string, ushort> GetInnovationProgresses(ICollection<string> irInventions) { + public Dictionary<string, ushort> GetInnovationProgresses(ICollection<string> irInventions) { Dictionary<string, ushort> progressesToReturn = []; foreach (var bonus in innovationBonuses) { var innovationProgress = bonus.GetProgress(irInventions); diff --git a/ImperatorToCK3/Outputter/PillarOutputter.cs b/ImperatorToCK3/Outputter/PillarOutputter.cs index 458a89e5c..3b2a18eca 100644 --- a/ImperatorToCK3/Outputter/PillarOutputter.cs +++ b/ImperatorToCK3/Outputter/PillarOutputter.cs @@ -7,7 +7,7 @@ namespace ImperatorToCK3.Outputter; -public static class PillarOutputter { +internal static class PillarOutputter { public static async Task OutputPillars(string outputPath, PillarCollection pillars) { Logger.Info("Outputting pillars...");