Allow non-locking, negative identifier-locks

This commit is contained in:
Ottermandias 2024-12-31 16:36:46 +01:00
parent 5f9cbe9ab1
commit cff482a2ed
5 changed files with 7 additions and 7 deletions

View file

@ -117,7 +117,7 @@ public class CollectionEditor(SaveService saveService, CommunicatorService commu
public bool CanSetTemporarySettings(ModCollection collection, Mod mod, int key)
{
var old = collection.GetTempSettings(mod.Index);
return old == null || old.Lock == 0 || old.Lock == key;
return old is not { Lock: > 0 } || old.Lock == key;
}
/// <summary> Copy the settings of an existing (sourceMod != null) or stored (sourceName) mod to another mod, if they exist. </summary>