Added registration code for new furniture, fixed their models

This commit is contained in:
Andrey2470T 2023-02-04 02:19:20 +03:00
parent f97fe3ba27
commit 3dae56573a
30 changed files with 684 additions and 5 deletions

View File

@ -193,6 +193,432 @@ function multidecor.register.register_furniture_unit(name, def, craft_def)
end
end
--[[def:
{
type = <kitchen, bathroom>,
style = <baroque, classic, high_tech, mixed, modern, royal>,
material = <wood, glass, metal and etc>,
tiles = {
<tabletop texture>,
<base texture>,
<texture of legs/handles/sink>
},
groups = <groups>,
modname = <name of mod registering the garniture>,
For kitchen garniture:
components = {
["two_floor_drws"] = {
description = <description>,
mesh = <filename>,
bounding_boxes = <table of bboxes definitions>,
shelves_data = {
pos_lower = <position of lower shelf>,
pos_upper = <position of upper shelf>,
inventory = <formspec_string>
}
},
["three_floor_drws"] = {
description = <description>,
mesh = <filename>,
bounding_boxes = <table of bboxes definitions>,
shelves_data = {
pos_lower = <position of lower shelf>,
pos_middle = <position of middle shelf>
pos_upper = <position of upper shelf>,
inventory = <formspec_string>
}
},
["two_floor_doors"] = {
description = <description>,
mesh = <filename>,
bounding_boxes = <table of bboxes definitions>,
shelves_data = {
pos_left = <position of left door>,
pos_right = <position of right door>,
inventory = <formspec_string>
}
},
["three_floor_doors"] = {
description = <description>,
mesh = <filename>,
bounding_boxes = <table of bboxes definitions>,
shelves_data = {
pos = <position of left door>,
pos2 = <position of right door>,
inventory = <formspec_string>
}
},
["three_floor_drw_door"] = {
description = <description>,
mesh = <filename>,
bounding_boxes = <table of bboxes definitions>,
shelves_data = {
pos_upper = <position of upper drawer>,
pos_left = <position of left door>,
pos_right = <position of right door>,
inventory = <formspec_string>
}
},
["two_wall_door"] = {
description = <description>,
mesh = <filename>,
bounding_boxes = <table of bboxes definitions>,
shelves_data = {
pos = <position of shelf>,
inventory = <formspec_string>
}
},
["two_wall_hdoor"] = {
description = <description>,
mesh = <filename>,
bounding_boxes = <table of bboxes definitions>,
shelves_data = {
pos_left = <position of left door>,
pos_right = <position of right door>,
inventory = <formspec_string>
}
},
["two_wall_hgldoors"] = {
description = <description>,
mesh = <filename>,
bounding_boxes = <table of bboxes definitions>,
shelves_data = {
pos_left = <position of left door>,
pos_right = <position of right door>,
inventory = <formspec_string>
}
},
["two_wall_crn_hgldoors"] = {
description = <description>,
mesh = <filename>,
bounding_boxes = <table of bboxes definitions>,
shelves_data = {
pos_left = <position of left door>,
pos_right = <position of right door>,
inventory = <formspec_string>
}
},
["sink"] = {
description = <description>,
mesh = <filename>,
bounding_boxes = <table of bboxes definitions>,
tap_pos = <tap position>,
shelves_data = {
pos_trash = <position of trash shelf>,
inventory = <formspec_string>
}
},
},
move_parts = {
["floor_door"] = <meshname>,
["floor_half_door"] = <meshname>,
["wall_door"] = <meshname>,
["wall_half_door"] = <meshname>,
["wall_half_glass_door"] = <meshname>,
["large_drawer"] = <meshname>,
["small_drawer"] = <meshname>
}
}
]]
-- Registers a set of furniture components of certain type: "kitchen", "bathroom", "bedroom", "living_room" and etc.
function multidecor.register.register_garniture()
function multidecor.register.register_garniture(def)
local cmn_def = {}
assert(multidecor.register.check_for_style(def.style), "The type with a name \"" .. def.style .. "\" is not registered!")
cmn_def.type = "table"
cmn_def.style = def.style
cmn_def.material = def.material
cmn_def.drawtype = "mesh"
cmn_def.visual_scale = 0.5
cmn_def.tiles = def.tiles
cmn_def.groups = def.groups
local objects = {
("%s:%s_%s_floor_door"):format(def.modname, def.style, def.type),
("%s:%s_%s_floor_half_door"):format(def.modname, def.style, def.type),
("%s:%s_%s_wall_door"):format(def.modname, def.style, def.type),
("%s:%s_%s_wall_half_door"):format(def.modname, def.style, def.type),
("%s:%s_%s_wall_half_glass_door"):format(def.modname, def.style, def.type),
("%s:%s_%s_large_drawer"):format(def.modname, def.style, def.type),
("%s:%s_%s_small_drawer"):format(def.modname, def.style, def.type),
}
local door_sounds = {
open = "multidecor_cabinet_door_open",
close = "multidecor_cabinet_door_close"
}
local drawer_sounds = {
open = "multidecor_drawer_open",
close = "multidecor_drawer_close"
}
-- kitchen floor two shelves cabinet with drawers
local two_floor_drws = table.copy(cmn_def)
two_floor_drws.description = def.components.two_floor_drws.description
two_floor_drws.mesh = def.components.two_floor_drws.mesh
two_floor_drws.bounding_boxes = def.components.two_floor_drws.bounding_boxes
local two_floors_drws_shelf = {
type = "drawer",
object = objects[6],
inventory = def.components.two_floor_drws.shelves_data.inventory,
inv_size = def.components.two_floor_drws.shelves_data.inv_size,
sounds = drawer_sounds
}
two_floor_drws.add_properties = {shelves_data = {table.copy(two_floors_drws_shelf), table.copy(two_floors_drws_shelf)}}
two_floor_drws.add_properties.shelves_data[1].pos = def.components.two_floor_drws.shelves_data.pos_lower
two_floor_drws.add_properties.shelves_data[2].pos = def.components.two_floor_drws.shelves_data.pos_upper
multidecor.register.register_furniture_unit("kitchen_cabinet_two_shelves_floor_with_drawers", two_floor_drws)
-- kitchen floor three shelves cabinet with drawers
local three_floor_drws = table.copy(cmn_def)
three_floor_drws.description = def.components.three_floor_drws.description
three_floor_drws.mesh = def.components.three_floor_drws.mesh
three_floor_drws.bounding_boxes = def.components.three_floor_drws.bounding_boxes
local three_floors_drws_shelf = {
type = "drawer",
object = objects[7],
inventory = def.components.three_floor_drws.shelves_data.inventory,
inv_size = def.components.three_floor_drws.shelves_data.inv_size,
sounds = drawer_sounds
}
three_floor_drws.add_properties = {shelves_data = {table.copy(three_floors_drws_shelf), table.copy(three_floors_drws_shelf), table.copy(three_floors_drws_shelf)}}
three_floor_drws.add_properties.shelves_data[1].pos = def.components.three_floor_drws.shelves_data.pos_lower
three_floor_drws.add_properties.shelves_data[2].pos = def.components.three_floor_drws.shelves_data.pos_middle
three_floor_drws.add_properties.shelves_data[3].pos = def.components.three_floor_drws.shelves_data.pos_upper
multidecor.register.register_furniture_unit("kitchen_cabinet_three_shelves_floor_with_drawers", three_floor_drws)
-- kitchen floor two shelves cabinet with doors
local two_floor_doors = table.copy(cmn_def)
two_floor_doors.description = def.components.two_floor_doors.description
two_floor_doors.mesh = def.components.two_floor_doors.mesh
two_floor_doors.bounding_boxes = def.components.two_floor_doors.bounding_boxes
local two_floors_doors_shelf = {
type = "sym_doors",
object = objects[2],
inventory = def.components.two_floor_doors.shelves_data.inventory,
inv_size = def.components.two_floor_doors.shelves_data.inv_size,
sounds = door_sounds
}
two_floor_doors.add_properties = {shelves_data = {table.copy(two_floors_doors_shelf)}}
two_floor_doors.add_properties.shelves_data[1].pos = def.components.two_floor_doors.shelves_data.pos_left
two_floor_doors.add_properties.shelves_data[1].pos2 = def.components.two_floor_doors.shelves_data.pos_right
multidecor.register.register_furniture_unit("kitchen_cabinet_two_shelves_floor_with_doors", two_floor_doors)
-- kitchen floor three shelves cabinet with doors
local three_floor_doors = table.copy(cmn_def)
three_floor_doors.description = def.components.three_floor_doors.description
three_floor_doors.mesh = def.components.three_floor_doors.mesh
three_floor_doors.bounding_boxes = def.components.three_floor_doors.bounding_boxes
local three_floors_doors_shelf = {
type = "sym_doors",
object = objects[2],
inventory = def.components.three_floor_doors.shelves_data.inventory,
inv_size = def.components.three_floor_doors.shelves_data.inv_size,
sounds = door_sounds
}
three_floor_doors.add_properties = {shelves_data = {table.copy(three_floors_doors_shelf)}}
three_floor_doors.add_properties.shelves_data[1].pos = def.components.three_floor_doors.shelves_data.pos_left
three_floor_doors.add_properties.shelves_data[1].pos2 = def.components.three_floor_doors.shelves_data.pos_right
multidecor.register.register_furniture_unit("kitchen_cabinet_three_shelves_floor_with_doors", three_floor_doors)
-- kitchen floor three shelves cabinet with drawer and door
local three_floor_drw_door = table.copy(cmn_def)
three_floor_drw_door.description = def.components.three_floor_drw_door.description
three_floor_drw_door.mesh = def.components.three_floor_drw_door.mesh
three_floor_drw_door.bounding_boxes = def.components.three_floor_drw_door.bounding_boxes
three_floor_drw_door.add_properties = {
shelves_data = {
{
type = "drawer",
object = objects[7],
pos = def.components.three_floor_drw_door.shelves_data.pos_upper,
inventory = def.components.three_floor_drw_door.shelves_data.inventory,
inv_size = def.components.three_floor_drw_door.shelves_data.inv_size,
sounds = drawer_sounds
},
{
type = "sym_doors",
object = objects[2],
pos = def.components.three_floor_drw_door.shelves_data.pos_left,
pos2 = def.components.three_floor_drw_door.shelves_data.pos_right,
inventory = def.components.three_floor_drw_door.shelves_data.inventory,
inv_size = def.components.three_floor_drw_door.shelves_data.inv_size,
sounds = door_sounds
}
}
}
multidecor.register.register_furniture_unit("kitchen_cabinet_three_shelves_floor_with_drawer_and_door", three_floor_drw_door)
-- kitchen wall two shelves cabinet with door
local two_wall_door = table.copy(cmn_def)
two_wall_door.description = def.components.two_wall_door.description
two_wall_door.mesh = def.components.two_wall_door.mesh
two_wall_door.bounding_boxes = def.components.two_wall_door.bounding_boxes
two_wall_door.add_properties = {
shelves_data = {
{
type = "door",
object = objects[3],
pos = def.components.two_wall_door.shelves_data.pos,
inventory = def.components.two_wall_door.shelves_data.inventory,
inv_size = def.components.two_wall_door.shelves_data.inv_size,
sounds = door_sounds
}
}
}
multidecor.register.register_furniture_unit("kitchen_cabinet_two_shelves_wall_with_door", two_wall_door)
-- kitchen wall two shelves cabinet with half doors
local two_wall_hdoor = table.copy(cmn_def)
two_wall_hdoor.description = def.components.two_wall_hdoor.description
two_wall_hdoor.mesh = def.components.two_wall_hdoor.mesh
two_wall_hdoor.bounding_boxes = def.components.two_wall_hdoor.bounding_boxes
two_wall_hdoor.add_properties = {
shelves_data = {
{
type = "sym_doors",
object = objects[4],
pos = def.components.two_wall_hdoor.shelves_data.pos_left,
pos2 = def.components.two_wall_hdoor.shelves_data.pos_right,
inventory = def.components.two_wall_hdoor.shelves_data.inventory,
inv_size = def.components.two_wall_hdoor.shelves_data.inv_size,
sounds = door_sounds
}
}
}
multidecor.register.register_furniture_unit("kitchen_cabinet_two_shelves_wall_with_half_doors", two_wall_hdoor)
-- kitchen wall two shelves cabinet with half glass doors
local two_wall_hgldoor = table.copy(cmn_def)
two_wall_hgldoor.description = def.components.two_wall_hgldoor.description
two_wall_hgldoor.mesh = def.components.two_wall_hgldoor.mesh
two_wall_hgldoor.bounding_boxes = def.components.two_wall_hgldoor.bounding_boxes
two_wall_hgldoor.add_properties = {
shelves_data = {
{
type = "sym_doors",
object = objects[5],
pos = def.components.two_wall_hgldoor.shelves_data.pos_left,
pos2 = def.components.two_wall_hgldoor.shelves_data.pos_right,
inventory = def.components.two_wall_hgldoor.shelves_data.inventory,
inv_size = def.components.two_wall_hgldoor.shelves_data.inv_size,
sounds = door_sounds
}
}
}
multidecor.register.register_furniture_unit("kitchen_cabinet_two_shelves_wall_with_half_glass_doors", two_wall_hgldoor)
-- kitchen wall corner two shelves cabinet with half glass doors
local two_wall_crn_hgldoor = table.copy(cmn_def)
two_wall_crn_hgldoor.description = def.components.two_wall_crn_hgldoor.description
two_wall_crn_hgldoor.mesh = def.components.two_wall_crn_hgldoor.mesh
two_wall_crn_hgldoor.bounding_boxes = def.components.two_wall_crn_hgldoor.bounding_boxes
two_wall_crn_hgldoor.add_properties = {
shelves_data = {
{
type = "sym_doors",
object = objects[5],
pos = def.components.two_wall_crn_hgldoor.shelves_data.pos_left,
pos2 = def.components.two_wall_crn_hgldoor.shelves_data.pos_right,
orig_angle = math.pi/4,
inventory = def.components.two_wall_hgldoor.shelves_data.inventory,
inv_size = def.components.two_wall_hgldoor.shelves_data.inv_size,
sounds = door_sounds
}
}
}
multidecor.register.register_furniture_unit("kitchen_corner_cabinet_two_shelves_wall_with_half_glass_doors", two_wall_crn_hgldoor)
-- kitchen sink
local sink = table.copy(cmn_def)
sink.description = def.components.sink.description
sink.mesh = def.components.sink.mesh
sink.bounding_boxes = def.components.sink.bounding_boxes
sink.callbacks = {
on_rightclick = function(pos, node, clicker)
local meta = minetest.get_meta(pos)
if meta:contains("water_stream_id") then
minetest.delete_particlespawner(tonumber(meta:get_string("water_stream_id")))
meta:set_string("water_stream_id", "")
local sound_handle = minetest.deserialize(meta:get_string("sound_handle"))
minetest.sound_stop(sound_handle)
else
local id = minetest.add_particlespawner({
amount = 10,
time = 0,
collisiondetection = true,
object_collision = true,
texture = "multidecor_water_drop.png",
minpos = vector.add(def.components.sink.tap_pos, {x=-0.1, y=0, z=-0.1}),
maxpos = vector.add(def.components.sink.tap_pos, {x=0.1, y=0, z=0.1}),
minvel = {x=0, y=1, z=0},
maxvel = {x=0, y=1, z=0},
minsize = 0.2,
maxsize = 0.8
})
meta:set_string("water_stream_id", tonumber(id))
local sound_handle = minetest.sound_play("multidecor_tap", {max_hear_distance=12, loop=true})
meta:set_string("sound_handle", minetest.serialize(sound_handle))
end
end
}
sink.add_properties = {
shelves_data = {
{
type = "door",
object = objects[3],
pos = def.components.sink.shelves_data.pos,
inventory = def.components.sink.shelves_data.inventory,
inv_size = def.components.sink.shelves_data.inv_size,
sounds = door_sounds
}
}
}
multidecor.register.register_furniture_unit("kitchen_sink", sink)
for obj_name, props in pairs(def.move_parts) do
minetest.register_entity(("%s:%s_%s_%s"):format(def.modname, def.style, def.type, obj_name), {
visual = "mesh",
visual_size = {x=5, y=5, z=5},
mesh = props.mesh,
textures = def.tiles,
physical = false,
selection_box = props.box,
on_activate = multidecor.shelves.default_on_activate,
on_rightclick = multidecor.shelves.default_on_rightclick,
on_step = def.type == "drawer" and multidecor.shelves.default_drawer_on_step or multidecor.shelves.default_door_on_step,
get_staticdata = multidecor.shelves.default_get_staticdata
})
end
end

