mirror of
https://github.com/Uberi/Minetest-WorldEdit.git
synced 2025-02-11 17:20:26 +01:00
Disable worldedit_brush mod instead of throwing error (#156)
This commit is contained in:
parent
3322ef90c4
commit
a97cccd2a1
@ -1,10 +1,27 @@
|
|||||||
|
local modname = minetest.get_current_modname()
|
||||||
|
|
||||||
|
-- check compatibility
|
||||||
if minetest.raycast == nil then
|
if minetest.raycast == nil then
|
||||||
error(
|
function log_unavailable_error()
|
||||||
"================================\n"..
|
minetest.log("error",
|
||||||
"This mod requires a suitable version of 0.4.16-dev/0.5.0-dev\n"..
|
"[MOD] " .. modname .. " is not compatible with current game version, " ..
|
||||||
"that includes support for minetest.raycast() [since 7th July 2017]\n"..
|
"you can disable it in the game settings!"
|
||||||
"================================\n"
|
)
|
||||||
)
|
minetest.log("verbose",
|
||||||
|
"[MOD] " .. modname .. " requires a suitable version of 0.4.16-dev or higher, " ..
|
||||||
|
"that includes support for minetest.raycast() [since 7th July 2017]"
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
if minetest.is_singleplayer() then
|
||||||
|
-- delay message until player is connected
|
||||||
|
minetest.register_on_joinplayer(log_unavailable_error)
|
||||||
|
else
|
||||||
|
log_unavailable_error()
|
||||||
|
end
|
||||||
|
|
||||||
|
-- exit here / do not load this mod
|
||||||
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local BRUSH_MAX_DIST = 150
|
local BRUSH_MAX_DIST = 150
|
||||||
|
Loading…
Reference in New Issue
Block a user