justarandomgeek / vscode-factoriomod-debug

Factorio Mod Tool Kit
Other
97 stars 21 forks source link

Missing required fields incorrectly highlighted for create_entity #103

Closed moon6969 closed 7 months ago

moon6969 commented 7 months ago

LuaSurface.create_entity() has different required fields depending on the type entity being created.

EG: for creating an entity-ghost, the "inner_name" field is required, but it's not required for creating a highlight-box... Screenshot 2023-11-21 165143 - vscode required field issue

If it's not possible for the checker to identify the type of entity being created, I would prefer it to only check for the main parameters to avoid false-positives.

I'm also not sure why the warning appears twice?

justarandomgeek commented 7 months ago

fmtk 1.1.38 will have these types split up properly, to reduce the silly warnings on here.

Wild stab in the dark, double warnings probably means having somehow ended up with doubled up library entries in your config (copied&mangled config from another workspace?)

moon6969 commented 7 months ago

Wild stab in the dark, double warnings probably means having somehow ended up with doubled up library entries in your config (copied&mangled config from another workspace?)

Yes - many of my workspaces settings.json files were old, copied & messy. My edits made things worse, so I nuked all setting.json, semneko, fmtk & the whole vscode workspaceStorage folder under %appdata%. I installed sumneko 3.7.0 (as per #102) to trigger the fmtk workspace popups, and now all is well (no duplicate warnings now). Cheers.