1
0
mirror of https://github.com/mt-mods/homedecor_modpack.git synced 2024-12-22 16:10:18 +01:00

Fix lines length related issues in homedecor_common

This commit is contained in:
Louis Royer 2020-08-04 16:12:47 +02:00
parent 7f67f4a035
commit 18744ee66d
4 changed files with 13 additions and 3 deletions

View File

@ -1,5 +1,6 @@
unused_args = false
allow_defined_top = true
max_comment_line_length = 999
read_globals = {
"DIR_DELIM",

View File

@ -146,7 +146,11 @@ function homedecor.stack_wing(itemstack, placer, pointed_thing, node1, node2, no
local forceright = placer:get_player_control()["sneak"]
local fdir = minetest.dir_to_facedir(placer:get_look_dir())
local is_right_wing = node1 == minetest.get_node({ x = pos.x + homedecor.fdir_to_left[fdir+1][1], y=pos.y, z = pos.z + homedecor.fdir_to_left[fdir+1][2] }).name
local is_right_wing = node1 == minetest.get_node(
{
x = pos.x + homedecor.fdir_to_left[fdir+1][1],
y = pos.y,
z = pos.z + homedecor.fdir_to_left[fdir+1][2] }).name
if forceright or is_right_wing then
node1, node2 = node1_right, node2_right
end

View File

@ -22,7 +22,8 @@ homedecor.box = {
end
end,
bar_y = function(radius) return {-radius, -0.5, -radius, radius, 0.5, radius} end,
cuboid = function(radius_x, radius_y, radius_z) return {-radius_x, -radius_y, -radius_z, radius_x, radius_y, radius_z} end,
cuboid = function(radius_x, radius_y, radius_z)
return {-radius_x, -radius_y, -radius_z, radius_x, radius_y, radius_z} end,
}
homedecor.nodebox = {

View File

@ -70,7 +70,11 @@ function homedecor.register(name, original_def)
if not fdir or fdir > 3 then return end
if expand.right and expand.forward ~= "air" then
local right_pos = { x=pos.x+homedecor.fdir_to_right[fdir+1][1], y=pos.y, z=pos.z+homedecor.fdir_to_right[fdir+1][2] }
local right_pos = {
x = pos.x + homedecor.fdir_to_right[fdir+1][1],
y = pos.y,
z = pos.z + homedecor.fdir_to_right[fdir+1][2]
}
local node = minetest.get_node(right_pos).name
if node == expand.right or node == placeholder_node then
minetest.remove_node(right_pos)