move workbench/tool cabinet, beer tap and mug, and soda machine to home_workshop_modpack

This commit is contained in:
Vanessa Dannenberg
2021-03-02 04:49:18 -05:00
parent 18ac518389
commit bef62eef1e
35 changed files with 1 additions and 3471 deletions

View File

@ -103,111 +103,6 @@ homedecor.register("wine_rack", {
sounds = default.node_sound_defaults(),
})
homedecor.register("beer_tap", {
description = S("Beer tap"),
mesh = "homedecor_beer_taps.obj",
tiles = {
"homedecor_generic_metal_bright.png",
{ name = "homedecor_generic_metal.png", color = homedecor.color_black }
},
inventory_image = "homedecor_beertap_inv.png",
groups = { snappy=3 },
walkable = false,
selection_box = {
type = "fixed",
fixed = { -0.25, -0.5, -0.4375, 0.25, 0.235, 0 }
},
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
local inv = clicker:get_inventory()
local wieldname = itemstack:get_name()
if wieldname == "vessels:drinking_glass" then
if inv:room_for_item("main", "homedecor:beer_mug 1") then
itemstack:take_item()
clicker:set_wielded_item(itemstack)
inv:add_item("main", "homedecor:beer_mug 1")
minetest.chat_send_player(clicker:get_player_name(),
S("Ahh, a frosty cold beer - look in your inventory for it!"))
else
minetest.chat_send_player(clicker:get_player_name(),
S("No room in your inventory to add a beer mug!"))
end
end
end
})
minetest.register_craft({
output = "homedecor:beer_tap",
recipe = {
{ "group:stick","default:steel_ingot","group:stick" },
{ "homedecor:kitchen_faucet","default:steel_ingot","homedecor:kitchen_faucet" },
{ "default:steel_ingot","default:steel_ingot","default:steel_ingot" }
},
})
local beer_cbox = {
type = "fixed",
fixed = { -5/32, -8/16, -9/32 , 7/32, -2/16, 1/32 }
}
homedecor.register("beer_mug", {
description = S("Beer mug"),
drawtype = "mesh",
mesh = "homedecor_beer_mug.obj",
tiles = { "homedecor_beer_mug.png" },
inventory_image = "homedecor_beer_mug_inv.png",
groups = { snappy=3, oddly_breakable_by_hand=3 },
walkable = false,
sounds = default.node_sound_glass_defaults(),
selection_box = beer_cbox,
on_use = function(itemstack, user, pointed_thing)
if not creative.is_enabled_for(user:get_player_name()) then
minetest.do_item_eat(2, "vessels:drinking_glass 1", itemstack, user, pointed_thing)
return itemstack
end
end
})
local svm_cbox = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 1.5, 0.5}
}
homedecor.register("soda_machine", {
description = S("Soda vending machine"),
mesh = "homedecor_soda_machine.obj",
tiles = {"homedecor_soda_machine.png"},
groups = {snappy=3},
selection_box = svm_cbox,
collision_box = svm_cbox,
expand = { top="placeholder" },
sounds = default.node_sound_wood_defaults(),
on_rotate = minetest.get_modpath("screwdriver") and screwdriver.rotate_simple or nil,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
local playername = clicker:get_player_name()
local wielditem = clicker:get_wielded_item()
local wieldname = wielditem:get_name()
local fdir_to_fwd = { {0, -1}, {-1, 0}, {0, 1}, {1, 0} }
local fdir = node.param2
local pos_drop = { x=pos.x+fdir_to_fwd[fdir+1][1], y=pos.y, z=pos.z+fdir_to_fwd[fdir+1][2] }
if wieldname == "currency:minegeld_cent_25" then
minetest.spawn_item(pos_drop, "homedecor:soda_can")
minetest.sound_play("insert_coin", {
pos=pos, max_hear_distance = 5
})
if not creative.is_enabled_for(playername) then
wielditem:take_item()
clicker:set_wielded_item(wielditem)
return wielditem
end
else
minetest.chat_send_player(playername, S("Please insert a coin in the machine."))
end
end
})
minetest.register_alias("homedecor:coin", "currency:minegeld_cent_25")
-- coffee!
-- coffee!
-- coffee!
@ -326,12 +221,6 @@ minetest.register_abm({
-- crafting
minetest.register_craftitem(":homedecor:soda_can", {
description = S("Soda Can"),
inventory_image = "homedecor_soda_can.png",
on_use = minetest.item_eat(2),
})
minetest.register_craft( {
output = "homedecor:bottle_green",
recipe = {
@ -363,14 +252,6 @@ minetest.register_craft({
},
})
minetest.register_craft({
output = "homedecor:beer_tap",
recipe = {
{ "group:stick","default:steel_ingot","group:stick" },
{ "homedecor:kitchen_faucet","default:steel_ingot","homedecor:kitchen_faucet" },
{ "default:steel_ingot","default:steel_ingot","default:steel_ingot" }
},
})
minetest.register_craft({
type = "shapeless",
@ -414,11 +295,3 @@ minetest.register_craft({
},
})
minetest.register_craft({
output = "homedecor:soda_machine",
recipe = {
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
{"default:steel_ingot", "dye:red", "default:steel_ingot"},
{"default:steel_ingot", "default:copperblock", "default:steel_ingot"},
},
})