Fixed and improved opening/closing doors. Fixed bounding boxes of corner dark rusty fence
parent
18f8757e26
commit
d8740e1773
|
@ -29,7 +29,6 @@ function helpers.upper_first_letters(s)
|
||||||
local new_s = ""
|
local new_s = ""
|
||||||
|
|
||||||
for substr in s:gmatch("%a+") do
|
for substr in s:gmatch("%a+") do
|
||||||
--minetest.debug("substr: " .. substr)
|
|
||||||
new_s = new_s .. substr:sub(1, 1):upper() .. substr:sub(2) .. " "
|
new_s = new_s .. substr:sub(1, 1):upper() .. substr:sub(2) .. " "
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -7,9 +7,6 @@ function connecting.are_nodes_identical(pos1, pos2)
|
||||||
local add_props1 = minetest.registered_nodes[minetest.get_node(pos1).name].add_properties
|
local add_props1 = minetest.registered_nodes[minetest.get_node(pos1).name].add_properties
|
||||||
local add_props2 = minetest.registered_nodes[minetest.get_node(pos2).name].add_properties
|
local add_props2 = minetest.registered_nodes[minetest.get_node(pos2).name].add_properties
|
||||||
|
|
||||||
minetest.debug("cmn1: " .. dump(add_props1 and add_props1.common_name or nil))
|
|
||||||
minetest.debug("cmn2: " .. dump(add_props2 and add_props2.common_name or nil))
|
|
||||||
|
|
||||||
return add_props1 and add_props2 and add_props1.common_name == add_props2.common_name
|
return add_props1 and add_props2 and add_props1.common_name == add_props2.common_name
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -45,19 +42,16 @@ function connecting.replace_node_to(pos, disconnect, cmn_name)
|
||||||
local rel_rot = 0
|
local rel_rot = 0
|
||||||
|
|
||||||
if connecting.are_nodes_identical(ord_shifts[1], pos) then
|
if connecting.are_nodes_identical(ord_shifts[1], pos) then
|
||||||
minetest.debug("identical")
|
|
||||||
target_node = "edge"
|
target_node = "edge"
|
||||||
rel_rot = 180
|
rel_rot = 180
|
||||||
end
|
end
|
||||||
|
|
||||||
if connecting.are_nodes_identical(ord_shifts[2], pos) then
|
if connecting.are_nodes_identical(ord_shifts[2], pos) then
|
||||||
minetest.debug("identical")
|
|
||||||
target_node = target_node == "edge" and "corner" or "edge"
|
target_node = target_node == "edge" and "corner" or "edge"
|
||||||
rel_rot = 90
|
rel_rot = 90
|
||||||
end
|
end
|
||||||
|
|
||||||
if connecting.are_nodes_identical(ord_shifts[3], pos) then
|
if connecting.are_nodes_identical(ord_shifts[3], pos) then
|
||||||
minetest.debug("identical")
|
|
||||||
if target_node == "corner" then
|
if target_node == "corner" then
|
||||||
target_node = "edge_middle"
|
target_node = "edge_middle"
|
||||||
elseif target_node == "edge" then
|
elseif target_node == "edge" then
|
||||||
|
@ -69,7 +63,6 @@ function connecting.replace_node_to(pos, disconnect, cmn_name)
|
||||||
end
|
end
|
||||||
|
|
||||||
if connecting.are_nodes_identical(ord_shifts[4], pos) then
|
if connecting.are_nodes_identical(ord_shifts[4], pos) then
|
||||||
minetest.debug("identical")
|
|
||||||
if target_node == "edge_middle" then
|
if target_node == "edge_middle" then
|
||||||
target_node = "off_edge"
|
target_node = "off_edge"
|
||||||
rel_rot = 0
|
rel_rot = 0
|
||||||
|
@ -87,7 +80,7 @@ function connecting.replace_node_to(pos, disconnect, cmn_name)
|
||||||
rel_rot = -90
|
rel_rot = -90
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
--minetest.debug("target_node: " .. target_node)
|
|
||||||
target_node = target_node ~= "" and "_" .. target_node or ""
|
target_node = target_node ~= "" and "_" .. target_node or ""
|
||||||
|
|
||||||
if not disconnect and target_node == "" then
|
if not disconnect and target_node == "" then
|
||||||
|
@ -173,7 +166,7 @@ function connecting.directional_replace_node_to(pos, dir, side, disconnect, cmn_
|
||||||
target_node = "middle"
|
target_node = "middle"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
--minetest.debug("target_node: " .. target_node)
|
|
||||||
target_node = target_node ~= "" and "_" .. target_node or ""
|
target_node = target_node ~= "" and "_" .. target_node or ""
|
||||||
|
|
||||||
if not disconnect and target_node == "" then
|
if not disconnect and target_node == "" then
|
||||||
|
@ -188,7 +181,7 @@ end
|
||||||
-- *type* can be "horizontal", "vertical", "pair", "sofa"
|
-- *type* can be "horizontal", "vertical", "pair", "sofa"
|
||||||
function connecting.update_adjacent_nodes_connection(pos, type, disconnect, old_node)
|
function connecting.update_adjacent_nodes_connection(pos, type, disconnect, old_node)
|
||||||
local node = minetest.get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
--minetest.debug("update_adjacent_nodes_connection()")
|
|
||||||
if not disconnect then
|
if not disconnect then
|
||||||
local add_props = minetest.registered_nodes[node.name].add_properties
|
local add_props = minetest.registered_nodes[node.name].add_properties
|
||||||
local modname = node.name:find("multidecor:")
|
local modname = node.name:find("multidecor:")
|
||||||
|
@ -279,6 +272,9 @@ function connecting.register_connect_parts(def)
|
||||||
c_def.groups = {not_in_creative_inventory=1}
|
c_def.groups = {not_in_creative_inventory=1}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if name == "corner" and def.add_properties.corner_bounding_boxes then
|
||||||
|
c_def.bounding_boxes = def.add_properties.corner_bounding_boxes
|
||||||
|
end
|
||||||
c_def.callbacks.on_construct = nil
|
c_def.callbacks.on_construct = nil
|
||||||
|
|
||||||
register.register_furniture_unit(def.add_properties.common_name .. "_" .. name, c_def)
|
register.register_furniture_unit(def.add_properties.common_name .. "_" .. name, c_def)
|
||||||
|
|
|
@ -2,58 +2,44 @@ multidecor.doors = {}
|
||||||
|
|
||||||
doors = multidecor.doors
|
doors = multidecor.doors
|
||||||
|
|
||||||
-- Rotates an entity corresponding to the 'dir'
|
-- Returns new position rotated around 'rotate_p' and rotation correponding to "dir"
|
||||||
function doors.rotate(obj, dir, rotate_p)
|
function doors.rotate(pos, dir, rotate_p)
|
||||||
if not obj:get_luaentity() then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
local y_rot = vector.dir_to_rotation(dir).y
|
local y_rot = vector.dir_to_rotation(dir).y
|
||||||
|
local rel_pos = pos - rotate_p
|
||||||
|
|
||||||
local p = vector.copy(rotate_p)
|
|
||||||
local rel_pos = obj:get_pos() - p
|
|
||||||
|
|
||||||
local y_rel_pos_r = vector.dir_to_rotation(rel_pos).y
|
|
||||||
rel_pos = vector.rotate_around_axis(rel_pos, {x=0, y=1, z=0}, y_rot)
|
rel_pos = vector.rotate_around_axis(rel_pos, {x=0, y=1, z=0}, y_rot)
|
||||||
|
|
||||||
obj:set_pos(rotate_p + rel_pos)
|
return rotate_p + rel_pos, {x=0, y=y_rot, z=0}
|
||||||
|
|
||||||
local obj_rot = obj:get_rotation()
|
|
||||||
obj:set_rotation({x=obj_rot.x, y=y_rot, z=obj_rot.z})
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Rotates obj's collision/selection boxes corresponding to the 'dir'
|
-- Returns rotated collisionbox and selectionbox corresponding to "dir"
|
||||||
function doors.rotate_bbox(obj, dir, rotate_cbox)
|
function doors.rotate_bbox(sbox, cbox, dir)
|
||||||
if not obj:get_luaentity() then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local y_rot = vector.dir_to_rotation(dir).y
|
local y_rot = vector.dir_to_rotation(dir).y
|
||||||
|
|
||||||
local sel_box = minetest.registered_entities[obj:get_luaentity().name].selectionbox
|
|
||||||
local box = {
|
local box = {
|
||||||
min = {x=sel_box[1], y=sel_box[2], z=sel_box[3]},
|
min = {x=sbox[1], y=sbox[2], z=sbox[3]},
|
||||||
max = {x=sel_box[4], y=sel_box[5], z=sel_box[6]}
|
max = {x=sbox[4], y=sbox[5], z=sbox[6]}
|
||||||
}
|
}
|
||||||
|
|
||||||
box.min = vector.rotate_around_axis(box.min, {x=0, y=1, z=0}, y_rot)
|
box.min = vector.rotate_around_axis(box.min, {x=0, y=1, z=0}, y_rot)
|
||||||
box.max = vector.rotate_around_axis(box.max, {x=0, y=1, z=0}, y_rot)
|
box.max = vector.rotate_around_axis(box.max, {x=0, y=1, z=0}, y_rot)
|
||||||
|
|
||||||
local sbox = {box.min.x, box.min.y, box.min.z, box.max.x, box.max.y, box.max.z}
|
local new_sbox = {box.min.x, box.min.y, box.min.z, box.max.x, box.max.y, box.max.z}
|
||||||
obj:set_properties({selectionbox=sbox})
|
local new_cbox
|
||||||
obj:get_luaentity().bbox = sbox
|
|
||||||
|
|
||||||
if rotate_cbox then
|
if cbox then
|
||||||
local col_box = minetest.registered_entities[obj:get_luaentity().name].collisionbox
|
box = {
|
||||||
local cbox = {
|
min = {x=cbox[1], y=cbox[2], z=cbox[3]},
|
||||||
min = {x=col_box[1], y=col_box[2], z=col_box[3]},
|
max = {x=cbox[4], y=cbox[5], z=cbox[6]}
|
||||||
max = {x=col_box[4], y=col_box[5], z=col_box[6]}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cbox.min = vector.rotate_around_axis(cbox.min, {x=0, y=1, z=0}, y_rot)
|
box.min = vector.rotate_around_axis(box.min, {x=0, y=1, z=0}, y_rot)
|
||||||
cbox.max = vector.rotate_around_axis(cbox.max, {x=0, y=1, z=0}, y_rot)
|
box.max = vector.rotate_around_axis(box.max, {x=0, y=1, z=0}, y_rot)
|
||||||
|
|
||||||
obj:set_properties({collisionbox={cbox.min.x, cbox.min.y, cbox.min.z, cbox.max.x, cbox.max.y, cbox.max.z}})
|
new_cbox = {box.min.x, box.min.y, box.min.z, box.max.x, box.max.y, box.max.z}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
return new_sbox, new_cbox
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Activates obj rotation from 'self.start_v' to 'self.end_v' or vice versa depending on 'dir_sign' value
|
-- Activates obj rotation from 'self.start_v' to 'self.end_v' or vice versa depending on 'dir_sign' value
|
||||||
|
@ -79,7 +65,6 @@ function doors.smooth_rotate_step(self, dtime, vel, acc)
|
||||||
rot.y = helpers.clamp(self.start_v, self.end_v, rot.y)
|
rot.y = helpers.clamp(self.start_v, self.end_v, rot.y)
|
||||||
|
|
||||||
if math.abs(target_rot-rot.y) <= math.rad(10) then
|
if math.abs(target_rot-rot.y) <= math.rad(10) then
|
||||||
minetest.debug("the door is rotated!")
|
|
||||||
self.dir = 0
|
self.dir = 0
|
||||||
self.step_c = nil
|
self.step_c = nil
|
||||||
self.object:set_rotation({x=rot.x, y=target_rot, z=rot.z})
|
self.object:set_rotation({x=rot.x, y=target_rot, z=rot.z})
|
||||||
|
@ -89,7 +74,7 @@ function doors.smooth_rotate_step(self, dtime, vel, acc)
|
||||||
self.step_c = self.step_c and self.step_c+acc or 1
|
self.step_c = self.step_c and self.step_c+acc or 1
|
||||||
-- Rotation speed is 60 degrees/sec
|
-- Rotation speed is 60 degrees/sec
|
||||||
local sign = self.start_v > self.end_v and -1 or 1
|
local sign = self.start_v > self.end_v and -1 or 1
|
||||||
local new_rot = self.dir*sign*math.rad(vel)*dtime*0.5*self.step_c
|
local new_rot = self.dir*sign*math.rad(vel)*dtime*self.step_c
|
||||||
|
|
||||||
self.object:set_rotation({x=rot.x, y=rot.y+new_rot, z=rot.z})
|
self.object:set_rotation({x=rot.x, y=rot.y+new_rot, z=rot.z})
|
||||||
end
|
end
|
||||||
|
@ -104,28 +89,36 @@ function doors.convert_to_entity(pos)
|
||||||
|
|
||||||
local obj_name = is_open and node.name:gsub("_open", "") or node.name
|
local obj_name = is_open and node.name:gsub("_open", "") or node.name
|
||||||
|
|
||||||
local shift = {x=pos.x+0.495, y=pos.y, z=pos.z+0.45}
|
|
||||||
local obj = minetest.add_entity(shift, obj_name)
|
|
||||||
|
|
||||||
if is_open then
|
if is_open then
|
||||||
dir = vector.rotate_around_axis(dir, {x=0, y=1, z=0}, -math.pi/2)
|
dir = vector.rotate_around_axis(dir, {x=0, y=1, z=0}, -math.pi/2)
|
||||||
end
|
end
|
||||||
|
|
||||||
doors.rotate(obj, dir, pos)
|
local shift = {x=pos.x+0.495, y=pos.y, z=pos.z+0.45}
|
||||||
doors.rotate_bbox(obj, dir, true)
|
local new_pos, rot = doors.rotate(shift, dir, pos)
|
||||||
|
|
||||||
|
local def = minetest.registered_entities[obj_name]
|
||||||
|
local sbox, cbox = doors.rotate_bbox(def.selectionbox, def.collisionbox, dir)
|
||||||
|
|
||||||
local y_rot = vector.dir_to_rotation(dir).y
|
local y_rot = vector.dir_to_rotation(dir).y
|
||||||
|
local start_r, end_r = y_rot, y_rot+math.pi/2
|
||||||
local self = obj:get_luaentity()
|
|
||||||
self.start_v = y_rot
|
|
||||||
self.end_v = y_rot+math.pi/2
|
|
||||||
|
|
||||||
if is_open then
|
if is_open then
|
||||||
dir = vector.rotate_around_axis(dir, {x=0, y=1, z=0}, math.pi/2)
|
dir = vector.rotate_around_axis(dir, {x=0, y=1, z=0}, math.pi/2)
|
||||||
doors.rotate(obj, dir, shift)
|
local new_pos2, rot2 = doors.rotate(new_pos, dir, shift)
|
||||||
doors.rotate_bbox(obj, dir, true)
|
rot = rot2
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local obj = minetest.add_entity(new_pos, obj_name)
|
||||||
|
obj:set_rotation(rot)
|
||||||
|
obj:set_properties({
|
||||||
|
collisionbox = cbox,
|
||||||
|
selectionbox = sbox
|
||||||
|
})
|
||||||
|
|
||||||
|
local self = obj:get_luaentity()
|
||||||
|
self.start_v = start_r
|
||||||
|
self.end_v = end_r
|
||||||
|
|
||||||
return obj
|
return obj
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -161,7 +154,16 @@ local function default_door_on_rightclick(pos)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function default_entity_door_on_rightclick(self)
|
local function default_entity_door_on_rightclick(self)
|
||||||
self.dir = self.dir * -1
|
local dir_sign = 0
|
||||||
|
if self.action == "open" then
|
||||||
|
dir_sign = -1
|
||||||
|
self.action = "close"
|
||||||
|
else
|
||||||
|
dir_sign = 1
|
||||||
|
self.action = "open"
|
||||||
|
end
|
||||||
|
|
||||||
|
doors.smooth_rotate(self.object, dir_sign)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function default_entity_door_on_activate(self, staticdata)
|
local function default_entity_door_on_activate(self, staticdata)
|
||||||
|
@ -234,13 +236,21 @@ function register.register_door(name, base_def, add_def, craft_def)
|
||||||
|
|
||||||
register.register_furniture_unit(name .. "_open", c_def2)
|
register.register_furniture_unit(name .. "_open", c_def2)
|
||||||
|
|
||||||
|
local bbox = table.copy(base_def.bounding_boxes[1])
|
||||||
|
local z_center = (bbox[3]+bbox[6])/2
|
||||||
|
bbox[3] = bbox[3] - z_center
|
||||||
|
bbox[6] = bbox[6] - z_center
|
||||||
|
|
||||||
|
bbox[1] = bbox[1] - 0.5
|
||||||
|
bbox[4] = bbox[4] - 0.5
|
||||||
minetest.register_entity(":multidecor:" .. name, {
|
minetest.register_entity(":multidecor:" .. name, {
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
visual_size = {x=5, y=5, z=5},
|
visual_size = {x=5, y=5, z=5},
|
||||||
textures = base_def.tiles,
|
textures = base_def.tiles,
|
||||||
mesh = c_def2.add_properties.door.mesh_activated,
|
mesh = c_def2.add_properties.door.mesh_activated,
|
||||||
collisionbox = base_def.bounding_boxes[1],
|
physical = true,
|
||||||
selectionbox = base_def.bounding_boxes[1],
|
collisionbox = bbox,
|
||||||
|
selectionbox = bbox,
|
||||||
use_texture_alpha = base_def.use_texture_alpha == "blend",
|
use_texture_alpha = base_def.use_texture_alpha == "blend",
|
||||||
backface_culling = false,
|
backface_culling = false,
|
||||||
static_save = true,
|
static_save = true,
|
||||||
|
|
|
@ -33,7 +33,10 @@ end
|
||||||
-- Rotates the shelf 'obj' around 'pos' position of the node
|
-- Rotates the shelf 'obj' around 'pos' position of the node
|
||||||
function shelves.rotate_shelf(pos, obj, is_drawer, move_dist)
|
function shelves.rotate_shelf(pos, obj, is_drawer, move_dist)
|
||||||
local dir = helpers.get_dir(pos)
|
local dir = helpers.get_dir(pos)
|
||||||
doors.rotate(obj, dir, pos)
|
--doors.rotate(obj, dir, pos)
|
||||||
|
local new_pos, rot = doors.rotate(obj:get_pos(), dir, pos)
|
||||||
|
obj:set_pos(new_pos)
|
||||||
|
obj:set_rotation(rot)
|
||||||
|
|
||||||
local self = obj:get_luaentity()
|
local self = obj:get_luaentity()
|
||||||
if is_drawer then
|
if is_drawer then
|
||||||
|
@ -59,7 +62,12 @@ function shelves.rotate_shelf_bbox(obj)
|
||||||
vector.round(vector.subtract(obj:get_pos(), self.connected_to.pos)) == vector.round(shelf.pos2) or self.is_flip_x_scale then
|
vector.round(vector.subtract(obj:get_pos(), self.connected_to.pos)) == vector.round(shelf.pos2) or self.is_flip_x_scale then
|
||||||
dir = vector.rotate_around_axis(dir, {x=0, y=1, z=0}, math.pi)
|
dir = vector.rotate_around_axis(dir, {x=0, y=1, z=0}, math.pi)
|
||||||
end
|
end
|
||||||
doors.rotate_bbox(obj, dir, false)
|
local def = minetest.registered_entities[self.name]
|
||||||
|
local sbox, cbox = doors.rotate_bbox(def.selectionbox, nil, dir)
|
||||||
|
obj:set_properties({
|
||||||
|
collisionbox = cbox,
|
||||||
|
selectionbox = sbox
|
||||||
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Animates opening or closing the shelf 'obj'. The action directly depends on 'dir_sign' value ('1' is open, '-1' is close)
|
-- Animates opening or closing the shelf 'obj'. The action directly depends on 'dir_sign' value ('1' is open, '-1' is close)
|
||||||
|
|
|
@ -16,7 +16,7 @@ register.register_door("high_dark_rusty_gate", {
|
||||||
door = {
|
door = {
|
||||||
mesh_open = "multidecor_high_dark_rusty_gate_open.b3d",
|
mesh_open = "multidecor_high_dark_rusty_gate_open.b3d",
|
||||||
mesh_activated = "multidecor_high_dark_rusty_gate_activated.b3d",
|
mesh_activated = "multidecor_high_dark_rusty_gate_activated.b3d",
|
||||||
vel = 90 -- degrees per sec
|
vel = 100 -- degrees per sec
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,6 +20,10 @@ register.register_hedge("dark_rusty_fence", {
|
||||||
["right_side"] = "multidecor_dark_rusty_fence_1.b3d",
|
["right_side"] = "multidecor_dark_rusty_fence_1.b3d",
|
||||||
["middle"] = "multidecor_dark_rusty_fence_3.b3d",
|
["middle"] = "multidecor_dark_rusty_fence_3.b3d",
|
||||||
["corner"] = "multidecor_dark_rusty_fence_4.b3d"
|
["corner"] = "multidecor_dark_rusty_fence_4.b3d"
|
||||||
|
},
|
||||||
|
corner_bounding_boxes = {
|
||||||
|
{-0.5, -0.5, 0.4, 0.5, 0.5, 0.5},
|
||||||
|
{-0.5, -0.5, -0.5, -0.4, 0.5, 0.4}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -49,7 +49,6 @@ minetest.register_node(":multidecor:modern_floor_clock", {
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
|
|
||||||
if meta:get_string("is_activated") == "false" then
|
if meta:get_string("is_activated") == "false" then
|
||||||
minetest.debug("activate")
|
|
||||||
wheel:set_animation({x=1, y=40}, 25.0, 0.0, true)
|
wheel:set_animation({x=1, y=40}, 25.0, 0.0, true)
|
||||||
meta:set_string("is_activated", "true")
|
meta:set_string("is_activated", "true")
|
||||||
else
|
else
|
||||||
|
@ -199,8 +198,6 @@ local on_rightclick_flowerpot = function(pos, node, clicker, itemstack)
|
||||||
local itemname = itemstack:get_name()
|
local itemname = itemstack:get_name()
|
||||||
|
|
||||||
local is_flowers_mod_i, is_flowers_mod_i2 = itemname:find("flowers:")
|
local is_flowers_mod_i, is_flowers_mod_i2 = itemname:find("flowers:")
|
||||||
minetest.debug("is_flowers_mod_i: " .. dump(is_flowers_mod_i))
|
|
||||||
minetest.debug("group: " .. minetest.get_item_group(itemname, "flower"))
|
|
||||||
if not is_flowers_mod_i or minetest.get_item_group(itemname, "flower") == 0 then
|
if not is_flowers_mod_i or minetest.get_item_group(itemname, "flower") == 0 then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
@ -230,7 +227,6 @@ local on_rightclick_flowerpot_with_flower = function(pos, node, clicker, itemsta
|
||||||
minetest.set_node(pos, {name=node.name:gsub("_with_flower_" .. current_flower, ""), param2=node.param2})
|
minetest.set_node(pos, {name=node.name:gsub("_with_flower_" .. current_flower, ""), param2=node.param2})
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.debug("current_flower: " .. current_flower)
|
|
||||||
clicker:get_inventory():add_item("main", "flowers:" .. current_flower)
|
clicker:get_inventory():add_item("main", "flowers:" .. current_flower)
|
||||||
|
|
||||||
return itemstack
|
return itemstack
|
||||||
|
|
|
@ -12,7 +12,6 @@ register.register_table("kitchen_modern_wooden_table", {
|
||||||
connecting.update_adjacent_nodes_connection(pos, "horizontal")
|
connecting.update_adjacent_nodes_connection(pos, "horizontal")
|
||||||
end,
|
end,
|
||||||
after_dig_node = function(pos, oldnode)
|
after_dig_node = function(pos, oldnode)
|
||||||
minetest.debug("1.2")
|
|
||||||
connecting.update_adjacent_nodes_connection(pos, "horizontal", true, oldnode)
|
connecting.update_adjacent_nodes_connection(pos, "horizontal", true, oldnode)
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue