public static void TraceMod(Def atFault, Verbosity Severity, string content, string category = null) { var mod = Find_Extensions.ModByDef(atFault); var modHelperDef = Find_Extensions.ModHelperDefForMod(mod); _Trace(modHelperDef, Severity, content, atFault, category); }
private static bool _TraceFor(ref ModHelperDef modHelperDef, Verbosity Severity, Def atFault) { Verbosity TraceAt = Verbosity.Default; if ( (!Controller.Data.Mods.NullOrEmpty()) && (!Controller.Data.ModHelperDefs.NullOrEmpty()) ) { if ( (modHelperDef == null) && (atFault != null) ) { // Try to find the mod associated with this def var mod = Find_Extensions.ModByDef(atFault); if (mod != null) { modHelperDef = Find_Extensions.ModHelperDefForMod(mod); } } if (modHelperDef != null) { TraceAt = modHelperDef.Verbosity; if (modHelperDef.Verbosity > captureVerbosity) { captureVerbosity = modHelperDef.Verbosity; } } else if (atFault == null) { TraceAt = captureVerbosity; } else { TraceAt = Find_Extensions.HightestVerbosity; } } return(TraceAt >= Severity); }