✅ 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 HarmonyLib;
|
||||
using HarmonyLib;
|
||||
using RimWorld.Planet;
|
||||
using System.Linq;
|
||||
using Verse;
|
||||
@@ -27,7 +27,7 @@ namespace WulaFallenEmpire
|
||||
if (isBeingObserved)
|
||||
{
|
||||
// 如果地图正在被监测,阻止地图被移除
|
||||
Log.Message($"[MapObserver] 阻止地图移除: {__instance.Label} 正在被监测");
|
||||
WulaLog.Debug($"[MapObserver] 阻止地图移除: {__instance.Label} 正在被监测");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -36,14 +36,14 @@ namespace WulaFallenEmpire
|
||||
{
|
||||
if (shuttle != null && shuttle.PocketMapGenerated && shuttle.PocketMap != null && shuttle.PocketMap.mapPawns.AnyPawnBlockingMapRemoval)
|
||||
{
|
||||
Log.Message($"[WULA] 阻止地图移除: 穿梭机 '{shuttle.Label}' 的口袋维度中仍有生物");
|
||||
WulaLog.Debug($"[WULA] 阻止地图移除: 穿梭机 '{shuttle.Label}' 的口袋维度中仍有生物");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
Log.Error($"[MapObserver] MapParent_CheckRemoveMapNow_Patch 错误: {ex}");
|
||||
WulaLog.Debug($"[MapObserver] MapParent_CheckRemoveMapNow_Patch 错误: {ex}");
|
||||
}
|
||||
|
||||
// 如果没有找到需要保护的情况,允许原方法继续执行
|
||||
|
||||
Reference in New Issue
Block a user