@@ -40,9 +40,21 @@ public static async Task OutputCustomGameStartOnAction(Configuration config) {
4040 }
4141
4242 if ( config . FallenEagleEnabled ) {
43- // As of the "Last of the Romans" update, TFE only disables Nicene for start dates >= 476.9.4.
44- // But for the converter it's important that Nicene is disabled for all start dates >= 451.8.25.
45- sb . AppendLine ( """
43+ AddFallenEagleSpecificEffects ( sb ) ;
44+ }
45+
46+ sb . AppendLine ( "\t }" ) ;
47+ sb . AppendLine ( "}" ) ;
48+
49+ var filePath = $ "output/{ config . OutputModName } /common/on_action/IRToCK3_game_start.txt";
50+ await using var writer = new StreamWriter ( filePath , append : false , new UTF8Encoding ( encoderShouldEmitUTF8Identifier : true ) ) ;
51+ await writer . WriteAsync ( sb . ToString ( ) ) ;
52+ }
53+
54+ private static void AddFallenEagleSpecificEffects ( StringBuilder sb ) {
55+ // As of the "Last of the Romans" update, TFE only disables Nicene for start dates >= 476.9.4.
56+ // But for the converter it's important that Nicene is disabled for all start dates >= 451.8.25.
57+ sb . AppendLine ( """
4658 # IRToCK3: disable Nicene after the Council of Chalcedon.
4759 if = {
4860 limit = {
@@ -68,22 +80,14 @@ public static async Task OutputCustomGameStartOnAction(Configuration config) {
6880 }
6981 }
7082 """ ) ;
71- // Disable the anachronistic Seven Houses mechanic for Persia,
72- // by making the sevenhouses_enabled scripted trigger evaluate to false.
73- sb . AppendLine ( """
83+ // Disable the anachronistic Seven Houses mechanic for Persia,
84+ // by making the sevenhouses_enabled scripted trigger evaluate to false.
85+ sb . AppendLine ( """
7486 # IRToCK3: disable the Seven Houses mechanic for Persia.
7587 set_global_variable = {
7688 name = sevenhouses_dead
7789 value = yes
7890 }
7991 """ ) ;
80- }
81-
82- sb . AppendLine ( "\t }" ) ;
83- sb . AppendLine ( "}" ) ;
84-
85- var filePath = $ "output/{ config . OutputModName } /common/on_action/IRToCK3_game_start.txt";
86- await using var writer = new StreamWriter ( filePath , append : false , new UTF8Encoding ( encoderShouldEmitUTF8Identifier : true ) ) ;
87- await writer . WriteAsync ( sb . ToString ( ) ) ;
8892 }
8993}
0 commit comments