2021-11-08 18:37:12 +01:00
|
|
|
--overidde craft recipe of the default beds
|
|
|
|
minetest.clear_craft({ output = "beds:bed_bottom" })
|
|
|
|
minetest.clear_craft({ output = "beds:fancy_bed_bottom" })
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "beds:fancy_bed",
|
|
|
|
recipe = {
|
|
|
|
{"", "", "group:stick"},
|
|
|
|
{"wool:red", "wool:red", "wool:white"},
|
|
|
|
{"group:wood", "group:wood", "group:wood"},
|
|
|
|
}
|
|
|
|
})
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "beds:bed",
|
|
|
|
recipe = {
|
|
|
|
{"wool:red", "wool:red", "wool:white"},
|
|
|
|
{"group:wood", "group:wood", "group:wood"},
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2018-08-27 21:25:56 +02:00
|
|
|
for _, colour in pairs({"white", "black", "blue", "green"}) do
|
|
|
|
-- fancy shaped bed
|
|
|
|
beds.register_bed(
|
|
|
|
"nalc_beds:fancy_bed_" .. colour,
|
|
|
|
{
|
|
|
|
description = "Fancy Bed (" .. colour .. ")",
|
|
|
|
inventory_image = "beds_bed_fancy_" .. colour .. ".png",
|
|
|
|
wield_image = "beds_bed_fancy_" .. colour .. ".png",
|
|
|
|
tiles = {
|
|
|
|
bottom = {
|
|
|
|
"beds_bed_top1_" .. colour .. ".png",
|
|
|
|
"default_wood.png",
|
|
|
|
"beds_bed_side1_" .. colour .. ".png",
|
|
|
|
"beds_bed_side1_" .. colour .. ".png^[transformFX",
|
|
|
|
"default_wood.png",
|
|
|
|
"beds_bed_foot_" .. colour .. ".png",
|
|
|
|
},
|
|
|
|
top = {
|
|
|
|
"beds_bed_top2_" .. colour .. ".png",
|
|
|
|
"default_wood.png",
|
|
|
|
"beds_bed_side2_" .. colour .. ".png",
|
|
|
|
"beds_bed_side2_" .. colour .. ".png^[transformFX",
|
|
|
|
"beds_bed_head.png",
|
|
|
|
"default_wood.png",
|
|
|
|
}
|
|
|
|
},
|
|
|
|
nodebox = {
|
|
|
|
bottom = {
|
|
|
|
{-0.5, -0.5, -0.5, -0.375, -0.065, -0.4375},
|
|
|
|
{0.375, -0.5, -0.5, 0.5, -0.065, -0.4375},
|
|
|
|
{-0.5, -0.375, -0.5, 0.5, -0.125, -0.4375},
|
|
|
|
{-0.5, -0.375, -0.5, -0.4375, -0.125, 0.5},
|
|
|
|
{0.4375, -0.375, -0.5, 0.5, -0.125, 0.5},
|
|
|
|
{-0.4375, -0.3125, -0.4375, 0.4375, -0.0625, 0.5},
|
|
|
|
},
|
|
|
|
top = {
|
|
|
|
{-0.5, -0.5, 0.4375, -0.375, 0.1875, 0.5},
|
|
|
|
{0.375, -0.5, 0.4375, 0.5, 0.1875, 0.5},
|
|
|
|
{-0.5, 0, 0.4375, 0.5, 0.125, 0.5},
|
|
|
|
{-0.5, -0.375, 0.4375, 0.5, -0.125, 0.5},
|
|
|
|
{-0.5, -0.375, -0.5, -0.4375, -0.125, 0.5},
|
|
|
|
{0.4375, -0.375, -0.5, 0.5, -0.125, 0.5},
|
|
|
|
{-0.4375, -0.3125, -0.5, 0.4375, -0.0625, 0.4375},
|
|
|
|
}
|
|
|
|
},
|
|
|
|
selectionbox = {-0.5, -0.5, -0.5, 0.5, 0.06, 1.5},
|
|
|
|
recipe = {
|
|
|
|
{"", "", "group:stick"},
|
|
|
|
{"wool:" .. colour, "wool:" .. colour, "wool:white"},
|
|
|
|
{"group:wood", "group:wood", "group:wood"},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
-- Alias for retro compatibility
|
|
|
|
minetest.register_alias("beds:fancy_bed_"..colour.."_bottom", "nalc_beds:fancy_bed_"..colour.."_bottom")
|
|
|
|
minetest.register_alias("beds:fancy_bed_"..colour.."_top", "nalc_beds:fancy_bed_"..colour.."_top")
|
2019-02-03 15:49:06 +01:00
|
|
|
minetest.register_alias("nalc:fancy_bed_"..colour.."_bottom", "nalc_beds:fancy_bed_"..colour.."_bottom")
|
|
|
|
minetest.register_alias("nalc:fancy_bed_"..colour.."_top", "nalc_beds:fancy_bed_"..colour.."_top")
|
2018-08-27 21:25:56 +02:00
|
|
|
|
|
|
|
-- simple shaped bed
|
|
|
|
beds.register_bed(
|
|
|
|
"nalc_beds:bed_" .. colour,
|
|
|
|
{
|
|
|
|
description = "Simple Bed (" .. colour .. ")",
|
|
|
|
inventory_image = "beds_bed_" .. colour .. ".png",
|
|
|
|
wield_image = "beds_bed_" .. colour .. ".png",
|
|
|
|
tiles = {
|
|
|
|
bottom = {
|
|
|
|
"beds_bed_top_bottom_" .. colour .. ".png^[transformR90",
|
|
|
|
"default_wood.png",
|
|
|
|
"beds_bed_side_bottom_r_" .. colour .. ".png",
|
|
|
|
"beds_bed_side_bottom_r_" .. colour .. ".png^[transformfx",
|
|
|
|
"beds_transparent.png",
|
|
|
|
"beds_bed_side_bottom_" .. colour .. ".png"
|
|
|
|
},
|
|
|
|
top = {
|
|
|
|
"beds_bed_top_top_" .. colour .. ".png^[transformR90",
|
|
|
|
"default_wood.png",
|
|
|
|
"beds_bed_side_top_r_" .. colour .. ".png",
|
|
|
|
"beds_bed_side_top_r_" .. colour .. ".png^[transformfx",
|
|
|
|
"beds_bed_side_top.png",
|
|
|
|
"beds_transparent.png",
|
|
|
|
}
|
|
|
|
},
|
|
|
|
nodebox = {
|
|
|
|
bottom = {-0.5, -0.5, -0.5, 0.5, 0.06, 0.5},
|
|
|
|
top = {-0.5, -0.5, -0.5, 0.5, 0.06, 0.5},
|
|
|
|
},
|
|
|
|
selectionbox = {-0.5, -0.5, -0.5, 0.5, 0.06, 1.5},
|
|
|
|
recipe = {
|
|
|
|
{"wool:" .. colour, "wool:" .. colour, "wool:white"},
|
|
|
|
{"group:wood", "group:wood", "group:wood"}
|
|
|
|
},
|
|
|
|
|
|
|
|
})
|
|
|
|
-- Alias for retro compatibility
|
|
|
|
minetest.register_alias("beds:bed_"..colour.."_bottom", "nalc_beds:bed_"..colour.."_bottom")
|
|
|
|
minetest.register_alias("beds:bed_"..colour.."_top", "nalc_beds:bed_"..colour.."_top")
|
2019-02-03 15:49:06 +01:00
|
|
|
minetest.register_alias("nalc:bed_"..colour.."_bottom", "nalc_beds:bed_"..colour.."_bottom")
|
|
|
|
minetest.register_alias("nalc:bed_"..colour.."_top", "nalc_beds:bed_"..colour.."_top")
|
2018-08-27 21:25:56 +02:00
|
|
|
-- Fuel
|
|
|
|
|
|
|
|
minetest.register_craft(
|
|
|
|
{
|
|
|
|
type = "fuel",
|
|
|
|
recipe = "nalc_beds:fancy_bed_"..colour,
|
|
|
|
burntime = 13,
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft(
|
|
|
|
{
|
|
|
|
type = "fuel",
|
|
|
|
recipe = "nalc_beds:bed_"..colour,
|
|
|
|
burntime = 12,
|
|
|
|
})
|
|
|
|
end
|
2018-09-16 15:24:40 +02:00
|
|
|
|
|
|
|
minetest.log("action", "[nalc_beds] loaded.")
|