Skip to content

Commit

Permalink
refactor: remove locked state from serialization
Browse files Browse the repository at this point in the history
Because all locks should be set anew during mods queue or campaign load as per the requirements of the currently used mods.
  • Loading branch information
LordMidas committed Feb 1, 2023
1 parent 2094e77 commit 28c2b05
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions msu/systems/mod_settings/abstract_setting.nut
Original file line number Diff line number Diff line change
Expand Up @@ -173,17 +173,14 @@
function __getSerializationTable()
{
return {
Value = this.getValue(),
Locked = this.isLocked(),
LockReason = this.getLockReason()
Value = this.getValue()
};
}

function __setFromSerializationTable( _table )
{
this.unlock();
this.set(_table.Value, true, false, true, true);
if (_table.Locked) this.lock(_table.LockReason);
}

function flagSerialize( _out )
Expand Down Expand Up @@ -217,8 +214,6 @@
this.unlock();
this.set(::World.Flags.get(valueFlag), true, false, true, true);
}
setPropertyIfFlagExists("Locked", modID);
setPropertyIfFlagExists("LockReason", modID);
}
else
{
Expand Down

0 comments on commit 28c2b05

Please sign in to comment.