mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Add min/max protocol version to minetest.get_version()
(#13482)
This commit is contained in:
parent
bc4fc6d648
commit
65692ad1b5
4 changed files with 22 additions and 0 deletions
12
games/devtest/mods/unittests/get_version.lua
Normal file
12
games/devtest/mods/unittests/get_version.lua
Normal file
|
@ -0,0 +1,12 @@
|
|||
|
||||
unittests.register("test_get_version", function()
|
||||
local version = core.get_version()
|
||||
assert(type(version) == "table")
|
||||
assert(type(version.project) == "string")
|
||||
assert(type(version.string) == "string")
|
||||
assert(type(version.proto_min) == "number")
|
||||
assert(type(version.proto_max) == "number")
|
||||
assert(version.proto_max >= version.proto_min)
|
||||
assert(type(version.hash) == "string")
|
||||
assert(type(version.is_dev) == "boolean")
|
||||
end)
|
|
@ -178,6 +178,7 @@ dofile(modpath .. "/crafting.lua")
|
|||
dofile(modpath .. "/itemdescription.lua")
|
||||
dofile(modpath .. "/async_env.lua")
|
||||
dofile(modpath .. "/entity.lua")
|
||||
dofile(modpath .. "/get_version.lua")
|
||||
dofile(modpath .. "/itemstack_equals.lua")
|
||||
dofile(modpath .. "/content_ids.lua")
|
||||
dofile(modpath .. "/metadata.lua")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue