do proper error logging (verbose logging added)
This commit is contained in:
parent
d71e438a3d
commit
34ff986724
|
@ -1,14 +1,19 @@
|
||||||
|
worldedit.brush = {
|
||||||
|
enabled = true,
|
||||||
|
modname = minetest.get_current_modname(),
|
||||||
|
}
|
||||||
|
|
||||||
|
local brush = worldedit.brush
|
||||||
|
|
||||||
if minetest.raycast == nil then
|
if minetest.raycast == nil then
|
||||||
print('[MOD] worldedit_brush is not compatible with your game, so it won\'t be loaded!')
|
brush.enabled = false
|
||||||
return
|
brush.error = brush.modname .. " is not compatible with current game version"
|
||||||
--[[
|
minetest.log("error", "[MOD] " .. brush.error .. ", so it won't be loaded!")
|
||||||
error(
|
minetest.log("verbose",
|
||||||
"================================\n"..
|
"[MOD] " .. brush.modname .. " requires a suitable version of 0.4.16-dev or higher, " ..
|
||||||
"This mod requires a suitable version of 0.4.16-dev/0.5.0-dev\n"..
|
"that includes support for minetest.raycast() [since 7th July 2017]"
|
||||||
"that includes support for minetest.raycast() [since 7th July 2017]\n"..
|
|
||||||
"================================\n"
|
|
||||||
)
|
)
|
||||||
]]
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local BRUSH_MAX_DIST = 150
|
local BRUSH_MAX_DIST = 150
|
||||||
|
|
Loading…
Reference in New Issue