sarbian/ModuleManager

More clarification on NEEDS parameters

Gfurst opened this issue · 5 comments

Something that ins't very clear to me, I tried some methods of NEEDS combining, for exemple:

:NEEDS[!RealFuels|!TacLifeSupport]:
:NEEDS[kOS]:NEEDS[RemoteTech]:
:NEEDS[DMagicOrbitalScience&UniversalStorage]:

both seem to apply correctly, but I'm unsure as to which to use, and which filter operators apply in this case *?@!#~, since they are not the same thing as a part nodes or keys. Beyond me just wondering about it, I think the wiki could use more documentation over this topic.

More than one :NEEDS block definitely does not work.

I disagree :NEEDS[DMagicOrbitalScience]:NEEDS[UniversalStorage] definitely does work, though I'm not sure if it just checks the first or the latter.

What about NEEDS[....&|....], & or |, would that be the proper way?

It's going to check the first one and ignore the rest. This may change at some point to explicitly give an error. Use &, |, , to separate different mods you need to check (& and , are equivalent). ! can prefix a mod name to indicate that you want to check that it's not there.

Cheers, thanks for the explanation, I think it would benefit to make this behavior more explicit in the docs.

Just saw there is a bit of documentation about this on syntax wiki page.