Skip to content

Error in laitela.js maxAllDarkMatterDimensions command #123

Description

@Supersonic-Seven

The function maxAllDarkMatterDimensions in laitela.js uses a command to find all unlocked DMDs, then buys the maximum number of upgrades available for these DMDs. The issue occurs only in some rare situations, the most common being a Dark Matter Dimension autobuyer being unlocked for a Dark Matter Dimension that isn’t yet unlocked, and sometimes will occur in post-END mods. The reason this issue occurs is because the for loop only purchases upgrades for DMDs that are unlocked, however the for loop will repeat for every DMD autobuyer that is unlocked via the Singularity Milestone (or when called manually with an index higher than the unlocked DMDs). It will try to purchase upgrades for DMDs that register in the loop as “undefined”, thus crashing the game with the error “Uncaught TypeError: Cannot read properties of undefined (reading 'buyManyInterval')”. The fix is quite simple: Instead of having the loop repeat for every unlocked autobuyer, it should only repeat for every unlocked DMD. You can change the instance of “maxTier” on laitela.js lines 90, 93 and 96 to “unlockedDimensions.length” and the issue should be fixed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Class: PatchFixes something that was brokenEasyShould be relatively easy to implement. If you are a new to coding, you should work on these.Focus: CelestialThis affects something to do with celestialsHigh PriorityWe should get this done ASAPRequirement: HighThis is a MUST for refactorScale: SmallThis will only directly impact itself or adjacent code

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions