Skip to content

Commit bcf5027

Browse files
perf: don't remove temp code locks before saving; instead just mark them as not saveable
1 parent bf8e8ac commit bcf5027

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/AutoCode.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ protected override void LoadDefaultConfig()
4242

4343
private void OnServerSave()
4444
{
45-
RemoveAllTempCodeLocks();
4645
data.Save();
4746
}
4847

@@ -439,6 +438,9 @@ public void OpenCodeLockUI(BasePlayer player, bool guest = false)
439438
return;
440439
}
441440

441+
// Don't save this code lock.
442+
codeLock.enableSaving = false;
443+
442444
// Associate the lock with the player.
443445
tempCodeLocks.Add(player, new TempCodeLockInfo(codeLock, guest));
444446

0 commit comments

Comments
 (0)