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:
parent
7f67f4a035
commit
18744ee66d
@ -1,5 +1,6 @@
|
|||||||
unused_args = false
|
unused_args = false
|
||||||
allow_defined_top = true
|
allow_defined_top = true
|
||||||
|
max_comment_line_length = 999
|
||||||
|
|
||||||
read_globals = {
|
read_globals = {
|
||||||
"DIR_DELIM",
|
"DIR_DELIM",
|
||||||
|
@ -146,7 +146,11 @@ function homedecor.stack_wing(itemstack, placer, pointed_thing, node1, node2, no
|
|||||||
local forceright = placer:get_player_control()["sneak"]
|
local forceright = placer:get_player_control()["sneak"]
|
||||||
local fdir = minetest.dir_to_facedir(placer:get_look_dir())
|
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
|
if forceright or is_right_wing then
|
||||||
node1, node2 = node1_right, node2_right
|
node1, node2 = node1_right, node2_right
|
||||||
end
|
end
|
||||||
|
@ -22,7 +22,8 @@ homedecor.box = {
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
bar_y = function(radius) return {-radius, -0.5, -radius, radius, 0.5, radius} 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 = {
|
homedecor.nodebox = {
|
||||||
|
@ -70,7 +70,11 @@ function homedecor.register(name, original_def)
|
|||||||
if not fdir or fdir > 3 then return end
|
if not fdir or fdir > 3 then return end
|
||||||
|
|
||||||
if expand.right and expand.forward ~= "air" then
|
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
|
local node = minetest.get_node(right_pos).name
|
||||||
if node == expand.right or node == placeholder_node then
|
if node == expand.right or node == placeholder_node then
|
||||||
minetest.remove_node(right_pos)
|
minetest.remove_node(right_pos)
|
||||||
|
Loading…
Reference in New Issue
Block a user