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:
@@ -22,6 +22,8 @@ internal sealed class RepairHandler
|
||||
private readonly IMuHelperSettings? _config;
|
||||
private readonly ItemRepairAction _repairAction = new();
|
||||
|
||||
private bool _loggedDisabled;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="RepairHandler"/> class.
|
||||
/// </summary>
|
||||
@@ -41,7 +43,13 @@ internal sealed class RepairHandler
|
||||
{
|
||||
if (this._config is not { RepairItem: true })
|
||||
{
|
||||
this._player.Logger.LogDebug("Auto-repair is disabled by MU Helper configuration for character {CharacterName}.", this._player.Name);
|
||||
// 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);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user