Update for 0.4.16 settings syntax
This commit is contained in:
parent
235dcb64b4
commit
cb2faf298e
2
init.lua
2
init.lua
@ -834,7 +834,7 @@ minetest.register_chatcommand("lplant",
|
|||||||
if not tree_id or not p.x or not p.y or not p.z then
|
if not tree_id or not p.x or not p.y or not p.z then
|
||||||
return false, "Invalid usage, see /help lplant."
|
return false, "Invalid usage, see /help lplant."
|
||||||
end
|
end
|
||||||
local lm = tonumber(minetest.setting_get("map_generation_limit") or 31000)
|
local lm = tonumber(minetest.settings:get("map_generation_limit") or 31000)
|
||||||
if p.x < -lm or p.x > lm or p.y < -lm or p.y > lm or p.z < -lm or p.z > lm then
|
if p.x < -lm or p.x > lm or p.y < -lm or p.y > lm or p.z < -lm or p.z > lm then
|
||||||
return false, "Cannot plant tree out of map bounds!"
|
return false, "Cannot plant tree out of map bounds!"
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user