version_check_snippet.lua 214 B

123456
  1. local version = minetest.get_version()
  2. do
  3. local major, minor, patch = version.string:match("(%d+)%.(%d+)%.(%d+)")
  4. version = tonumber(major) * 0x10000 + tonumber(minor) * 0x100 + tonumber(patch)
  5. end