Compare commits

...

5 Commits

Author SHA1 Message Date
NathanSalapat 6c73958fa1 fixed license. 2019-03-30 15:02:20 -05:00
NathanSalapat 2fcfe695db major code cleanup. No new features. 2019-02-16 16:47:56 -06:00
NathanSalapat 0516d1496c updated depreciated calls. 2019-02-02 15:35:42 -06:00
NathanSalapat 4cb6b39f6f fixed maddison corners. 2018-02-11 11:37:08 -06:00
NathanSalapat c3f522c9ac a few small tweaks. 2017-02-04 17:56:05 -06:00
18 changed files with 1155 additions and 1190 deletions

View File

@ -1,10 +1,8 @@
minetest.register_node("mylandscaping:concrete", { minetest.register_node('mylandscaping:concrete', {
description = "Concrete", description = 'Concrete',
drawtype = "normal", tiles = {'mylandscaping_cement.png'},
tiles = {"mylandscaping_cement.png"}, groups = {cracky=1, ml=1},
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky=1},
sounds = default.node_sound_stone_defaults(), sounds = default.node_sound_stone_defaults(),
}) })
--THIS NEEDS TO BE CRAFTABLE. Right now it has ZERO purpose.

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

@ -8,12 +8,12 @@ form =
input = input =
'label[3,4.5;Input]'.. 'label[3,4.5;Input]'..
'list[current_name;input;3,5;1,1;]'.. 'list[context;input;3,5;1,1;]'..
'label[4,4.5;Dye]'.. 'label[4,4.5;Dye]'..
'list[current_name;dye;4,5;1,1;]'.. 'list[context;dye;4,5;1,1;]'..
--Output --Output
'label[6,4.5;Output]'.. 'label[6,4.5;Output]'..
'list[current_name;output;6,5;1,1;]'.. 'list[context;output;6,5;1,1;]'..
--Players Inven --Players Inven
'list[current_player;main;1,6;8,4;]' 'list[current_player;main;1,6;8,4;]'
@ -43,7 +43,7 @@ columns = --Although all the columns are in the wall files they get their own me
form.. form..
'label[.75,1;Columns are compatible with all walls.]'.. 'label[.75,1;Columns are compatible with all walls.]'..
'label[.75,2.75;Freeport]'.. 'label[.75,2.75;Freeport]'..
'label[.75,3.75;Madison]'.. -- 'label[.75,3.75;Madison]'..
'label[.75,1.75;Adaridge]'.. 'label[.75,1.75;Adaridge]'..
'item_image_button[2,2.5;1,1;mylandscaping:fwall_column_m_t_cement;fcolumn1; ]'.. '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; ]'.. 'item_image_button[3,2.5;1,1;mylandscaping:fwall_column_ic_t_cement;fcolumn2; ]'..

View File

@ -1,6 +1,9 @@
--configs mylandscaping = {}
-- change this to make blocks show in creative inventory. 0 will show, 1 is invisible if minetest.settings:get_bool('mylandscaping.creative') then
mylandscaping_visible = 1 ml_visible = 0
else
ml_visible = 1
end
--Load File --Load File
dofile(minetest.get_modpath('mylandscaping')..'/walls_freeport.lua') dofile(minetest.get_modpath('mylandscaping')..'/walls_freeport.lua')
@ -9,8 +12,8 @@ dofile(minetest.get_modpath('mylandscaping')..'/walls_adaridge.lua')
dofile(minetest.get_modpath('mylandscaping')..'/walls_deco.lua') dofile(minetest.get_modpath('mylandscaping')..'/walls_deco.lua')
dofile(minetest.get_modpath('mylandscaping')..'/stones.lua') dofile(minetest.get_modpath('mylandscaping')..'/stones.lua')
dofile(minetest.get_modpath('mylandscaping')..'/recipes.lua') dofile(minetest.get_modpath('mylandscaping')..'/recipes.lua')
dofile(minetest.get_modpath("mylandscaping").."/machine.lua") dofile(minetest.get_modpath('mylandscaping')..'/machine.lua')
dofile(minetest.get_modpath("mylandscaping").."/mixer.lua") dofile(minetest.get_modpath('mylandscaping')..'/mixer.lua')
dofile(minetest.get_modpath('mylandscaping')..'/concrete.lua') dofile(minetest.get_modpath('mylandscaping')..'/concrete.lua')
dofile(minetest.get_modpath('mylandscaping')..'/formspec.lua') dofile(minetest.get_modpath('mylandscaping')..'/formspec.lua')
dofile(minetest.get_modpath('mylandscaping')..'/toppers.lua') dofile(minetest.get_modpath('mylandscaping')..'/toppers.lua')

View File

@ -1,13 +0,0 @@
DO WHAT YOU WANT TO PUBLIC LICENSE
or abbreviated DWYWPL
December 2nd 2015
License Copyright (C) 2015 Michael Tomaino (PlatinumArts@gmail.com)
www.sandboxgamemaker.com/DWYWPL/
DO WHAT YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
1. You are allowed to do whatever you want to with what content is using this license.
2. This content is provided 'as-is', without any express or implied warranty. In no event
will the authors be held liable for any damages arising from the use of this content.

File diff suppressed because it is too large Load Diff

146
mixer.lua
View File

