forked from mtcontrib/homedecor_modpack
Added a toaster
On right-click, the toast pops out & plays a sound. Right click again to reset the toast.
This commit is contained in:
parent
91a9eaaeda
commit
7da4ec0e63
|
@ -2619,3 +2619,12 @@ minetest.register_craft({
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "homedecor:toaster",
|
||||||
|
recipe = {
|
||||||
|
{ "default:steel_ingot", "homedecor:heating_element", "default:steel_ingot" },
|
||||||
|
{ "default:steel_ingot", "homedecor:heating_element", "default:steel_ingot" }
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1405,3 +1405,63 @@ minetest.register_node("homedecor:piano_right", {
|
||||||
fixed = { 0, 0, 0, 0, 0, 0 }
|
fixed = { 0, 0, 0, 0, 0, 0 }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_node("homedecor:toaster", {
|
||||||
|
description = "Toaster",
|
||||||
|
tiles = {
|
||||||
|
"homedecor_toaster_top.png",
|
||||||
|
"homedecor_toaster_sides.png",
|
||||||
|
"homedecor_toaster_sides.png",
|
||||||
|
"homedecor_toaster_sides.png",
|
||||||
|
"homedecor_toaster_sides.png",
|
||||||
|
"homedecor_toaster_sides.png"
|
||||||
|
},
|
||||||
|
inventory_image = "homedecor_toaster_inv.png",
|
||||||
|
drawtype = "nodebox",
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
groups = { snappy=3 },
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-0.0625, -0.5, -0.125, 0.125, -0.3125, 0.125}, -- NodeBox1
|
||||||
|
},
|
||||||
|
},
|
||||||
|
on_rightclick = function(pos, node, clicker)
|
||||||
|
local fdir = node.param2
|
||||||
|
minetest.set_node(pos, { name = "homedecor:toaster_loaf", param2 = fdir })
|
||||||
|
minetest.sound_play("toaster", {
|
||||||
|
pos = pos,
|
||||||
|
gain = 1.0,
|
||||||
|
max_hear_distance = 5
|
||||||
|
})
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("homedecor:toaster_loaf", {
|
||||||
|
tiles = {
|
||||||
|
"homedecor_toaster_toploaf.png",
|
||||||
|
"homedecor_toaster_sides.png",
|
||||||
|
"homedecor_toaster_sides.png",
|
||||||
|
"homedecor_toaster_sides.png",
|
||||||
|
"homedecor_toaster_sides.png",
|
||||||
|
"homedecor_toaster_sides.png"
|
||||||
|
},
|
||||||
|
drawtype = "nodebox",
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
groups = { snappy=3, not_in_creative_inventory=1 },
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-0.0625, -0.5, -0.125, 0.125, -0.3125, 0.125}, -- NodeBox1
|
||||||
|
{-0.03125, -0.3125, -0.0935, 0, -0.25, 0.0935}, -- NodeBox2
|
||||||
|
{0.0625, -0.3125, -0.0935, 0.0935, -0.25, 0.0935}, -- NodeBox3
|
||||||
|
},
|
||||||
|
},
|
||||||
|
on_rightclick = function(pos, node, clicker)
|
||||||
|
local fdir = node.param2
|
||||||
|
minetest.set_node(pos, { name = "homedecor:toaster", param2 = fdir })
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
|
BIN
homedecor/sounds/toaster.ogg
Normal file
BIN
homedecor/sounds/toaster.ogg
Normal file
Binary file not shown.
BIN
homedecor/textures/homedecor_toaster_inv.png
Normal file
BIN
homedecor/textures/homedecor_toaster_inv.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.1 KiB |
BIN
homedecor/textures/homedecor_toaster_sides.png
Normal file
BIN
homedecor/textures/homedecor_toaster_sides.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 333 B |
BIN
homedecor/textures/homedecor_toaster_top.png
Normal file
BIN
homedecor/textures/homedecor_toaster_top.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
BIN
homedecor/textures/homedecor_toaster_toploaf.png
Normal file
BIN
homedecor/textures/homedecor_toaster_toploaf.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
Loading…
Reference in New Issue
Block a user