Fixed connecting of corner sofas, increased the inv size of the cupboard
parent
51f9b20c20
commit
dad6f0e1e1
|
@ -107,9 +107,9 @@ function connecting.directional_replace_node_to(pos, dir, side, disconnect)
|
|||
minetest.debug("dir_rot: " .. dir_rot)
|
||||
minetest.debug("dir_rot2: " .. dir_rot2)
|
||||
local is_left_corner = add_props.connect_parts.left_side == def.mesh and side == "right" and
|
||||
dir_rot-math.pi/2 == dir_rot2
|
||||
dir_rot-90 == dir_rot2
|
||||
local is_right_corner = add_props.connect_parts.right_side == def.mesh and side == "left" and
|
||||
dir_rot+math.pi/2 == dir_rot2
|
||||
dir_rot+90 == dir_rot2
|
||||
if is_left_corner then
|
||||
--minetest.debug("left corner")
|
||||
right_dir = dir
|
||||
|
@ -137,12 +137,12 @@ function connecting.directional_replace_node_to(pos, dir, side, disconnect)
|
|||
end
|
||||
|
||||
if connecting.are_nodes_identical(right_pos, pos) then
|
||||
if target_node == "" then
|
||||
if is_right_corner then
|
||||
target_node = "corner"
|
||||
elseif target_node == "" then
|
||||
target_node = "left_side"
|
||||
elseif target_node == "right_side" then
|
||||
target_node = "middle"
|
||||
elseif is_right_corner then
|
||||
target_node = "corner"
|
||||
end
|
||||
end
|
||||
minetest.debug("target_node: " .. target_node)
|
||||
|
|
|
@ -141,10 +141,20 @@ function shelves.set_shelves(pos)
|
|||
for i, shelf_data in ipairs(def.add_properties.shelves_data) do
|
||||
local inv_name = shelves.build_name_from_tmp(node.name, "inv", i)
|
||||
local list_name = shelves.build_name_from_tmp(node.name, "list", i)
|
||||
local fs = "formspec_version[5]size[11," .. shelf_data.inv_size.h+7 .. "]" ..
|
||||
"list[detached:" .. inv_name .. ";" .. list_name .. ";0.5,1;" ..
|
||||
shelf_data.inv_size.w .. "," .. shelf_data.inv_size.h .. ";]" ..
|
||||
"list[current_player;main;0.5," .. shelf_data.inv_size.h+2 .. ";8,4;]"
|
||||
|
||||
local padding = 0.25
|
||||
local fs_size = {
|
||||
w = shelf_data.inv_size.w+1+(shelf_data.inv_size.w-1)*padding,
|
||||
h = shelf_data.inv_size.h+5.5+(shelf_data.inv_size.h-1)*padding+3*padding
|
||||
}
|
||||
local player_list_y = shelf_data.inv_size.h+1+(shelf_data.inv_size.h-1)*padding
|
||||
|
||||
local fs = ("formspec_version[4]size[%f,%f]" ..
|
||||
"list[detached:%s;%s;0.5,0.5;%f,%f;]" ..
|
||||
"list[current_player;main;0.5,%f;8,4;]"):format(
|
||||
fs_size.w, fs_size.h,
|
||||
inv_name, list_name,
|
||||
shelf_data.inv_size.w, shelf_data.inv_size.h, player_list_y)
|
||||
local obj = minetest.add_entity(vector.add(pos, shelf_data.pos), shelf_data.object, minetest.serialize({fs, {name=node.name, pos=pos}, 0, i}))
|
||||
|
||||
local move_dist
|
||||
|
|
|
@ -28,7 +28,7 @@ local silver_chain_on_construct = function(pos)
|
|||
local up_node = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z})
|
||||
local up_def = minetest.registered_nodes[up_node.name]
|
||||
|
||||
if up_node.name ~= "multidecor:silver_chain_tip" and
|
||||
if up_node.name ~= "multidecor:silver_chain_tip" and up_node.name ~= "multidecor:silver_chain" and
|
||||
not (up_def.drawtype == "airlike" or up_def.drawtype == "liquid" or
|
||||
up_def.drawtype == "flowingliquid") then
|
||||
minetest.set_node(pos, {name="multidecor:silver_chain_tip"})
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -22,14 +22,14 @@ register.register_table("modern_cupboard_with_glass_doors", {
|
|||
pos = {x=0.5, y=1.6625, z=0.25},
|
||||
pos2 = {x=-0.5, y=1.6625, z=0.25},
|
||||
object = "modern:wardrobe_wooden_glass_door",
|
||||
inv_size = {w=6,h=3}
|
||||
inv_size = {w=8,h=6}
|
||||
},
|
||||
{
|
||||
type = "sym_doors",
|
||||
pos = {x=0.5, y=0.2375, z=0.25},
|
||||
pos2 = {x=-0.5, y=0.2375, z=0.25},
|
||||
object = "modern:wardrobe_wooden_door",
|
||||
inv_size = {w=6,h=3}
|
||||
inv_size = {w=8,h=6}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue