diff --git a/AnnoDesigner.Core/Extensions/StringExtensions.cs b/AnnoDesigner.Core/Extensions/StringExtensions.cs index 4699d6a8..3a19569f 100644 --- a/AnnoDesigner.Core/Extensions/StringExtensions.cs +++ b/AnnoDesigner.Core/Extensions/StringExtensions.cs @@ -8,8 +8,18 @@ namespace AnnoDesigner.Core.Extensions { public static class StringExtensions { + //private static readonly Logger logger = LogManager.GetCurrentClassLogger(); + public static bool Contains(this string s, string token, StringComparison stringComparison) { + + if (string.IsNullOrWhiteSpace(s) || string.IsNullOrWhiteSpace(token)) + { + //logger.Trace($"{nameof(s)}: {s} | {nameof(token)}: {token}"); + + return false;//or throw error? + } + if (s.IndexOf(token, stringComparison) != -1) { return true; diff --git a/AnnoDesigner/Localization/TreeLocalization.cs b/AnnoDesigner/Localization/TreeLocalization.cs index ae2636d1..5ab1ef6f 100644 --- a/AnnoDesigner/Localization/TreeLocalization.cs +++ b/AnnoDesigner/Localization/TreeLocalization.cs @@ -120,7 +120,12 @@ static TreeLocalization() { "11SpecialOrnaments", "11 Special Ornaments" }, { "12ChristmasDecorations", "12 Christmas Decorations" }, { "13World'sFairRewards", "13 World's Fair Rewards" }, - { "14Gardens", "14 Gardens" } + { "14Gardens", "14 Gardens" }, + { "15AgriculturalOrnaments", "15 Agricultural Ornaments" }, + { "16AgriculturalFences", "16 Agricultural Fences" }, + { "17IndustrialOrnaments", "17 Industrial Ornaments" }, + { "18IndustrialFences", "18 Industrial Fences" }, + { "19AmusementPark", "19 Amusement Park" } } }, { @@ -216,7 +221,12 @@ static TreeLocalization() { "11SpecialOrnaments", "11 Besondere Verzierungen" }, { "12ChristmasDecorations", "12 Weihnachts Dekorationen" }, { "13World'sFairRewards", "13 Belohnungen der Weltausstellung" }, - { "14Gardens", "14 Gärten" } + { "14Gardens", "14 Gärten" }, + { "15AgriculturalOrnaments", "15 Landwirtschaftliche Verzierungen" }, + { "16AgriculturalFences", "16 Landwirtschaftszäune" }, + { "17IndustrialOrnaments", "17 Industrielle Verzierungen" }, + { "18IndustrialFences", "18 Industriezäune" }, + { "19AmusementPark", "19 Vergnügungspark" } } }, { @@ -312,7 +322,12 @@ static TreeLocalization() { "11SpecialOrnaments", "11 Ornements spéciaux" }, { "12ChristmasDecorations", "12 Décorations de Noël" }, { "13World'sFairRewards", "13 Récompenses de l'exposition" }, - { "14Gardens", "14 Jardins" } + { "14Gardens", "14 Jardins" }, + { "15AgriculturalOrnaments", "15 Ornements Agricoles" }, + { "16AgriculturalFences", "16 Clôtures Agricoles" }, + { "17IndustrialOrnaments", "17 Ornements Industriels" }, + { "18IndustrialFences", "18 Clôtures Industrielles" }, + { "19AmusementPark", "19 Parc d'attractions" } } }, { @@ -408,7 +423,12 @@ static TreeLocalization() { "11SpecialOrnaments", "11 Ornamenty specjalne" }, { "12ChristmasDecorations", "12 Dekoracje świąteczne" }, { "13World'sFairRewards", "13 Nagrody Wystawy Światowej" }, - { "14Gardens", "14 Ogrody" } + { "14Gardens", "14 Ogrody" }, + { "15AgriculturalOrnaments", "15 Ornamenty Rolnicze" }, + { "16AgriculturalFences", "16 Ogrodzenia Rolnicze" }, + { "17IndustrialOrnaments", "17 Ornamenty Przemysłowe" }, + { "18IndustrialFences", "18 Ogrodzenia Przemysłowe" }, + { "19AmusementPark", "19 Park Rozrywki" } } }, { @@ -504,7 +524,12 @@ static TreeLocalization() { "11SpecialOrnaments", "11 Специальные украшения" }, { "12ChristmasDecorations", "12 рождественские украшения" }, { "13World'sFairRewards", "13 Награды Всемирной выставки" }, - { "14Gardens", "14 Сады" } + { "14Gardens", "14 Сады" }, + { "15AgriculturalOrnaments", "15 Сельскохозяйственные украшения" }, + { "16AgriculturalFences", "16 Сельскохозяйственных Заборов" }, + { "17IndustrialOrnaments", "17 промышленных украшений" }, + { "18IndustrialFences", "18 промышленных заборов" }, + { "19AmusementPark", "19 Парк развлечений" } } }, }; diff --git a/AnnoDesigner/icons/A7_barrels.png b/AnnoDesigner/icons/A7_barrels.png new file mode 100644 index 00000000..83e0917d Binary files /dev/null and b/AnnoDesigner/icons/A7_barrels.png differ diff --git a/AnnoDesigner/icons/A7_celebration_ornament_01.png b/AnnoDesigner/icons/A7_celebration_ornament_01.png new file mode 100644 index 00000000..6b169e2d Binary files /dev/null and b/AnnoDesigner/icons/A7_celebration_ornament_01.png differ diff --git a/AnnoDesigner/icons/A7_clothesline.png b/AnnoDesigner/icons/A7_clothesline.png new file mode 100644 index 00000000..7f97851a Binary files /dev/null and b/AnnoDesigner/icons/A7_clothesline.png differ diff --git a/AnnoDesigner/icons/A7_commuter_pier.png b/AnnoDesigner/icons/A7_commuter_pier.png index 978bb9f7..c038ad18 100644 Binary files a/AnnoDesigner/icons/A7_commuter_pier.png and b/AnnoDesigner/icons/A7_commuter_pier.png differ diff --git a/AnnoDesigner/icons/A7_fence_archway.png b/AnnoDesigner/icons/A7_fence_archway.png new file mode 100644 index 00000000..513465e8 Binary files /dev/null and b/AnnoDesigner/icons/A7_fence_archway.png differ diff --git a/AnnoDesigner/icons/A7_flatbed_wagon.png b/AnnoDesigner/icons/A7_flatbed_wagon.png new file mode 100644 index 00000000..929220f8 Binary files /dev/null and b/AnnoDesigner/icons/A7_flatbed_wagon.png differ diff --git a/AnnoDesigner/icons/A7_fountain_history_preorder.png b/AnnoDesigner/icons/A7_fountain_history_preorder.png new file mode 100644 index 00000000..68ed7196 Binary files /dev/null and b/AnnoDesigner/icons/A7_fountain_history_preorder.png differ diff --git a/AnnoDesigner/icons/A7_gangway.png b/AnnoDesigner/icons/A7_gangway.png new file mode 100644 index 00000000..9c77ec36 Binary files /dev/null and b/AnnoDesigner/icons/A7_gangway.png differ diff --git a/AnnoDesigner/icons/A7_gasoline.png b/AnnoDesigner/icons/A7_gasoline.png new file mode 100644 index 00000000..3752c670 Binary files /dev/null and b/AnnoDesigner/icons/A7_gasoline.png differ diff --git a/AnnoDesigner/icons/A7_hay_bales.png b/AnnoDesigner/icons/A7_hay_bales.png new file mode 100644 index 00000000..ee524472 Binary files /dev/null and b/AnnoDesigner/icons/A7_hay_bales.png differ diff --git a/AnnoDesigner/icons/A7_heap.png b/AnnoDesigner/icons/A7_heap.png new file mode 100644 index 00000000..7713a8e7 Binary files /dev/null and b/AnnoDesigner/icons/A7_heap.png differ diff --git a/AnnoDesigner/icons/A7_industry_ground.png b/AnnoDesigner/icons/A7_industry_ground.png new file mode 100644 index 00000000..95128476 Binary files /dev/null and b/AnnoDesigner/icons/A7_industry_ground.png differ diff --git a/AnnoDesigner/icons/A7_industry_low_wall_junction.png b/AnnoDesigner/icons/A7_industry_low_wall_junction.png new file mode 100644 index 00000000..ca0bfb15 Binary files /dev/null and b/AnnoDesigner/icons/A7_industry_low_wall_junction.png differ diff --git a/AnnoDesigner/icons/A7_industry_low_wall_straight.png b/AnnoDesigner/icons/A7_industry_low_wall_straight.png new file mode 100644 index 00000000..32f72ab0 Binary files /dev/null and b/AnnoDesigner/icons/A7_industry_low_wall_straight.png differ diff --git a/AnnoDesigner/icons/A7_industry_wall_arch.png b/AnnoDesigner/icons/A7_industry_wall_arch.png new file mode 100644 index 00000000..690e74c5 Binary files /dev/null and b/AnnoDesigner/icons/A7_industry_wall_arch.png differ diff --git a/AnnoDesigner/icons/A7_industry_wall_corner.png b/AnnoDesigner/icons/A7_industry_wall_corner.png new file mode 100644 index 00000000..d1c77611 Binary files /dev/null and b/AnnoDesigner/icons/A7_industry_wall_corner.png differ diff --git a/AnnoDesigner/icons/A7_industry_wall_cross.png b/AnnoDesigner/icons/A7_industry_wall_cross.png new file mode 100644 index 00000000..d526cc76 Binary files /dev/null and b/AnnoDesigner/icons/A7_industry_wall_cross.png differ diff --git a/AnnoDesigner/icons/A7_industry_wall_end.png b/AnnoDesigner/icons/A7_industry_wall_end.png new file mode 100644 index 00000000..1e805b93 Binary files /dev/null and b/AnnoDesigner/icons/A7_industry_wall_end.png differ diff --git a/AnnoDesigner/icons/A7_industry_wall_entrance.png b/AnnoDesigner/icons/A7_industry_wall_entrance.png new file mode 100644 index 00000000..9d35b69d Binary files /dev/null and b/AnnoDesigner/icons/A7_industry_wall_entrance.png differ diff --git a/AnnoDesigner/icons/A7_industry_wall_tall_arch.png b/AnnoDesigner/icons/A7_industry_wall_tall_arch.png new file mode 100644 index 00000000..029007bd Binary files /dev/null and b/AnnoDesigner/icons/A7_industry_wall_tall_arch.png differ diff --git a/AnnoDesigner/icons/A7_industry_wall_tall_corner.png b/AnnoDesigner/icons/A7_industry_wall_tall_corner.png new file mode 100644 index 00000000..c63924ff Binary files /dev/null and b/AnnoDesigner/icons/A7_industry_wall_tall_corner.png differ diff --git a/AnnoDesigner/icons/A7_industry_wall_tall_cross.png b/AnnoDesigner/icons/A7_industry_wall_tall_cross.png new file mode 100644 index 00000000..b1ff16cc Binary files /dev/null and b/AnnoDesigner/icons/A7_industry_wall_tall_cross.png differ diff --git a/AnnoDesigner/icons/A7_industry_wall_tall_end.png b/AnnoDesigner/icons/A7_industry_wall_tall_end.png new file mode 100644 index 00000000..6d0e7efa Binary files /dev/null and b/AnnoDesigner/icons/A7_industry_wall_tall_end.png differ diff --git a/AnnoDesigner/icons/A7_industry_wall_tall_gate.png b/AnnoDesigner/icons/A7_industry_wall_tall_gate.png new file mode 100644 index 00000000..21e7b9de Binary files /dev/null and b/AnnoDesigner/icons/A7_industry_wall_tall_gate.png differ diff --git a/AnnoDesigner/icons/A7_industry_wall_tall_junction.png b/AnnoDesigner/icons/A7_industry_wall_tall_junction.png new file mode 100644 index 00000000..60f4ceb3 Binary files /dev/null and b/AnnoDesigner/icons/A7_industry_wall_tall_junction.png differ diff --git a/AnnoDesigner/icons/A7_industry_wall_tall_straight.png b/AnnoDesigner/icons/A7_industry_wall_tall_straight.png new file mode 100644 index 00000000..80e270e3 Binary files /dev/null and b/AnnoDesigner/icons/A7_industry_wall_tall_straight.png differ diff --git a/AnnoDesigner/icons/A7_ironbar.png b/AnnoDesigner/icons/A7_ironbar.png new file mode 100644 index 00000000..5aa872d4 Binary files /dev/null and b/AnnoDesigner/icons/A7_ironbar.png differ diff --git a/AnnoDesigner/icons/A7_kontor_main.png b/AnnoDesigner/icons/A7_kontor_main.png new file mode 100644 index 00000000..779028fe Binary files /dev/null and b/AnnoDesigner/icons/A7_kontor_main.png differ diff --git a/AnnoDesigner/icons/A7_largebox.png b/AnnoDesigner/icons/A7_largebox.png new file mode 100644 index 00000000..ee62a5f8 Binary files /dev/null and b/AnnoDesigner/icons/A7_largebox.png differ diff --git a/AnnoDesigner/icons/A7_logpile.png b/AnnoDesigner/icons/A7_logpile.png new file mode 100644 index 00000000..97341dbe Binary files /dev/null and b/AnnoDesigner/icons/A7_logpile.png differ diff --git a/AnnoDesigner/icons/A7_om_tractor.png b/AnnoDesigner/icons/A7_om_tractor.png new file mode 100644 index 00000000..e54e569c Binary files /dev/null and b/AnnoDesigner/icons/A7_om_tractor.png differ diff --git a/AnnoDesigner/icons/A7_ornament_cascading_fountain.png b/AnnoDesigner/icons/A7_ornament_cascading_fountain.png new file mode 100644 index 00000000..29fead78 Binary files /dev/null and b/AnnoDesigner/icons/A7_ornament_cascading_fountain.png differ diff --git a/AnnoDesigner/icons/A7_ornament_elephountain.png b/AnnoDesigner/icons/A7_ornament_elephountain.png new file mode 100644 index 00000000..a6f198ea Binary files /dev/null and b/AnnoDesigner/icons/A7_ornament_elephountain.png differ diff --git a/AnnoDesigner/icons/A7_ornament_equastrian_statue.png b/AnnoDesigner/icons/A7_ornament_equastrian_statue.png new file mode 100644 index 00000000..d110469f Binary files /dev/null and b/AnnoDesigner/icons/A7_ornament_equastrian_statue.png differ diff --git a/AnnoDesigner/icons/A7_ornament_iris_girdle_fountain.png b/AnnoDesigner/icons/A7_ornament_iris_girdle_fountain.png new file mode 100644 index 00000000..6ad14bd4 Binary files /dev/null and b/AnnoDesigner/icons/A7_ornament_iris_girdle_fountain.png differ diff --git a/AnnoDesigner/icons/A7_ornament_ploughmanglory.png b/AnnoDesigner/icons/A7_ornament_ploughmanglory.png new file mode 100644 index 00000000..1f082112 Binary files /dev/null and b/AnnoDesigner/icons/A7_ornament_ploughmanglory.png differ diff --git a/AnnoDesigner/icons/A7_ornament_promenade_angle.png b/AnnoDesigner/icons/A7_ornament_promenade_angle.png new file mode 100644 index 00000000..d614f8d1 Binary files /dev/null and b/AnnoDesigner/icons/A7_ornament_promenade_angle.png differ diff --git a/AnnoDesigner/icons/A7_ornament_promenade_crossing.png b/AnnoDesigner/icons/A7_ornament_promenade_crossing.png new file mode 100644 index 00000000..f1092b35 Binary files /dev/null and b/AnnoDesigner/icons/A7_ornament_promenade_crossing.png differ diff --git a/AnnoDesigner/icons/A7_ornament_promenade_end.png b/AnnoDesigner/icons/A7_ornament_promenade_end.png new file mode 100644 index 00000000..7e3b88ec Binary files /dev/null and b/AnnoDesigner/icons/A7_ornament_promenade_end.png differ diff --git a/AnnoDesigner/icons/A7_ornament_promenade_junction.png b/AnnoDesigner/icons/A7_ornament_promenade_junction.png new file mode 100644 index 00000000..42e2ee6c Binary files /dev/null and b/AnnoDesigner/icons/A7_ornament_promenade_junction.png differ diff --git a/AnnoDesigner/icons/A7_ornament_pruned_spruced.png b/AnnoDesigner/icons/A7_ornament_pruned_spruced.png new file mode 100644 index 00000000..eb6c2cf2 Binary files /dev/null and b/AnnoDesigner/icons/A7_ornament_pruned_spruced.png differ diff --git a/AnnoDesigner/icons/A7_ornament_regal_standard.png b/AnnoDesigner/icons/A7_ornament_regal_standard.png new file mode 100644 index 00000000..6f39b64d Binary files /dev/null and b/AnnoDesigner/icons/A7_ornament_regal_standard.png differ diff --git a/AnnoDesigner/icons/A7_ornament_straight_promenade.png b/AnnoDesigner/icons/A7_ornament_straight_promenade.png new file mode 100644 index 00000000..86d9e812 Binary files /dev/null and b/AnnoDesigner/icons/A7_ornament_straight_promenade.png differ diff --git a/AnnoDesigner/icons/A7_ornament_straight_promenade_variation.png b/AnnoDesigner/icons/A7_ornament_straight_promenade_variation.png new file mode 100644 index 00000000..e09e3afc Binary files /dev/null and b/AnnoDesigner/icons/A7_ornament_straight_promenade_variation.png differ diff --git a/AnnoDesigner/icons/A7_ornament_tall_boxwood.png b/AnnoDesigner/icons/A7_ornament_tall_boxwood.png new file mode 100644 index 00000000..5cb51656 Binary files /dev/null and b/AnnoDesigner/icons/A7_ornament_tall_boxwood.png differ diff --git a/AnnoDesigner/icons/A7_ornamental_category_agriculture.png b/AnnoDesigner/icons/A7_ornamental_category_agriculture.png new file mode 100644 index 00000000..381b2f9c Binary files /dev/null and b/AnnoDesigner/icons/A7_ornamental_category_agriculture.png differ diff --git a/AnnoDesigner/icons/A7_ornamental_category_industrial.png b/AnnoDesigner/icons/A7_ornamental_category_industrial.png new file mode 100644 index 00000000..b74e8fd5 Binary files /dev/null and b/AnnoDesigner/icons/A7_ornamental_category_industrial.png differ diff --git a/AnnoDesigner/icons/A7_outhouse.png b/AnnoDesigner/icons/A7_outhouse.png new file mode 100644 index 00000000..56b1d972 Binary files /dev/null and b/AnnoDesigner/icons/A7_outhouse.png differ diff --git a/AnnoDesigner/icons/A7_pile_box_barrels.png b/AnnoDesigner/icons/A7_pile_box_barrels.png new file mode 100644 index 00000000..c1270d92 Binary files /dev/null and b/AnnoDesigner/icons/A7_pile_box_barrels.png differ diff --git a/AnnoDesigner/icons/A7_piles_of_crates.png b/AnnoDesigner/icons/A7_piles_of_crates.png new file mode 100644 index 00000000..b82595a5 Binary files /dev/null and b/AnnoDesigner/icons/A7_piles_of_crates.png differ diff --git a/AnnoDesigner/icons/A7_pipes.png b/AnnoDesigner/icons/A7_pipes.png new file mode 100644 index 00000000..49397c2c Binary files /dev/null and b/AnnoDesigner/icons/A7_pipes.png differ diff --git a/AnnoDesigner/icons/A7_scarecrow.png b/AnnoDesigner/icons/A7_scarecrow.png new file mode 100644 index 00000000..125d3d49 Binary files /dev/null and b/AnnoDesigner/icons/A7_scarecrow.png differ diff --git a/AnnoDesigner/icons/A7_shed.png b/AnnoDesigner/icons/A7_shed.png new file mode 100644 index 00000000..6c6dc5ac Binary files /dev/null and b/AnnoDesigner/icons/A7_shed.png differ diff --git a/AnnoDesigner/icons/A7_signpost.png b/AnnoDesigner/icons/A7_signpost.png new file mode 100644 index 00000000..20b46975 Binary files /dev/null and b/AnnoDesigner/icons/A7_signpost.png differ diff --git a/AnnoDesigner/icons/A7_silo.png b/AnnoDesigner/icons/A7_silo.png new file mode 100644 index 00000000..5ea70983 Binary files /dev/null and b/AnnoDesigner/icons/A7_silo.png differ diff --git a/AnnoDesigner/icons/A7_silo_02.png b/AnnoDesigner/icons/A7_silo_02.png new file mode 100644 index 00000000..0c0d5149 Binary files /dev/null and b/AnnoDesigner/icons/A7_silo_02.png differ diff --git a/AnnoDesigner/icons/A7_swing.png b/AnnoDesigner/icons/A7_swing.png new file mode 100644 index 00000000..a989d0d6 Binary files /dev/null and b/AnnoDesigner/icons/A7_swing.png differ diff --git a/AnnoDesigner/icons/A7_tanks.png b/AnnoDesigner/icons/A7_tanks.png new file mode 100644 index 00000000..31f7f320 Binary files /dev/null and b/AnnoDesigner/icons/A7_tanks.png differ diff --git a/AnnoDesigner/icons/A7_tractor.png b/AnnoDesigner/icons/A7_tractor.png new file mode 100644 index 00000000..87c99f4d Binary files /dev/null and b/AnnoDesigner/icons/A7_tractor.png differ diff --git a/AnnoDesigner/icons/A7_twitch_billboard_brightharvest.png b/AnnoDesigner/icons/A7_twitch_billboard_brightharvest.png new file mode 100644 index 00000000..c4d221bb Binary files /dev/null and b/AnnoDesigner/icons/A7_twitch_billboard_brightharvest.png differ diff --git a/AnnoDesigner/icons/A7_twitch_billboard_landoflions.png b/AnnoDesigner/icons/A7_twitch_billboard_landoflions.png new file mode 100644 index 00000000..8d006604 Binary files /dev/null and b/AnnoDesigner/icons/A7_twitch_billboard_landoflions.png differ diff --git a/AnnoDesigner/icons/A7_twitch_flag_brightharvest.png b/AnnoDesigner/icons/A7_twitch_flag_brightharvest.png new file mode 100644 index 00000000..2782b602 Binary files /dev/null and b/AnnoDesigner/icons/A7_twitch_flag_brightharvest.png differ diff --git a/AnnoDesigner/icons/A7_twitch_flag_landoflions.png b/AnnoDesigner/icons/A7_twitch_flag_landoflions.png new file mode 100644 index 00000000..c632cd8a Binary files /dev/null and b/AnnoDesigner/icons/A7_twitch_flag_landoflions.png differ diff --git a/AnnoDesigner/icons/A7_water_tower.png b/AnnoDesigner/icons/A7_water_tower.png new file mode 100644 index 00000000..89117e60 Binary files /dev/null and b/AnnoDesigner/icons/A7_water_tower.png differ diff --git a/AnnoDesigner/icons/A7_woodfence.png b/AnnoDesigner/icons/A7_woodfence.png new file mode 100644 index 00000000..b1d5cdae Binary files /dev/null and b/AnnoDesigner/icons/A7_woodfence.png differ diff --git a/AnnoDesigner/icons/A7_woodfence_angle.png b/AnnoDesigner/icons/A7_woodfence_angle.png new file mode 100644 index 00000000..f52f5e44 Binary files /dev/null and b/AnnoDesigner/icons/A7_woodfence_angle.png differ diff --git a/AnnoDesigner/icons/A7_woodfence_cross.png b/AnnoDesigner/icons/A7_woodfence_cross.png new file mode 100644 index 00000000..4af26e39 Binary files /dev/null and b/AnnoDesigner/icons/A7_woodfence_cross.png differ diff --git a/AnnoDesigner/icons/A7_woodfence_end.png b/AnnoDesigner/icons/A7_woodfence_end.png new file mode 100644 index 00000000..9d5822ee Binary files /dev/null and b/AnnoDesigner/icons/A7_woodfence_end.png differ diff --git a/AnnoDesigner/icons/A7_woodfence_entrance.png b/AnnoDesigner/icons/A7_woodfence_entrance.png new file mode 100644 index 00000000..c545596d Binary files /dev/null and b/AnnoDesigner/icons/A7_woodfence_entrance.png differ diff --git a/AnnoDesigner/icons/A7_woodfence_junction.png b/AnnoDesigner/icons/A7_woodfence_junction.png new file mode 100644 index 00000000..a70e68e7 Binary files /dev/null and b/AnnoDesigner/icons/A7_woodfence_junction.png differ diff --git a/PresetParser/Anno1800/NewFactionAndGroup1800.cs b/PresetParser/Anno1800/NewFactionAndGroup1800.cs index 36f137a7..033da900 100644 --- a/PresetParser/Anno1800/NewFactionAndGroup1800.cs +++ b/PresetParser/Anno1800/NewFactionAndGroup1800.cs @@ -15,6 +15,10 @@ namespace PresetParser.Anno1800 /// OW1 (Old World - (7) Jornaleros) - OW2 (Old World - (8) Obreros) /// AT1 (Arctic - (10) Explorers) - AT2 (Arctic - (11) Technicians) /// <2> wil be the Group under <1>, like Production, Public, etc + /// + /// NOTE : New world and Old World are reversed in this code, in game it seams that the start world is Old World + /// So, Games Old World is NWx and Games New World is OWx in this code !!!!! + /// /// public static class NewFactionAndGroup1800 { @@ -35,10 +39,10 @@ public static class NewFactionAndGroup1800 private static readonly List ChangeBuildingsToNW1_Productions_1800 = new List { "Coastal_01 (Fish Coast Building)", "Processing_04 (Weavery)", "Food_06 (Schnapps Maker)", "Factory_03 (Timber Factory)", "Agriculture_05 (Timber Yard)" }; private static readonly List ChangeBuildingsToNW2_Productions_1800 = new List { "Factory_09 (Sailcloth Factory)", "Heavy_01 (Beams Heavy Industry)", "Heavy_04 (Weapons Heavy Industry)", "Heavy_02 (Steel Heavy Industry)", "Heavy_03 (Coal Heavy Industry)", "Processing_01 (Tallow Processing)", "Food_07 (Sausage Maker)", "Processing_02 (Flour Processing)", "Factory_02 (Soap Factory)", "Processing_03 (Malt Processing)", "Food_02 (Beer Maker)", "Factory_04 (Brick Factory)", "Food_01 (Bread Maker)" }; private static readonly List ChangeBuildingsToNW3_Productions_1800 = new List { "Food_03 (Goulash Factory)", "Food_05 (Canned Food Factory)", "Processing_06 (Glass Processing)", "Factory_07 (Window Factory)", "Agriculture_09 (Hunter's Cabin)", "Factory_05 (Fur Coat Workshop)", "Workshop_03 (Sewing Machines Factory)" }; - private static readonly List ChangeBuildingsToNW4_Productions_1800 = new List { "Factory_06 (Light Bulb Factory)", "Processing_08 (Carbon Filament Processing)", "Workshop_02 (Pocket Watch Workshop)", "Workshop_05 (Gold Workshop)", "Heavy_07 (Steam Motors Heavy Industry)", "Workshop_01 (High-Wheeler Workshop)", "Heavy_06 (Advanced Weapons Heavy Industry)", "Processing_05 (Dynamite Processing)", "Coastal_02 (Niter Coast Building)", "Workshop_07 (Glasses Workshop)", "Heavy_09 (Brass Heavy Industry)", "Heavy_10 (Oil Heavy Industry)", "Factory_01 (Concrete Factory)", "Heavy_10_field (Oil Pump)" }; + private static readonly List ChangeBuildingsToNW4_Productions_1800 = new List { "Factory_06 (Light Bulb Factory)", "Processing_08 (Carbon Filament Processing)", "Workshop_02 (Pocket Watch Workshop)", "Workshop_05 (Gold Workshop)", "Heavy_07 (Steam Motors Heavy Industry)", "Workshop_01 (High-Wheeler Workshop)", "Heavy_06 (Advanced Weapons Heavy Industry)", "Processing_05 (Dynamite Processing)", "Coastal_02 (Niter Coast Building)", "Workshop_07 (Glasses Workshop)", "Heavy_09 (Brass Heavy Industry)", "Heavy_10 (Oil Heavy Industry)", "Factory_01 (Concrete Factory)", "Heavy_10_field (Oil Pump)", "Moderate_fuel_station_01 (FuelStation)" }; private static readonly List ChangeBuildingsToNW5_Productions_1800 = new List { "Heavy_08 (Steam Carriages Heavy Industry)", "Factory_10 (Chassis Factory)", "Workshop_04 (Phonographs Workshop)", "Processing_07 (Inlay Processing)", "Workshop_06 (Jewelry Workshop)", "Food_08 (Champagne Maker)" }; private static readonly List ChangeBuildingsToOW1_Productions_1800 = new List { "Processing_colony01_02 (Poncho Maker)", "Coastal_colony01_01 (Pearls Coast Building)", "Food_colony01_04 (Fried Banana Maker)", "Coastal_colony01_02 (Fish Coast Building)", "Factory_colony01_02 (Sailcloth Factory)", "Factory_colony01_01 (Timber Factory)", "Agriculture_colony01_06 (Timber Yard)", "Factory_colony01_03 (Cotton Cloth Processing)", "Food_colony01_01 (Rum Maker)" }; - private static readonly List ChangeBuildingsToOW2_Productions_1800 = new List { "Food_colony01_02 (Chocolate Maker)", "Workshop_colony01_01 (Cigars Workshop)", "Factory_colony01_07 (Bombin Maker)", "Factory_colony01_06 (Felt Maker)", "Food_colony01_03 (Coffee Maker)", "Food_colony01_05 (Burrito Maker)", "Processing_colony01_01 (Sugar Processing)", "Processing_colony01_03 (Inlay Processing)", "Heavy_colony01_01 (Oil Heavy Industry)", "Heavy_colony01_01_field (Oil Pump)" }; + private static readonly List ChangeBuildingsToOW2_Productions_1800 = new List { "Food_colony01_02 (Chocolate Maker)", "Workshop_colony01_01 (Cigars Workshop)", "Factory_colony01_07 (Bombin Maker)", "Factory_colony01_06 (Felt Maker)", "Food_colony01_03 (Coffee Maker)", "Food_colony01_05 (Burrito Maker)", "Processing_colony01_01 (Sugar Processing)", "Processing_colony01_03 (Inlay Processing)", "Heavy_colony01_01 (Oil Heavy Industry)", "Heavy_colony01_01_field (Oil Pump)", "Colony01_fuel_station_01 (FuelStation)" }; private static readonly List ChangeBuildingsToAT1_Productions_1800 = new List { "Agriculture_arctic_01 (Timber Yard)", "Factory_arctic_01 (Timber Factory)", "Agriculture_arctic_02 (Caribou Hunter)", "Factory_arctic_02 (Sleeping Bags Factory)", "Heavy_arctic_01 (Coal Heavy Industry)", "Coastal_arctic_01 (Whale Coast Building)", "Coastal_arctic_02 (Seal Hunter)", "Factory_arctic_03 (Oil Lamp Factory)", "Food_arctic_01 (Pemmican)" }; private static readonly List ChangeBuildingsToAT2_Productions_1800 = new List { "Agriculture_arctic_04 (Bear Hunter)", "Factory_arctic_04 (Parka Factory)", "Agriculture_arctic_06 (Normal Fur Hunter)", "Factory_arctic_05 (Sled Frame Factory)", "Factory_arctic_06 (Husky Sled Factory)", "Mining_arctic_01 (Gas Mine)", "Mining_arctic_02 (Gold Mine)", "Mining_arctic_01_pump (Gas Pump)", "Monument_arctic_01_00" }; @@ -58,7 +62,7 @@ public static class NewFactionAndGroup1800 private static readonly List ChangeBuildingsToAW_SpecialBuilding_1800 = new List { "Guild_house", "Town hall" }; //Ornamentals - private static readonly List ChangeBuildingsToAW_Ornamentals_1800 = new List { "Culture_preorder_statue", "Uplay_ornament_2x1_lion_statue", "Uplay_ornament_2x2_pillar_chess_park", "Uplay_ornament_3x2_large_fountain" }; + //private static readonly List ChangeBuildingsToAW_Ornamentals_1800 = new List { "Culture_preorder_statue", "Uplay_ornament_2x1_lion_statue", "Uplay_ornament_2x2_pillar_chess_park", "Uplay_ornament_3x2_large_fountain" }; /// /// Retuns the faction and group for an identifier. @@ -68,7 +72,7 @@ public static class NewFactionAndGroup1800 /// If Buildingmane is in one of the lists, groupName will be changed /// if buildingname is in ToAT1 or ToAT2 and is a Production Building, the Templatename will be changed /// - public static string[] GetNewFactionAndGroup1800(string identifierName, string factionName, string groupName, string templateName = "") + public static (string Faction, string Group, string Template) GetNewFactionAndGroup1800(string identifierName, string factionName, string groupName, string templateName = "") { if (string.IsNullOrWhiteSpace(identifierName)) { @@ -114,9 +118,9 @@ public static string[] GetNewFactionAndGroup1800(string identifierName, string f //Special Buildings if (identifierName.IsPartOf(ChangeBuildingsToAW_SpecialBuilding_1800)) { factionName = "All Worlds"; groupName = "Special Buildings"; } //Ornamentals - if (identifierName.IsPartOf(ChangeBuildingsToAW_Ornamentals_1800)) { factionName = "All Worlds"; } + //if (identifierName.IsPartOf(ChangeBuildingsToAW_Ornamentals_1800)) { factionName = "All Worlds"; } - return new string[] { factionName, groupName, templateName }; + return (factionName, groupName, templateName); } } } diff --git a/PresetParser/Anno1800/NewOrnamentsGroup1800.cs b/PresetParser/Anno1800/NewOrnamentsGroup1800.cs new file mode 100644 index 00000000..a78cddc6 --- /dev/null +++ b/PresetParser/Anno1800/NewOrnamentsGroup1800.cs @@ -0,0 +1,108 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using AnnoDesigner.Core.Extensions; + +namespace PresetParser.Anno1800 +{ + /// + /// in this file are made the following lists + /// ChangeOrnamentTo<1>_1800 + /// <1> can be : ParkPaths + /// ParkFences + /// ParkVegetation + /// ParkFountains + /// ParkStatues + /// ParkDecorations + /// CityPaths + /// CityFences + /// CityStatues + /// CityDecorations + /// SpecialOrnaments + /// ChristmasDecorations + /// WorldsFairReward + /// Gardens + /// AgriculturalOrnaments + /// AgriculturalFences + /// IndustrialOnrnaments + /// IndustrialFences + /// AmusementPark + /// + public static class NewOrnamentsGroup1800 + { + //private static readonly List ChangeOrnamentToParkPaths_1800 = new List { "" }; + private static readonly List ChangeOrnamentToParkPaths_1800 = new List { "Park_1x1_pathstraight", "Park_1x1_pathend", "Park_1x1_pathangle", "Park_1x1_pathcrossing", "Park_1x1_pathwall" }; + private static readonly List ChangeOrnamentToParkFences_1800 = new List { "Park_1x1_hedgestraight", "Park_1x1_hedgeend", "Park_1x1_hedgeangle", "Park_1x1_hedgecrossing", "Park_1x1_hedgewall", "Culture_1x1_fencestraight", "Culture_1x1_fenceend", + "Culture_1x1_fenceangle", "Culture_1x1_fencecrossing", "Culture_1x1_fencewall", "Park_1x1_hedgegate", "Culture_1x1_fencegate" }; + private static readonly List ChangeOrnamentToParkVegetation_1800 = new List { "Park_1x1_grass", "Park_1x1_bush", "Park_1x1_smalltree", "Park_1x1_pine", "Park_1x1_poplar" , "Park_1x1_bigtree", "Park_1x1_poplarforest", "Park_1x1_tropicalforest", + "Park_1x1_philodendron", "Park_1x1_ferns", "Park_1x1_floweringshrub", "Park_1x1_smallpalmtree", "Park_1x1_palmtree", "Park_1x1_shrub", "Park_1x1_growncypress"}; + private static readonly List ChangeOrnamentToParkFountains_1800 = new List { "Uplay_ornament_3x2_large_fountain", "Park_2x2_fountain", "Park_3x3_fountain" }; + private static readonly List ChangeOrnamentToParkStatues_1800 = new List { "Sunken Treasure Ornament 01", "Sunken Treasure Ornament 02", "Sunken Treasure Ornament 03", "Uplay_ornament_2x1_lion_statue", "Culture_preorder_statue", "Park_2x2_statue", "Park_2x2_horsestatue" }; + private static readonly List ChangeOrnamentToParkDecorations_1800 = new List { "Park_1x1_benches", "Uplay_ornament_2x2_pillar_chess_park", "Park_2x2_garden", "Park_1x1_stand", "Park_2x2_gazebo", "Park_3x3_gazebo" }; + private static readonly List ChangeOrnamentToCityPaths_1800 = new List { "Palace Ornament02 Set01 hedge pointy", "Palace Ornament01 Set01 banner", "Palace Ornament03 Set01 hedge round", "Palace Ornament05 Set01 fountain big", "Palace Ornament04 Set01 fountain small", + "Palace Ornament03 Set02 angle", "Palace Ornament04 Set02 crossing", "Palace Ornament02 Set02 end", "Palace Ornament05 Set02 junction", "Palace Ornament01 Set02 straight", "Palace Ornament06 Set02 straight variation",}; + private static readonly List ChangeOrnamentToCityFences_1800 = new List { "Culture_prop_system_1x1_03", "Culture_prop_system_1x1_04", "Culture_prop_system_1x1_05", "Culture_prop_system_1x1_06", "Culture_prop_system_1x1_07", "Culture_prop_system_1x1_08", + "Culture_prop_system_1x1_09", "Culture_prop_system_1x1_11", "Culture_prop_system_1x1_12", "Culture_prop_system_1x1_13", "Culture_prop_system_1x1_14", "Culture_1x1_hedgegate", "Culture_1x1_hedgestraight" }; + private static readonly List ChangeOrnamentToCityStatues_1800 = new List { "Park_1x1_statue", "City_prop_system_2x2_03", "Culture_prop_system_1x1_10" }; + private static readonly List ChangeOrnamentToCityDecorations_1800 = new List { "PropagandaTower Players Version", "PropagandaFlag Players Version", "Botanica Ornament 01", "Botanica Ornament 02", "Botanica Ornament 03", "Culture_1x1_benches", "Culture_1x1_stand" }; + private static readonly List ChangeOrnamentToSpecialOrnaments_1800 = new List { "Event_ornament_halloween_2019", "Event_ornament_christmas_2019", "Event_ornament_onemio", "Twitchdrops_ornament_billboard_annoholic", "Twitchdrops_ornament_billboard_anno_union", + "Twitchdrops_ornament_billboard_anarchy","Twitchdrops_ornament_billboard_sunken_treasures","Twitchdrops_ornament_botanical_garden","Twitchdrops_ornament_flag_banner_annoholic","Twitchdrops_ornament_flag_banner_anno_union","Twitchdrops_ornament_billboard_the_passage", + "Twitchdrops_ornament_morris_column_annoholic","Twitchdrops_ornament_flag_seat_of_power","Twitchdrops_ornament_billboard_seat_of_power","Twitchdrops_ornament_flag_bright_harvest","Twitchdrops_ornament_billboard_bright_harvest","Twitchdrops_ornament_flag_land_of_lions", + "Twitchdrops_ornament_billboard_land_of_lions","Season 2 - Fountain Elephant","Season 2 - Statue Tractor","Season 2 - Pillar"}; + private static readonly List ChangeOrnamentToChristmasDecorations_1800 = new List { "Xmas City Tree Small 01", "Xmas City Tree Big 01","Xmas Parksystem Ornament Straight", "Xmas Parksystem Ornament Corner", "Xmas Parksystem Ornament End", "Xmas City Snowman Ornament 01", + "Xmas City Lightpost Ornament 01","Xmas Citysystem Ornament T","Xmas Citysystem Ornament Straight","Xmas Citysystem Ornament Gap","Xmas Citysystem Ornament Cross","Xmas Citysystem Ornament End","Xmas Citysystem Ornament Corner","Xmas Parksystem Ornament Gap","Xmas Market 1", + "Xmas Parksystem Ornament Cross","Xmas Parksystem Ornament T","Xmas Lightpost Ornament 02","Xmas Market 2","XMas Market 3","Xmas Carousel","Xmas presents","Xmas Santa Chair"}; + private static readonly List ChangeOrnamentToWFRewards_1800 = new List { "City_prop_system_1x1_02", "City_prop_system_1x1_03", "City_prop_system_2x2_02", "City_prop_system_2x2_04", "City_prop_system_3x3_02", "City_prop_system_3x3_03", "Culture_prop_system_1x1_02", + "Culture_1x1_basinbridge","Culture_1x1_secondground"}; + private static readonly List ChangeOrnamentToGardens_1800 = new List { "Light pink flower field - roses", "Blue flower field - gentian", "Labyrinth", "Pink flower field - hibiscus", "Purple blue flower field - iris", "White flower field - blue heart lily", + "Orange flower field - plumeria aussi orange", "Red white flower field - red white petunia", "Trees alley", "Sculpted trees", "Yellow flower field - miracle daisy" }; + private static readonly List ChangeOrnamentToAgriculturalOrnaments_1800 = new List { "BH Ornament04 Flatbed Wagon", "BH Ornament05 Scarecrow", "BH Ornament06 LogPile", "BH Ornament07 Outhouse", "BH Ornament08 Signpost", "BH Ornament09 HayBalePile", "BH Ornament10 Swing", + "BH Ornament23 Clothes Line" }; + private static readonly List ChangeOrnamentToAgriculturalFences_1800 = new List { "BH Ornament03 Fence Straight", "BH Ornament03 Fence End", "BH Ornament03 Fence Cross", "BH Ornament03 Fence T-Cross", "BH Ornament03 Fence Corner", "BH Ornament03 Fence Gate" }; + private static readonly List ChangeOrnamentToIndustrialOrnaments_1800 = new List { "BH Ornament24 Empty Groundplane", "BH Ornament11 Pipes", "BH Ornament12 Barrel Pile", "BH Ornament13 WoddenBoxes", "BH Ornament14 Tanks", "BH Ornament15 Water Tower", + "BH Ornament17 Shed", "BH Ornament18 Pile Iron Bars", "BH Ornament19 Pile Boxes and Barrels", "BH Ornament20 Heap", "BH Ornament21 Large Boxes", "BH Ornament22 Gangway" }; + private static readonly List ChangeOrnamentToIndustrialFences_1800 = new List { "BH Ornament01 Wall Straight", "BH Ornament01 Wall End", "BH Ornament01 Wall Cross", "BH Ornament01 Wall T-Cross", "BH Ornament01 Wall Corner", "BH Ornament01 Wall Gate", + "BH Ornament01 Wall Gate 02", "BH Ornament02 Wall Straight Large", "BH Ornament02 Wall End Large", "BH Ornament02 Wall Cross Large", "BH Ornament02 Wall T-Cross Large", "BH Ornament02 Wall Corner Large", "BH Ornament02 Wall Gate Large" }; + private static readonly List ChangeOrnamentToAmusementPark_1800 = new List { "" }; + /// + /// Retuns the faction and group for an identifier. + /// + /// The given objectname, this will not changed + /// If objectname is in one of the lists, factionName will be changed + /// If objectname is in one of the lists, groupName will be changed + /// Objects Color Assignement for color.json + /// + public static (string Faction, string Group, string Template) GetNewOrnamentsGroup1800(string identifierName, string factionName, string groupName, string templateName) + { + if (string.IsNullOrWhiteSpace(identifierName)) + { + throw new ArgumentNullException(nameof(identifierName), "No identifier was given."); + } + + //New Ornaments Groups + if (identifierName.IsPartOf(ChangeOrnamentToParkPaths_1800)) { factionName = "Ornaments"; groupName = "01 Park Paths"; templateName = "OrnamentalBuilding_Park"; } + if (identifierName.IsPartOf(ChangeOrnamentToParkFences_1800)) { factionName = "Ornaments"; groupName = "02 Park Fences"; templateName = "OrnamentalBuilding_Park"; } + if (identifierName.IsPartOf(ChangeOrnamentToParkVegetation_1800)) { factionName = "Ornaments"; groupName = "03 Park Vegetation"; templateName = "OrnamentalBuilding_Park"; } + if (identifierName.IsPartOf(ChangeOrnamentToParkFountains_1800)) { factionName = "Ornaments"; groupName = "04 Park Fountains"; templateName = "OrnamentalBuilding_Park"; } + if (identifierName.IsPartOf(ChangeOrnamentToParkStatues_1800)) { factionName = "Ornaments"; groupName = "05 Park Statues"; templateName = "OrnamentalBuilding_Park"; } + if (identifierName.IsPartOf(ChangeOrnamentToParkDecorations_1800)) { factionName = "Ornaments"; groupName = "06 Park Decorations"; templateName = "OrnamentalBuilding_Park"; } + if (identifierName.IsPartOf(ChangeOrnamentToCityPaths_1800)) { factionName = "Ornaments"; groupName = "07 City Paths"; } + if (identifierName.IsPartOf(ChangeOrnamentToCityFences_1800)) { factionName = "Ornaments"; groupName = "08 City Fences"; } + if (identifierName.IsPartOf(ChangeOrnamentToCityStatues_1800)) { factionName = "Ornaments"; groupName = "09 City Statues"; } + if (identifierName.IsPartOf(ChangeOrnamentToCityDecorations_1800)) { factionName = "Ornaments"; groupName = "10 City Decorations"; } + if (identifierName.IsPartOf(ChangeOrnamentToSpecialOrnaments_1800)) { factionName = "Ornaments"; groupName = "11 Special Ornaments"; } + if (identifierName.IsPartOf(ChangeOrnamentToChristmasDecorations_1800)) { factionName = "Ornaments"; groupName = "12 Christmas Decorations"; } + if (identifierName.IsPartOf(ChangeOrnamentToWFRewards_1800)) { factionName = "Ornaments"; groupName = "13 World's Fair Rewards"; } + if (identifierName.IsPartOf(ChangeOrnamentToGardens_1800)) { factionName = "Ornaments"; groupName = "14 Gardens"; templateName = "OrnamentalBuilding_Park"; } + if (identifierName.IsPartOf(ChangeOrnamentToAgriculturalOrnaments_1800)) { factionName = "Ornaments"; groupName = "15 Agricultural Ornaments"; templateName = "OrnamentalBuilding_Park"; } + if (identifierName.IsPartOf(ChangeOrnamentToAgriculturalFences_1800)) { factionName = "Ornaments"; groupName = "16 Agricultural Fences"; templateName = "OrnamentalBuilding_Park"; } + if (identifierName.IsPartOf(ChangeOrnamentToIndustrialOrnaments_1800)) { factionName = "Ornaments"; groupName = "17 Industrial Ornaments"; templateName = "OrnamentalBuilding_Industrial"; } + if (identifierName.IsPartOf(ChangeOrnamentToIndustrialFences_1800)) { factionName = "Ornaments"; groupName = "18 IndustrialFences"; templateName = "OrnamentalBuilding_Industrial"; } + if (identifierName.IsPartOf(ChangeOrnamentToAmusementPark_1800)) { factionName = "Ornaments"; groupName = "19 Amusement Park"; } + + return (factionName, groupName, templateName); + } + } +} diff --git a/PresetParser/BuildingBlockProvider.cs b/PresetParser/BuildingBlockProvider.cs index 03f2979a..1fd77b3a 100644 --- a/PresetParser/BuildingBlockProvider.cs +++ b/PresetParser/BuildingBlockProvider.cs @@ -44,7 +44,15 @@ private bool ParseBuildingBlockerForAnno1800(XmlDocument ifoDocument, IBuildingI { try { - XmlNode node = ifoDocument.FirstChild[BUILDBLOCKER].FirstChild; + XmlNode node = ifoDocument.FirstChild?[BUILDBLOCKER].FirstChild; + + //check of the node contains data + if (string.IsNullOrEmpty(node?.InnerText)) + { + Console.WriteLine("-'X' and 'Z' are both 'Null' - Building will be skipped!"); + return false; + } + building.BuildBlocker = new SerializableDictionary(); string xfNormal = node["xf"].InnerText; diff --git a/PresetParser/ExtraPresets.cs b/PresetParser/ExtraPresets.cs index bf5be2e0..3bd93afe 100644 --- a/PresetParser/ExtraPresets.cs +++ b/PresetParser/ExtraPresets.cs @@ -89,20 +89,16 @@ private static IEnumerable GetExtraPresetsForAnno1800() result.Add(new ExtraPreset { BuildBlockerX = 6, BuildBlockerZ = 4, Faction = "Attractiveness", Group = "Modules", Header = "(A7) Anno 1800", IconFileName = "A7_Zoo module.png", Identifier = "Culture_01_module", InfluenceRadius = 0, InfluenceRange = 0, Template = "CultureModule", LocaEng = "Zoo Module (6x4)", LocaGer = "Zoo-Modul (6x4)", LocaFra = "Module du zoo (6x4)", LocaPol = "Moduł ZOO (6x4)", LocaRus = "Модуль зоопарка (6x4)" }); result.Add(new ExtraPreset { BuildBlockerX = 5, BuildBlockerZ = 4, Faction = "Attractiveness", Group = "Modules", Header = "(A7) Anno 1800", IconFileName = "A7_Museum module.png", Identifier = "Culture_02_module", InfluenceRadius = 0, InfluenceRange = 0, Template = "CultureModule", LocaEng = "Museum Module (5x4)", LocaGer = "Museumsmodul (5x4)", LocaFra = "Module du musée (5x4)", LocaPol = "Moduł Muzeum (5x4)", LocaRus = "Модуль музея (5x4)" }); result.Add(new ExtraPreset { BuildBlockerX = 5, BuildBlockerZ = 4, Faction = "Attractiveness", Group = "Modules", Header = "(A7) Anno 1800", IconFileName = "A7_botanic_module.png", Identifier = "Culture_03_module", InfluenceRadius = 0, InfluenceRange = 0, Template = "CultureModule", LocaEng = "Botanica Module (5x4)", LocaGer = "Botanikmodul (5x4)", LocaFra = "Module Botanica (5x4)", LocaPol = "Moduł botaniczny (5x4)", LocaRus = "модуль Ботанический (5x4)" }); - result.Add(new ExtraPreset { BuildBlockerX = 1, BuildBlockerZ = 1, Faction = "All Worlds", Group = "OrnamentalBuilding", Header = "(A7) Anno 1800", IconFileName = "A7_park_props_system_1x1_44.png", Identifier = "Park_1x1_appletree", InfluenceRadius = 0, InfluenceRange = 0, Template = "OrnamentalBuilding", LocaEng = "Apple Tree", LocaGer = "Apfelbaum", LocaFra = "Pommier", LocaPol = "Jabłoń", LocaRus = "Яблоня" }); - result.Add(new ExtraPreset { BuildBlockerX = 1, BuildBlockerZ = 1, Faction = "All Worlds", Group = "OrnamentalBuilding", Header = "(A7) Anno 1800", IconFileName = "A7_park_props_system_1x1_40.png", Identifier = "Park_1x1_elmtree", InfluenceRadius = 0, InfluenceRange = 0, Template = "OrnamentalBuilding", LocaEng = "Elm Tree", LocaGer = "Ulme", LocaFra = "L'orme", LocaPol = "Wiąz", LocaRus = "Вяз" }); - result.Add(new ExtraPreset { BuildBlockerX = 1, BuildBlockerZ = 1, Faction = "All Worlds", Group = "OrnamentalBuilding", Header = "(A7) Anno 1800", IconFileName = "A7_park_props_system_1x1_39.png", Identifier = "Park_1x1_grownbush", InfluenceRadius = 0, InfluenceRange = 0, Template = "OrnamentalBuilding", LocaEng = "Mature Shrubbery", LocaGer = "Großes Gebüsch", LocaFra = "Arbustes matures", LocaPol = "Dojrzałe krzewy", LocaRus = "Кустарник" }); - result.Add(new ExtraPreset { BuildBlockerX = 1, BuildBlockerZ = 1, Faction = "All Worlds", Group = "OrnamentalBuilding", Header = "(A7) Anno 1800", IconFileName = "A7_park_1x1_02.png", Identifier = "Park_1x1_poplar", InfluenceRadius = 0, InfluenceRange = 0, Template = "OrnamentalBuilding", LocaEng = "Poplar", LocaGer = "Pappel", LocaFra = "Peuplier", LocaPol = "Topola", LocaRus = "Тополь" }); - result.Add(new ExtraPreset { BuildBlockerX = 1, BuildBlockerZ = 1, Faction = "All Worlds", Group = "OrnamentalBuilding", Header = "(A7) Anno 1800", IconFileName = "A7_park_props_1x1_26.png", Identifier = "Park_1x1_bush", InfluenceRadius = 0, InfluenceRange = 0, Template = "OrnamentalBuilding", LocaEng = "Shrubbery", LocaGer = "Gebüsch", LocaFra = "Arbustes", LocaPol = "Krzewy", LocaRus = "Кустарник" }); - result.Add(new ExtraPreset { BuildBlockerX = 1, BuildBlockerZ = 1, Faction = "All Worlds", Group = "OrnamentalBuilding", Header = "(A7) Anno 1800", IconFileName = "A7_park_props_system_1x1_temperateforest.png", Identifier = "Park_1x1_temperateforest", InfluenceRadius = 0, InfluenceRange = 0, Template = "OrnamentalBuilding", LocaEng = "Temperate Grove", LocaGer = "Laubbaum", LocaFra = "Bosquet tempéré", LocaPol = "Zagajnik klimatu umiarkowanego", LocaRus = "Лиственная роща" }); - result.Add(new ExtraPreset { BuildBlockerX = 1, BuildBlockerZ = 1, Faction = "All Worlds", Group = "OrnamentalBuilding", Header = "(A7) Anno 1800", IconFileName = "A7_park_props_system_1x1_43.png", Identifier = "Park_1x1_tremblingaspen", InfluenceRadius = 0, InfluenceRange = 0, Template = "OrnamentalBuilding", LocaEng = "Trembling Aspen", LocaGer = "Zitterpappel", LocaFra = "Peuplier faux-tremble", LocaPol = "Topola osikowa", LocaRus = "Осина" }); - result.Add(new ExtraPreset { BuildBlockerX = 1, BuildBlockerZ = 1, Faction = "All Worlds", Group = "OrnamentalBuilding", Header = "(A7) Anno 1800", IconFileName = "A7_park_props_system_1x1_45.png", Identifier = "Park_1x1_wateringplace", InfluenceRadius = 0, InfluenceRange = 0, Template = "OrnamentalBuilding", LocaEng = "Watering Hole", LocaGer = "Alte Tränke", LocaFra = "Trou d'arrosage", LocaPol = "Wodopój", LocaRus = "Водопой" }); - result.Add(new ExtraPreset { BuildBlockerX = 1, BuildBlockerZ = 1, Faction = "All Worlds", Group = "OrnamentalBuilding", Header = "(A7) Anno 1800", IconFileName = "A7_park_props_system_1x1_46.png", Identifier = "Park_1x1_well", InfluenceRadius = 0, InfluenceRange = 0, Template = "OrnamentalBuilding", LocaEng = "Well", LocaGer = "Brunnen", LocaFra = "Puits", LocaPol = "Studnia", LocaRus = "Колодец" }); - result.Add(new ExtraPreset { BuildBlockerX = 1, BuildBlockerZ = 1, Faction = "All Worlds", Group = "OrnamentalBuilding", Header = "(A7) Anno 1800", IconFileName = "A7_park_props_system_1x1_38.png", Identifier = "Park_1x1_flowerbed", InfluenceRadius = 0, InfluenceRange = 0, Template = "OrnamentalBuilding", LocaEng = "Flower Bed", LocaGer = "Blumenbeet", LocaFra = "Lit de fleurs", LocaPol = "Klomb", LocaRus = "Цветочная поляна" }); - result.Add(new ExtraPreset { BuildBlockerX = 1, BuildBlockerZ = 1, Faction = "All Worlds", Group = "OrnamentalBuilding", Header = "(A7) Anno 1800", IconFileName = "A7_park_props_system_1x1_36.png", Identifier = "Park_1x1_hedgegate", InfluenceRadius = 0, InfluenceRange = 0, Template = "OrnamentalBuilding", LocaEng = "Entrance", LocaGer = "Eingang", LocaFra = "L'entrée", LocaPol = "Wejście", LocaRus = "Вход" }); - result.Add(new ExtraPreset { BuildBlockerX = 1, BuildBlockerZ = 1, Faction = "All Worlds", Group = "OrnamentalBuilding", Header = "(A7) Anno 1800", IconFileName = "A7_cultural_props_1x1_04.png", Identifier = "Culture_1x1_fencegate", InfluenceRadius = 0, InfluenceRange = 0, Template = "OrnamentalBuilding", LocaEng = "Archway", LocaGer = "Torbogen", LocaFra = "Passerelle en Arc", LocaPol = "Brama", LocaRus = "Арка" }); - result.Add(new ExtraPreset { BuildBlockerX = 2, BuildBlockerZ = 2, Faction = "All Worlds", Group = "OrnamentalBuilding", Header = "(A7) Anno 1800", IconFileName = "A7_park_props_2x2_02.png", Identifier = "Park_2x2_manstatue", InfluenceRadius = 0, InfluenceRange = 0, Template = "OrnamentalBuilding", LocaEng = "Memorial Garden", LocaGer = "Gedenkgarten", LocaFra = "Jardin Commémoratif", LocaPol = "Ogród pamięci", LocaRus = "Памятный сад" }); - result.Add(new ExtraPreset { BuildBlockerX = 3, BuildBlockerZ = 3, Faction = "All Worlds", Group = "OrnamentalBuilding", Header = "(A7) Anno 1800", IconFileName = "A7_park_props3x3_02.png", Identifier = "Park_3x3_fountain", InfluenceRadius = 0, InfluenceRange = 0, Template = "OrnamentalBuilding", LocaEng = "Fountain Plaza", LocaGer = "Springbrunnenplatz", LocaFra = "Plaza de la fontaine", LocaPol = "Plac z fontanną", LocaRus = "Площадь с фонтанами" }); + result.Add(new ExtraPreset { BuildBlockerX = 1, BuildBlockerZ = 1, Faction = "Ornaments", Group = "03 Park Vegetation", Header = "(A7) Anno 1800", IconFileName = "A7_park_props_system_1x1_44.png", Identifier = "Park_1x1_appletree", InfluenceRadius = 0, InfluenceRange = 0, Template = "OrnamentalBuilding_Park", LocaEng = "Apple Tree", LocaGer = "Apfelbaum", LocaFra = "Pommier", LocaPol = "Jabłoń", LocaRus = "Яблоня" }); + result.Add(new ExtraPreset { BuildBlockerX = 1, BuildBlockerZ = 1, Faction = "Ornaments", Group = "03 Park Vegetation", Header = "(A7) Anno 1800", IconFileName = "A7_park_props_system_1x1_40.png", Identifier = "Park_1x1_elmtree", InfluenceRadius = 0, InfluenceRange = 0, Template = "OrnamentalBuilding_Park", LocaEng = "Elm Tree", LocaGer = "Ulme", LocaFra = "L'orme", LocaPol = "Wiąz", LocaRus = "Вяз" }); + result.Add(new ExtraPreset { BuildBlockerX = 1, BuildBlockerZ = 1, Faction = "Ornaments", Group = "03 Park Vegetation", Header = "(A7) Anno 1800", IconFileName = "A7_park_props_system_1x1_39.png", Identifier = "Park_1x1_grownbush", InfluenceRadius = 0, InfluenceRange = 0, Template = "OrnamentalBuilding_Park", LocaEng = "Mature Shrubbery", LocaGer = "Großes Gebüsch", LocaFra = "Arbustes matures", LocaPol = "Dojrzałe krzewy", LocaRus = "Кустарник" }); + result.Add(new ExtraPreset { BuildBlockerX = 1, BuildBlockerZ = 1, Faction = "Ornaments", Group = "03 Park Vegetation", Header = "(A7) Anno 1800", IconFileName = "A7_park_props_1x1_26.png", Identifier = "Park_1x1_bush", InfluenceRadius = 0, InfluenceRange = 0, Template = "OrnamentalBuilding_Park", LocaEng = "Shrubbery", LocaGer = "Gebüsch", LocaFra = "Arbustes", LocaPol = "Krzewy", LocaRus = "Кустарник" }); + result.Add(new ExtraPreset { BuildBlockerX = 1, BuildBlockerZ = 1, Faction = "Ornaments", Group = "03 Park Vegetation", Header = "(A7) Anno 1800", IconFileName = "A7_park_props_system_1x1_temperateforest.png", Identifier = "Park_1x1_temperateforest", InfluenceRadius = 0, InfluenceRange = 0, Template = "OrnamentalBuilding_Park", LocaEng = "Temperate Grove", LocaGer = "Laubbaum", LocaFra = "Bosquet tempéré", LocaPol = "Zagajnik klimatu umiarkowanego", LocaRus = "Лиственная роща" }); + result.Add(new ExtraPreset { BuildBlockerX = 1, BuildBlockerZ = 1, Faction = "Ornaments", Group = "03 Park Vegetation", Header = "(A7) Anno 1800", IconFileName = "A7_park_props_system_1x1_43.png", Identifier = "Park_1x1_tremblingaspen", InfluenceRadius = 0, InfluenceRange = 0, Template = "OrnamentalBuilding_Park", LocaEng = "Trembling Aspen", LocaGer = "Zitterpappel", LocaFra = "Peuplier faux-tremble", LocaPol = "Topola osikowa", LocaRus = "Осина" }); + result.Add(new ExtraPreset { BuildBlockerX = 1, BuildBlockerZ = 1, Faction = "Ornaments", Group = "04 Park Fountains", Header = "(A7) Anno 1800", IconFileName = "A7_park_props_system_1x1_45.png", Identifier = "Park_1x1_wateringplace", InfluenceRadius = 0, InfluenceRange = 0, Template = "OrnamentalBuilding_Park", LocaEng = "Watering Hole", LocaGer = "Alte Tränke", LocaFra = "Trou d'arrosage", LocaPol = "Wodopój", LocaRus = "Водопой" }); + result.Add(new ExtraPreset { BuildBlockerX = 1, BuildBlockerZ = 1, Faction = "Ornaments", Group = "06 Park Decorations", Header = "(A7) Anno 1800", IconFileName = "A7_park_props_system_1x1_46.png", Identifier = "Park_1x1_well", InfluenceRadius = 0, InfluenceRange = 0, Template = "OrnamentalBuilding_Park", LocaEng = "Well", LocaGer = "Brunnen", LocaFra = "Puits", LocaPol = "Studnia", LocaRus = "Колодец" }); + result.Add(new ExtraPreset { BuildBlockerX = 1, BuildBlockerZ = 1, Faction = "Ornaments", Group = "03 Park Vegetation", Header = "(A7) Anno 1800", IconFileName = "A7_park_props_system_1x1_38.png", Identifier = "Park_1x1_flowerbed", InfluenceRadius = 0, InfluenceRange = 0, Template = "OrnamentalBuilding_Park", LocaEng = "Flower Bed", LocaGer = "Blumenbeet", LocaFra = "Lit de fleurs", LocaPol = "Klomb", LocaRus = "Цветочная поляна" }); + result.Add(new ExtraPreset { BuildBlockerX = 2, BuildBlockerZ = 2, Faction = "Ornaments", Group = "05 Park Statues", Header = "(A7) Anno 1800", IconFileName = "A7_park_props_2x2_02.png", Identifier = "Park_2x2_manstatue", InfluenceRadius = 0, InfluenceRange = 0, Template = "OrnamentalBuilding_Park", LocaEng = "Memorial Garden", LocaGer = "Gedenkgarten", LocaFra = "Jardin Commémoratif", LocaPol = "Ogród pamięci", LocaRus = "Памятный сад" }); result.Add(new ExtraPreset { BuildBlockerX = 22, BuildBlockerZ = 18, Faction = "Attractiveness", Group = null, Header = "(A7) Anno 1800", IconFileName = "A7_world_fair_2.png", Identifier = "Worlds_Fair_Foundation", InfluenceRadius = 0, InfluenceRange = 0, Template = "WorldsFairFoundation", LocaEng = "World's Fair (Foundation)", LocaGer = "Weltausstellung (Fundament)", LocaFra = "Exposition universelle (Fondation)", LocaPol = "Światowe Targi (Fundacja)", LocaRus = "Всемирная ярмарка (Фонд)" }); result.Add(new ExtraPreset { BuildBlockerX = 3, BuildBlockerZ = 4, Faction = "(10) Explorers", Group = "Public Buildings", Header = "(A7) Anno 1800", IconFileName = "A7_heating_center.png", Identifier = "Heater_Arctic", InfluenceRadius = 0, InfluenceRange = 21, Template = "Heater_Arctic", LocaEng = "Heater", LocaGer = "Heizgerät", LocaFra = "Chaufferie", LocaPol = "Kotłownia", LocaRus = "Подогреватель" }); return result; diff --git a/PresetParser/IfoFileProvider.cs b/PresetParser/IfoFileProvider.cs index 4e98e853..626acb7d 100644 --- a/PresetParser/IfoFileProvider.cs +++ b/PresetParser/IfoFileProvider.cs @@ -14,8 +14,14 @@ public XmlDocument GetIfoFileContent(string basePath, string variationFilename) { var result = new XmlDocument(); - var filePath = Path.Combine(Path.GetDirectoryName(variationFilename), Path.GetFileNameWithoutExtension(variationFilename)); - result.Load(Path.Combine(basePath + "/", string.Format("{0}.ifo", filePath))); + var pathToFileDirectory = Path.Combine(Path.GetDirectoryName(variationFilename), Path.GetFileNameWithoutExtension(variationFilename)); + var pathToFile = Path.Combine(basePath + "/", string.Format("{0}.ifo", pathToFileDirectory)); + + if (File.Exists(pathToFile)) + { + result.Load(pathToFile); + return result; + } return result; } diff --git a/PresetParser/Program.cs b/PresetParser/Program.cs index b6eaa9c9..50604bf8 100644 --- a/PresetParser/Program.cs +++ b/PresetParser/Program.cs @@ -11,6 +11,7 @@ using System.IO; using System.IO.Abstractions; using System.Linq; +using System.Security.Cryptography.X509Certificates; using System.Xml; namespace PresetParser @@ -25,18 +26,20 @@ public class Program private static string BASE_PATH_1800 { get; set; } public static bool isExcludedName = false; + public static bool isExcludeIconName = false; /*Only for Anno 1800*/ public static bool isExcludedTemplate = false; - public static bool isExcludedGUID = false; /*only for anno 1800 */ + public static bool isExcludedGUID = false; /*only for Anno 1800 */ private static Dictionary> VersionSpecificPaths { get; set; } - - private const string BUILDING_PRESETS_VERSION = "3.2.10"; + private const string BUILDING_PRESETS_VERSION = "3.3"; // Initalisizing Language Directory's and Filenames private static readonly string[] Languages = new[] { "eng", "ger", "fra", "pol", "rus" }; private static readonly string[] LanguagesFiles2205 = new[] { "english", "german", "french", "polish", "russian" }; private static readonly string[] LanguagesFiles1800 = new[] { "english", "german", "french", "polish", "russian" }; - // Internal Program Buildings List to skipp double buildings + // Internal Program Buildings Lists to skipp double buildings public static List annoBuildingLists = new List(); + public static List anno1800IconNameLists = new List(); + public static List TempExcludeOrnamentsFromPreset_1800 = new List(); public static int annoBuildingsListCount = 0, printTestText = 0; public static bool testVersion = false; // The internal Building list for the Preset writing @@ -80,24 +83,31 @@ public class Program #region anno 1800 /// - /// i need the IncludeBuildingsTemplateNames to get Building informaton from, as it is also the Presets Template String or Template GUID + /// I need the IncludeBuildingsTemplateNames to get Building informaton from, as it is also the Presets Template String or Template GUID /// public static IList farmFieldList1800 = new List(); // Removed IncludeBuildingsTemplate "CultureModule" (to must to handle and thus are replaced with the Zoo Module and Museum Module private static readonly List IncludeBuildingsTemplateNames1800 = new List { "ResidenceBuilding7", "FarmBuilding", "FreeAreaBuilding", "FactoryBuilding7", "HeavyFactoryBuilding", "SlotFactoryBuilding7", "Farmfield", "OilPumpBuilding", "PublicServiceBuilding", "CityInstitutionBuilding", "CultureBuilding", "Market", "Warehouse", "PowerplantBuilding", "HarborOffice", "HarborWarehouse7", "HarborDepot","Shipyard","HarborBuildingAttacker", "RepairCrane", "HarborLandingStage7", "VisitorPier", "WorkforceConnector", "Guildhouse", "OrnamentalBuilding", - "CultureModule","Palace"}; + "CultureModule","Palace","BuffFactory", "BuildPermitBuilding", "BuildPermitModules", "OrnamentalModule"}; private static readonly List IncludeBuildingsTemplateGUID1800 = new List { "100451", "1010266", "1010343", "1010288", "101331", "1010320", "1010263", "1010372", "1010359", "1010358", "1010462", "1010463", "1010464", "1010275", "1010271","1010516"}; - //private static readonly List ExcludeBuildingsGUID1800 = new List { "102139", "102140", "102141", "102142", "102143", "102828" }; + private static readonly List ExcludeBuildingsGUID1800 = new List { "269850", "269851" }; private static readonly List ExcludeNameList1800 = new List { "tier02", "tier03", "tier04", "tier05", "(Wood Field)", "(Hunting Grounds)", "(Wash House)", "Quay System", "module_01_birds", "module_02_peacock", "(Warehouse II)", "(Warehouse III)", "logistic_colony01_01 (Warehouse I)", "Kontor_main_02", "Kontor_main_03", "kontor_main_colony01", "Fake Ornament [test 2nd party]", "Kontor_imperial_02", "Kontor_imperial_03","(Oil Harbor II)","(Oil Harbor III)", "Third_party_", "CQO_", "Kontor_imperial_01", "- Pirates", "Harbor_colony01_09 (tourism_pier_01)", "Ai_", "AarhantLighthouseFake", "CO_Tunnel_Entrance01_Fake","Park_1x1_fence", "Electricity_01", "AI Version No Unlock", "Entertainment_musicpavillion_1701", "Entertainment_musicpavillion_1404", "Entertainment_musicpavillion_2070", "Entertainment_musicpavillion_2205", "Entertainment_musicpavillion_1800", "Culture_01_module_06_empty","Culture_02_module_06_empty", "AnarchyBanner", "Culture_props_system_all_nohedge", "Monument_arctic_01_01", "Monument_arctic_01_02", "Monument_arctic_01_03", - "Active fertility","- Decree","Ministry of Public Services","Ministry of Productivity","Arctic Shepherd","fertility","Arctic Cook","Arctic Builder","Arctic Hunter","Arctic Sewer"," Buff"," Seeds"}; + "Active fertility","- Decree","Ministry of Public Services","Ministry of Productivity","Arctic Shepherd","fertility","Arctic Cook","Arctic Builder","Arctic Hunter","Arctic Sewer"," Buff"," Seeds", + "PropagandaTower Merciers Version","tractor_module_02 (Harvester)", "Culture_1x1_statue", "Culture_prop_system_1x1_10", "Culture_prop_system_1x1_01", "Logistic_05 (Warehouse IV)", "Park_1x1_hedgeentrance", + "Harbour Slot (Ghost) Arctic", "Tractor_module_01 (GASOLINE TEST)", "Fuel_station_01 (GASOLINE TEST)", "Kontor_main_04", "Kontor_imperial_04", "Culture_1x1_plaza" }; + //Skip the following icons to put in the presets for anno 1800, to avoid double Ornamentalbuildings + public static List ExcludeOrnamentsIcons_1800 = new List { "A7_bush03.png", "A7_park_props_1x1_01.png", "A7_park_props_1x1_07.png", "A7_bush01.png", "A7_col_props_1x1_13_back.png", "A7_bush05.png", "A7_park_props_1x1_08.png", + "A7_bush02.png", "A7_bush04.png", "A7_col_props_1x1_11_bac.pngk", "A7_col_props_1x1_01_back.png", "A7_col_props_1x1_07_back.png","A7_park_1x1_06.png","A7_park_1x1_02.png","A7_park_1x1_03.png","A7_col_park_props_system_1x1_21_back.png", + "A7_park_3x3_02.png", "A7_park_2x2_05.png","A7_park_2x2_02.png", "A7_col_props_1x1_11_back.png", "A7_benches.png", "A7_park_2x2_04.png"}; + /// /// in NewFactionAndGroup1800.cs are made the following lists /// ChangeBuildingTo<1>_<2>_1800 @@ -293,6 +303,7 @@ public static void Main(string[] args) /// only the 'Values' will skip the