From c3f522c9ac0589ba5aae87faf308075efe5d2a39 Mon Sep 17 00:00:00 2001 From: NathanSalapat Date: Sat, 4 Feb 2017 17:56:05 -0600 Subject: [PATCH] a few small tweaks. --- description.txt | 2 +- formspec.lua | 2 +- walls_adaridge.lua | 7 ++----- walls_freeport.lua | 18 +++++++----------- walls_madison.lua | 18 +++++++----------- 5 files changed, 18 insertions(+), 29 deletions(-) diff --git a/description.txt b/description.txt index 07a340a..b1287f2 100644 --- a/description.txt +++ b/description.txt @@ -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. diff --git a/formspec.lua b/formspec.lua index 13132d4..1440603 100644 --- a/formspec.lua +++ b/formspec.lua @@ -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; ]'.. diff --git a/walls_adaridge.lua b/walls_adaridge.lua index 0a0a286..bcae8e8 100644 --- a/walls_adaridge.lua +++ b/walls_adaridge.lua @@ -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, }) diff --git a/walls_freeport.lua b/walls_freeport.lua index e8a1d14..2f74110 100644 --- a/walls_freeport.lua +++ b/walls_freeport.lua @@ -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, }) diff --git a/walls_madison.lua b/walls_madison.lua index 911eec5..9945668 100644 --- a/walls_madison.lua +++ b/walls_madison.lua @@ -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, })