Fix deprecated call to Minetest settings
This commit is contained in:
parent
2ef2d1762e
commit
d41acdd258
|
@ -188,7 +188,7 @@ end
|
||||||
-- Registers craft item or node depending on settings
|
-- Registers craft item or node depending on settings
|
||||||
function food.register(name, data, mod)
|
function food.register(name, data, mod)
|
||||||
if (minetest.settings:get_bool("food_use_2d")
|
if (minetest.settings:get_bool("food_use_2d")
|
||||||
or (mod and minetest.setting_getbool("food_"..mod.."_use_2d"))) then
|
or (mod and minetest.settings:get_bool("food_"..mod.."_use_2d"))) then
|
||||||
minetest.register_craftitem(name,{
|
minetest.register_craftitem(name,{
|
||||||
description = data.description,
|
description = data.description,
|
||||||
inventory_image = data.inventory_image,
|
inventory_image = data.inventory_image,
|
||||||
|
@ -207,7 +207,7 @@ function food.register(name, data, mod)
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
node_box = data.node_box
|
node_box = data.node_box
|
||||||
}
|
}
|
||||||
if (minetest.setting_getbool("food_2d_inv_image")) then
|
if (minetest.settings:get_bool("food_2d_inv_image")) then
|
||||||
newdata.inventory_image = data.inventory_image
|
newdata.inventory_image = data.inventory_image
|
||||||
end
|
end
|
||||||
minetest.register_node(name,newdata)
|
minetest.register_node(name,newdata)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user