justarandomgeek / vscode-factoriomod-debug

Factorio Mod Tool Kit
Other
100 stars 24 forks source link

Add plugin disabling part 1: `---@plugin` annotation #110

Closed JanSharp closed 8 months ago

JanSharp commented 9 months ago

Adds ---@plugin <tag>: <module_one>, <module_two>

Adds intellisense for both tags and module names.

The only question from me is your opinion on remote_add and remote_call being separated. My thought process is that people do weird things, so allowing them to just disable one of them (like add) in a file while still using call would be useful, and adding that separation was easy. But it's also easy to combine them.

(edit: damn it I keep forgetting to change the base branch)

justarandomgeek commented 8 months ago

i'm not sure the two remote parts would actually function correctly separately (the call relies on seeing the types from the add, doesn't it?), but i don't see any harm in separate disables for them, and it'll probably be useful one day in debugging something.

JanSharp commented 8 months ago

It's true that remote.call relies on the remote.add_interface part, but I agree with the potential use for debugging and or more specific plugin disables, since you can choose in which file or line the plugin should perform either one of those 2 parts.