Fix world info entry saves for match fields
| @@ -3362,15 +3362,15 @@ export async function getWorldEntry(name, data, entry) { | |||
| 3362 | const key = originalWIDataKeyMap[fieldName]; | 3362 | const key = originalWIDataKeyMap[fieldName]; |
| 3363 | const checkBoxElem = template.find(`input[type="checkbox"][name="${fieldName}"]`); | 3363 | const checkBoxElem = template.find(`input[type="checkbox"][name="${fieldName}"]`); |
| 3364 | checkBoxElem.data('uid', entry.uid); | 3364 | checkBoxElem.data('uid', entry.uid); |
| 3365 | checkBoxElem.on('change', async function () { | 3365 | checkBoxElem.on('input', async function () { |
| 3366 | const uid = $(this).data('uid'); | 3366 | const uid = $(this).data('uid'); |
| 3367 | const isChecked = $(this).is(':checked'); | 3367 | const value = $(this).prop('checked'); |
| 3368 | 3368 | ||
| 3369 | data.entries[uid][fieldName] = isChecked; | 3369 | data.entries[uid][fieldName] = value; |
| 3370 | setWIOriginalDataValue(data, uid, key, data.entries[uid][fieldName]); | 3370 | setWIOriginalDataValue(data, uid, key, data.entries[uid][fieldName]); |
| 3371 | await saveWorldInfo(name, data); | 3371 | await saveWorldInfo(name, data); |
| 3372 | }); | 3372 | }); |
| 3373 | checkBoxElem.prop('checked', !!entry[name]).trigger('change'); | 3373 | checkBoxElem.prop('checked', !!entry[fieldName]).trigger('input'); |
| 3374 | } | 3374 | } |
| 3375 | 3375 | ||
| 3376 | handleOptionalSelect("matchPersonaDescription"); | 3376 | handleOptionalSelect("matchPersonaDescription"); |
| @@ -3586,6 +3586,11 @@ export const newWorldInfoEntryDefinition = { | |||
| 3586 | disable: { default: false, type: 'boolean' }, | 3586 | disable: { default: false, type: 'boolean' }, |
| 3587 | excludeRecursion: { default: false, type: 'boolean' }, | 3587 | excludeRecursion: { default: false, type: 'boolean' }, |
| 3588 | preventRecursion: { default: false, type: 'boolean' }, | 3588 | preventRecursion: { default: false, type: 'boolean' }, |
| 3589 | matchPersonaDescription: { default: false, type: 'boolean' }, | ||
| 3590 | matchCharacterDescription: { default: false, type: 'boolean' }, | ||
| 3591 | matchCharacterDepthPrompt: { default: false, type: 'boolean' }, | ||
| 3592 | matchScenario: { default: false, type: 'boolean' }, | ||
| 3593 | matchCreatorNotes: { default: false, type: 'boolean' }, | ||
| 3589 | delayUntilRecursion: { default: 0, type: 'number' }, | 3594 | delayUntilRecursion: { default: 0, type: 'number' }, |
| 3590 | probability: { default: 100, type: 'number' }, | 3595 | probability: { default: 100, type: 'number' }, |
| 3591 | useProbability: { default: true, type: 'boolean' }, | 3596 | useProbability: { default: true, type: 'boolean' }, |