Skip to content

remove metatable mutation #4

@AndreLouisIssa

Description

@AndreLouisIssa

https://github.com/SGG-Modding/SeerSuite/blob/main/src/core.lua#L105-L187

in this part the __pairs and __next metamethods are defined on sol types, but this is done by mutating their metatables, however since this mod is ideally just a debug tool it should have no effect on the operation of the rest of the game that modders might accidentally rely on when using this for debugging.

instead of doing rawset, it could extract definitions for pairs and next corresponding to each type this is run on and use those individual definitions in a polymorphic switch, replacing the use of pairs or next within the mod (in cases where we expect various types to appear like object browser unfold or script console tprint).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions