-
-
Notifications
You must be signed in to change notification settings - Fork 391
Description
Factorio mods use one shared Lua state (and thus do share globals) for some startup work and then one Lua state per mod (and thus do not share globals) at runtime. The Intellisense currently just assumes everything in the workspace shares one set of globals. For the most part this works okay, since we generally just don't refer to the objects from other "stages", and I don't generally create any new globals. However, Factorio provides a global table named global (a unique one per mod) for us to persist data in the save file, and my workspace has multiple mods in it, so the autocomplete for global is the union of all the open mods globals!
Also, the "defined globals" list really needs to vary per-file, because data-stage has a ton of globals while runtime has only a handful.
Is there any way to indicate these different sets of global variables?