mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-12 07:04:52 +09:00
Use Factorio's version component names
Minor nitpick: The coponent names of the Factorio version is called main, major, minor. Change integerFactorioVersion to match.
This commit is contained in:
1 parent
660d0f08a1
commit
20e620993b
1 file changed
+2
-2
@@ -26,8 +26,8 @@ function integerModVersion(version) {
|
||||
* @alias module:lib/data.integerFactorioVersion
|
||||
*/
|
||||
function integerFactorioVersion(version) {
|
||||
const [major, minor, sub] = version.split(".").map(n => Number.parseInt(n, 10));
|
||||
return major * 0x100000000 + minor * 0x10000 + (sub || 0); // Can't use bitwise here because this is 48-bits.
|
||||
const [main, major, minor] = version.split(".").map(n => Number.parseInt(n, 10));
|
||||
return main * 0x100000000 + major * 0x10000 + (minor || 0); // Can't use bitwise here because this is 48-bits.
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user