View File

@ -26,12 +26,15 @@ multidecor.shelves = {}
local open_shelves = {}
-- Rotates the shelf 'obj' around 'pos' position of the node
function multidecor.shelves.rotate_shelf(pos, obj, is_drawer, move_dist)
function multidecor.shelves.rotate_shelf(pos, obj, is_drawer, move_dist, orig_angle)
orig_angle = orig_angle or 0
local dir = multidecor.helpers.get_dir(pos)
--doors.rotate(obj, dir, pos)
local new_pos, rot = multidecor.doors.rotate(obj:get_pos(), dir, pos)
obj:set_pos(new_pos)
obj:set_rotation(rot)
obj:set_rotation(rot+orig_angle)
dir = vector.rotate_around_axis(dir, vector.new(0, 1, 0), orig_angle)
local self = obj:get_luaentity()
if is_drawer then
@ -150,7 +153,7 @@ function multidecor.shelves.set_shelves(pos)
elseif shelf_data.type == "sym_doors" then
move_dist = -math.pi/2
end
multidecor.shelves.rotate_shelf(pos, obj, shelf_data.type == "drawer", move_dist)
multidecor.shelves.rotate_shelf(pos, obj, shelf_data.type == "drawer", move_dist, shelf_data.orig_angle)
if shelf_data.type == "sym_doors" then
local obj2 = minetest.add_entity(vector.add(pos, shelf_data.pos2), shelf_data.object, minetest.serialize({fs, {name=node.name, pos=pos}, 0, i}))
@ -159,7 +162,7 @@ function multidecor.shelves.set_shelves(pos)
obj2:set_properties({visual_size={x=vis_size.x*-1, y=vis_size.y, z=vis_size.z}})
obj2:get_luaentity().is_flip_x_scale = true
multidecor.shelves.rotate_shelf(pos, obj2, false, math.pi/2)
multidecor.shelves.rotate_shelf(pos, obj2, false, math.pi/2, shelf_data.orig_angle)
end
end
end

