Add desk lamps (mesh)
@ -2997,6 +2997,19 @@ for i in ipairs(picture_dyes) do
|
||||
})
|
||||
end
|
||||
|
||||
local dlamp_colors = { "red","blue","green","violet" }
|
||||
|
||||
for _, color in ipairs(dlamp_colors) do
|
||||
minetest.register_craft({
|
||||
output = "homedecor:desk_lamp_"..color,
|
||||
recipe = {
|
||||
{ "", "homedecor:steel_strip", "homedecor:glowlight_small_cube_white" },
|
||||
{ "", "homedecor:copper_wire", "" },
|
||||
{ "homedecor:plastic_sheeting", "dye:"..color, "homedecor:plastic_sheeting" },
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
if (minetest.get_modpath("technic") and minetest.get_modpath("dye") and minetest.get_modpath("bees")) then
|
||||
technic.register_separating_recipe({ input = {"bees:wax 1"}, output = {"homedecor:oil_extract 2","dye:yellow 1"} })
|
||||
end
|
||||
|
@ -391,3 +391,23 @@ for _, color in ipairs(lamp_colors) do
|
||||
reg_lamp("hi", "max", "h", 11, color )
|
||||
reg_lamp("max", "off", "x", 14, color )
|
||||
end
|
||||
|
||||
local dlamp_cbox = {
|
||||
type = "fixed",
|
||||
fixed = { -0.2, -0.5, -0.15, 0.32, 0.12, 0.15 },
|
||||
}
|
||||
|
||||
local dlamp_colors = { "red","blue","green","violet" }
|
||||
|
||||
for _, color in ipairs(dlamp_colors) do
|
||||
homedecor.register("desk_lamp_"..color, {
|
||||
description = S("Desk Lamp ("..color..")"),
|
||||
mesh = "homedecor_desk_lamp.obj",
|
||||
tiles = {"homedecor_desk_lamp_"..color..".png"},
|
||||
inventory_image = "homedecor_desk_lamp_inv_"..color..".png",
|
||||
wield_image = "homedecor_desk_lamp_inv_"..color..".png",
|
||||
selection_box = dlamp_cbox,
|
||||
collision_box = dlamp_cbox,
|
||||
groups = {snappy=3},
|
||||
})
|
||||
end
|
||||
|
1622
homedecor/models/homedecor_desk_lamp.obj
Normal file
BIN
homedecor/textures/homedecor_desk_lamp_blue.png
Normal file
After Width: | Height: | Size: 217 B |
BIN
homedecor/textures/homedecor_desk_lamp_green.png
Normal file
After Width: | Height: | Size: 217 B |
BIN
homedecor/textures/homedecor_desk_lamp_inv_blue.png
Normal file
After Width: | Height: | Size: 531 B |
BIN
homedecor/textures/homedecor_desk_lamp_inv_green.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
homedecor/textures/homedecor_desk_lamp_inv_red.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
homedecor/textures/homedecor_desk_lamp_inv_violet.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
homedecor/textures/homedecor_desk_lamp_red.png
Normal file
After Width: | Height: | Size: 217 B |
BIN
homedecor/textures/homedecor_desk_lamp_violet.png
Normal file
After Width: | Height: | Size: 217 B |