@ -1,20 +1,18 @@
minetest.register_alias("myconcrete:concrete", "mylandscaping:concrete")
minetest.register_node('mylandscaping:mixer', { minetest.register_node('mylandscaping:mixer', {
description = 'concrete mixer', description = 'Concrete Mixer',
drawtype = 'mesh', drawtype = 'mesh',
mesh = 'mylandscaping_crusher.obj', mesh = 'mylandscaping_crusher.obj',
tiles = { tiles = {
{name='mylandscaping_tex1.png'},{name='mylandscaping_supports.png'},{name='mylandscaping_base.png'},{name='mylandscaping_hopper.png'},{name='mylandscaping_crusher.png'}}, {name='mylandscaping_tex1.png'},{name='mylandscaping_supports.png'},
{name='mylandscaping_base.png'},{name='mylandscaping_hopper.png'},
{name='mylandscaping_crusher.png'}},
groups = {oddly_breakable_by_hand=2}, groups = {oddly_breakable_by_hand=2},
paramtype = 'light', paramtype = 'light',
paramtype2 = 'facedir', paramtype2 = 'facedir',
selection_box = { selection_box = {
type = 'fixed', type = 'fixed',
fixed = { fixed = {
{-0.5, -0.5, -0.5, 1.5, 1.5, 0.5}, {-0.5, -0.5, -0.5, 1.5, 1.5, 0.5},
} }
}, },
collision_box = { collision_box = {
@ -27,83 +25,99 @@ minetest.register_node('mylandscaping:mixer', {
can_dig = function(pos,player) can_dig = function(pos,player)
local meta = minetest.get_meta(pos); local meta = minetest.get_meta(pos);
local inv = meta:get_inventory() local inv = meta:get_inventory()
if player:get_player_name() == meta:get_string("owner") and if player:get_player_name() == meta:get_string('owner') and
inv:is_empty("cobble") and inv:is_empty('cobble') and
inv:is_empty("gravel") and inv:is_empty('gravel') and
inv:is_empty("concrete") and inv:is_empty('concrete') and
inv:is_empty("sand") then inv:is_empty('sand') then
return true return true
else else
return false return false
end end
end, end,
after_place_node = function(pos, placer, itemstack) after_place_node = function(pos, placer, itemstack)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
local timer = minetest.get_node_timer(pos) local timer = minetest.get_node_timer(pos)
meta:set_string("owner",placer:get_player_name()) meta:set_string('owner',placer:get_player_name())
meta:set_string("infotext","Cement Mixer (owned by "..placer:get_player_name()..")") meta:set_string('infotext','Cement Mixer (owned by '..placer:get_player_name()..')')
timer:start(10) timer:start(10)
end, end,
on_construct = function(pos) on_construct = function(pos)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
meta:set_string("formspec", "invsize[9,10;]".. meta:set_string('formspec', 'size[9,10;]'..
"background[-0.15,-0.25;9.40,10.75;mylandscaping_background.png]".. 'background[-0.15,-0.25;9.40,10.75;mylandscaping_background.png]'..
--Gravel --Gravel
"label[0.5,1;Cobble]".. 'label[0.5,1;Cobble]'..
"label[0.5,1.5;Crusher]".. 'label[0.5,1.5;Crusher]'..
"label[2.5,2;Cobble]".. 'label[2.5,2;Cobble]'..
"list[current_name;cobble;2.5,1;1,1;]".. 'list[context;cobble;2.5,1;1,1;]'..
--"button[4,1;1,1;crush;Crush]".. 'list[context;gravel;5.5,1;1,1;]'..
"list[current_name;gravel;5.5,1;1,1;]".. 'label[6.5,1;Gravel]'..
"label[6.5,1;Gravel]".. --Concrete
'label[5,0.5;Concrete Mixer]'..
--Concrete 'list[context;sand;5.5,2.5;1,1;]'..
"label[5,0.5;Concrete Mixer]".. 'label[6.5,2.5;Sand]'..
"list[current_name;sand;5.5,2.5;1,1;]".. 'list[context;concrete;5.5,4.5;1,1;]'..
"label[6.5,2.5;Sand]".. 'label[6.5,4.5;Output]'..
--"button[5.5,3.5;1,1;mix;Mix]".. --Players Inven
"list[current_name;concrete;5.5,4.5;1,1;]".. 'list[current_player;main;0.5,6;8,4;]')
"label[6.5,4.5;Output]".. meta:set_string('infotext', 'Concrete Mixer')
--Players Inven
"list[current_player;main;0.5,6;8,4;]")
meta:set_string("infotext", "Concrete Mixer")
local inv = meta:get_inventory() local inv = meta:get_inventory()
inv:set_size("cobble", 1) inv:set_size('cobble', 1)
inv:set_size("gravel", 1) inv:set_size('gravel', 1)
inv:set_size("concrete", 1) inv:set_size('concrete', 1)
inv:set_size("sand", 1) inv:set_size('sand', 1)
end, end,
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
local input = stack:get_name()
if listname == 'cobble' then
if input == 'default:cobble' or minetest.get_item_group(input, 'ml') > 0 then
return 99
else
return 0
end
elseif listname == 'gravel' then
if input ~= 'default:gravel' then
return 0
else
return 99
end
elseif listname == 'sand' then
if minetest.get_item_group(input, 'sand') > 0 then
return 99
else
return 0
end
elseif listname == 'concrete' then
return 0
end
end,
on_timer = function(pos) on_timer = function(pos)
local timer = minetest.get_node_timer(pos) local timer = minetest.get_node_timer(pos)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
local inv = meta:get_inventory() local inv = meta:get_inventory()
local cobble = inv:get_stack("cobble", 1) local cobble = inv:get_stack('cobble', 1)
local gravel = inv:get_stack("gravel", 1) local gravel = inv:get_stack('gravel', 1)
local sand = inv:get_stack("sand", 1) local sand = inv:get_stack('sand', 1)
local cobble_inv= cobble:get_name() local cobble_inv= cobble:get_name()
local sand_inv = sand:get_name()
---------------------------------------------------------------------- ----------------------------------------------------------------------
if cobble:get_name() == "default:cobble" or if cobble:get_name() == 'default:cobble' or minetest.get_item_group(cobble_inv, 'ml') > 0 then
minetest.get_node_group(cobble_inv, 'ml') > 0 then inv:add_item('gravel','default:gravel')
inv:add_item("gravel","default:gravel") cobble:take_item()
cobble:take_item() inv:set_stack('cobble',1,cobble)
inv:set_stack("cobble",1,cobble)
end end
if gravel:get_name() == "default:gravel" and if gravel:get_name() == 'default:gravel' and minetest.get_item_group(sand_inv, 'sand') > 0 then
sand:get_name() == "default:sand" or inv:add_item('concrete','mylandscaping:concrete_bag')
sand:get_name() == "default:desert_sand" then gravel:take_item()
inv:add_item("concrete","mylandscaping:concrete_bag") inv:set_stack('gravel',1,gravel)
gravel:take_item() sand:take_item()
inv:set_stack("gravel",1,gravel) inv:set_stack('sand',1,sand)
sand:take_item()
inv:set_stack("sand",1,sand)
end end
timer:start(10) timer:start(10)
end, end,
}) })

View File

@ -1 +1,4 @@
name = mylandscaping name = mylandscaping
description = This is a mod that lets you put up decorative walls around your gardens, and make pretty hardscapes.
depends = default, bucket
optional_depends = myconcrete

View File

@ -9,13 +9,10 @@ This is a Minetest mod that adds retaining walls and column nodes.
- https://forum.minetest.net/viewtopic.php?f=11&t=12094 - https://forum.minetest.net/viewtopic.php?f=11&t=12094
## Licensing ## Licensing
- DWYWPL - Code: MIT
- Graphics/Models: CC-by-SA 4.0 Nathan Salapat
## Dependencies ## Dependencies
- default - default
- bucket - bucket
- myconcrete? - myconcrete?
#
Please Note:
If you don't want all the blocks showing in creative inventory modify the walls.lua file and change the first line to say visible = 0, (this is the default setting.)

View File

@ -1,19 +1,28 @@
minetest.register_craft({ minetest.register_craft({
output = 'mylandscaping:machine 1', output = 'mylandscaping:machine',
recipe = { recipe = {
{'default:shovel_steel', 'bucket:bucket_water', ''}, {'default:shovel_steel', 'bucket:bucket_water', ''},
{'default:steel_ingot', 'mylandscaping:concrete_bag', 'default:steel_ingot'}, {'default:steel_ingot', 'mylandscaping:concrete_bag', 'default:steel_ingot'},
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'}, {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'mylandscaping:mixer 1', output = 'mylandscaping:mixer',
recipe = { recipe = {
{'default:pick_steel', 'default:paper', 'default:chest'}, {'default:pick_steel', 'default:paper', 'default:chest'},
{'group:stick', 'default:paper', 'group:stick'}, {'group:stick', 'default:paper', 'group:stick'},
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'}, {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
} }
})
minetest.register_craft({
output = 'mylandscaping:concrete',
recipe = {
{'', '', ''},
{'', '', ''},
{'', '', ''},
}
}) })
minetest.register_craftitem('mylandscaping:concrete_bag', { minetest.register_craftitem('mylandscaping:concrete_bag', {

1
settingtypes.txt Normal file
View File

@ -0,0 +1 @@
mylandscaping.creative (Display retaining wall blocks in creative inventory?) bool false

View File

@ -1,32 +1,32 @@
local stone_cbox = { local stone_cbox = {
type = "fixed", type = 'fixed',
fixed = { fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
} }
} }
local sstone_cbox = { local sstone_cbox = {
type = "fixed", type = 'fixed',
fixed = { fixed = {
{-0.5, -0.5, -0.5, 0.5, 0.4375, 0.5}, {-0.5, -0.5, -0.5, 0.5, 0.4375, 0.5},
} }
} }
local sq_cbox = { local sq_cbox = {
type = "fixed", type = 'fixed',
fixed = { fixed = {
{-0.4375, -0.5, -0.4375, 0.4375, -0.3125, 0.4375}, {-0.4375, -0.5, -0.4375, 0.4375, -0.3125, 0.4375},
{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
} }
} }
local s_sq_cbox = { local s_sq_cbox = {
type = "fixed", type = 'fixed',
fixed = { fixed = {
{-0.4375, -0.5, -0.4375, 0.4375, 0.5, 0.4375}, {-0.4375, -0.5, -0.4375, 0.4375, 0.5, 0.4375},
{-0.5, -0.5, -0.5, 0.5, 0.4375, 0.5}, {-0.5, -0.5, -0.5, 0.5, 0.4375, 0.5},
} }
} }
local smsq_cbox = { local smsq_cbox = {
type = "fixed", type = 'fixed',
fixed = { fixed = {
{-0.4375, -0.5, -0.4375, -0.0625, -0.3125, -0.0625}, {-0.4375, -0.5, -0.4375, -0.0625, -0.3125, -0.0625},
{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
@ -36,7 +36,7 @@ local smsq_cbox = {
} }
} }
local s_smsq_cbox = { local s_smsq_cbox = {
type = "fixed", type = 'fixed',
fixed = { fixed = {
{-0.4375, -0.5, -0.4375, -0.0625, 0.5, -0.0625}, {-0.4375, -0.5, -0.4375, -0.0625, 0.5, -0.0625},
{-0.5, -0.5, -0.5, 0.5, 0.4375, 0.5}, {-0.5, -0.5, -0.5, 0.5, 0.4375, 0.5},
@ -46,7 +46,7 @@ local s_smsq_cbox = {
} }
} }
local xsmsq_cbox = { local xsmsq_cbox = {
type = "fixed", type = 'fixed',
fixed = { fixed = {
{-0.4375, -0.5, -0.4375, -0.1875, -0.3125, -0.1875}, {-0.4375, -0.5, -0.4375, -0.1875, -0.3125, -0.1875},
{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
@ -61,7 +61,7 @@ local xsmsq_cbox = {
} }
} }
local s_xsmsq_cbox = { local s_xsmsq_cbox = {
type = "fixed", type = 'fixed',
fixed = { fixed = {
{-0.4375, -0.5, -0.4375, -0.1875, 0.5, -0.1875}, {-0.4375, -0.5, -0.4375, -0.1875, 0.5, -0.1875},
{-0.5, -0.5, -0.5, 0.5, 0.4375, 0.5}, {-0.5, -0.5, -0.5, 0.5, 0.4375, 0.5},
@ -76,89 +76,89 @@ local s_xsmsq_cbox = {
} }
} }
local paver_cbox = { local paver_cbox = {
type = "fixed", type = 'fixed',
fixed = { fixed = {
{-0.5, -0.5, 0.3125, -0.3125, -0.3125, 0.5}, {-0.5, -0.5, 0.3125, -0.3125, -0.3125, 0.5},
{-0.25, -0.5, 0.3125, -0.0625, -0.3125, 0.5}, {-0.25, -0.5, 0.3125, -0.0625, -0.3125, 0.5},
{-0.5, -0.5, 0.0625, -0.0625, -0.3125, 0.25}, {-0.5, -0.5, 0.0625, -0.0625, -0.3125, 0.25},
{0, -0.5, 0.0625, 0.1875, -0.3125, 0.5}, {0, -0.5, 0.0625, 0.1875, -0.3125, 0.5},
{-0.5, -0.5, -0.4375, -0.3125, -0.3125, 0}, {-0.5, -0.5, -0.4375, -0.3125, -0.3125, 0},
{-0.25, -0.5, -0.1875, 0.1875, -0.3125, 0}, {-0.25, -0.5, -0.1875, 0.1875, -0.3125, 0},
{0.25, -0.5, 0.3125, 0.5, -0.3125, 0.5}, {0.25, -0.5, 0.3125, 0.5, -0.3125, 0.5},
{0.25, -0.5, -0.1875, 0.4375, -0.3125, 0.25}, {0.25, -0.5, -0.1875, 0.4375, -0.3125, 0.25},
{-0.25, -0.5, -0.5, -0.0625, -0.3125, -0.25}, {-0.25, -0.5, -0.5, -0.0625, -0.3125, -0.25},
{0, -0.5, -0.4375, 0.4375, -0.3125, -0.25}, {0, -0.5, -0.4375, 0.4375, -0.3125, -0.25},
{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
} }
} }
local spaver_cbox = { local spaver_cbox = {
type = "fixed", type = 'fixed',
fixed = { fixed = {
{-0.5, -0.5, 0.3125, -0.3125, 0.5, 0.5}, {-0.5, -0.5, 0.3125, -0.3125, 0.5, 0.5},
{-0.25, -0.5, 0.3125, -0.0625, 0.5, 0.5}, {-0.25, -0.5, 0.3125, -0.0625, 0.5, 0.5},
{-0.5, -0.5, 0.0625, -0.0625, 0.5, 0.25}, {-0.5, -0.5, 0.0625, -0.0625, 0.5, 0.25},
{0, -0.5, 0.0625, 0.1875, 0.5, 0.5}, {0, -0.5, 0.0625, 0.1875, 0.5, 0.5},
{-0.5, -0.5, -0.4375, -0.3125, 0.5, 0}, {-0.5, -0.5, -0.4375, -0.3125, 0.5, 0},
{-0.25, -0.5, -0.1875, 0.1875, 0.5, 0}, {-0.25, -0.5, -0.1875, 0.1875, 0.5, 0},
{0.25, -0.5, 0.3125, 0.5, 0.5, 0.5}, {0.25, -0.5, 0.3125, 0.5, 0.5, 0.5},
{0.25, -0.5, -0.1875, 0.4375, 0.5, 0.25}, {0.25, -0.5, -0.1875, 0.4375, 0.5, 0.25},
{-0.25, -0.5, -0.5, -0.0625, 0.5, -0.25}, {-0.25, -0.5, -0.5, -0.0625, 0.5, -0.25},
{0, -0.5, -0.4375, 0.4375, 0.5, -0.25}, {0, -0.5, -0.4375, 0.4375, 0.5, -0.25},
{-0.5, -0.5, -0.5, 0.5, 0.4375, 0.5}, {-0.5, -0.5, -0.5, 0.5, 0.4375, 0.5},
} }
} }
local ashlar_cbox = { local ashlar_cbox = {
type = "fixed", type = 'fixed',
fixed = { fixed = {
{-0.5, -0.5, 0.375, -0.375, -0.3125, 0.5}, {-0.5, -0.5, 0.375, -0.375, -0.3125, 0.5},
{-0.5, -0.5, 0.1875, -0.375, -0.3125, 0.3125}, {-0.5, -0.5, 0.1875, -0.375, -0.3125, 0.3125},
{-0.3125, -0.5, 0.1875, -0.0625, -0.3125, 0.5}, {-0.3125, -0.5, 0.1875, -0.0625, -0.3125, 0.5},
{0, -0.5, 0.375, 0.25, -0.3125, 0.5}, {0, -0.5, 0.375, 0.25, -0.3125, 0.5},
{0.3125, -0.5, 0.375, 0.5, -0.3125, 0.5}, {0.3125, -0.5, 0.375, 0.5, -0.3125, 0.5},
{-0.5, -0.5, -0.1875, -0.1875, -0.3125, 0.125}, {-0.5, -0.5, -0.1875, -0.1875, -0.3125, 0.125},
{-0.5, -0.5, -0.5, -0.375, -0.3125, -0.25}, {-0.5, -0.5, -0.5, -0.375, -0.3125, -0.25},
{-0.3125, -0.5, -0.375, -0.1875, -0.3125, -0.25}, {-0.3125, -0.5, -0.375, -0.1875, -0.3125, -0.25},
{-0.125, -0.5, -0.0625, -0.0625, -0.3125, 0.125}, {-0.125, -0.5, -0.0625, -0.0625, -0.3125, 0.125},
{-0.125, -0.5, -0.375, 0.0625, -0.3125, -0.125}, {-0.125, -0.5, -0.375, 0.0625, -0.3125, -0.125},
{0, -0.5, -0.0625, 0.0625, -0.3125, 0}, {0, -0.5, -0.0625, 0.0625, -0.3125, 0},
{0, -0.5, 0.0625, 0.3125, -0.3125, 0.3125}, {0, -0.5, 0.0625, 0.3125, -0.3125, 0.3125},
{0.375, -0.5, 0.1875, 0.5, -0.3125, 0.3125}, {0.375, -0.5, 0.1875, 0.5, -0.3125, 0.3125},
{0.375, -0.5, -0.1875, 0.5, -0.3125, 0.125}, {0.375, -0.5, -0.1875, 0.5, -0.3125, 0.125},
{0.125, -0.5, -0.1875, 0.3125, -0.3125, 0}, {0.125, -0.5, -0.1875, 0.3125, -0.3125, 0},
{0.125, -0.5, -0.375, 0.25, -0.3125, -0.25}, {0.125, -0.5, -0.375, 0.25, -0.3125, -0.25},
{-0.3125, -0.5, -0.5, -0.0625, -0.3125, -0.4375}, {-0.3125, -0.5, -0.5, -0.0625, -0.3125, -0.4375},
{0, -0.5, -0.5, 0.25, -0.3125, -0.4375}, {0, -0.5, -0.5, 0.25, -0.3125, -0.4375},
{0.3125, -0.5, -0.5, 0.5, -0.3125, -0.25}, {0.3125, -0.5, -0.5, 0.5, -0.3125, -0.25},
{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
} }
} }
local sashlar_cbox = { local sashlar_cbox = {
type = "fixed", type = 'fixed',
fixed = { fixed = {
{-0.5, -0.5, 0.375, -0.375, 0.5, 0.5}, {-0.5, -0.5, 0.375, -0.375, 0.5, 0.5},
{-0.5, -0.5, 0.1875, -0.375, 0.5, 0.3125}, {-0.5, -0.5, 0.1875, -0.375, 0.5, 0.3125},
{-0.3125, -0.5, 0.1875, -0.0625, 0.5, 0.5}, {-0.3125, -0.5, 0.1875, -0.0625, 0.5, 0.5},
{0, -0.5, 0.375, 0.25, 0.5, 0.5}, {0, -0.5, 0.375, 0.25, 0.5, 0.5},
{0.3125, -0.5, 0.375, 0.5, 0.5, 0.5}, {0.3125, -0.5, 0.375, 0.5, 0.5, 0.5},
{-0.5, -0.5, -0.1875, -0.1875, 0.5, 0.125}, {-0.5, -0.5, -0.1875, -0.1875, 0.5, 0.125},
{-0.5, -0.5, -0.5, -0.375, 0.5, -0.25}, {-0.5, -0.5, -0.5, -0.375, 0.5, -0.25},
{-0.3125, -0.5, -0.375, -0.1875, 0.5, -0.25}, {-0.3125, -0.5, -0.375, -0.1875, 0.5, -0.25},
{-0.125, -0.5, -0.0625, -0.0625, 0.5, 0.125}, {-0.125, -0.5, -0.0625, -0.0625, 0.5, 0.125},
{-0.125, -0.5, -0.375, 0.0625, 0.5, -0.125}, {-0.125, -0.5, -0.375, 0.0625, 0.5, -0.125},
{0, -0.5, -0.0625, 0.0625, 0.5, 0}, {0, -0.5, -0.0625, 0.0625, 0.5, 0},
{0, -0.5, 0.0625, 0.3125, 0.5, 0.3125}, {0, -0.5, 0.0625, 0.3125, 0.5, 0.3125},
{0.375, -0.5, 0.1875, 0.5, 0.5, 0.3125}, {0.375, -0.5, 0.1875, 0.5, 0.5, 0.3125},
{0.375, -0.5, -0.1875, 0.5, 0.5, 0.125}, {0.375, -0.5, -0.1875, 0.5, 0.5, 0.125},
{0.125, -0.5, -0.1875, 0.3125, 0.5, 0}, {0.125, -0.5, -0.1875, 0.3125, 0.5, 0},
{0.125, -0.5, -0.375, 0.25, 0.5, -0.25}, {0.125, -0.5, -0.375, 0.25, 0.5, -0.25},
{-0.3125, -0.5, -0.5, -0.0625, 0.5, -0.4375}, {-0.3125, -0.5, -0.5, -0.0625, 0.5, -0.4375},
{0, -0.5, -0.5, 0.25, 0.5, -0.4375}, {0, -0.5, -0.5, 0.25, 0.5, -0.4375},
{0.3125, -0.5, -0.5, 0.5, 0.5, -0.25}, {0.3125, -0.5, -0.5, 0.5, 0.5, -0.25},
{-0.5, -0.5, -0.5, 0.5, 0.4375, 0.5}, {-0.5, -0.5, -0.5, 0.5, 0.4375, 0.5},
} }
} }
local flag_cbox = { local flag_cbox = {
type = "fixed", type = 'fixed',
fixed = { fixed = {
{-0.5, -0.5, 0.0625, -0.0625, -0.3125, 0.5}, {-0.5, -0.5, 0.0625, -0.0625, -0.3125, 0.5},
{-0.5, -0.5, -0.1875, -0.25, -0.3125, 0}, {-0.5, -0.5, -0.1875, -0.25, -0.3125, 0},
@ -172,7 +172,7 @@ local flag_cbox = {
} }
} }
local sflag_cbox = { local sflag_cbox = {
type = "fixed", type = 'fixed',
fixed = { fixed = {
{-0.5, -0.5, 0.0625, -0.0625, 0.5, 0.5}, {-0.5, -0.5, 0.0625, -0.0625, 0.5, 0.5},
{-0.5, -0.5, -0.1875, -0.25, 0.5, 0}, {-0.5, -0.5, -0.1875, -0.25, 0.5, 0},
@ -186,7 +186,7 @@ local sflag_cbox = {
} }
} }
local pin_cbox = { local pin_cbox = {
type = "fixed", type = 'fixed',
fixed = { fixed = {
{-0.5, -0.5, -0.125, -0.25, -0.3125, 0.5}, {-0.5, -0.5, -0.125, -0.25, -0.3125, 0.5},
{-0.5, -0.5, -0.4375, 0.125, -0.3125, -0.1875}, {-0.5, -0.5, -0.4375, 0.125, -0.3125, -0.1875},
@ -197,7 +197,7 @@ local pin_cbox = {
} }
} }
local spin_cbox = { local spin_cbox = {
type = "fixed", type = 'fixed',
fixed = { fixed = {
{-0.5, -0.5, -0.125, -0.25, 0.5, 0.5}, {-0.5, -0.5, -0.125, -0.25, 0.5, 0.5},
{-0.5, -0.5, -0.4375, 0.125, 0.5, -0.1875}, {-0.5, -0.5, -0.4375, 0.125, 0.5, -0.1875},
@ -208,16 +208,14 @@ local spin_cbox = {
} }
} }
local stone_types = { --style, desc, img1, img2 local stone_types = { --style, desc, img1, img2
{"square", "Square", "concrete", "square",sq_cbox,s_sq_cbox}, {'square', 'Square', 'concrete', 'square',sq_cbox,s_sq_cbox},
{"square_sm", "Small Square", "concrete", "square_sm",smsq_cbox,s_smsq_cbox}, {'square_sm', 'Small Square', 'concrete', 'square_sm',smsq_cbox,s_smsq_cbox},
{"square_xsm", "Extra Small Square", "concrete", "square_xsm",xsmsq_cbox,s_xsmsq_cbox}, {'square_xsm', 'Extra Small Square', 'concrete', 'square_xsm',xsmsq_cbox,s_xsmsq_cbox},
{"pavers", "Paver", "concrete", "pavers",paver_cbox,spaver_cbox}, {'pavers', 'Paver', 'concrete', 'pavers',paver_cbox,spaver_cbox},
{"ashlar", "Ashlar", "concrete", "ashlar",ashlar_cbox,sashlar_cbox}, {'ashlar', 'Ashlar', 'concrete', 'ashlar',ashlar_cbox,sashlar_cbox},
{"flagstone", "Flagstone", "concrete", "flagstone",flag_cbox,sflag_cbox}, {'flagstone', 'Flagstone', 'concrete', 'flagstone',flag_cbox,sflag_cbox},
{"pinwheel", "Pinwheel", "concrete", "pinwheel",pin_cbox,spin_cbox}, {'pinwheel', 'Pinwheel', 'concrete', 'pinwheel',pin_cbox,spin_cbox},
} }
for i in ipairs (stone_types) do for i in ipairs (stone_types) do
local style = stone_types[i][1] local style = stone_types[i][1]
@ -226,83 +224,80 @@ for i in ipairs (stone_types) do
local img2 = stone_types[i][4] local img2 = stone_types[i][4]
local cbox = stone_types[i][5] local cbox = stone_types[i][5]
local scbox = stone_types[i][6] local scbox = stone_types[i][6]
local color_tab = {
{'black', 'Black', '^[multiply:#2c2c2c'},
{'blue', 'Blue', '^[multiply:#0041f4'},
{'brown', 'Brown', '^[multiply:#6c3800'},
{'cyan', 'Cyan', '^[multiply:cyan'},
{'dark_green', 'Dark Green', '^[multiply:#2b7b00'},
{'dark_grey', 'Dark Grey', '^[multiply:#464646'},
{'green', 'Green', '^[multiply:#67eb1c'},
{'grey', 'Grey', '^[multiply:#818181'},
{'magenta', 'Magenta', '^[multiply:#d80481'},
{'orange', 'Orange', '^[multiply:#e0601a'},
{'pink', 'Pink', '^[multiply:#ffa5a5'},
{'red', 'Red', '^[multiply:#c91818'},
{'violet', 'Violet', '^[multiply:#480680'},
{'white', 'White', '^[multiply:white'},
{'yellow', 'Yellow', '^[multiply:#fcf611'},
{'cement', 'Concrete', ''},
}
local color_tab = { for i in ipairs (color_tab) do
{"black", "Black", "^[colorize:black:150"}, local col = color_tab[i][1]
{"blue", "Blue", "^[colorize:#0404B4:100"}, local coldesc = color_tab[i][2]
{"brown", "Brown", "^[colorize:#190B07:100"}, local alpha = color_tab[i][3]
{"cyan", "Cyan", "^[colorize:cyan:100"},
{"dark_green", "Dark Green", "^[colorize:#071907:150"},
{"dark_grey", "Dark Grey", "^[colorize:black:150"},
{"green", "Green", "^[colorize:green:100"},
{"grey", "Grey", "^[colorize:black:100"},
{"magenta", "Magenta", "^[colorize:magenta:100"},
{"orange", "Orange", "^[colorize:orange:100"},
{"pink", "Pink", "^[colorize:#FE2E9A:100"},
{"red", "Red", "^[colorize:#B40404:100"},
{"violet", "Violet", "^[colorize:#2F0B3A:100"},
{"white", "White", "^[colorize:white:100"},
{"yellow", "Yellow", "^[colorize:yellow:100"},
{"cement", "Concrete", ""},
}
for i in ipairs (color_tab) do
local col = color_tab[i][1]
local coldesc = color_tab[i][2]
local alpha = color_tab[i][3]
minetest.register_alias("mylandscaping:stone_"..style,"mylandscaping:stone_"..style.."cement") minetest.register_alias('mylandscaping:stone_'..style,'mylandscaping:stone_'..style..'cement')
minetest.register_node("mylandscaping:stone_"..style..col,{ minetest.register_node('mylandscaping:stone_'..style..col,{
description = desc.." Patio Stone"..coldesc, description = desc..' Patio Stone '..coldesc,
drawtype = "nodebox", drawtype = 'nodebox',
tiles = { tiles = {
"mylandscaping_"..img1..".png^mylandscaping_"..img2..".png"..alpha, 'mylandscaping_'..img1..'.png^mylandscaping_'..img2..'.png'..alpha,
"mylandscaping_"..img1..".png"..alpha, 'mylandscaping_'..img1..'.png'..alpha,
"mylandscaping_"..img1..".png"..alpha, 'mylandscaping_'..img1..'.png'..alpha,
"mylandscaping_"..img1..".png"..alpha, 'mylandscaping_'..img1..'.png'..alpha,
"mylandscaping_"..img1..".png"..alpha, 'mylandscaping_'..img1..'.png'..alpha,
"mylandscaping_"..img1..".png"..alpha, 'mylandscaping_'..img1..'.png'..alpha,
}, },
paramtype = "light", paramtype = 'light',
groups = {cracky = 2, not_in_creative_inventory=1, ml=1,}, groups = {cracky = 2, not_in_creative_inventory=ml_visible, ml=1,},
node_box = cbox, node_box = cbox,
selection_box = stone_cbox, selection_box = stone_cbox,
collision_box = stone_cbox, collision_box = stone_cbox,
sounds = default.node_sound_stone_defaults(), sounds = default.node_sound_stone_defaults(),
after_place_node = function(pos, placer, itemstack, pointed_thing)
local nodeu = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name
if nodeu == "default:sand" or after_place_node = function(pos, placer, itemstack, pointed_thing)
nodeu == "default:desert_sand" then local nodeu = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mylandscaping:stone_"..style.."_sand"..col}) if minetest.get_item_group(nodeu, 'sand') > 0 then
minetest.set_node(pos,{name = "air"}) minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = 'mylandscaping:stone_'..style..'_sand'..col})
end minetest.set_node(pos,{name = 'air'})
end, end
end,
}) })
minetest.register_node("mylandscaping:stone_"..style.."_sand"..col,{ minetest.register_node('mylandscaping:stone_'..style..'_sand'..col,{
description = desc.." Patio Stone in Sand "..coldesc, description = desc..' Patio Stone in Sand '..coldesc,
drawtype = "nodebox", drawtype = 'nodebox',
tiles = { tiles = {
"mylandscaping_"..img1..".png^mylandscaping_"..img2..".png"..alpha, 'mylandscaping_'..img1..'.png^mylandscaping_'..img2..'.png'..alpha,
"mylandscaping_"..img1..".png"..alpha, 'mylandscaping_'..img1..'.png'..alpha,
"mylandscaping_"..img1..".png"..alpha, 'mylandscaping_'..img1..'.png'..alpha,
"mylandscaping_"..img1..".png"..alpha, 'mylandscaping_'..img1..'.png'..alpha,
"mylandscaping_"..img1..".png"..alpha, 'mylandscaping_'..img1..'.png'..alpha,
"mylandscaping_"..img1..".png"..alpha, 'mylandscaping_'..img1..'.png'..alpha,
}, },
drop = "mylandscaping:stone_"..style, drop = 'mylandscaping:stone_'..style,
paramtype = "light", paramtype = 'light',
groups = {cracky = 2, not_in_creative_inventory = 1}, groups = {cracky = 2, not_in_creative_inventory = 1},
node_box = scbox, node_box = scbox,
selection_box = sstone_cbox, selection_box = sstone_cbox,
collision_box = sstone_cbox, collision_box = sstone_cbox,
sounds = default.node_sound_stone_defaults(), sounds = default.node_sound_stone_defaults(),
after_dig_node = function(pos, oldnode, oldmetadata, digger) after_dig_node = function(pos, oldnode, oldmetadata, digger)
minetest.set_node(pos,{name = "default:sand"}) minetest.set_node(pos,{name = 'default:silver_sand'})
end, end,
}) })
end end
end end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 401 B

View File

@ -1,48 +1,47 @@
local block_type1 = { -- desc2, obj, texture local block_type1 = { -- desc2, obj, texture
{"Sphere", "sphere", 'concrete'}, {'Sphere', 'sphere', 'concrete'},
{"Suzanne", "suzanne", 'concrete'}, {'Suzanne', 'suzanne', 'concrete'},
{'Dragon', 'dragon', 'dragon'}, {'Dragon', 'dragon', 'dragon'},
{'Cross', 'cross', 'concrete'}, {'Cross', 'cross', 'concrete'},
} }
for i in ipairs (block_type1) do for i in ipairs (block_type1) do
local desc2 = block_type1[i][1] local desc2 = block_type1[i][1]
local obj = block_type1[i][2] local obj = block_type1[i][2]
local tex = block_type1[i][3] local tex = block_type1[i][3]
local color_tab = {
{'black', 'Black', '^[multiply:#2c2c2c'},
{'blue', 'Blue', '^[multiply:#0041f4'},
{'brown', 'Brown', '^[multiply:#6c3800'},
{'cyan', 'Cyan', '^[multiply:cyan'},
{'dark_green', 'Dark Green', '^[multiply:#2b7b00'},
{'dark_grey', 'Dark Grey', '^[multiply:#464646'},
{'green', 'Green', '^[multiply:#67eb1c'},
{'grey', 'Grey', '^[multiply:#818181'},
{'magenta', 'Magenta', '^[multiply:#d80481'},
{'orange', 'Orange', '^[multiply:#e0601a'},
{'pink', 'Pink', '^[multiply:#ffa5a5'},
{'red', 'Red', '^[multiply:#c91818'},
{'violet', 'Violet', '^[multiply:#480680'},
{'white', 'White', '^[multiply:white'},
{'yellow', 'Yellow', '^[multiply:#fcf611'},
{'cement', 'Concrete', ''},
}
local color_tab = { for i in ipairs (color_tab) do
{"black", "Black", "^[colorize:black:150"}, local col = color_tab[i][1]
{"blue", "Blue", "^[colorize:#0404B4:100"}, local coldesc = color_tab[i][2]
{"brown", "Brown", "^[colorize:#190B07:100"}, local alpha = color_tab[i][3]
{"cyan", "Cyan", "^[colorize:cyan:100"},
{"dark_green", "Dark Green", "^[colorize:#071907:150"},
{"dark_grey", "Dark Grey", "^[colorize:black:150"},
{"green", "Green", "^[colorize:green:100"},
{"grey", "Grey", "^[colorize:black:100"},
{"magenta", "Magenta", "^[colorize:magenta:100"},
{"orange", "Orange", "^[colorize:orange:100"},
{"pink", "Pink", "^[colorize:#FE2E9A:100"},
{"red", "Red", "^[colorize:#B40404:100"},
{"violet", "Violet", "^[colorize:#2F0B3A:100"},
{"white", "White", "^[colorize:white:100"},
{"yellow", "Yellow", "^[colorize:yellow:100"},
{"cement", "Concrete", ""},
}
for i in ipairs (color_tab) do
local col = color_tab[i][1]
local coldesc = color_tab[i][2]
local alpha = color_tab[i][3]
minetest.register_node('mylandscaping:column_t_'..obj.."_"..col, {
description = desc2..' topper',
drawtype = 'mesh',
mesh = 'mylandscaping_column_t_'..obj..'.obj',
tiles = {name='mylandscaping_'..tex..'.png'..alpha},
groups = {cracky=2, not_in_creative_inventory=mylandscaping_visible, ml=1},
paramtype = 'light',
paramtype2 = 'facedir',
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node('mylandscaping:column_t_'..obj..'_'..col, {
description = desc2..' topper',
drawtype = 'mesh',
mesh = 'mylandscaping_column_t_'..obj..'.obj',
tiles = {name='mylandscaping_'..tex..'.png'..alpha},
groups = {cracky=2, not_in_creative_inventory=ml_visible, ml=1},
paramtype = 'light',
paramtype2 = 'facedir',
sounds = default.node_sound_stone_defaults(),
})
end
end end
end

View File

@ -1,26 +1,26 @@
local colbox_type1 = { --top blocks local colbox_type1 = { --top blocks
type = "fixed", type = 'fixed',
fixed = {{-.49, -.5, 0.05, .5, .6, .52}} fixed = {{-.49, -.5, 0.05, .5, .5, .52}}
} }
local colbox_type2 = { --outside corner columns local colbox_type2 = { --outside corner columns
type = "fixed", type = 'fixed',
fixed = {{-.2, -.5, -.2, .5, .5, .5}} fixed = {{-.2, -.5, -.2, .5, .5, .5}}
} }
local colbox_type3 = { --bottom blocks local colbox_type3 = { --bottom blocks
type = "fixed", type = 'fixed',
fixed = {{-.5, -.5, -.16, .5, .5, .25}} fixed = {{-.5, -.5, -.16, .5, .5, .25}}
} }
local colbox_type4 = { --inside corner local colbox_type4 = { --inside corner
type = "fixed", type = 'fixed',
fixed = {{-.5, -.5, 0, .5, .5, .5}, fixed = {{-.5, -.5, 0, .5, .5, .5},
{0, -.5, -.5, .5, .5, .5}} {0, -.5, -.5, .5, .5, .5}}
} }
local colbox_type5 = { --inside corner column local colbox_type5 = { --inside corner column
type = "fixed", type = 'fixed',
fixed = {{-.5, -.5, -.5, .5, .5, .5},} fixed = {{-.5, -.5, -.5, .5, .5, .5},}
} }
local colbox_type6 = { --middle column local colbox_type6 = { --middle column
type = "fixed", type = 'fixed',
fixed = {{-.5, -.5, -.3, .5, .5, .5},} fixed = {{-.5, -.5, -.3, .5, .5, .5},}
} }
@ -30,22 +30,22 @@ local colbox_type7 = { --outside corner
} }
local block_type1 = { -- desc2, typ, obj, colbox, drops, grup local block_type1 = { -- desc2, typ, obj, colbox, drops, grup
{"Retaining Wall Left", "left", "blocka_l_t", colbox_type1, "left", {ml=1,cracky=2,not_in_creative_inventory=mylandscaping_visible}}, {'Adaridge Left', 'left', 'blocka_l_t', colbox_type1, 'left', {ml=1,cracky=2,not_in_creative_inventory=ml_visible}},
{"Retaining Wall Middle", "middle", "blocka_m_t", colbox_type1, "middle", {ml=1,cracky=2,not_in_creative_inventory=mylandscaping_visible}}, {'Adaridge Middle', 'middle', 'blocka_m_t', colbox_type1, 'middle', {ml=1,cracky=2,not_in_creative_inventory=ml_visible}},
{"Retaining Wall Right", "right", "blocka_r_t", colbox_type1, "right", {ml=1,cracky=2,not_in_creative_inventory=mylandscaping_visible}}, {'Adaridge Right', 'right', 'blocka_r_t', colbox_type1, 'right', {ml=1,cracky=2,not_in_creative_inventory=ml_visible}},
{"Retaining Wall Inside Corner", "icorner", "blocka_ic_t", colbox_type4, "icorner", {ml=1,cracky=2,not_in_creative_inventory=mylandscaping_visible}}, {'Adaridge Inside Corner', 'icorner', 'blocka_ic_t', colbox_type4, 'icorner', {ml=1,cracky=2,not_in_creative_inventory=ml_visible}},
{"Retaining Wall Outside Corner", "ocorner", "blocka_oc_t", colbox_type2, "ocorner", {ml=1,cracky=2,not_in_creative_inventory=mylandscaping_visible}}, {'Adaridge Outside Corner', 'ocorner', 'blocka_oc_t', colbox_type2, 'ocorner', {ml=1,cracky=2,not_in_creative_inventory=ml_visible}},
{"Retaining Wall Left Bot", "bleft", "blocka_l_b", colbox_type3, "left", {not_in_creative_inventory=mylandscaping_visible}}, {'Hax0r', 'bleft', 'blocka_l_b', colbox_type3, 'left', {not_in_creative_inventory=1}},
{"Retaining Wall Middle Bot", "bmiddle", "blocka_m_b", colbox_type3, "middle", {not_in_creative_inventory=mylandscaping_visible}}, {'Hax0r', 'bmiddle', 'blocka_m_b', colbox_type3, 'middle', {not_in_creative_inventory=1}},
{"Retaining Wall Right Bot", "bright", "blocka_r_b", colbox_type3, "right", {not_in_creative_inventory=mylandscaping_visible}}, {'Hax0r', 'bright', 'blocka_r_b', colbox_type3, 'right', {not_in_creative_inventory=1}},
{"Retaining Wall Inside Corner Bot", "bicorner", "blocka_ic_b", colbox_type4, "icorner", {not_in_creative_inventory=mylandscaping_visible}}, {'Hax0r', 'bicorner', 'blocka_ic_b', colbox_type4, 'icorner', {not_in_creative_inventory=1}},
{"Retaining Wall Outside Corner Bot", "bocorner", "blocka_oc_b", colbox_type2, "ocorner", {not_in_creative_inventory=mylandscaping_visible}}, {'Hax0r', 'bocorner', 'blocka_oc_b', colbox_type2, 'ocorner', {not_in_creative_inventory=1}},
{"Column Inside Corner", "column_ic_t", "columna_ic_t", colbox_type5, "column_ic_t", {ml=1,cracky=2,not_in_creative_inventory=mylandscaping_visible}}, {'Adaridge Column (IC)', 'column_ic_t', 'columna_ic_t', colbox_type5, 'column_ic_t', {ml=1,cracky=2,not_in_creative_inventory=ml_visible}},
{"Column Outside Corner", "column_oc_t", "columna_oc_t", colbox_type2, "column_oc_t", {ml=1,cracky=2,not_in_creative_inventory=mylandscaping_visible}}, {'Adaridge Column (OC)', 'column_oc_t', 'columna_oc_t', colbox_type2, 'column_oc_t', {ml=1,cracky=2,not_in_creative_inventory=ml_visible}},
{"Column Middle", "column_m_t", "columna_m_t", colbox_type6, "column_m_t", {ml=1,cracky=2,not_in_creative_inventory=mylandscaping_visible}}, {'Adaridge Column (M)', 'column_m_t', 'columna_m_t', colbox_type6, 'column_m_t', {ml=1,cracky=2,not_in_creative_inventory=ml_visible}},
{"Column Inside Corner Bot", "bcolumn_ic_t", "columna_ic_b", colbox_type5, "column_ic_b", {not_in_creative_inventory=mylandscaping_visible}}, {'Hax0r', 'bcolumn_ic_t', 'columna_ic_b', colbox_type5, 'column_ic_b', {not_in_creative_inventory=1}},
{"Column Outside Corner Bot", "bcolumn_oc_t", "columna_oc_b", colbox_type2, "column_oc_b", {not_in_creative_inventory=mylandscaping_visible}}, {'Hax0r', 'bcolumn_oc_t', 'columna_oc_b', colbox_type2, 'column_oc_b', {not_in_creative_inventory=1}},
{"Column Middle Bot", "bcolumn_m_t", "columna_m_b", colbox_type6, "column_m_b", {not_in_creative_inventory=mylandscaping_visible}}, {'Hax0r', 'bcolumn_m_t', 'columna_m_b', colbox_type6, 'column_m_b', {not_in_creative_inventory=1}},
} }
for i in ipairs (block_type1) do for i in ipairs (block_type1) do
local desc2 = block_type1[i][1] local desc2 = block_type1[i][1]
@ -54,69 +54,61 @@ for i in ipairs (block_type1) do
local colbox = block_type1[i][4] local colbox = block_type1[i][4]
local drops = block_type1[i][5] local drops = block_type1[i][5]
local grup = block_type1[i][6] local grup = block_type1[i][6]
local color_tab = {
{'black', 'Black', '^[multiply:#2c2c2c'},
{'blue', 'Blue', '^[multiply:#0041f4'},
{'brown', 'Brown', '^[multiply:#6c3800'},
{'cyan', 'Cyan', '^[multiply:cyan'},
{'dark_green', 'Dark Green', '^[multiply:#2b7b00'},
{'dark_grey', 'Dark Grey', '^[multiply:#464646'},
{'green', 'Green', '^[multiply:#67eb1c'},
{'grey', 'Grey', '^[multiply:#818181'},
{'magenta', 'Magenta', '^[multiply:#d80481'},
{'orange', 'Orange', '^[multiply:#e0601a'},
{'pink', 'Pink', '^[multiply:#ffa5a5'},
{'red', 'Red', '^[multiply:#c91818'},
{'violet', 'Violet', '^[multiply:#480680'},
{'white', 'White', '^[multiply:white'},
{'yellow', 'Yellow', '^[multiply:#fcf611'},
{'cement', 'Concrete', ''},
}
for i in ipairs (color_tab) do
local col = color_tab[i][1]
local coldesc = color_tab[i][2]
local alpha = color_tab[i][3]
local color_tab = { minetest.register_node('mylandscaping:awall_'..typ..'_'..col, {
{"black", "Black", "^[colorize:black:150"}, description = desc2..' '..coldesc,
{"blue", "Blue", "^[colorize:#0404B4:100"}, drawtype = 'mesh',
{"brown", "Brown", "^[colorize:#190B07:100"}, mesh = 'mylandscaping_'..obj..'.obj',
{"cyan", "Cyan", "^[colorize:cyan:100"}, tiles = {name='mylandscaping_adaridge_tex.png'..alpha},
{"dark_green", "Dark Green", "^[colorize:#071907:150"}, groups = grup,
{"dark_grey", "Dark Grey", "^[colorize:black:150"}, paramtype = 'light',
{"green", "Green", "^[colorize:green:100"}, paramtype2 = 'facedir',
{"grey", "Grey", "^[colorize:black:100"}, drop = 'mylandscaping:awall_'..drops..'_'..col,
{"magenta", "Magenta", "^[colorize:magenta:100"}, selection_box = colbox,
{"orange", "Orange", "^[colorize:orange:100"}, collision_box = colbox,
{"pink", "Pink", "^[colorize:#FE2E9A:100"}, sounds = default.node_sound_stone_defaults(),
{"red", "Red", "^[colorize:#B40404:100"},
{"violet", "Violet", "^[colorize:#2F0B3A:100"},
{"white", "White", "^[colorize:white:100"},
{"yellow", "Yellow", "^[colorize:yellow:100"},
{"cement", "Concrete", ""},
}
for i in ipairs (color_tab) do
local col = color_tab[i][1]
local coldesc = color_tab[i][2]
local alpha = color_tab[i][3]
minetest.register_node('mylandscaping:awall_'..typ.."_"..col, { after_place_node = function(pos, placer, itemstack, pointed_thing)
description = desc2.." "..coldesc, local nodeu = minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z})
drawtype = 'mesh', local nodea = minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z})
mesh = 'mylandscaping_'..obj..'.obj', local node = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z})
tiles = {name='mylandscaping_adaridge_tex.png'..alpha}, if nodeu.name == 'mylandscaping:awall_'..typ..'_'..col then
groups = grup, minetest.swap_node(pos,{name='mylandscaping:awall_'..typ..'_'..col,param2=nodeu.param2})
paramtype = 'light', minetest.swap_node({x=pos.x,y=pos.y-1,z=pos.z},{name='mylandscaping:awall_b'..typ..'_'..col,param2=nodeu.param2})
paramtype2 = 'facedir', end
drop = 'mylandscaping:awall_'..drops.."_"..col, if nodea.name == 'mylandscaping:awall_'..typ..'_'..col then
selection_box = colbox, minetest.swap_node(pos,{name='mylandscaping:awall_b'..typ..'_'..col,param2=nodea.param2})
collision_box = colbox, end
sounds = default.node_sound_stone_defaults(), end,
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:awall_"..typ.."_"..col then
minetest.set_node(pos,{name="mylandscaping:awall_"..typ.."_"..col,param2=nodeu.param2})
minetest.set_node({x=pos.x,y=pos.y-1,z=pos.z},{name="mylandscaping:awall_b"..typ.."_"..col,param2=nodeu.param2})
end
if nodea.name == "mylandscaping:awall_"..typ..col then
minetest.set_node(pos,{name="mylandscaping:awall_b"..typ.."_"..col,param2=node.param2})
end
end,
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
minetest.set_node({x=pos.x,y=pos.y-1,z=pos.z},{name="mylandscaping:awall_"..typ.."_"..col,param2=nodeu.param2})
end
end,
})
end after_destruct = function(pos, oldnode)
local nodeu = minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z})
if nodeu.name == 'mylandscaping:awall_b'..typ..'_'..col then
minetest.swap_node({x=pos.x,y=pos.y-1,z=pos.z},{name='mylandscaping:awall_'..typ..'_'..col,param2=nodeu.param2})
end
end,
})
end
end end

View File

@ -8,77 +8,76 @@ local colbox_type2 = { --wall
} }
local block_type1 = { -- desc2, obj, colbox, grup, local block_type1 = { -- desc2, obj, colbox, grup,
{"Deco Wall Scalloped", "wall_s", colbox_type2, {ml=1,cracky=2,not_in_creative_inventory=mylandscaping_visible}}, {"Deco Wall Scalloped", "wall_s", colbox_type2, {ml=1,cracky=2,not_in_creative_inventory=ml_visible}},
{"Deco Wall Flat Top", "wall_f", colbox_type2, {ml=1,cracky=2,not_in_creative_inventory=mylandscaping_visible}}, {"Deco Wall Flat Top", "wall_f", colbox_type2, {ml=1,cracky=2,not_in_creative_inventory=ml_visible}},
{'Deco Wall Peaked Top', 'wall_p', colbox_type2, {ml=1,cracky=2,not_in_creative_inventory=mylandscaping_visible}}, {'Deco Wall Peaked Top', 'wall_p', colbox_type2, {ml=1,cracky=2,not_in_creative_inventory=ml_visible}},
{'Deco Wall Random Top', 'wall_r', colbox_type2, {ml=1,cracky=2,not_in_creative_inventory=mylandscaping_visible}}, {'Deco Wall Random Top', 'wall_r', colbox_type2, {ml=1,cracky=2,not_in_creative_inventory=ml_visible}},
{"Deco Wall Column", "column", colbox_type1, {ml=1,cracky=2,not_in_creative_inventory=mylandscaping_visible}}, {"Deco Wall Column", "column", colbox_type1, {ml=1,cracky=2,not_in_creative_inventory=ml_visible}},
} }
for i in ipairs (block_type1) do for i in ipairs (block_type1) do
local desc2 = block_type1[i][1] local desc2 = block_type1[i][1]
local obj = block_type1[i][2] local obj = block_type1[i][2]
local colbox = block_type1[i][3] local colbox = block_type1[i][3]
local grup = block_type1[i][4] local grup = block_type1[i][4]
local color_tab = {
{'black', 'Black', '^[multiply:#2c2c2c'},
{'blue', 'Blue', '^[multiply:#0041f4'},
{'brown', 'Brown', '^[multiply:#6c3800'},
{'cyan', 'Cyan', '^[multiply:cyan'},
{'dark_green', 'Dark Green', '^[multiply:#2b7b00'},
{'dark_grey', 'Dark Grey', '^[multiply:#464646'},
{'green', 'Green', '^[multiply:#67eb1c'},
{'grey', 'Grey', '^[multiply:#818181'},
{'magenta', 'Magenta', '^[multiply:#d80481'},
{'orange', 'Orange', '^[multiply:#e0601a'},
{'pink', 'Pink', '^[multiply:#ffa5a5'},
{'red', 'Red', '^[multiply:#c91818'},
{'violet', 'Violet', '^[multiply:#480680'},
{'white', 'White', '^[multiply:white'},
{'yellow', 'Yellow', '^[multiply:#fcf611'},
{'cement', 'Concrete', ''},
}
for i in ipairs (color_tab) do
local col = color_tab[i][1]
local coldesc = color_tab[i][2]
local alpha = color_tab[i][3]
local color_tab = { minetest.register_node('mylandscaping:deco_'..obj..'_'..col, {
{"black", "Black", "^[colorize:black:150"}, description = desc2.." "..coldesc,
{"blue", "Blue", "^[colorize:#0404B4:100"}, drawtype = 'mesh',
{"brown", "Brown", "^[colorize:#190B07:100"}, mesh = 'mylandscaping_deco_'..obj..'.obj',
{"cyan", "Cyan", "^[colorize:cyan:100"}, tiles = {{name='mylandscaping_block_split.png'..alpha}, {name='mylandscaping_block_smooth.png'..alpha}},
{"dark_green", "Dark Green", "^[colorize:#071907:150"}, groups = grup,
{"dark_grey", "Dark Grey", "^[colorize:black:150"}, paramtype = 'light',
{"green", "Green", "^[colorize:green:100"}, paramtype2 = 'facedir',
{"grey", "Grey", "^[colorize:black:100"}, selection_box = colbox,
{"magenta", "Magenta", "^[colorize:magenta:100"}, collision_box = colbox,
{"orange", "Orange", "^[colorize:orange:100"}, sounds = default.node_sound_stone_defaults(),
{"pink", "Pink", "^[colorize:#FE2E9A:100"}, })
{"red", "Red", "^[colorize:#B40404:100"},
{"violet", "Violet", "^[colorize:#2F0B3A:100"},
{"white", "White", "^[colorize:white:100"},
{"yellow", "Yellow", "^[colorize:yellow:100"},
{"cement", "Concrete", ""},
}
for i in ipairs (color_tab) do
local col = color_tab[i][1]
local coldesc = color_tab[i][2]
local alpha = color_tab[i][3]
minetest.register_node('mylandscaping:deco_'..obj..'_'..col, { minetest.register_node('mylandscaping:deco_column_light_'..col, {
description = desc2.." "..coldesc, description = coldesc..'lighted column',
drawtype = 'mesh', drawtype = 'mesh',
mesh = 'mylandscaping_deco_'..obj..'.obj', mesh = 'mylandscaping_deco_column_l.obj',
tiles = {{name='mylandscaping_block_split.png'..alpha}, {name='mylandscaping_block_smooth.png'..alpha}}, tiles = {
groups = grup, {name='mylandscaping_block_split.png'..alpha},
paramtype = 'light', {name='mylandscaping_block_smooth.png'..alpha},
paramtype2 = 'facedir', {name='mylandscaping_block_smooth.png^[colorize:yellow:255'},
selection_box = colbox, {name='mylandscaping_block_smooth.png^[colorize:#190B07:200'}},
collision_box = colbox, groups = grup,
sounds = default.node_sound_stone_defaults(), paramtype = 'light',
}) paramtype2 = 'facedir',
light_source = LIGHT_MAX,
selection_box = colbox_type1,
collision_box = colbox_type1,
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node('mylandscaping:deco_column_light_'..col, { minetest.register_craft({
description = coldesc..'lighted column', type = 'shapeless',
drawtype = 'mesh', output = 'mylandscaping:deco_column_light_'..col,
mesh = 'mylandscaping_deco_column_l.obj', recipe = {'default:torch', 'mylandscaping:deco_column_'..col}
tiles = { })
{name='mylandscaping_block_split.png'..alpha},
{name='mylandscaping_block_smooth.png'..alpha},
{name='mylandscaping_block_smooth.png^[colorize:yellow:255'},
{name='mylandscaping_block_smooth.png^[colorize:#190B07:200'}},
groups = grup,
paramtype = 'light',
paramtype2 = 'facedir',
light_source = LIGHT_MAX,
selection_box = colbox_type1,
collision_box = colbox_type1,
sounds = default.node_sound_stone_defaults(),
})
minetest.register_craft({
type = 'shapeless',
output = 'mylandscaping:deco_column_light_'..col,
recipe = {'default:torch', 'mylandscaping:deco_column_'..col}
})
end end
end end

View File

@ -1,44 +1,44 @@
local colbox_type1 = { --top blocks local colbox_type1 = { --top blocks
type = "fixed", type = 'fixed',
fixed = {{-.49, -.5, 0.05, .5, .6, .52}} fixed = {{-.49, -.5, 0.05, .5, .5, .52}}
} }
local colbox_type2 = { --columns local colbox_type2 = { --columns
type = "fixed", type = 'fixed',
fixed = {{-.2, -.5, -.2, .5, .5, .5}} fixed = {{-.2, -.5, -.2, .5, .5, .5}}
} }
local colbox_type3 = { --bottom blocks local colbox_type3 = { --bottom blocks
type = "fixed", type = 'fixed',
fixed = {{-.5, -.5, -.16, .5, .5, .25}} fixed = {{-.5, -.5, -.16, .5, .5, .25}}
} }
local colbox_type4 = { --corner local colbox_type4 = { --corner
type = "fixed", type = 'fixed',
fixed = {{-.5, -.5, 0, .5, .5, .5}, fixed = {{-.5, -.5, 0, .5, .5, .5},
{0, -.5, -.5, .5, .5, .5}} {0, -.5, -.5, .5, .5, .5}}
} }
local colbox_type5 = { --corner local colbox_type5 = { --corner
type = "fixed", type = 'fixed',
fixed = {{-.5, -.5, -.5, .5, .5, .5},} fixed = {{-.5, -.5, -.5, .5, .5, .5},}
} }
local colbox_type6 = { --corner local colbox_type6 = { --corner
type = "fixed", type = 'fixed',
fixed = {{-.5, -.5, -.3, .5, .5, .5},} fixed = {{-.5, -.5, -.3, .5, .5, .5},}
} }
local block_type1 = { -- desc2, typ, obj, colbox, drops, grup local block_type1 = { -- desc2, typ, obj, colbox, drops, grup
{"Retaining Wall Left", "left", "blockf_l_t", colbox_type1, "left", {ml=1,cracky=2,not_in_creative_inventory=mylandscaping_visible}}, {'Freeport Left', 'left', 'blockf_l_t', colbox_type1, 'left', {ml=1,cracky=2,not_in_creative_inventory=ml_visible}},
{"Retaining Wall Middle", "middle", "blockf_m_t", colbox_type1, "middle", {ml=1,cracky=2,not_in_creative_inventory=mylandscaping_visible}}, {'Freeport Middle', 'middle', 'blockf_m_t', colbox_type1, 'middle', {ml=1,cracky=2,not_in_creative_inventory=ml_visible}},
{"Retaining Wall Right", "right", "blockf_r_t", colbox_type1, "right", {ml=1,cracky=2,not_in_creative_inventory=mylandscaping_visible}}, {'Freeport Right', 'right', 'blockf_r_t', colbox_type1, 'right', {ml=1,cracky=2,not_in_creative_inventory=ml_visible}},
{"Retaining Wall Corner", "corner", "blockf_c_t", colbox_type4, "corner", {ml=1,cracky=2,not_in_creative_inventory=mylandscaping_visible}}, {'Freeport Inside Corner', 'corner', 'blockf_c_t', colbox_type4, 'corner', {ml=1,cracky=2,not_in_creative_inventory=ml_visible}},
{"Retaining Wall Left Bot", "bleft", "blockf_l_b", colbox_type3, "left", {not_in_creative_inventory=mylandscaping_visible}}, {'Hax0r', 'bleft', 'blockf_l_b', colbox_type3, 'left', {not_in_creative_inventory=1}},
{"Retaining Wall Middle Bot", "bmiddle", "blockf_m_b", colbox_type3, "middle", {not_in_creative_inventory=mylandscaping_visible}}, {'Hax0r', 'bmiddle', 'blockf_m_b', colbox_type3, 'middle', {not_in_creative_inventory=1}},
{"Retaining Wall Right Bot", "bright", "blockf_r_b", colbox_type3, "right", {not_in_creative_inventory=mylandscaping_visible}}, {'Hax0r', 'bright', 'blockf_r_b', colbox_type3, 'right', {not_in_creative_inventory=1}},
{"Retaining Wall Corner Bot", "bcorner", "blockf_c_b", colbox_type4, "corner", {not_in_creative_inventory=mylandscaping_visible}}, {'Hax0r', 'bcorner', 'blockf_c_b', colbox_type4, 'corner', {not_in_creative_inventory=1}},
{"Column Inside Corner", "column_ic_t", "columnf_ic_t", colbox_type5, "column_ic_t", {ml=1,cracky=2,not_in_creative_inventory=mylandscaping_visible}}, {'Freeport Column (IC)', 'column_ic_t', 'columnf_ic_t', colbox_type5, 'column_ic_t', {ml=1,cracky=2,not_in_creative_inventory=ml_visible}},
{"Column Outside Corner", "column_oc_t", "columnf_oc_t", colbox_type2, "column_oc_t", {ml=1,cracky=2,not_in_creative_inventory=mylandscaping_visible}}, {'Freeport Column (OC)', 'column_oc_t', 'columnf_oc_t', colbox_type2, 'column_oc_t', {ml=1,cracky=2,not_in_creative_inventory=ml_visible}},
{"Column Middle", "column_m_t", "columnf_m_t", colbox_type6, "column_m_t", {ml=1,cracky=2,not_in_creative_inventory=mylandscaping_visible}}, {'Freeport Column (M)', 'column_m_t', 'columnf_m_t', colbox_type6, 'column_m_t', {ml=1,cracky=2,not_in_creative_inventory=ml_visible}},
{"Column Inside Corner Bot", "bcolumn_ic_t", "columnf_ic_b", colbox_type5, "column_ic_b", {not_in_creative_inventory=mylandscaping_visible}}, {'Hax0r', 'bcolumn_ic_t', 'columnf_ic_b', colbox_type5, 'column_ic_b', {not_in_creative_inventory=1}},
{"Column Outside Corner Bot", "bcolumn_oc_t", "columnf_oc_b", colbox_type2, "column_oc_b", {not_in_creative_inventory=mylandscaping_visible}}, {'Hax0r', 'bcolumn_oc_t', 'columnf_oc_b', colbox_type2, 'column_oc_b', {not_in_creative_inventory=1}},
{"Column Middle Bot", "bcolumn_m_t", "columnf_m_b", colbox_type6, "column_m_b", {not_in_creative_inventory=mylandscaping_visible}}, {'Hax0r', 'bcolumn_m_t', 'columnf_m_b', colbox_type6, 'column_m_b', {not_in_creative_inventory=1}},
} }
for i in ipairs (block_type1) do for i in ipairs (block_type1) do
local desc2 = block_type1[i][1] local desc2 = block_type1[i][1]
@ -47,69 +47,61 @@ for i in ipairs (block_type1) do
local colbox = block_type1[i][4] local colbox = block_type1[i][4]
local drops = block_type1[i][5] local drops = block_type1[i][5]
local grup = block_type1[i][6] local grup = block_type1[i][6]
local color_tab = {
{'black', 'Black', '^[multiply:#2c2c2c'},
{'blue', 'Blue', '^[multiply:#0041f4'},
{'brown', 'Brown', '^[multiply:#6c3800'},
{'cyan', 'Cyan', '^[multiply:cyan'},
{'dark_green', 'Dark Green', '^[multiply:#2b7b00'},
{'dark_grey', 'Dark Grey', '^[multiply:#464646'},
{'green', 'Green', '^[multiply:#67eb1c'},
{'grey', 'Grey', '^[multiply:#818181'},
{'magenta', 'Magenta', '^[multiply:#d80481'},
{'orange', 'Orange', '^[multiply:#e0601a'},
{'pink', 'Pink', '^[multiply:#ffa5a5'},
{'red', 'Red', '^[multiply:#c91818'},
{'violet', 'Violet', '^[multiply:#480680'},
{'white', 'White', '^[multiply:white'},
{'yellow', 'Yellow', '^[multiply:#fcf611'},
{'cement', 'Concrete', ''},
}
for i in ipairs (color_tab) do
local col = color_tab[i][1]
local coldesc = color_tab[i][2]
local alpha = color_tab[i][3]
local color_tab = { minetest.register_node('mylandscaping:fwall_'..typ..'_'..col, {
{"black", "Black", "^[colorize:black:150"}, description = desc2..' '..coldesc,
{"blue", "Blue", "^[colorize:#0404B4:100"}, drawtype = 'mesh',
{"brown", "Brown", "^[colorize:#190B07:100"}, mesh = 'mylandscaping_'..obj..'.obj',
{"cyan", "Cyan", "^[colorize:cyan:100"}, tiles = {{name='mylandscaping_block_smooth.png'..alpha}, {name='mylandscaping_block_split.png'..alpha}},
{"dark_green", "Dark Green", "^[colorize:#071907:150"}, groups = grup,
{"dark_grey", "Dark Grey", "^[colorize:black:150"}, paramtype = 'light',
{"green", "Green", "^[colorize:green:100"}, paramtype2 = 'facedir',
{"grey", "Grey", "^[colorize:black:100"}, drop = 'mylandscaping:fwall_'..drops..'_'..col,
{"magenta", "Magenta", "^[colorize:magenta:100"}, selection_box = colbox,
{"orange", "Orange", "^[colorize:orange:100"}, collision_box = colbox,
{"pink", "Pink", "^[colorize:#FE2E9A:100"}, sounds = default.node_sound_stone_defaults(),
{"red", "Red", "^[colorize:#B40404:100"},
{"violet", "Violet", "^[colorize:#2F0B3A:100"},
{"white", "White", "^[colorize:white:100"},
{"yellow", "Yellow", "^[colorize:yellow:100"},
{"cement", "Concrete", ""},
}
for i in ipairs (color_tab) do
local col = color_tab[i][1]
local coldesc = color_tab[i][2]
local alpha = color_tab[i][3]
minetest.register_node('mylandscaping:fwall_'..typ.."_"..col, { after_place_node = function(pos, placer, itemstack)
description = desc2.." "..coldesc, local nodeu = minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z})
drawtype = 'mesh', local nodea = minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z})
mesh = 'mylandscaping_'..obj..'.obj', if nodeu.name == 'mylandscaping:fwall_'..typ..'_'..col then
tiles = {{name='mylandscaping_block_smooth.png'..alpha}, {name='mylandscaping_block_split.png'..alpha}}, minetest.swap_node(pos,{name='mylandscaping:fwall_'..typ..'_'..col,param2=nodeu.param2})
groups = grup, minetest.swap_node({x=pos.x,y=pos.y-1,z=pos.z},{name='mylandscaping:fwall_b'..typ..'_'..col,param2=nodeu.param2})
paramtype = 'light', end
paramtype2 = 'facedir', if nodea.name == 'mylandscaping:fwall_'..typ..'_'..col then
drop = 'mylandscaping:fwall_'..drops.."_"..col, minetest.swap_node(pos,{name='mylandscaping:fwall_b'..typ..'_'..col,param2=nodea.param2})
selection_box = colbox, end
collision_box = colbox, end,
sounds = default.node_sound_stone_defaults(),
after_place_node = function(pos, placer, itemstack, pointed_thing) after_destruct = function(pos, oldnode)
local nodeu = minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z}) 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 then
local node = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}) minetest.swap_node({x=pos.x,y=pos.y-1,z=pos.z},{name='mylandscaping:fwall_'..typ..'_'..col,param2=nodeu.param2})
if nodeu.name == "mylandscaping:fwall_"..typ.."_"..col then end
minetest.set_node(pos,{name="mylandscaping:fwall_"..typ.."_"..col,param2=nodeu.param2}) end,
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})
end
end,
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: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})
end
end,
})
end })
end
end end

View File

@ -1,37 +1,37 @@
local colbox_type1 = { --top blocks local colbox_type1 = { --top blocks
type = "fixed", type = 'fixed',
fixed = {-.5, -.5, -.2, .5, .6, .5} fixed = {-.5, -.5, -.2, .5, .5, .5}
} }
local colbox_type2 = { --bottom blocks local colbox_type2 = { --bottom blocks
type = "fixed", type = 'fixed',
fixed = {-.5, -.5, -.2, .5, .5, .5} fixed = {-.5, -.5, -.2, .5, .5, .5}
} }
local colbox_type3 = { --top inside corner local colbox_type3 = { --top inside corner
type = "fixed", type = 'fixed',
fixed = {{-.2, -.5, -.5, .5, .6, .5}, fixed = {{-.2, -.5, -.5, .5, .5, .5},
{-.5, -.5, -.2, .5, .6, .5}} {-.5, -.5, -.2, .5, .5, .5}}
} }
local colbox_type4 = { --bottom inside corner local colbox_type4 = { --bottom inside corner
type = "fixed", type = 'fixed',
fixed = {{-.2, -.5, -.5, .5, .5, .5}, fixed = {{-.2, -.5, -.5, .5, .5, .5},
{-.5, -.5, -.2, .5, .5, .5}} {-.5, -.5, -.2, .5, .5, .5}}
} }
local colbox_type5 = { --top outside corner local colbox_type5 = { --top outside corner
type = "fixed", type = 'fixed',
fixed = {-.2, -.5, -.2, .5, .6, .5} fixed = {-.2, -.5, -.2, .5, .5, .5}
} }
local colbox_type6 = { --bottom outside corner local colbox_type6 = { --bottom outside corner
type = "fixed", type = 'fixed',
fixed = {-.2, -.5, -.2, .5, .5, .5} fixed = {-.2, -.5, -.2, .5, .5, .5}
} }
local block_type1 = { -- desc2, typ, obj, colbox, drops, grup local block_type1 = { -- desc2, typ, obj, colbox, drops, grup
{"Retaining Wall Middle", "middle", "blockm_m_t", colbox_type1, "middle", {ml=1,cracky=2,not_in_creative_inventory=mylandscaping_visible}}, {'Madison Middle', 'middle', 'blockm_m_t', colbox_type1, 'middle', {ml=1,cracky=2,not_in_creative_inventory=ml_visible}},
{"Retaining Wall Middle Bot", "bmiddle", "blockm_m_b", colbox_type2, "middle", {not_in_creative_inventory=mylandscaping_visible}}, {'Hax0r', 'bmiddle', 'blockm_m_b', colbox_type2, 'middle', {not_in_creative_inventory=1}},
{"Retaining Wall Inside Corner", "icorner", "blockm_ic_t", colbox_type3, "icorner", {ml=1,cracky=2,not_in_creative_inventory=mylandscaping_visible}}, {'Madison Inside Corner', 'icorner', 'blockm_ic_t', colbox_type3, 'icorner', {ml=1,cracky=2,not_in_creative_inventory=ml_visible}},
{"Retaining Wall Inside Corner Bot", "bicorner", "blockm_ic_b", colbox_type4, "icorner", {not_in_creative_inventory=mylandscaping_visible}}, {'Hax0r', 'bicorner', 'blockm_ic_b', colbox_type4, 'icorner', {not_in_creative_inventory=1}},
{"Retaining Wall Outside Corner", "ocorner", "blockm_oc_t", colbox_type5, "ocorner", {ml=1,cracky=2,not_in_creative_inventory=mylandscaping_visible}}, {'Madison Outside Corner', 'ocorner', 'blockm_oc_t', colbox_type5, 'ocorner', {ml=1,cracky=2,not_in_creative_inventory=ml_visible}},
{"Retaining Wall Outside Corner Bot", "bocorner", "blockm_oc_b", colbox_type6, "ocorner", {not_in_creative_inventory=mylandscaping_visible}}, {'Hax0r', 'bocorner', 'blockm_oc_b', colbox_type6, 'ocorner', {not_in_creative_inventory=1}},
} }
for i in ipairs (block_type1) do for i in ipairs (block_type1) do
@ -41,69 +41,60 @@ for i in ipairs (block_type1) do
local colbox = block_type1[i][4] local colbox = block_type1[i][4]
local drops = block_type1[i][5] local drops = block_type1[i][5]
local grup = block_type1[i][6] local grup = block_type1[i][6]
local color_tab = {
{'black', 'Black', '^[multiply:#2c2c2c'},
{'blue', 'Blue', '^[multiply:#0041f4'},
{'brown', 'Brown', '^[multiply:#6c3800'},
{'cyan', 'Cyan', '^[multiply:cyan'},
{'dark_green', 'Dark Green', '^[multiply:#2b7b00'},
{'dark_grey', 'Dark Grey', '^[multiply:#464646'},
{'green', 'Green', '^[multiply:#67eb1c'},
{'grey', 'Grey', '^[multiply:#818181'},
{'magenta', 'Magenta', '^[multiply:#d80481'},
{'orange', 'Orange', '^[multiply:#e0601a'},
{'pink', 'Pink', '^[multiply:#ffa5a5'},
{'red', 'Red', '^[multiply:#c91818'},
{'violet', 'Violet', '^[multiply:#480680'},
{'white', 'White', '^[multiply:white'},
{'yellow', 'Yellow', '^[multiply:#fcf611'},
{'cement', 'Concrete', ''},
}
for i in ipairs (color_tab) do
local col = color_tab[i][1]
local coldesc = color_tab[i][2]
local alpha = color_tab[i][3]
local color_tab = { minetest.register_node('mylandscaping:mwall_'..typ..'_'..col, {
{"black", "Black", "^[colorize:black:150"}, description = desc2..' '..coldesc,
{"blue", "Blue", "^[colorize:#0404B4:100"}, drawtype = 'mesh',
{"brown", "Brown", "^[colorize:#190B07:100"}, mesh = 'mylandscaping_'..obj..'.obj',
{"cyan", "Cyan", "^[colorize:cyan:100"}, tiles = {{name='mylandscaping_madison_wood.png'}, {name='mylandscaping_madison_stone.png'..alpha}},
{"dark_green", "Dark Green", "^[colorize:#071907:150"}, groups = grup,
{"dark_grey", "Dark Grey", "^[colorize:black:150"}, paramtype = 'light',
{"green", "Green", "^[colorize:green:100"}, paramtype2 = 'facedir',
{"grey", "Grey", "^[colorize:black:100"}, drop = 'mylandscaping:mwall_'..drops..'_'..col,
{"magenta", "Magenta", "^[colorize:magenta:100"}, selection_box = colbox,
{"orange", "Orange", "^[colorize:orange:100"}, collision_box = colbox,
{"pink", "Pink", "^[colorize:#FE2E9A:100"}, sounds = default.node_sound_stone_defaults(),
{"red", "Red", "^[colorize:#B40404:100"},
{"violet", "Violet", "^[colorize:#2F0B3A:100"},
{"white", "White", "^[colorize:white:100"},
{"yellow", "Yellow", "^[colorize:yellow:100"},
{"cement", "Concrete", ""},
}
for i in ipairs (color_tab) do
local col = color_tab[i][1]
local coldesc = color_tab[i][2]
local alpha = color_tab[i][3]
minetest.register_node('mylandscaping:mwall_'..typ.."_"..col, { after_place_node = function(pos, placer, itemstack, pointed_thing)
description = desc2.." "..coldesc, local nodeu = minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z})
drawtype = 'mesh', local nodea = minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z})
mesh = 'mylandscaping_'..obj..'.obj', if nodeu.name == 'mylandscaping:mwall_'..typ..'_'..col then
tiles = {{name='mylandscaping_madison_wood.png'}, {name='mylandscaping_madison_stone.png'..alpha}}, minetest.swap_node(pos,{name='mylandscaping:mwall_'..typ..'_'..col,param2=nodeu.param2})
groups = grup, minetest.swap_node({x=pos.x,y=pos.y-1,z=pos.z},{name='mylandscaping:mwall_b'..typ..'_'..col,param2=nodeu.param2})
paramtype = 'light', end
paramtype2 = 'facedir', if nodea.name == 'mylandscaping:mwall_'..typ..'_'..col then
drop = 'mylandscaping:mwall_'..drops.."_"..col, minetest.swap_node(pos,{name='mylandscaping:mwall_b'..typ..'_'..col,param2=nodea.param2})
selection_box = colbox, end
collision_box = colbox, end,
sounds = default.node_sound_stone_defaults(),
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})
end
end,
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: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})
end
end,
})
end after_destruct = function(pos, oldnode)
local nodeu = minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z})
if nodeu.name == 'mylandscaping:mwall_b'..typ..'_'..col then
minetest.swap_node({x=pos.x,y=pos.y-1,z=pos.z},{name='mylandscaping:mwall_'..typ..'_'..col,param2=nodeu.param2})
end
end,
})
end
end end