a few small tweaks.

master
NathanSalapat 2017-02-04 17:56:05 -06:00
parent ab3eca8b50
commit c3f522c9ac
5 changed files with 18 additions and 29 deletions

View File

@ -1 +1 @@
Two machines and a plethora of block walls and columns.
This is a mod that lets you put up decorative walls around your gardens, and make pretty hardscapes.

View File

@ -43,7 +43,7 @@ columns = --Although all the columns are in the wall files they get their own me
form..
'label[.75,1;Columns are compatible with all walls.]'..
'label[.75,2.75;Freeport]'..
'label[.75,3.75;Madison]'..
-- 'label[.75,3.75;Madison]'..
'label[.75,1.75;Adaridge]'..
'item_image_button[2,2.5;1,1;mylandscaping:fwall_column_m_t_cement;fcolumn1; ]'..
'item_image_button[3,2.5;1,1;mylandscaping:fwall_column_ic_t_cement;fcolumn2; ]'..

View File

@ -1,6 +1,6 @@
local colbox_type1 = { --top blocks
type = "fixed",
fixed = {{-.49, -.5, 0.05, .5, .6, .52}}
fixed = {{-.49, -.5, 0.05, .5, .5, .52}}
}
local colbox_type2 = { --outside corner columns
type = "fixed",
@ -108,12 +108,9 @@ after_destruct = function(pos, oldnode)
local node = minetest.get_node(pos).name
local nodeu = minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z})
local nodea = minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z})
if nodeu.name == "mylandscaping:awall_b"..typ.."_"..col and
nodea.name == "air" then
if nodeu.name == "mylandscaping:awall_b"..typ.."_"..col then
minetest.set_node({x=pos.x,y=pos.y-1,z=pos.z},{name="mylandscaping:awall_"..typ.."_"..col,param2=nodeu.param2})
end
end,
})

View File

@ -1,6 +1,6 @@
local colbox_type1 = { --top blocks
type = "fixed",
fixed = {{-.49, -.5, 0.05, .5, .6, .52}}
fixed = {{-.49, -.5, 0.05, .5, .5, .52}}
}
local colbox_type2 = { --columns
type = "fixed",
@ -84,29 +84,25 @@ minetest.register_node('mylandscaping:fwall_'..typ.."_"..col, {
collision_box = colbox,
sounds = default.node_sound_stone_defaults(),
after_place_node = function(pos, placer, itemstack, pointed_thing)
after_place_node = function(pos, placer, itemstack)
local nodeu = minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z})
local nodea = minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z})
local node = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z})
if nodeu.name == "mylandscaping:fwall_"..typ.."_"..col then
minetest.set_node(pos,{name="mylandscaping:fwall_"..typ.."_"..col,param2=nodeu.param2})
minetest.set_node({x=pos.x,y=pos.y-1,z=pos.z},{name="mylandscaping:fwall_b"..typ.."_"..col,param2=nodeu.param2})
end
if nodea.name == "mylandscaping:fwall_"..typ..col then
minetest.set_node(pos,{name="mylandscaping:fwall_b"..typ.."_"..col,param2=node.param2})
if nodea.name == "mylandscaping:fwall_"..typ..'_'..col then
minetest.set_node(pos,{name="mylandscaping:fwall_b"..typ.."_"..col,param2=nodea.param2})
end
end,
after_destruct = function(pos, oldnode)
local node = minetest.get_node(pos).name
local node = minetest.get_node(pos)
local nodeu = minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z})
local nodea = minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z})
if nodeu.name == "mylandscaping:fwall_b"..typ.."_"..col and
nodea.name == "air" then
minetest.set_node({x=pos.x,y=pos.y-1,z=pos.z},{name="mylandscaping:fwall_"..typ.."_"..col,param2=nodeu.param2})
if nodeu.name == "mylandscaping:fwall_b"..typ.."_"..col then
minetest.set_node({x=pos.x,y=pos.y-1,z=pos.z},{name="mylandscaping:fwall_"..typ.."_"..col,param2=node.param2})
end
end,
})

View File

@ -1,6 +1,6 @@
local colbox_type1 = { --top blocks
type = "fixed",
fixed = {-.5, -.5, -.2, .5, .6, .5}
fixed = {-.5, -.5, -.2, .5, .5, .5}
}
local colbox_type2 = { --bottom blocks
type = "fixed",
@ -8,7 +8,7 @@ local colbox_type2 = { --bottom blocks
}
local colbox_type3 = { --top inside corner
type = "fixed",
fixed = {{-.2, -.5, -.5, .5, .6, .5},
fixed = {{-.2, -.5, -.5, .5, .5, .5},
{-.5, -.5, -.2, .5, .6, .5}}
}
local colbox_type4 = { --bottom inside corner
@ -18,7 +18,7 @@ local colbox_type4 = { --bottom inside corner
}
local colbox_type5 = { --top outside corner
type = "fixed",
fixed = {-.2, -.5, -.2, .5, .6, .5}
fixed = {-.2, -.5, -.2, .5, .5, .5}
}
local colbox_type6 = { --bottom outside corner
type = "fixed",
@ -81,26 +81,22 @@ minetest.register_node('mylandscaping:mwall_'..typ.."_"..col, {
after_place_node = function(pos, placer, itemstack, pointed_thing)
local nodeu = minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z})
local nodea = minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z})
local node = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z})
if nodeu.name == "mylandscaping:mwall_"..typ.."_"..col then
minetest.set_node(pos,{name="mylandscaping:mwall_"..typ.."_"..col,param2=nodeu.param2})
minetest.set_node({x=pos.x,y=pos.y-1,z=pos.z},{name="mylandscaping:mwall_b"..typ.."_"..col,param2=nodeu.param2})
end
if nodea.name == "mylandscaping:mwall_"..typ..col then
minetest.set_node(pos,{name="mylandscaping:mwall_b"..typ.."_"..col,param2=node.param2})
minetest.set_node(pos,{name="mylandscaping:mwall_b"..typ.."_"..col,param2=nodea.param2})
end
end,
after_destruct = function(pos, oldnode)
local node = minetest.get_node(pos).name
local node = minetest.get_node(pos)
local nodeu = minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z})
local nodea = minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z})
if nodeu.name == "mylandscaping:mwall_b"..typ.."_"..col and
nodea.name == "air" then
minetest.set_node({x=pos.x,y=pos.y-1,z=pos.z},{name="mylandscaping:mwall_"..typ.."_"..col,param2=nodeu.param2})
if nodeu.name == "mylandscaping:mwall_b"..typ.."_"..col then
minetest.set_node({x=pos.x,y=pos.y-1,z=pos.z},{name="mylandscaping:mwall_"..typ.."_"..col,param2=node.param2})
end
end,
})