View File

@ -4,6 +4,7 @@ dofile(modpath .. "/bedroom.lua")
dofile(modpath .. "/chairs.lua")
dofile(modpath .. "/doors.lua")
dofile(modpath .. "/fences.lua")
dofile(modpath .. "/kitchen.lua")
dofile(modpath .. "/lamps.lua")
dofile(modpath .. "/living_room.lua")
dofile(modpath .. "/paintings.lua")

195
modern/kitchen.lua Normal file
View File

@ -0,0 +1,195 @@
local cab_bboxes = {
{-0.5, -0.5, -0.45, 0.5, 0.45, 0.5},
{-0.5, 0.45, -0.5, 0.5, 0.5, 0.5}
}
local wall_cab_bbox = {{-0.5, -0.5, -0.45, 0.5, 0.5, 0.5}}
multidecor.register.register_garniture({
type = "kitchen",
style = "modern",
material = "wood",
tiles = {
"multidecor_wood.png",
"multidecor_granite_material.png",
"multidecor_metal_material.png",
"multidecor_sink_leakage.png",
"multidecor_plastic_bucket.png"
},
groups = {choppy=1.5},
modname = "modern",
components = {
["two_floor_drws"] = {
description = "Kitchen Two Shelves Cabinet With Drawers",
mesh = "multidecor_kitchen_cabinet_two_shelves.b3d",
bounding_boxes = cab_bboxes,
shelves_data = {
pos_lower = {x=0, y=-0.25, z=0},
pos_upper = {x=0, y=0.25, z=0},
inv_size = {w=8, h=2}
}
},
["three_floor_drws"] = {
description = "Kitchen Three Shelves Cabinet With Drawers",
mesh = "multidecor_kitchen_cabinet_three_shelves.b3d",
bounding_boxes = cab_bboxes,
shelves_data = {
pos_lower = {x=0, y=-0.3, z=0},
pos_middle = {x=0, y=0, z=0},
pos_upper = {x=0, y=0.3, z=0},
inv_size = {w=8, h=1}
}
},
["two_floor_doors"] = {
description = "Kitchen Two Shelves Cabinet With Doors",
mesh = "multidecor_kitchen_cabinet_two_shelves.b3d",
bounding_boxes = cab_bboxes,
shelves_data = {
pos_left = {x=-0.5, y=0, z=0.45},
pos_upper = {x=0.5, y=0, z=0.45},
inv_size = {w=8, h=3}
}
},
["three_floor_doors"] = {
description = "Kitchen Three Shelves Cabinet With Doors",
mesh = "multidecor_kitchen_cabinet_three_shelves.b3d",
bounding_boxes = cab_bboxes,
shelves_data = {
pos_left = {x=-0.5, y=0, z=0.45},
pos_upper = {x=0.5, y=0, z=0.45},
inv_size = {w=8, h=3}
}
},
["three_floor_drw_door"] = {
description = "Kitchen Three Shelves Cabinet With Drawer And Door",
mesh = "multidecor_kitchen_cabinet_three_shelves.b3d",
bounding_boxes = cab_bboxes,
shelves_data = {
pos_upper = {x=0, y=0.3, z=0},
pos_left = {x=-0.5, y=0, z=0.45},
pos_upper = {x=0.5, y=0, z=0.45},
inv_size = {w=8, h=2}
}
},
["two_wall_door"] = {
description = "Kitchen Two Shelves Wall Cabinet With Door",
mesh = "multidecor_kitchen_wall_cabinet_two_shelves.b3d",
bounding_boxes = wall_cab_bbox,
shelves_data = {
pos = {x=-0.5, y=0, z=0.45},
inv_size = {w=8, h=3}
}
},
["two_wall_hdoor"] = {
description = "Kitchen Two Shelves Wall Cabinet With Half Doors",
mesh = "multidecor_kitchen_wall_cabinet_two_shelves.b3d",
bounding_boxes = wall_cab_bbox,
shelves_data = {
pos_left = {x=-0.5, y=0, z=0.45},
pos_right = {x=0.5, y=0, z=0.45},
inv_size = {w=8, h=3}
}
},
["two_wall_hgldoor"] = {
description = "Kitchen Two Shelves Wall Cabinet With Half Glass Doors",
mesh = "multidecor_kitchen_wall_cabinet_two_shelves.b3d",
bounding_boxes = wall_cab_bbox,
shelves_data = {
pos_left = {x=-0.5, y=0, z=0.45},
pos_right = {x=0.5, y=0, z=0.45},
inv_size = {w=8, h=3}
}
},
["two_wall_crn_hgldoor"] = {
description = "Kitchen Two Shelves Wall Corner Cabinet With Half Glass Doors",
mesh = "multidecor_kitchen_wall_corner_cabinet_two_shelves.b3d",
bounding_boxes = wall_cab_bbox,
shelves_data = {
pos_left = {x=0.8, y=0, z=1.2},
pos_right = {x=1.2, y=0, z=0.8},
inv_size = {w=8, h=4}
}
},
["sink"] = {
description = "Kitchen Sink",
mesh = "multidecor_kitchen_sink_cabinet.b3d",
bounding_boxes = cab_bboxes,
tap_pos = {x=0, y=0.7, z=-0.1},
shelves_data = {
pos_trash = {x=-0.5, y=0, z=0.45},
inv_size = {w=1, h=1}
}
},
},
move_parts = {
["floor_door"] = "multidecor_kitchen_cabinet_door.b3d",
["floor_half_door"] = "multidecor_kitchen_cabinet_half_door.b3d",
["wall_door"] = "multidecor_kitchen_wall_cabinet_door.b3d",
["wall_half_door"] = "multidecor_kitchen_wall_cabinet_half_door.b3d",
["wall_half_glass_door"] = "multidecor_kitchen_wall_cabinet_half_glass_door.b3d",
["large_drawer"] = "multidecor_kitchen_cabinet_two_shelves_drawer.b3d",
["small_drawer"] = "multidecor_kitchen_cabinet_three_shelves_drawer"
}
})
multidecor.register.register_furniture_unit("ceiling_fan", {
type = "decoration",
style = "modern",
material = "plastic",
description = "Ceiling Fan",
mesh = "multidecor_ceiling_fan.b3d",
visual_scale = 0.5,
tiles = {"multidecor_ceiling_fan.png"},
bounding_boxes = {{-0.4, 0, -0.4, 0.4, 0.5, 0.4}}
})
multidecor.register.register_furniture_unit("kitchen_cooker", {
type = "decoration",
style = "modern",
material = "steel",
description = "Kitchen Cooker",
mesh = "multidecor_kitchen_cooker.b3d",
visual_scale = 0.5,
tiles = {
"multidecor_metal_material.png",
"multidecor_metal_material3.png",
"multidecor_kitchen_cooker_black_metal.png",
"multidecor_kitchen_cooker_grid.png"
}
})
multidecor.register.register_furniture_unit("kitchen_hood", {
type = "decoration",
style = "modern",
material = "steel",
description = "Kitchen Hood",
mesh = "multidecor_kitchen_hood.b3d",
visual_scale = 0.5,
tiles = {
"multidecor_kitchen_hood_body.png",
"multidecor_kitchen_hood_net.png"
},
bounding_boxes = {
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
{-0.3, 0, -0.3, 0.3, 0.5, 0.3}
}
})
multidecor.register.register_furniture_unit("kitchen_fridge", {
type = "decoration",
style = "modern",
material = "steel",
description = "Kitchen Fridge",
mesh = "multidecor_fridge.b3d",
visual_scale = 0.5,
tiles = {
"multidecor_fridge_base.png",
"multidecor_fridge_interior.png",
"multidecor_plastic_material.png"
},
bounding_boxes = {
{-0.5, -0.5, -0.5, 0.5, 1.5, 0.5}
}
})

