Fix glyph sorting order in showcase modal

This commit is contained in:
SpectralFlame 2023-08-31 14:49:16 -05:00 committed by cyip92
parent a98ed69a81
commit a5d0643ad1

View File

@ -60,6 +60,7 @@ export default {
this.glyphs = this.isGlyphSelection
? GlyphSelection.glyphList(GlyphSelection.choiceCount, gainedGlyphLevel(), { isChoosingGlyph: false })
: this.glyphSet.filter(x => x);
this.sortGlyphs();
this.gainedLevel = gainedGlyphLevel().actualLevel;
// There should only be one reality glyph; this picks one pseudo-randomly if multiple are cheated/glitched in
const realityGlyph = this.glyphs.filter(g => g.type === "reality")[0];
@ -67,6 +68,11 @@ export default {
? GlyphEffects.realityglyphlevel.effect(realityGlyph.level)
: 0;
},
sortGlyphs() {
const standardOrder = ["reality", "effarig", "power", "infinity", "replication", "time", "dilation",
"cursed", "companion"];
this.glyphs.sort((a, b) => standardOrder.indexOf(a.type) - standardOrder.indexOf(b.type));
}
},
};
</script>