factoriolib / flib

A set of high-quality, commonly-used utilities for creating Factorio mods.
https://mods.factorio.com/mod/flib
MIT License
61 stars 15 forks source link

get_energy_value doesn't handle exponent_multipliers ? #47

Closed Stargateur closed 1 year ago

Stargateur commented 1 year ago

https://github.com/factoriolib/flib/blob/9f880e2d203b6b7569209f79767a2e40fda30796/data-util.lua#L128

(%D*) is supposed to be "parse any number of digit" according to https://www.lua.org/manual/5.1/manual.html#5.4.1 but that mean it will not parse letter.

That result in my script fail to parse simple "5MW".

Stargateur commented 1 year ago

was on my end (lua is not my thing), I return to shadow, thus I still don't understand why the fuck it's work.