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).
https://github.com/SGG-Modding/SeerSuite/blob/main/src/core.lua#L105-L187
in this part the
__pairsand__nextmetamethods 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 forpairsandnextcorresponding to each type this is run on and use those individual definitions in a polymorphic switch, replacing the use ofpairsornextwithin the mod (in cases where we expect various types to appear like object browserunfoldor script consoletprint).