✅ WulaFallenEmpireSettings.cs - 添加了 public bool enableDebugLogs = false; 字段和保存配置
✅ WulaLog.cs - 修改了DebugEnabled属性,仅检查enableDebugLogs设置(不检查DevMode) ✅ WulaFallenEmpireMod.cs - 在DoSettingsWindowContents中添加了UI复选框,显示"Enable Debug Logs"选项 ✅ 替换了所有848个Log.Message/Error/Warning调用为WulaLog.Debug()
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using RimWorld;
|
||||
using RimWorld;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
@@ -64,7 +64,7 @@ namespace WulaFallenEmpire
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
Log.Error($"Error spawning fly over: {ex}");
|
||||
WulaLog.Debug($"Error spawning fly over: {ex}");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace WulaFallenEmpire
|
||||
ThingDef flyOverDef = Props.flyOverDef ?? DefDatabase<ThingDef>.GetNamedSilentFail("ARA_HiveShip");
|
||||
if (flyOverDef == null)
|
||||
{
|
||||
Log.Warning("No fly over def specified for standard fly over");
|
||||
WulaLog.Debug("No fly over def specified for standard fly over");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ namespace WulaFallenEmpire
|
||||
ThingDef flyOverDef = Props.flyOverDef ?? DefDatabase<ThingDef>.GetNamedSilentFail("ARA_HiveCorvette");
|
||||
if (flyOverDef == null)
|
||||
{
|
||||
Log.Warning("No fly over def specified for ground strafing fly over");
|
||||
WulaLog.Debug("No fly over def specified for ground strafing fly over");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ namespace WulaFallenEmpire
|
||||
ThingDef flyOverDef = Props.flyOverDef ?? DefDatabase<ThingDef>.GetNamedSilentFail("ARA_HiveCorvette");
|
||||
if (flyOverDef == null)
|
||||
{
|
||||
Log.Warning("No fly over def specified for sector surveillance fly over");
|
||||
WulaLog.Debug("No fly over def specified for sector surveillance fly over");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user