Enhance AIImages mod by adding debug logging functionality to various components, improving troubleshooting capabilities. Introduce a new setting to enable or disable debug logs in the UI, with localized strings in English and Russian. Update StableDiffusionNet.Core dependency to version 1.1.5. Update AIImages.dll to reflect these changes.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using AIImages.Helpers;
|
||||
using Verse;
|
||||
|
||||
namespace AIImages.Components
|
||||
@@ -23,9 +24,35 @@ namespace AIImages.Components
|
||||
public override void PostExposeData()
|
||||
{
|
||||
base.PostExposeData();
|
||||
|
||||
string portraitPath = PortraitPath;
|
||||
bool isSaving = Scribe.mode == LoadSaveMode.Saving;
|
||||
bool isLoading = Scribe.mode == LoadSaveMode.LoadingVars;
|
||||
|
||||
DebugLogger.Log(
|
||||
$"[AI Images] PostExposeData for {parent?.LabelShort} - Mode: {Scribe.mode}, Current path: '{PortraitPath}'"
|
||||
);
|
||||
|
||||
Scribe_Values.Look(ref portraitPath, "aiPortraitPath", null);
|
||||
|
||||
if (isSaving)
|
||||
{
|
||||
DebugLogger.Log(
|
||||
$"[AI Images] Saving portrait path for {parent?.LabelShort}: '{portraitPath}'"
|
||||
);
|
||||
}
|
||||
else if (isLoading)
|
||||
{
|
||||
DebugLogger.Log(
|
||||
$"[AI Images] Loading portrait path for {parent?.LabelShort}: '{portraitPath}'"
|
||||
);
|
||||
}
|
||||
|
||||
PortraitPath = portraitPath;
|
||||
|
||||
DebugLogger.Log(
|
||||
$"[AI Images] PostExposeData completed for {parent?.LabelShort} - Final path: '{PortraitPath}', HasPortrait: {HasPortrait}"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user