@@ -97,7 +97,8 @@ private static void OutputCCUParameters(string outputModPath, ModFilesystem ck3M
97
97
Logger . Warn ( "Could not find ccu_scripted_effects.txt in the CK3 mod. Aborting the outputting of CCU parameters." ) ;
98
98
return ;
99
99
}
100
-
100
+ Logger . Debug ( $ "Found ccu_scripted_effects.txt at { scriptedEffectsPath } ") ;
101
+
101
102
Encoding . RegisterProvider ( CodePagesEncodingProvider . Instance ) ;
102
103
103
104
string fileText = File . ReadAllText ( scriptedEffectsPath , Encoding . UTF8 ) ;
@@ -400,13 +401,13 @@ private static void AddChildrenToNode(Node node, string filePath, string fileNam
400
401
private static void AddChildrenToNodeAfterLastChildContainingText ( Node node , string filePath , string fileName , string [ ] childrenStrings , string precedingChildText ) {
401
402
List < Child > allChildren = node . AllChildren ;
402
403
403
- Child ? predecingChild = allChildren . LastOrNull ( c => CKPrinter . api . prettyPrintStatement . Invoke ( c . node . ToRaw ) . Contains ( precedingChildText ) ) ;
404
- if ( predecingChild is null ) {
404
+ Child ? precedingChild = allChildren . LastOrNull ( c => CKPrinter . api . prettyPrintStatement . Invoke ( c . node . ToRaw ) . Contains ( precedingChildText ) ) ;
405
+ if ( ! precedingChild . HasValue ) {
405
406
Logger . Warn ( $ "Failed to find the preceding child containing the text '{ precedingChildText } '!") ;
406
407
return ;
407
408
}
408
409
409
- int indexToUse = allChildren . IndexOf ( predecingChild . Value ) + 1 ;
410
+ int indexToUse = allChildren . IndexOf ( precedingChild . Value ) + 1 ;
410
411
411
412
foreach ( var childStr in childrenStrings ) {
412
413
var statements = CKParser . parseString ( childStr , fileName ) . GetResult ( ) ;
@@ -428,6 +429,7 @@ private static void OutputCCUErrorSuppression(string outputModPath, ModFilesyste
428
429
"Some harmless errors related to converter-added language parameters may appear in error.log." ) ;
429
430
return ;
430
431
}
432
+ Logger . Debug ( $ "Found ccu_error_suppression.txt at { errorSuppressionPath } ") ;
431
433
432
434
// In the file, find the last line that contains: "if = { limit = { var:temp = flag:heritage_family_",
433
435
// and output the same line for each heritage family parameter.
0 commit comments