Fix: Sandwich slices
This commit is contained in:
parent
5cfbea5f51
commit
ef52910688
3 changed files with 759 additions and 753 deletions
File diff suppressed because it is too large
Load diff
|
@ -9,7 +9,7 @@ minetest.register_node("ma_pops_furniture:toaster", {
|
||||||
"mp_toas_right.png",
|
"mp_toas_right.png",
|
||||||
"mp_toas_left.png",
|
"mp_toas_left.png",
|
||||||
"mp_toas_back.png",
|
"mp_toas_back.png",
|
||||||
"mp_toas_front.png"
|
"mp_toas_front.png",
|
||||||
},
|
},
|
||||||
walkable = false,
|
walkable = false,
|
||||||
groups = { snappy = 3 },
|
groups = { snappy = 3 },
|
||||||
|
@ -53,6 +53,9 @@ end
|
||||||
if minetest.registered_items["farming:bread_slice"] then
|
if minetest.registered_items["farming:bread_slice"] then
|
||||||
minetest.override_item("farming:bread_slice", { on_use = breadslice_on_use })
|
minetest.override_item("farming:bread_slice", { on_use = breadslice_on_use })
|
||||||
minetest.register_alias("ma_pops_furniture:breadslice", "farming:bread_slice")
|
minetest.register_alias("ma_pops_furniture:breadslice", "farming:bread_slice")
|
||||||
|
elseif minetest.registered_items["sandwiches:bread_slice"] then
|
||||||
|
minetest.override_item("sandwiches:bread_slice", { on_use = breadslice_on_use })
|
||||||
|
minetest.register_alias("ma_pops_furniture:breadslice", "sandwiches:bread_slice")
|
||||||
else
|
else
|
||||||
minetest.register_craftitem("ma_pops_furniture:breadslice", {
|
minetest.register_craftitem("ma_pops_furniture:breadslice", {
|
||||||
description = S("Slice of Bread"),
|
description = S("Slice of Bread"),
|
||||||
|
@ -81,7 +84,7 @@ minetest.register_node("ma_pops_furniture:toaster_with_breadslice", {
|
||||||
"mp_toas_right_bread.png",
|
"mp_toas_right_bread.png",
|
||||||
"mp_toas_left_bread.png",
|
"mp_toas_left_bread.png",
|
||||||
"mp_toas_back_bread.png",
|
"mp_toas_back_bread.png",
|
||||||
"mp_toas_front_bread.png"
|
"mp_toas_front_bread.png",
|
||||||
},
|
},
|
||||||
walkable = false,
|
walkable = false,
|
||||||
groups = { not_in_creative_inventory = 1 },
|
groups = { not_in_creative_inventory = 1 },
|
||||||
|
@ -106,10 +109,10 @@ minetest.register_node("ma_pops_furniture:toaster_with_breadslice", {
|
||||||
minetest.sound_play("toaster", {
|
minetest.sound_play("toaster", {
|
||||||
pos = pos,
|
pos = pos,
|
||||||
gain = 1.0,
|
gain = 1.0,
|
||||||
max_hear_distance = 5
|
max_hear_distance = 5,
|
||||||
})
|
})
|
||||||
return itemstack
|
return itemstack
|
||||||
end
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("ma_pops_furniture:toaster_toasting_breadslice", {
|
minetest.register_node("ma_pops_furniture:toaster_toasting_breadslice", {
|
||||||
|
@ -120,7 +123,7 @@ minetest.register_node("ma_pops_furniture:toaster_toasting_breadslice", {
|
||||||
"mp_toas_right_bread.png",
|
"mp_toas_right_bread.png",
|
||||||
"mp_toas_left_toast_side.png",
|
"mp_toas_left_toast_side.png",
|
||||||
"mp_toas_back_side.png",
|
"mp_toas_back_side.png",
|
||||||
"mp_toas_front_side.png"
|
"mp_toas_front_side.png",
|
||||||
},
|
},
|
||||||
walkable = false,
|
walkable = false,
|
||||||
groups = { not_in_creative_inventory = 1 },
|
groups = { not_in_creative_inventory = 1 },
|
||||||
|
@ -146,7 +149,7 @@ minetest.register_node("ma_pops_furniture:toaster_with_toast", {
|
||||||
"mp_toas_right_toast.png",
|
"mp_toas_right_toast.png",
|
||||||
"mp_toas_left_toast.png",
|
"mp_toas_left_toast.png",
|
||||||
"mp_toas_back_toast.png",
|
"mp_toas_back_toast.png",
|
||||||
"mp_toas_front_toast.png"
|
"mp_toas_front_toast.png",
|
||||||
},
|
},
|
||||||
walkable = false,
|
walkable = false,
|
||||||
groups = { snappy = 3, not_in_creative_inventory = 1 },
|
groups = { snappy = 3, not_in_creative_inventory = 1 },
|
||||||
|
@ -169,9 +172,10 @@ minetest.register_node("ma_pops_furniture:toaster_with_toast", {
|
||||||
if left:is_empty() then
|
if left:is_empty() then
|
||||||
minetest.set_node(pos, { name = "ma_pops_furniture:toaster", param2 = node.param2 })
|
minetest.set_node(pos, { name = "ma_pops_furniture:toaster", param2 = node.param2 })
|
||||||
end
|
end
|
||||||
end
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
--[[
|
||||||
--Slice of Bread (only if not farming one used)
|
--Slice of Bread (only if not farming one used)
|
||||||
if not minetest.registered_items["farming:bread_slice"] then
|
if not minetest.registered_items["farming:bread_slice"] then
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
|
@ -180,4 +184,5 @@ if not minetest.registered_items["farming:bread_slice"] then
|
||||||
recipe = {"farming:bread", "ma_pops_furniture:knife"},
|
recipe = {"farming:bread", "ma_pops_furniture:knife"},
|
||||||
replacements = {{"ma_pops_furniture:knife", "ma_pops_furniture:knife"}},
|
replacements = {{"ma_pops_furniture:knife", "ma_pops_furniture:knife"}},
|
||||||
})
|
})
|
||||||
end
|
end ]]
|
||||||
|
--
|
||||||
|
|
|
@ -51,8 +51,8 @@ minetest.register_craftitem("sandwiches:bread_slice", {
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "sandwiches:bread_slice 4",
|
output = "sandwiches:bread_slice 4",
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
recipe = {"group:food_bread", "group:food_cutting_board", ""},
|
recipe = {"group:food_bread", board, ""},
|
||||||
replacements = { {"group:food_cutting_board", board }, }
|
replacements = { {board, board }, }
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craftitem("sandwiches:bread_crumbs", {
|
minetest.register_craftitem("sandwiches:bread_crumbs", {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue