1:
ReturnOfModdingBase may change the namespace used so I can't rely on it for helpers, a hacky fix would be local rom = rom or _G assuming the only namespaces would be those, for now this is the best that can be done (unless it becomes possible to do local rom = ... and have the loader provide the namespace ref).
2:
Not every env that calls into import may have _PLUGIN or the same content in _PLUGIN, using another function as indirection for getting the mod folder path would make that a bit easier to change, and possibly a folder path provider could be registered with ENVY for external edge cases.
1:
ReturnOfModdingBase may change the namespace used so I can't rely on it for helpers, a hacky fix would be
local rom = rom or _Gassuming the only namespaces would be those, for now this is the best that can be done (unless it becomes possible to dolocal rom = ...and have the loader provide the namespace ref).2:
Not every env that calls into
importmay have_PLUGINor the same content in_PLUGIN, using another function as indirection for getting the mod folder path would make that a bit easier to change, and possibly a folder path provider could be registered with ENVY for external edge cases.