Fix embedded lorebook depths
This commit is contained in:
parent
edb79d8c53
commit
01f14b461f
|
@ -699,7 +699,7 @@ function getWorldEntry(name, data, entry) {
|
||||||
const value = Number($(this).val());
|
const value = Number($(this).val());
|
||||||
|
|
||||||
data.entries[uid].depth = !isNaN(value) ? value : 0;
|
data.entries[uid].depth = !isNaN(value) ? value : 0;
|
||||||
setOriginalDataValue(data, uid, "depth", data.entries[uid].depth);
|
setOriginalDataValue(data, uid, "extensions.depth", data.entries[uid].depth);
|
||||||
saveWorldInfo(name, data);
|
saveWorldInfo(name, data);
|
||||||
});
|
});
|
||||||
depthInput.val(entry.depth ?? DEFAULT_DEPTH).trigger("input");
|
depthInput.val(entry.depth ?? DEFAULT_DEPTH).trigger("input");
|
||||||
|
@ -1465,6 +1465,7 @@ function convertCharacterBook(characterBook) {
|
||||||
displayIndex: entry.extensions?.display_index ?? index,
|
displayIndex: entry.extensions?.display_index ?? index,
|
||||||
probability: entry.extensions?.probability ?? null,
|
probability: entry.extensions?.probability ?? null,
|
||||||
useProbability: entry.extensions?.useProbability ?? false,
|
useProbability: entry.extensions?.useProbability ?? false,
|
||||||
|
depth: entry.extensions?.depth ?? DEFAULT_DEPTH,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1695,7 +1695,8 @@ function convertWorldInfoToCharacterBook(name, entries) {
|
||||||
display_index: entry.displayIndex,
|
display_index: entry.displayIndex,
|
||||||
probability: entry.probability ?? null,
|
probability: entry.probability ?? null,
|
||||||
useProbability: entry.useProbability ?? false,
|
useProbability: entry.useProbability ?? false,
|
||||||
}
|
depth: entry.depth ?? 4,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
result.entries.push(originalEntry);
|
result.entries.push(originalEntry);
|
||||||
|
|
Loading…
Reference in New Issue