Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make compatibility error in worldedit_brush fatal again
This reverts commit a97cccd.
  • Loading branch information
sfan5 committed Jul 16, 2019
1 parent 3ffecdd commit 324eb55
Showing 1 changed file with 3 additions and 23 deletions.
26 changes: 3 additions & 23 deletions worldedit_brush/init.lua
@@ -1,27 +1,7 @@
local modname = minetest.get_current_modname()

-- check compatibility
if minetest.raycast == nil then
function log_unavailable_error()
minetest.log("error",
"[MOD] " .. modname .. " is not compatible with current game version, " ..
"you can disable it in the game settings!"
)
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
error(
"worldedit_brush requires at least Minetest 5.0"
)
end

local BRUSH_MAX_DIST = 150
Expand Down

0 comments on commit 324eb55

Please sign in to comment.