[mcl_beds] fix warnings
parent
892f4b96c9
commit
203c7e2c84
|
@ -48,7 +48,9 @@ local function rotate(pos, node, user, mode, new_param2)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
local new_dir, newp = minetest_facedir_to_dir(new_param2)
|
local newp
|
||||||
|
local new_dir = minetest_facedir_to_dir(new_param2)
|
||||||
|
|
||||||
if bottom then
|
if bottom then
|
||||||
newp = vector_add(pos, new_dir)
|
newp = vector_add(pos, new_dir)
|
||||||
else
|
else
|
||||||
|
@ -153,7 +155,7 @@ function mcl_beds.register_bed(name, def)
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
stack_max = 1,
|
stack_max = 1,
|
||||||
groups = {handy=1, flammable = 3, bed = 1, dig_by_piston=1, bouncy=66, fall_damage_add_percent=-50, deco_block = 1, flammable=-1},
|
groups = {handy=1, bed = 1, dig_by_piston=1, bouncy=66, fall_damage_add_percent=-50, deco_block = 1, flammable=-1},
|
||||||
_mcl_hardness = 0.2,
|
_mcl_hardness = 0.2,
|
||||||
_mcl_blast_resistance = 1,
|
_mcl_blast_resistance = 1,
|
||||||
sounds = def.sounds or default_sounds,
|
sounds = def.sounds or default_sounds,
|
||||||
|
|
|
@ -319,14 +319,14 @@ function mcl_beds.on_rightclick(pos, player, is_top)
|
||||||
|
|
||||||
-- move to bed
|
-- move to bed
|
||||||
if not mcl_beds.player[name] then
|
if not mcl_beds.player[name] then
|
||||||
local success, message
|
local message
|
||||||
if is_top then
|
if is_top then
|
||||||
success, message = lay_down(player, ppos, pos)
|
_, message = lay_down(player, ppos, pos)
|
||||||
else
|
else
|
||||||
local node = minetest.get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
local dir = minetest.facedir_to_dir(node.param2)
|
local dir = minetest.facedir_to_dir(node.param2)
|
||||||
local other = vector.add(pos, dir)
|
local other = vector.add(pos, dir)
|
||||||
success, message = lay_down(player, ppos, other)
|
_, message = lay_down(player, ppos, other)
|
||||||
end
|
end
|
||||||
if message then
|
if message then
|
||||||
mcl_tmp_message.message(player, message)
|
mcl_tmp_message.message(player, message)
|
||||||
|
|
Loading…
Reference in New Issue