Merge pull request #838 from nolt/fix-bot-log-spam

Log the disabled auto-repair once per session

(cherry picked from commit 4636dfaf0832b1c06eee9a2bc4b3b624eb5985e9)
This commit is contained in:
sven-n
2026-07-21 22:04:39 +02:00
committed by Acentech Dev
parent 93050d5276
commit 0159849335

View File

@@ -22,6 +22,8 @@ internal sealed class RepairHandler
private readonly IMuHelperSettings? _config; private readonly IMuHelperSettings? _config;
private readonly ItemRepairAction _repairAction = new(); private readonly ItemRepairAction _repairAction = new();
private bool _loggedDisabled;
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="RepairHandler"/> class. /// Initializes a new instance of the <see cref="RepairHandler"/> class.
/// </summary> /// </summary>
@@ -41,7 +43,13 @@ internal sealed class RepairHandler
{ {
if (this._config is not { RepairItem: true }) if (this._config is not { RepairItem: true })
{ {
// Once per session: this states a configuration, not an event, and the tick runs twice a second.
if (!this._loggedDisabled)
{
this._loggedDisabled = true;
this._player.Logger.LogDebug("Auto-repair is disabled by MU Helper configuration for character {CharacterName}.", this._player.Name); this._player.Logger.LogDebug("Auto-repair is disabled by MU Helper configuration for character {CharacterName}.", this._player.Name);
}
return; return;
} }