mirror of
https://github.com/IvarK/AntimatterDimensionsSourceCode.git
synced 2024-09-20 11:01:45 +00:00
Fix errors due to removed glyph filter info
This commit is contained in:
parent
f8b33a5e36
commit
8f0573f1e3
|
@ -19,7 +19,7 @@ export const AutoGlyphProcessor = {
|
|||
// on only the glyph itself and not external factors.
|
||||
filterValue(glyph) {
|
||||
const typeCfg = this.types[glyph.type];
|
||||
if (glyph.type === "companion") return Infinity;
|
||||
if (["companion", "reality"].includes(glyph.type)) return Infinity;
|
||||
if (glyph.type === "cursed") return -Infinity;
|
||||
switch (this.scoreMode) {
|
||||
case AUTO_GLYPH_SCORE.LOWEST_SACRIFICE:
|
||||
|
@ -79,6 +79,9 @@ export const AutoGlyphProcessor = {
|
|||
},
|
||||
// This is a mode-specific threshold which determines if selected glyphs are "good enough" to keep
|
||||
thresholdValue(glyph) {
|
||||
// Glyph filter settings are undefined for companion/cursed/reality glyphs, so we return the lowest possible
|
||||
// value on the basis that we never want to automatically get rid of them
|
||||
if (this.types[glyph.type] === undefined) return -Number.MAX_VALUE;
|
||||
switch (this.scoreMode) {
|
||||
case AUTO_GLYPH_SCORE.EFFECT_COUNT:
|
||||
return player.reality.glyphs.filter.simple;
|
||||
|
|
|
@ -290,6 +290,8 @@ GameStorage.migrations = {
|
|||
// old filter data into the new prop
|
||||
const reducedFilter = {};
|
||||
const effectDB = Object.values(GameDatabase.reality.glyphEffects);
|
||||
// The in-dev filter had entries for companion/reality/cursed glyphs, which have been removed and any other errors
|
||||
// which show up elsewhere have been resolved
|
||||
for (const type of ALCHEMY_BASIC_GLYPH_TYPES) {
|
||||
const oldData = player.celestials.effarig.glyphScoreSettings.types[type];
|
||||
const typeEffects = effectDB.filter(t => t.glyphTypes.includes(type)).map(t => t.id);
|
||||
|
|
Loading…
Reference in New Issue
Block a user