Fixed deprecated calls. Minor file cleanup. (#3)
This commit is contained in:
parent
aabecb3595
commit
548904328a
12
init.lua
12
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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user