View File

@ -224,3 +224,47 @@ multidecor.register.register_light("brass_candlestick", {
{"", "", ""}
}
})
multidecor.register.register_light("ceiling_round_lamp", {
style = "modern",
material = "glass",
description = "Ceiling Round Lamp",
visual_scale = 0.5,
light_source = 8,
mesh = "multidecor_ceiling_round_lamp.b3d",
tiles = {"multidecor_ceiling_round_lamp.png"},
bounding_boxes = {{-0.375, 0.4, -0.375, 0.375, 0.5, 0.375}}
})
multidecor.register.register_light("ceiling_wooden_lamp", {
style = "modern",
material = "glass",
description = "Ceiling Wooden Lamp",
visual_scale = 0.5,
light_source = 8,
mesh = "multidecor_ceiling_wooden_lamp.b3d",
tiles = {
"multidecor_jungle_wood.png",
"multidecor_ceiling_lamp_bottom.png"
},
bounding_boxes = {{-0.375, 0.4, -0.375, 0.375, 0.5, 0.375}}
})
multidecor.register.register_light("kitchen_chandelier", {
style = "modern",
material = "wood",
description = "Kitchen Chandelier",
visual_scale = 0.5,
light_source = 12,
mesh = "multidecor_kitchen_chandelier.b3d",
tiles = {
"multidecor_metal_material.png",
"multidecor_polished_jungle_wood.png",
"multidecor_plastic_material.png",
"multidecor_bulb_surf.png"
},
bounding_boxes = {
{-0.4, -0.5, -0.4, 0.4, 0, 0.4},
{-0.15, 0, -0.15, 0.15, 0.5, 0.15}
}
})

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -151,3 +151,13 @@ for _, wood_n in ipairs({"", "jungle", "pine", "aspen"}) do
recipe = {"multidecor:modern_wooden_" .. wood_n .. "wall_shelf", "multidecor:books_stack"}
})
end
multidecor.register.register_table("three_level_wooden_rack", {
style = "modern",
material = "wood",
visual_scale = 0.5,
description = "Three Level Wooden Rack",
mesh = "multidecor_three_level_wooden_rack.b3d",
tiles = {"multidecor_wood.png"}
})

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 579 B