diff --git a/ImperatorToCK3.UnitTests/CK3/Titles/LandedTitlesTests.cs b/ImperatorToCK3.UnitTests/CK3/Titles/LandedTitlesTests.cs index a4190ef1a..f4b54f275 100644 --- a/ImperatorToCK3.UnitTests/CK3/Titles/LandedTitlesTests.cs +++ b/ImperatorToCK3.UnitTests/CK3/Titles/LandedTitlesTests.cs @@ -238,10 +238,10 @@ public void GovernorshipsCanBeRecognizedAsCountyLevel() { imperatorWorld.Countries.Add(country); imperatorWorld.Areas.LoadAreas(imperatorWorld.ModFS, imperatorWorld.Provinces); - var impRegionMapper = new ImperatorRegionMapper(imperatorWorld.Areas); - impRegionMapper.LoadRegions(imperatorWorld.ModFS, new ColorFactory()); - Assert.True(impRegionMapper.RegionNameIsValid("galatia_area")); - Assert.True(impRegionMapper.RegionNameIsValid("galatia_region")); + var irRegionMapper = new ImperatorRegionMapper(imperatorWorld.Areas); + irRegionMapper.LoadRegions(imperatorWorld.ModFS, new ColorFactory()); + Assert.True(irRegionMapper.RegionNameIsValid("galatia_area")); + Assert.True(irRegionMapper.RegionNameIsValid("galatia_region")); var ck3RegionMapper = new CK3RegionMapper(); var reader = new BufferedReader( @@ -250,7 +250,7 @@ public void GovernorshipsCanBeRecognizedAsCountyLevel() { "start_date=450.10.1 " + "governorship = \"galatia_region\"" ); - var governorship1 = new Governorship(reader, imperatorWorld.Countries, impRegionMapper); + var governorship1 = new Governorship(reader, imperatorWorld.Countries, irRegionMapper); imperatorWorld.JobsDB.Governorships.Add(governorship1); var titles = new Title.LandedTitles(); titles.LoadTitles(new BufferedReader( @@ -265,8 +265,8 @@ public void GovernorshipsCanBeRecognizedAsCountyLevel() { provinceMapper.LoadMappings(provinceMappingsPath, "test_version"); var locDB = new LocDB("english"); var ck3Religions = new ReligionCollection(titles); - var religionMapper = new ReligionMapper(ck3Religions, impRegionMapper, ck3RegionMapper); - var cultureMapper = new CultureMapper(impRegionMapper, ck3RegionMapper, cultures); + var religionMapper = new ReligionMapper(ck3Religions, irRegionMapper, ck3RegionMapper); + var cultureMapper = new CultureMapper(irRegionMapper, ck3RegionMapper, cultures); var coaMapper = new CoaMapper(); var definiteFormMapper = new DefiniteFormMapper(); var traitMapper = new TraitMapper(); @@ -306,7 +306,7 @@ public void GovernorshipsCanBeRecognizedAsCountyLevel() { var provinces = new ProvinceCollection(ck3ModFS); provinces.ImportImperatorProvinces(imperatorWorld, titles, cultureMapper, religionMapper, provinceMapper, conversionDate, config); // Country 589 is imported as duchy-level title, so its governorship of galatia_region will be county level. - titles.ImportImperatorGovernorships(imperatorWorld, provinces, tagTitleMapper, locDB, config, provinceMapper, definiteFormMapper, impRegionMapper, coaMapper, countyLevelGovernorships); + titles.ImportImperatorGovernorships(imperatorWorld, provinces, tagTitleMapper, locDB, config, provinceMapper, definiteFormMapper, irRegionMapper, coaMapper, countyLevelGovernorships); Assert.Collection(titles, title => Assert.Equal("c_county1", title.Id), diff --git a/ImperatorToCK3/Data_Files/configurables/culture_map.txt b/ImperatorToCK3/Data_Files/configurables/culture_map.txt index ada301332..aeff327cc 100644 --- a/ImperatorToCK3/Data_Files/configurables/culture_map.txt +++ b/ImperatorToCK3/Data_Files/configurables/culture_map.txt @@ -9,10 +9,10 @@ # historicalTag = (optional) # irProvince = (optional) # ck3Province = (optional) -# impRegion = (optional) +# irRegion = (optional) # ck3Region = (optional) # } -# multiple entries allowed for: ir, irProvince, ck3Province, impRegion, ck3Region, historicalTag +# multiple entries allowed for: ir, irProvince, ck3Province, irRegion, ck3Region, historicalTag # multiple entries not allowed for: ck3 # Variables: @@ -32,37 +32,37 @@ ## A: @culture_splitting_region_A = "ck3Province = 28 ck3Province = 29 ck3Province = 30 ck3Province = 31 ck3Province = 32 ck3Province = 34 ck3Province = 33 ck3Province = 36 ck3Province = 15 ck3Province = 13 ck3Province = 14 ck3Province = 18 ck3Province = 17 ck3Province = 19 ck3Province = 9 ck3Province = 10 ck3Province = 11 ck3Province = 12 ck3Province = 20 ck3Province = 21 ck3Province = 22 ck3Province = 23 ck3Province = 24 ck3Province = 25 ck3Province = 26 ck3Province = 27 ck3Province = 37 ck3Province = 38 ck3Province = 39 ck3Province = 40 ck3Province = 43 ck3Province = 41 ck3Province = 42 ck3Province = 44 ck3Province = 45 ck3Province = 46 ck3Province = 47 ck3Province = 48 ck3Province = 49 ck3Province = 50 ck3Province = 51 ck3Province = 52 ck3Province = 53 ck3Province = 54 ck3Province = 8745 ck3Province = 16" ## B (overlaps with A, so put it AFTER): -@culture_splitting_region_B = "impRegion = caledonia_region" +@culture_splitting_region_B = "irRegion = caledonia_region" ## C: -@culture_splitting_region_C = "impRegion = britain_region" +@culture_splitting_region_C = "irRegion = britain_region" ## D: -@culture_splitting_region_D = "impRegion = scandinavia_region" +@culture_splitting_region_D = "irRegion = scandinavia_region" ## E: -@culture_splitting_region_E = "impRegion = armorica_region impRegion = central_gaul_region" +@culture_splitting_region_E = "irRegion = armorica_region irRegion = central_gaul_region" ## F: -@culture_splitting_region_F = "impRegion = aquitaine_region impRegion = transalpine_gaul_region" +@culture_splitting_region_F = "irRegion = aquitaine_region irRegion = transalpine_gaul_region" ## G: -@culture_splitting_region_G = "impRegion=germania_superior_region impRegion=belgica_region impRegion=germania_region impRegion=bohemia_area impRegion=bohemia_region impRegion=germania_magna_region" +@culture_splitting_region_G = "irRegion=germania_superior_region irRegion=belgica_region irRegion=germania_region irRegion=bohemia_area irRegion=bohemia_region irRegion=germania_magna_region" ## H: -@culture_splitting_region_H = "impRegion = venedia_region" +@culture_splitting_region_H = "irRegion = venedia_region" ## I: -@culture_splitting_region_I = "impRegion = rhaetia_region impRegion = cisalpine_gaul_region" +@culture_splitting_region_I = "irRegion = rhaetia_region irRegion = cisalpine_gaul_region" ## J: -@culture_splitting_region_J1 = "impRegion=pannonia_prima_occidentalis_area impRegion=pannonia_prima_orientalis_area impRegion=pannonia_valeria_area impRegion=noricum_mediterranum_area impRegion=pannonia_secunda_area impRegion=illyria_region" -@culture_splitting_region_J2 = "impRegion=pannonia_terminus_area impRegion=transcarpathia_occidentalis_area impRegion=carnuntia_area impRegion=dacia_region" +@culture_splitting_region_J1 = "irRegion=pannonia_prima_occidentalis_area irRegion=pannonia_prima_orientalis_area irRegion=pannonia_valeria_area irRegion=noricum_mediterranum_area irRegion=pannonia_secunda_area irRegion=illyria_region" +@culture_splitting_region_J2 = "irRegion=pannonia_terminus_area irRegion=transcarpathia_occidentalis_area irRegion=carnuntia_area irRegion=dacia_region" @culture_splitting_region_J = "@culture_splitting_region_J1 @culture_splitting_region_J2" ## K: -@culture_splitting_region_K1 = "impRegion=moesia_region impRegion=moesia_s_region impRegion=thrace_region impRegion=macedonia_region" -@culture_splitting_region_K2 = "impRegion = vistulia_region impRegion = sarmatia_europea_region" +@culture_splitting_region_K1 = "irRegion=moesia_region irRegion=moesia_s_region irRegion=thrace_region irRegion=macedonia_region" +@culture_splitting_region_K2 = "irRegion = vistulia_region irRegion = sarmatia_europea_region" @culture_splitting_region_K = "@culture_splitting_region_K1 @culture_splitting_region_K2" ## L: -@culture_splitting_region_L1 = "impRegion = sarmatia_asiatica_region impRegion = taurica_region" -@culture_splitting_region_L2 = "impRegion = colchis_region impRegion = bithynia_region impRegion = cappadocia_region impRegion = galatia_region impRegion = cilicia_region" +@culture_splitting_region_L1 = "irRegion = sarmatia_asiatica_region irRegion = taurica_region" +@culture_splitting_region_L2 = "irRegion = colchis_region irRegion = bithynia_region irRegion = cappadocia_region irRegion = galatia_region irRegion = cilicia_region" @culture_splitting_region_L = "@culture_splitting_region_L1 @culture_splitting_region_L2" ## M: -@culture_splitting_region_M = "impRegion = gedrosia_region impRegion = media_region impRegion = persis_region impRegion = ariana_region impRegion = parthia_region" +@culture_splitting_region_M = "irRegion = gedrosia_region irRegion = media_region irRegion = persis_region irRegion = ariana_region irRegion = parthia_region" ## N: -@culture_splitting_region_N = "impRegion = syria_region impRegion = assyria_region impRegion = palestine_region" +@culture_splitting_region_N = "irRegion = syria_region irRegion = assyria_region irRegion = palestine_region" ## O: @culture_splitting_region_O = "impRegion = numidia_region impRegion = mauretainia_region impRegion = africa_region impRegion = cyrenaica_region impRegion = upper_egypt_region impRegion = lower_egypt_region" ## P (!overlaps with S, must be put after it): diff --git a/ImperatorToCK3/Data_Files/configurables/religion_map.txt b/ImperatorToCK3/Data_Files/configurables/religion_map.txt index 14752e7a4..568f11e8b 100644 --- a/ImperatorToCK3/Data_Files/configurables/religion_map.txt +++ b/ImperatorToCK3/Data_Files/configurables/religion_map.txt @@ -5,12 +5,12 @@ # ck3Culture = CK3 culture ID (optional) # irProvince = Imperator province ID (optional) # ck3Province = CK3 province ID (optional) -# impRegion = Imperator region or area ID (optional) +# irRegion = Imperator region or area ID (optional) # ck3Region = CK3 region ID (optional) # historicalTag = Imperator historical tag (optional) # heresiesInHistoricalAreas = yes/no (optional) # } -# multiple entries allowed for: ir, ck3Culture, irProvince, ck3Province, impRegion, ck3Region, historicalTag +# multiple entries allowed for: ir, ck3Culture, irProvince, ck3Province, irRegion, ck3Region, historicalTag # multiple entries not allowed for: ck3 # Variables: @@ -31,7 +31,7 @@ link = { ck3 = guanche_pagan ir = berber_religion ck3Province = 8713 ck3Province link = { ck3 = amazigh_pagan ir = berber_religion } link = { ck3 = scythian_pagan ir = indo_iranian_religion } # Vanilla CK3 -link = { ck3 = kushitism_pagan ir = egyptian_pantheon impRegion = nubia_region impRegion = punt_region } +link = { ck3 = kushitism_pagan ir = egyptian_pantheon irRegion = nubia_region irRegion = punt_region } link = { ck3 = egyptian_pagan ir = egyptian_pantheon } link = { ck3 = canaanite_pagan ir = carthaginian_pantheon } link = { ck3 = dacian_pagan ir = shamanism } @@ -54,13 +54,13 @@ link = { ck3=sardinian_pagan ir=nuragic_pantheon } # TFE link = { ck3=pagan ir=nuragic_pantheon } # TODO: https://github.com/ParadoxGameConverters/ImperatorToCK3/issues/1474 # Arabic -link = { ck3 = aksumite_pagan ir = arabian_pantheon impRegion = punt_region } # TFE +link = { ck3 = aksumite_pagan ir = arabian_pantheon irRegion = punt_region } # TFE link = { # TFE ck3 = nabataean_pagan ir = arabian_pantheon ck3Province = 6030 ck3Province = 6031 ck3Province = 6032 ck3Province = 6033 ck3Province = 6034 ck3Province = 6035 ck3Province = 6037 ck3Province = 5969 ck3Province = 5971 ck3Province = 5972 ck3Province = 5973 ck3Province = 5978 ck3Province = 5979 ck3Province = 5980 ck3Province = 5977 ck3Province = 5976 ck3Province = 5975 ck3Province = 5974 ck3Province = 6183 } -link = { ck3 = south_arabian_pagan ir = arabian_pantheon impRegion = arabia_felix_region } # TFE +link = { ck3 = south_arabian_pagan ir = arabian_pantheon irRegion = arabia_felix_region } # TFE link = { ck3 = arabic_pagan ir = arabian_pantheon } # TFE link = { ck3 = druze ir = arabian_pantheon ck3Province = 5925 ck3Province = 5926 ck3Province = 5937 } link = { ck3 = druze ir = judaism ck3Province = 5925 ck3Province = 5926 ck3Province = 5937 } @@ -71,17 +71,17 @@ link = { ck3 = arabic_pagan ir = arabian_pantheon } link = { ck3 = mithraic_mysteries ir = roman_pantheon - impRegion = armenia_region impRegion = assyria_region impRegion = mesopotamia_region impRegion = media_region impRegion = persis_region impRegion = parthia_region + irRegion = armenia_region irRegion = assyria_region irRegion = mesopotamia_region irRegion = media_region irRegion = persis_region irRegion = parthia_region } link = { ck3 = mithraic_mysteries ir = mithra_religion # from Invictus } -link = { ck3 = eleusinian_mysteries ir = roman_pantheon impRegion = thrace_region } +link = { ck3 = eleusinian_mysteries ir = roman_pantheon irRegion = thrace_region } link = { ck3 = celto_hellenic_syncretism ir = roman_pantheon - impRegion = germania_region impRegion = britain_region impRegion = belgica_region impRegion = germania_superior_region impRegion = caledonia_region impRegion = central_gaul_region impRegion = pannonia_region impRegion = bohomia_area + irRegion = germania_region irRegion = britain_region irRegion = belgica_region irRegion = germania_superior_region irRegion = caledonia_region irRegion = central_gaul_region irRegion = pannonia_region irRegion = bohomia_area } link = { ck3 = hellenic_pagan ir = roman_pantheon } # Default @@ -91,18 +91,18 @@ link = { ck3 = baltic_pagan ir = matrist_religion ck3Province = 154 ck3Province link = { ck3 = slavic_pagan ir = matrist_religion } # Steppe Religion - Melieism in the East, Tengri in the West -link = { ck3 = tengri_pagan ir = eastern_animism impRegion = sarmatia_europea_region impRegion = vistulia_region impRegion = venedia_region impRegion = scandinavia_region impRegion = dacia_region impRegion = pannonia_region impRegion = moesia_region impRegion = thrace_region impRegion = macedonia_region impRegion = greece_region impRegion = illyria_region impRegion = germania_region impRegion = bohemia_area } +link = { ck3 = tengri_pagan ir = eastern_animism irRegion = sarmatia_europea_region irRegion = vistulia_region irRegion = venedia_region irRegion = scandinavia_region irRegion = dacia_region irRegion = pannonia_region irRegion = moesia_region irRegion = thrace_region irRegion = macedonia_region irRegion = greece_region irRegion = illyria_region irRegion = germania_region irRegion = bohemia_area } link = { ck3 = melieism ir = eastern_animism } # Celtic - TFE -link = { ck3 = brythonic_druidism ir = druidism impRegion = britain_region impRegion = scandinavia_region } +link = { ck3 = brythonic_druidism ir = druidism irRegion = britain_region irRegion = scandinavia_region } link = { ck3 = irish_druidism ir = druidism ck3Province = 9 ck3Province = 10 ck3Province = 11 ck3Province = 12 ck3Province = 13 ck3Province = 14 ck3Province = 15 ck3Province = 16 ck3Province = 17 ck3Province = 18 ck3Province = 19 ck3Province = 20 ck3Province = 21 ck3Province = 22 ck3Province = 23 ck3Province = 24 ck3Province = 25 ck3Province = 26 ck3Province = 27 ck3Province = 28 ck3Province = 29 ck3Province = 30 ck3Province = 31 ck3Province = 32 ck3Province = 33 ck3Province = 34 ck3Province = 36 ck3Province = 37 ck3Province = 38 ck3Province = 39 ck3Province = 40 ck3Province = 41 ck3Province = 42 ck3Province = 43 ck3Province = 44 ck3Province = 45 ck3Province = 46 ck3Province = 47 ck3Province = 48 ck3Province = 49 ck3Province = 50 ck3Province = 51 ck3Province = 52 ck3Province = 53 ck3Province = 54 } -link = { ck3 = pictish_druidism ir = druidism impRegion = caledonia_region } +link = { ck3 = pictish_druidism ir = druidism irRegion = caledonia_region } link = { ck3 = druidism ir = druidism } # Fallback # Celtic - Vanilla CK3 -link = { ck3 = briton_paganism ir = druidism impRegion = britain_region impRegion = scandinavia_region } -link = { ck3 = gaelic_paganism ir = druidism impRegion = caledonia_region } -link = { ck3 = gallic_celtic ir = druidism impRegion = aquitaine_region impRegion = transalpine_gaul_region impRegion = armorica_region impRegion = central_gaul_region impRegion = rhaetia_region impRegion = cisalpine_gaul_region impRegion = central_italy_region impRegion = magna_graecia_region impRegion = belgica_region impRegion = germania_superior_region } +link = { ck3 = briton_paganism ir = druidism irRegion = britain_region irRegion = scandinavia_region } +link = { ck3 = gaelic_paganism ir = druidism irRegion = caledonia_region } +link = { ck3 = gallic_celtic ir = druidism irRegion = aquitaine_region irRegion = transalpine_gaul_region irRegion = armorica_region irRegion = central_gaul_region impRegion = rhaetia_region impRegion = cisalpine_gaul_region impRegion = central_italy_region impRegion = magna_graecia_region impRegion = belgica_region impRegion = germania_superior_region } link = { ck3 = celtiberian_paganism ir = druidism impRegion = tarraconensis_region impRegion = gallaecia_region impRegion = lusitania_region impRegion = contestania_region impRegion = baetica_region } link = { ck3 = celtic_pagan ir = druidism } # Fallback diff --git a/ImperatorToCK3/Mappers/Culture/CultureMappingRule.cs b/ImperatorToCK3/Mappers/Culture/CultureMappingRule.cs index 9051d1e33..07262e4b0 100644 --- a/ImperatorToCK3/Mappers/Culture/CultureMappingRule.cs +++ b/ImperatorToCK3/Mappers/Culture/CultureMappingRule.cs @@ -96,7 +96,7 @@ static CultureMappingRule() { parser.RegisterKeyword("ir", reader => mappingToReturn.cultures.Add(reader.GetString())); parser.RegisterKeyword("historicalTag", reader => mappingToReturn.irHistoricalTags.Add(reader.GetString())); parser.RegisterKeyword("ck3Region", reader => mappingToReturn.ck3Regions.Add(reader.GetString())); - parser.RegisterKeyword("impRegion", reader => mappingToReturn.irRegions.Add(reader.GetString())); + parser.RegisterKeyword("irRegion", reader => mappingToReturn.irRegions.Add(reader.GetString())); parser.RegisterKeyword("ck3Province", reader => mappingToReturn.ck3Provinces.Add(reader.GetULong())); parser.RegisterKeyword("irProvince", reader => mappingToReturn.irProvinces.Add(reader.GetULong())); parser.RegisterRegex(CommonRegexes.Variable, (reader, variableName) => { diff --git a/ImperatorToCK3/Mappers/Religion/ReligionMapper.cs b/ImperatorToCK3/Mappers/Religion/ReligionMapper.cs index a5ff0cc7d..e3697095e 100644 --- a/ImperatorToCK3/Mappers/Religion/ReligionMapper.cs +++ b/ImperatorToCK3/Mappers/Religion/ReligionMapper.cs @@ -2,7 +2,6 @@ using commonItems.Collections; using ImperatorToCK3.CK3.Religions; using ImperatorToCK3.Mappers.Region; -using System; using System.Collections.Generic; using System.IO; diff --git a/ImperatorToCK3/Mappers/Religion/ReligionMapping.cs b/ImperatorToCK3/Mappers/Religion/ReligionMapping.cs index 53deed5df..5efb123eb 100644 --- a/ImperatorToCK3/Mappers/Religion/ReligionMapping.cs +++ b/ImperatorToCK3/Mappers/Religion/ReligionMapping.cs @@ -19,7 +19,6 @@ public class ReligionMapping { private readonly SortedSet irHistoricalTags = new(); private bool? heresiesInHistoricalAreas; - private bool warnWhenMissing = true; // whether to log a warning when the CK3 faith is not found private static readonly Parser parser = new(); private static ReligionMapping mappingToReturn = new(); @@ -28,12 +27,11 @@ static ReligionMapping() { parser.RegisterKeyword("ir", reader => mappingToReturn.irReligionIds.Add(reader.GetString())); parser.RegisterKeyword("ck3Culture", reader => mappingToReturn.ck3CultureIds.Add(reader.GetString())); parser.RegisterKeyword("ck3Region", reader => mappingToReturn.ck3Regions.Add(reader.GetString())); - parser.RegisterKeyword("impRegion", reader => mappingToReturn.imperatorRegions.Add(reader.GetString())); + parser.RegisterKeyword("irRegion", reader => mappingToReturn.imperatorRegions.Add(reader.GetString())); parser.RegisterKeyword("ck3Province", reader => mappingToReturn.ck3Provinces.Add(reader.GetULong())); parser.RegisterKeyword("irProvince", reader => mappingToReturn.irProvinceIds.Add(reader.GetULong())); parser.RegisterKeyword("historicalTag", reader => mappingToReturn.irHistoricalTags.Add(reader.GetString())); parser.RegisterKeyword("heresiesInHistoricalAreas", reader => mappingToReturn.heresiesInHistoricalAreas = reader.GetBool()); - parser.RegisterKeyword("warnWhenMissing", reader => mappingToReturn.warnWhenMissing = reader.GetBool()); parser.RegisterRegex(CommonRegexes.Variable, (reader, variableName) => { var variableValue = reader.ResolveVariable(variableName).ToString() ?? string.Empty; var variableReader = new BufferedReader(variableValue);