Address PR bugs (glyph-stuff)

This commit is contained in:
SpectralFlame 2023-06-06 19:19:21 -05:00 committed by cyip92
parent 0f90ed6420
commit 46478dd365
4 changed files with 11 additions and 4 deletions

View File

@ -21,7 +21,7 @@ export default {
let decoded;
try {
decoded = GameSaveSerializer.decodeText(this.input, "glyph filter");
return decoded.length > 0 && decoded.match(/^[0-9,.|]*$/u) !== null;
return decoded.length > 0 && decoded.match(/^[0-9,.|/-]*$/u) !== null;
} catch {
return false;
}
@ -41,7 +41,7 @@ export default {
score: Number(subparts[1]),
effectCount: Number(subparts[2]),
specifiedMask: Number(subparts[3]),
effectScores: subparts[4].split(".").map(s => Number(s)),
effectScores: subparts[4].split("/").map(s => Number(s)),
};
partIndex++;
}

View File

@ -31,7 +31,7 @@ export default {
glyphBGStr() {
switch (this.glyphBG) {
case GLYPH_BG_SETTING.AUTO:
return "AUTO";
return "Auto";
case GLYPH_BG_SETTING.LIGHT:
return "Light";
case GLYPH_BG_SETTING.DARK:

View File

@ -176,7 +176,7 @@ export default {
exportFilterSettings() {
const filter = player.reality.glyphs.filter;
const serializeType = settings => [settings.rarity, settings.score, settings.effectCount,
settings.specifiedMask, settings.effectScores.join(".")].join(",");
settings.specifiedMask, settings.effectScores.join("/")].join(",");
const simpleData = [filter.select, filter.simple, filter.trash].join("|");
const typeData = ALCHEMY_BASIC_GLYPH_TYPES.map(t => serializeType(filter.types[t])).join("|");
copyToClipboard(GameSaveSerializer.encodeText(`${simpleData}|${typeData}`, "glyph filter"));

View File

@ -346,6 +346,13 @@ GameStorage.migrations = {
const allGlyphs = player.reality.glyphs.active.concat(player.reality.glyphs.inventory);
for (const glyph of allGlyphs) glyph.effects = updateBitmask(glyph.effects);
// We also need to update glyphs that appear in the statistics tab records too
const glyphSetProps = ["RMSet", "RMminSet", "glyphLevelSet", "bestEPSet", "speedSet", "iMCapSet", "laitelaSet"];
for (const prop of glyphSetProps) {
const glyphSet = player.records.bestReality[prop];
for (const glyph of glyphSet) glyph.effects = updateBitmask(glyph.effects);
}
// Glyph light/dark formatting was refactored as well; these values are in reference to the GLYPH_BG_SETTING enum
player.options.glyphBG = player.options.lightGlyphs ? 1 : 2;
delete player.options.lightGlyphs;