Merge branch 'fix/preference-server-update' into 'master'

HOTFIX: Check the post-validation settings against the actually character data

See merge request 
This commit is contained in:
BondageProjects 2025-03-20 00:45:42 +00:00
commit e9b41c0cb8

View file

@ -508,9 +508,9 @@ function PreferenceInitPlayer(C, data) {
/** @type {{ [k in keyof typeof PrefBefore]?: PlayerCharacter[k] }} */
const toUpdate = {};
for (const prop of Object.keys(PrefBefore))
if (PrefBefore[prop] !== JSON.stringify(data[prop]))
toUpdate[prop] = data[prop];
for (const [prop, stringPrefBefore] of CommonEntries(PrefBefore))
if (JSON.stringify(C[prop]) !== stringPrefBefore)
toUpdate[/** @type {string} */(prop)] = data[prop];
if (Object.keys(toUpdate).length > 0)
ServerAccountUpdate.QueueData(toUpdate);