From 548904328aa55b7f676110dd633acf07b029a2d3 Mon Sep 17 00:00:00 2001 From: EdwardThorsten <32431077+EdwardThorsten@users.noreply.github.com> Date: Sun, 8 Oct 2017 15:32:07 +0100 Subject: [PATCH] Fixed deprecated calls. Minor file cleanup. (#3) --- init.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/init.lua b/init.lua index 1453620..217290d 100644 --- a/init.lua +++ b/init.lua @@ -17,7 +17,7 @@ for i, size in ipairs(sizes) do local description local drop local tiles - + if slice == 0 then name = "cake:cake" description = S("Cake") @@ -28,7 +28,7 @@ for i, size in ipairs(sizes) do drop = '' tiles = {"cake_top.png", "cake_bottom.png", "cake_side.png", "cake_inner.png", "cake_side.png", "cake_side.png"} end - + minetest.register_node(name, { description = description, drop = drop, @@ -48,7 +48,7 @@ for i, size in ipairs(sizes) do }, on_rightclick = function(pos, node, clicker) clicker:set_hp(clicker:get_hp() + 1) - + if i < #sizes then minetest.swap_node(pos, {name="cake:cake_"..i}) else @@ -64,7 +64,7 @@ if not minetest.get_modpath("food") then inventory_image = "cake_sugar.png", groups = {food_sugar=1} }) - + minetest.register_craft({ type = "shapeless", output = "cake:sugar", @@ -80,7 +80,7 @@ minetest.register_craft({ recipe = {"farming:flour", "group:water_bucket", "group:food_sugar", "group:food_sugar"}, replacements = { {"group:water_bucket", "bucket:bucket_empty"}, - + -- Not needed >0.4.13 {"bucket:bucket_water", "bucket:bucket_empty"}, {"bucket:bucket_river_water", "bucket:bucket_empty"} @@ -123,7 +123,7 @@ minetest.register_entity("cake:cake_entity", { if throwable_cake then minetest.override_item("cake:cake", { on_use = function(itemstack, player, pointed_thing) - if not minetest.setting_getbool("creative_mode") then + if not minetest.settings:get_bool("creative_mode") then itemstack:take_item() end local playerpos = player:getpos()