sarbian / ModuleManager

178 stars 95 forks source link

[Proposal] Exact number matching #99

Open blowfishpro opened 6 years ago

blowfishpro commented 6 years ago

We can currently compare numbers based on greater than or less than, but no way to compare equal to (or gteq/lteq).

The = character is off limits since KSP uses it to parse. is available but hard to type on Windows (OSX makes it easy with modifiers, not sure about Linux). ~ would also work but is used elsewhere in MM making this possibly confusing. Any other characters make sense?

One option for absolute equality would be to look for a sign at the beginning and if present, use that to check absolute equality (e.g. @PART:HAS[#mass[+0.2]])

sarbian commented 6 years ago

I like the sign idea but it may be confusing for users. We nearly used all the ASCII operator that would be safe to use with KSP so at that point we ll have to use obscure operators that needs ALT codes. ":" may do as an operator. Or ≈ and we explain how to type it (ALT 247). Or ≡ (ALT 240)