Check the post-validation settings against the actually character data

This commit is contained in:
Jean-Baptiste Emmanuel Zorg 2025-03-19 23:27:57 +01:00
parent e51138b4a2
commit a07d92afb0

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);