Rename cake mod

This commit is contained in:
Wuzzy 2017-01-16 21:13:26 +01:00
parent 22cb7930b6
commit ac094daedb
8 changed files with 13 additions and 12 deletions

View file

@ -13,7 +13,7 @@ slice_6 = { -7/16, -8/16, -7/16, 7/16, 0/16, 7/16}
-- FIXME: Recipe. milk instead of water bucket and egg instead of leaves -- FIXME: Recipe. milk instead of water bucket and egg instead of leaves
minetest.register_craft({ minetest.register_craft({
output = "cake:cake", output = "mcl_cake:cake",
recipe = { recipe = {
{'bucket:bucket_water', 'bucket:bucket_water', 'bucket:bucket_water'}, {'bucket:bucket_water', 'bucket:bucket_water', 'bucket:bucket_water'},
{'default:sugar', 'default:leaves', 'default:sugar'}, {'default:sugar', 'default:leaves', 'default:sugar'},
@ -22,7 +22,7 @@ minetest.register_craft({
replacements = {{"bucket:bucket_water", "bucket:bucket_empty"}}, replacements = {{"bucket:bucket_water", "bucket:bucket_empty"}},
}) })
minetest.register_node("cake:cake", { minetest.register_node("mcl_cake:cake", {
description = "Cake", description = "Cake",
tiles = {"cake_top.png","cake_bottom.png","cake_side.png","cake_side.png","cake_side.png","cake_side.png"}, tiles = {"cake_top.png","cake_bottom.png","cake_side.png","cake_side.png","cake_side.png","cake_side.png"},
inventory_image = "cake.png", inventory_image = "cake.png",
@ -45,12 +45,12 @@ minetest.register_node("cake:cake", {
minetest.item_eat(2) minetest.item_eat(2)
if clicker:get_hp() < 20 then if clicker:get_hp() < 20 then
clicker:set_hp(clicker:get_hp()+2) clicker:set_hp(clicker:get_hp()+2)
minetest.add_node(pos,{type="node",name="cake:cake_5",param2=param2}) minetest.add_node(pos,{type="node",name="mcl_cake:cake_5",param2=param2})
end end
end, end,
sounds = default.node_sound_leaves_defaults(), sounds = default.node_sound_leaves_defaults(),
}) })
minetest.register_node("cake:cake_5", { minetest.register_node("mcl_cake:cake_5", {
description = "Cake (5 Slices Left)", description = "Cake (5 Slices Left)",
tiles = cake_texture, tiles = cake_texture,
paramtype = "light", paramtype = "light",
@ -69,12 +69,12 @@ minetest.register_node("cake:cake_5", {
on_rightclick = function(pos, node, clicker, itemstack) on_rightclick = function(pos, node, clicker, itemstack)
if clicker:get_hp() < 20 then if clicker:get_hp() < 20 then
clicker:set_hp(clicker:get_hp()+2) clicker:set_hp(clicker:get_hp()+2)
minetest.add_node(pos,{type="node",name="cake:cake_4",param2=param2}) minetest.add_node(pos,{type="node",name="mcl_cake:cake_4",param2=param2})
end end
end, end,
sounds = default.node_sound_leaves_defaults(), sounds = default.node_sound_leaves_defaults(),
}) })
minetest.register_node("cake:cake_4", { minetest.register_node("mcl_cake:cake_4", {
description = "Cake (4 Slices Left)", description = "Cake (4 Slices Left)",
tiles = cake_texture, tiles = cake_texture,
paramtype = "light", paramtype = "light",
@ -93,12 +93,12 @@ minetest.register_node("cake:cake_4", {
on_rightclick = function(pos, node, clicker, itemstack) on_rightclick = function(pos, node, clicker, itemstack)
if clicker:get_hp() < 20 then if clicker:get_hp() < 20 then
clicker:set_hp(clicker:get_hp()+2) clicker:set_hp(clicker:get_hp()+2)
minetest.add_node(pos,{type="node",name="cake:cake_3",param2=param2}) minetest.add_node(pos,{type="node",name="mcl_cake:cake_3",param2=param2})
end end
end, end,
sounds = default.node_sound_leaves_defaults(), sounds = default.node_sound_leaves_defaults(),
}) })
minetest.register_node("cake:cake_3", { minetest.register_node("mcl_cake:cake_3", {
description = "Cake (3 Slices Left)", description = "Cake (3 Slices Left)",
tiles = cake_texture, tiles = cake_texture,
paramtype = "light", paramtype = "light",
@ -117,12 +117,12 @@ minetest.register_node("cake:cake_3", {
on_rightclick = function(pos, node, clicker, itemstack) on_rightclick = function(pos, node, clicker, itemstack)
if clicker:get_hp() < 20 then if clicker:get_hp() < 20 then
clicker:set_hp(clicker:get_hp()+2) clicker:set_hp(clicker:get_hp()+2)
minetest.add_node(pos,{type="node",name="cake:cake_2",param2=param2}) minetest.add_node(pos,{type="node",name="mcl_cake:cake_2",param2=param2})
end end
end, end,
sounds = default.node_sound_leaves_defaults(), sounds = default.node_sound_leaves_defaults(),
}) })
minetest.register_node("cake:cake_2", { minetest.register_node("mcl_cake:cake_2", {
description = "Cake (2 Slices Left)", description = "Cake (2 Slices Left)",
tiles = cake_texture, tiles = cake_texture,
paramtype = "light", paramtype = "light",
@ -141,12 +141,12 @@ minetest.register_node("cake:cake_2", {
on_rightclick = function(pos, node, clicker, itemstack) on_rightclick = function(pos, node, clicker, itemstack)
if clicker:get_hp() < 20 then if clicker:get_hp() < 20 then
clicker:set_hp(clicker:get_hp()+2) clicker:set_hp(clicker:get_hp()+2)
minetest.add_node(pos,{type="node",name="cake:cake_1",param2=param2}) minetest.add_node(pos,{type="node",name="mcl_cake:cake_1",param2=param2})
end end
end, end,
sounds = default.node_sound_leaves_defaults(), sounds = default.node_sound_leaves_defaults(),
}) })
minetest.register_node("cake:cake_1", { minetest.register_node("mcl_cake:cake_1", {
description = "Cake (1 Slice Left)", description = "Cake (1 Slice Left)",
tiles = cake_texture, tiles = cake_texture,
paramtype = "light", paramtype = "light",

1
mods/mcl_cake/mod.conf Normal file
View file

@ -0,0 +1 @@
name = mcl_cake

View file

Before

Width:  |  Height:  |  Size: 377 B

After

Width:  |  Height:  |  Size: 377 B

View file

Before

Width:  |  Height:  |  Size: 179 B

After

Width:  |  Height:  |  Size: 179 B

View file

Before

Width:  |  Height:  |  Size: 266 B

After

Width:  |  Height:  |  Size: 266 B

View file

Before

Width:  |  Height:  |  Size: 253 B

After

Width:  |  Height:  |  Size: 253 B

View file

Before

Width:  |  Height:  |  Size: 287 B

After

Width:  |  Height:  |  Size: 287 B