Removed brush crafting from the machine and simplified the machine functions.
Won't attempt to craft when there's a different item in the output. Created crafting recipes for the brushes.
This commit is contained in:
parent
9b171ae570
commit
ff3ebfa59d
340
machine.lua
340
machine.lua
@ -87,8 +87,8 @@ end,
|
||||
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec", "invsize[12,10;]"..
|
||||
"background[-0.15,-0.25;12.40,10.75;mydeck_background.png]"..
|
||||
meta:set_string("formspec", "invsize[9,10;]"..
|
||||
"background[-0.15,-0.25;9.3,10.75;mydeck_background.png]"..
|
||||
"label[6,4;Wood:]"..
|
||||
"list[current_name;ingot;6,4.5;1,1;]"..
|
||||
"label[7.5,4;Output:]"..
|
||||
@ -121,352 +121,100 @@ on_construct = function(pos)
|
||||
"item_image_button[3.5,4;1,1;mydeck:rail_icorner;railic; ]"..
|
||||
"item_image_button[4.5,4;1,1;mydeck:lattice;lattice; ]"..
|
||||
|
||||
"label[9.5,0.5;Craft Stain Brush]"..
|
||||
"label[10.5,1;Wool]"..
|
||||
"list[current_name;wool;9.5,1;1,1;]"..
|
||||
"label[10.5,2;Steel Ingot]"..
|
||||
"list[current_name;steel;9.5,2;1,1;]"..
|
||||
"label[10.5,3;Stick]"..
|
||||
"list[current_name;stick;9.5,3;1,1;]"..
|
||||
"button[9.5,4;1,1;mbrush;Make]"..
|
||||
"label[10.5,5;Brush]"..
|
||||
"list[current_name;brush;9.5,5;1,1;]"..
|
||||
"label[10.5,6;Dye]"..
|
||||
"list[current_name;dye;9.5,6;1,1;]"..
|
||||
"button[9.5,7;1,1;mcbrush;Make]"..
|
||||
"list[current_name;cbrush;9.5,8;1,1;]"..
|
||||
|
||||
"list[current_player;main;0.5,6;8,4;]")
|
||||
meta:set_string("infotext", "Deck Machine")
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("ingot", 1)
|
||||
inv:set_size("res", 1)
|
||||
inv:set_size("wool", 1)
|
||||
inv:set_size("steel", 1)
|
||||
inv:set_size("stick", 1)
|
||||
inv:set_size("brush", 1)
|
||||
inv:set_size("dye", 1)
|
||||
inv:set_size("cbrush", 1)
|
||||
end,
|
||||
|
||||
on_receive_fields = function(pos, formname, fields, sender)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
|
||||
if fields["joists"]
|
||||
or fields["joistside"]
|
||||
or fields["joistend"]
|
||||
or fields["joistsidend"]
|
||||
or fields["joistendr"]
|
||||
or fields["joistsidendr"]
|
||||
|
||||
or fields["post"]
|
||||
or fields["beam"]
|
||||
or fields["stairs"]
|
||||
or fields["stairso"]
|
||||
or fields["stairsi"]
|
||||
or fields["sraill"]
|
||||
or fields["srailr"]
|
||||
|
||||
or fields["deckb"]
|
||||
or fields["rail"]
|
||||
or fields["railc"]
|
||||
or fields["railic"]
|
||||
or fields["lattice"]
|
||||
then
|
||||
local material_group = "wood"
|
||||
local ingotstack = inv:get_stack("ingot", 1)
|
||||
local resstack = inv:get_stack("res", 1)
|
||||
local anzahl = 0
|
||||
local shape
|
||||
|
||||
if fields["joists"] then
|
||||
make_ok = "0"
|
||||
anzahl = "2"
|
||||
shape = "mydeck:joists"
|
||||
if inv:is_empty("ingot") then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
if fields["joistside"] then
|
||||
make_ok = "0"
|
||||
elseif fields["joistside"] then
|
||||
anzahl = "2"
|
||||
shape = "mydeck:joists_side"
|
||||
if inv:is_empty("ingot") then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
if fields["joistend"] then
|
||||
make_ok = "0"
|
||||
elseif fields["joistend"] then
|
||||
anzahl = "2"
|
||||
shape = "mydeck:joists_end"
|
||||
if inv:is_empty("ingot") then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
if fields["joistsidend"] then
|
||||
make_ok = "0"
|
||||
elseif fields["joistsidend"] then
|
||||
anzahl = "2"
|
||||
shape = "mydeck:joists_side_endr"
|
||||
if inv:is_empty("ingot") then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
if fields["joistendr"] then
|
||||
make_ok = "0"
|
||||
elseif fields["joistendr"] then
|
||||
anzahl = "2"
|
||||
shape = "mydeck:joists_endr"
|
||||
if inv:is_empty("ingot") then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
if fields["joistsidendr"] then
|
||||
make_ok = "0"
|
||||
elseif fields["joistsidendr"] then
|
||||
anzahl = "2"
|
||||
shape = "mydeck:joists_side_end"
|
||||
if inv:is_empty("ingot") then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
if fields["post"] then
|
||||
make_ok = "0"
|
||||
elseif fields["post"] then
|
||||
anzahl = "4"
|
||||
shape = "mydeck:post"
|
||||
if inv:is_empty("ingot") then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
if fields["beam"] then
|
||||
make_ok = "0"
|
||||
elseif fields["beam"] then
|
||||
anzahl = "1"
|
||||
shape = "mydeck:beam"
|
||||
if inv:is_empty("ingot") then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
if fields["stairs"] then
|
||||
make_ok = "0"
|
||||
elseif fields["stairs"] then
|
||||
anzahl = "1"
|
||||
shape = "mydeck:stairs"
|
||||
if inv:is_empty("ingot") then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
if fields["stairso"] then
|
||||
make_ok = "0"
|
||||
elseif fields["stairso"] then
|
||||
anzahl = "1"
|
||||
shape = "mydeck:stairs_ocorner"
|
||||
if inv:is_empty("ingot") then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
if fields["stairsi"] then
|
||||
make_ok = "0"
|
||||
elseif fields["stairsi"] then
|
||||
anzahl = "1"
|
||||
shape = "mydeck:stairs_icorner"
|
||||
if inv:is_empty("ingot") then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
if fields["sraill"] then
|
||||
make_ok = "0"
|
||||
elseif fields["sraill"] then
|
||||
anzahl = "3"
|
||||
shape = "mydeck:stairs_raill"
|
||||
if inv:is_empty("ingot") then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
if fields["srailr"] then
|
||||
make_ok = "0"
|
||||
elseif fields["srailr"] then
|
||||
anzahl = "3"
|
||||
shape = "mydeck:stairs_railr"
|
||||
if inv:is_empty("ingot") then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
if fields["deckb"] then
|
||||
make_ok = "0"
|
||||
elseif fields["deckb"] then
|
||||
anzahl = "4"
|
||||
shape = "mydeck:deck_boards"
|
||||
if inv:is_empty("ingot") then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
if fields["rail"] then
|
||||
make_ok = "0"
|
||||
elseif fields["rail"] then
|
||||
anzahl = "2"
|
||||
shape = "mydeck:rail"
|
||||
if inv:is_empty("ingot") then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
if fields["railc"] then
|
||||
make_ok = "0"
|
||||
elseif fields["railc"] then
|
||||
anzahl = "1"
|
||||
shape = "mydeck:rail_corner"
|
||||
if inv:is_empty("ingot") then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
if fields["railic"] then
|
||||
make_ok = "0"
|
||||
elseif fields["railic"] then
|
||||
anzahl = "4"
|
||||
shape = "mydeck:rail_icorner"
|
||||
if inv:is_empty("ingot") then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
if fields["lattice"] then
|
||||
make_ok = "0"
|
||||
elseif fields["lattice"] then
|
||||
anzahl = "4"
|
||||
shape = "mydeck:lattice"
|
||||
if inv:is_empty("ingot") then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
local ingotstack = inv:get_stack("ingot", 1)
|
||||
local resstack = inv:get_stack("res", 1)
|
||||
----------------------------------------------------------------------------------
|
||||
--register nodes
|
||||
----------------------------------------------------------------------------------
|
||||
local gwood = minetest.registered_aliases[ingotstack:get_name()]
|
||||
if not gwood then
|
||||
gwood = ingotstack:get_name()
|
||||
end
|
||||
local allwood = minetest.registered_items[gwood]
|
||||
|
||||
if allwood and allwood.groups and allwood.groups["wood"] then
|
||||
make_ok = "1"
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
if make_ok == "1" then
|
||||
local give = {}
|
||||
for i = 0, anzahl-1 do
|
||||
give[i+1]=inv:add_item("res",shape)
|
||||
end
|
||||
ingotstack:take_item()
|
||||
inv:set_stack("ingot",1,ingotstack)
|
||||
end
|
||||
end --if fields
|
||||
----------------------------------------------------------------------
|
||||
if fields["pile"] then
|
||||
make_ok = "0"
|
||||
elseif fields["pile"] then
|
||||
anzahl = "1"
|
||||
shape = "mydeck:pile"
|
||||
if inv:is_empty("ingot") then
|
||||
return
|
||||
end
|
||||
|
||||
local ingotstack = inv:get_stack("ingot", 1)
|
||||
local resstack = inv:get_stack("res", 1)
|
||||
if ingotstack:get_name()== "default:stone" then
|
||||
material = "mydeck:pile"
|
||||
make_ok = "1"
|
||||
end
|
||||
-----------------------------------------------------------------------
|
||||
if make_ok == "1" then
|
||||
local give = {}
|
||||
for i = 0, anzahl-1 do
|
||||
give[i+1]=inv:add_item("res",shape)
|
||||
end
|
||||
ingotstack:take_item()
|
||||
inv:set_stack("ingot",1,ingotstack)
|
||||
end
|
||||
end --if fields
|
||||
---------------------------------------------------------------------
|
||||
|
||||
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 woolstack = inv:get_stack("wool", 1)
|
||||
local steelstack = inv:get_stack("steel", 1)
|
||||
local stickstack = inv:get_stack("stick", 1)
|
||||
local brushstack = inv:get_stack("brush", 1)
|
||||
local dyestack = inv:get_stack("dye", 1)
|
||||
|
||||
if fields["mbrush"]
|
||||
then
|
||||
if fields["mbrush"] then
|
||||
make_ok2 = "0"
|
||||
if inv:is_empty("wool") or
|
||||
inv:is_empty("steel") or
|
||||
inv:is_empty("stick") then
|
||||
return
|
||||
end
|
||||
material_group = "stone"
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
if woolstack:get_name()== "wool:"..col and
|
||||
steelstack:get_name()=="default:steel_ingot" and
|
||||
stickstack:get_name()== "default:stick" then
|
||||
material = "mydeck:stain_brush"
|
||||
make_ok2 = "1"
|
||||
if ingotstack:is_empty() or minetest.get_item_group(ingotstack:get_name(), material_group) == 0 then
|
||||
return true
|
||||
end
|
||||
if not resstack:is_empty() and resstack:get_name() ~= shape then
|
||||
return true
|
||||
end
|
||||
|
||||
if inv:is_empty("brush") and
|
||||
make_ok2 == "1" then
|
||||
inv:add_item("brush",material)
|
||||
woolstack:take_item()
|
||||
inv:set_stack("wool",1,woolstack)
|
||||
steelstack:take_item()
|
||||
inv:set_stack("steel",1,steelstack)
|
||||
stickstack:take_item()
|
||||
inv:set_stack("stick",1,stickstack)
|
||||
for i = 0, anzahl-1 do
|
||||
inv:add_item("res", shape)
|
||||
end
|
||||
|
||||
end --if fields
|
||||
|
||||
if fields["mcbrush"]
|
||||
then
|
||||
|
||||
if fields["mcbrush"] then
|
||||
make_ok3 = "0"
|
||||
if inv:is_empty("brush") or
|
||||
inv:is_empty("dye") then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
if brushstack:get_name()=="mydeck:stain_brush" and
|
||||
dyestack:get_name()=="dye:"..col then
|
||||
material = "mydeck:stain_brush_"..col
|
||||
make_ok3 = "1"
|
||||
end
|
||||
|
||||
if inv:is_empty("cbrush") and
|
||||
make_ok3 == "1" then
|
||||
inv:add_item("cbrush",material)
|
||||
brushstack:take_item()
|
||||
inv:set_stack("brush",1,brushstack)
|
||||
dyestack:take_item()
|
||||
inv:set_stack("dye",1,dyestack)
|
||||
end
|
||||
|
||||
|
||||
end --if fields
|
||||
end --color table
|
||||
end --on_recieve
|
||||
ingotstack:take_item()
|
||||
inv:set_stack("ingot" ,1, ingotstack)
|
||||
end
|
||||
})
|
||||
|
||||
--Craft
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'mydeck:machine',
|
||||
recipe = {
|
||||
@ -476,15 +224,3 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
236
stain.lua
236
stain.lua
@ -18,27 +18,55 @@ local color_tab = {
|
||||
{"white", "White", "^[colorize:white:100"},
|
||||
{"yellow", "Yellow", "^[colorize:yellow:75"},
|
||||
}
|
||||
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_craftitem("mydeck:stain_brush",{
|
||||
description = "Stain Brush",
|
||||
inventory_image = "mydeck_paint_brush.png",
|
||||
stack_max = 1,
|
||||
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'mydeck:stain_brush',
|
||||
recipe = {
|
||||
{'wool:white'},
|
||||
{'group:stick'},
|
||||
}
|
||||
output = 'mydeck:stain_brush',
|
||||
recipe = {
|
||||
{'wool:white'},
|
||||
{'group:stick'},
|
||||
}
|
||||
})
|
||||
|
||||
local stainables = {
|
||||
"mydeck:deck_boards", "mydeck:deck_joists", "mydeck:deck_joists_side", "mydeck:deck_joists_end",
|
||||
"mydeck:deck_joists_side_end", "mydeck:deck_joists_endr", "mydeck:deck_joists_side_endr", "mydeck:rail",
|
||||
"mydeck:rail_corner", "mydeck:rail_icorner", "mydeck:beam", "mydeck:beam_wbracket", "mydeck:joists_beam",
|
||||
"mydeck:joists_beam_wbracket", "mydeck:joists_side_beam", "mydeck:joists_side_beam_wbracket",
|
||||
"mydeck:deck_joists_beam", "mydeck:deck_joists_beam_wbracket", "mydeck:deck_joists_side_beam",
|
||||
"mydeck:deck_joists_side_beam_wbracket", "mydeck:joists", "mydeck:joists_side", "mydeck:joists_end",
|
||||
"mydeck:joists_side_end", "mydeck:joists_endr", "mydeck:joists_side_endr", "mydeck:pile", "mydeck:pile_wpost",
|
||||
"mydeck:post", "mydeck:stairs", "mydeck:stairsb", "mydeck:stairs_ocorner", "mydeck:stairs_icorner",
|
||||
"mydeck:stairs_railr", "mydeck:stairs_raill", "mydeck:lattice", "mydeck:stairs_raill_end",
|
||||
"mydeck:stairs_railr_end", "mydeck:deck_beam", "mydeck:deck_boardss"
|
||||
}
|
||||
|
||||
function stain_node(pos, node, col, itemstack)
|
||||
for i, name in ipairs(stainables) do
|
||||
if node.name == name then
|
||||
minetest.set_node(pos,{name = name.."s_"..col, param2 = node.param2})
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
itemstack:add_wear(65535 / (USES - 1))
|
||||
end
|
||||
return itemstack
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
for i, entry in ipairs(color_tab) do
|
||||
local col = entry[1]
|
||||
local coldesc = entry[2]
|
||||
local alpha = entry[3]
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = 'mydeck:stain_brush_'..col,
|
||||
recipe = {'dye:'..col, 'mydeck:stain_brush'}
|
||||
})
|
||||
|
||||
minetest.register_tool("mydeck:stain_brush_"..col, {
|
||||
@ -46,182 +74,14 @@ minetest.register_tool("mydeck:stain_brush_"..col, {
|
||||
inventory_image = "mydeck_paint_brush_"..col..".png",
|
||||
groups = {not_in_creative_inventory=1},
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
if pointed_thing.type ~= "node" then
|
||||
return
|
||||
end
|
||||
local pos = pointed_thing.under
|
||||
local node = minetest.get_node(pos)
|
||||
|
||||
if pointed_thing.type ~= "node" then
|
||||
return
|
||||
return stain_node(pos, node, col, itemstack)
|
||||
end
|
||||
local pos = pointed_thing.under
|
||||
local node = minetest.get_node(pos)
|
||||
|
||||
if node.name == "mydeck:deck_boards" then
|
||||
minetest.set_node(pos,{name = "mydeck:deck_boardss_"..col, param2=node.param2})
|
||||
end
|
||||
|
||||
if node.name == "mydeck:deck_joists" then
|
||||
minetest.set_node(pos,{name = "mydeck:deck_joistss_"..col, param2=node.param2})
|
||||
end
|
||||
|
||||
if node.name == "mydeck:deck_joists_side" then
|
||||
minetest.set_node(pos,{name = "mydeck:deck_joists_sides_"..col, param2=node.param2})
|
||||
end
|
||||
|
||||
if node.name == "mydeck:deck_joists_end" then
|
||||
minetest.set_node(pos,{name = "mydeck:deck_joists_ends_"..col, param2=node.param2})
|
||||
end
|
||||
|
||||
if node.name == "mydeck:deck_joists_side_end" then
|
||||
minetest.set_node(pos,{name = "mydeck:deck_joists_side_ends_"..col, param2=node.param2})
|
||||
end
|
||||
|
||||
if node.name == "mydeck:deck_joists_endr" then
|
||||
minetest.set_node(pos,{name = "mydeck:deck_joists_endrs_"..col, param2=node.param2})
|
||||
end
|
||||
|
||||
if node.name == "mydeck:deck_joists_side_endr" then
|
||||
minetest.set_node(pos,{name = "mydeck:deck_joists_side_endrs_"..col, param2=node.param2})
|
||||
end
|
||||
|
||||
if node.name == "mydeck:rail" then
|
||||
minetest.set_node(pos,{name = "mydeck:rails_"..col, param2=node.param2})
|
||||
end
|
||||
|
||||
if node.name == "mydeck:rail_corner" then
|
||||
minetest.set_node(pos,{name = "mydeck:rail_corners_"..col, param2=node.param2})
|
||||
end
|
||||
|
||||
if node.name == "mydeck:rail_icorner" then
|
||||
minetest.set_node(pos,{name = "mydeck:rail_icorners_"..col, param2=node.param2})
|
||||
end
|
||||
|
||||
if node.name == "mydeck:beam" then
|
||||
minetest.set_node(pos,{name = "mydeck:beams_"..col, param2=node.param2})
|
||||
end
|
||||
|
||||
if node.name == "mydeck:beam_wbracket" then
|
||||
minetest.set_node(pos,{name = "mydeck:beam_wbrackets_"..col, param2=node.param2})
|
||||
end
|
||||
|
||||
if node.name == "mydeck:joists_beam" then
|
||||
minetest.set_node(pos,{name = "mydeck:joists_beams_"..col, param2=node.param2})
|
||||
end
|
||||
|
||||
if node.name == "mydeck:joists_beam_wbracket" then
|
||||
minetest.set_node(pos,{name = "mydeck:joists_beam_wbrackets_"..col, param2=node.param2})
|
||||
end
|
||||
|
||||
if node.name == "mydeck:joists_side_beam" then
|
||||
minetest.set_node(pos,{name = "mydeck:joists_side_beams_"..col, param2=node.param2})
|
||||
end
|
||||
|
||||
if node.name == "mydeck:joists_side_beam_wbracket" then
|
||||
minetest.set_node(pos,{name = "mydeck:joists_side_beam_wbrackets_"..col, param2=node.param2})
|
||||
end
|
||||
|
||||
if node.name == "mydeck:deck_joists_beam" then
|
||||
minetest.set_node(pos,{name = "mydeck:deck_joists_beams_"..col, param2=node.param2})
|
||||
end
|
||||
|
||||
if node.name == "mydeck:deck_joists_beam_wbracket" then
|
||||
minetest.set_node(pos,{name = "mydeck:deck_joists_beam_wbrackets_"..col, param2=node.param2})
|
||||
end
|
||||
|
||||
if node.name == "mydeck:deck_joists_side_beam" then
|
||||
minetest.set_node(pos,{name = "mydeck:deck_joists_side_beams_"..col, param2=node.param2})
|
||||
end
|
||||
|
||||
if node.name == "mydeck:deck_joists_side_beam_wbracket" then
|
||||
minetest.set_node(pos,{name = "mydeck:deck_joists_side_beam_wbrackets_"..col, param2=node.param2})
|
||||
end
|
||||
|
||||
if node.name == "mydeck:joists" then
|
||||
minetest.set_node(pos,{name = "mydeck:joistss_"..col, param2=node.param2})
|
||||
end
|
||||
|
||||
if node.name == "mydeck:joists_side" then
|
||||
minetest.set_node(pos,{name = "mydeck:joists_sides_"..col, param2=node.param2})
|
||||
end
|
||||
|
||||
if node.name == "mydeck:joists_end" then
|
||||
minetest.set_node(pos,{name = "mydeck:joists_ends_"..col, param2=node.param2})
|
||||
end
|
||||
|
||||
if node.name == "mydeck:joists_side_end" then
|
||||
minetest.set_node(pos,{name = "mydeck:joists_side_ends_"..col, param2=node.param2})
|
||||
end
|
||||
|
||||
if node.name == "mydeck:joists_endr" then
|
||||
minetest.set_node(pos,{name = "mydeck:joists_endrs_"..col, param2=node.param2})
|
||||
end
|
||||
|
||||
if node.name == "mydeck:joists_side_endr" then
|
||||
minetest.set_node(pos,{name = "mydeck:joists_side_endrs_"..col, param2=node.param2})
|
||||
end
|
||||
|
||||
if node.name == "mydeck:pile" then
|
||||
minetest.set_node(pos,{name = "mydeck:piles_"..col, param2=node.param2})
|
||||
end
|
||||
|
||||
if node.name == "mydeck:pile_wpost" then
|
||||
minetest.set_node(pos,{name = "mydeck:pile_wposts_"..col, param2=node.param2})
|
||||
end
|
||||
|
||||
if node.name == "mydeck:post" then
|
||||
minetest.set_node(pos,{name = "mydeck:posts_"..col, param2=node.param2})
|
||||
end
|
||||
|
||||
if node.name == "mydeck:stairs" then
|
||||
minetest.set_node(pos,{name = "mydeck:stairss_"..col, param2=node.param2})
|
||||
end
|
||||
|
||||
if node.name == "mydeck:stairsb" then
|
||||
minetest.set_node(pos,{name = "mydeck:stairsbs_"..col, param2=node.param2})
|
||||
end
|
||||
|
||||
if node.name == "mydeck:stairs_ocorner" then
|
||||
minetest.set_node(pos,{name = "mydeck:stairs_ocorners_"..col, param2=node.param2})
|
||||
end
|
||||
|
||||
if node.name == "mydeck:stairs_icorner" then
|
||||
minetest.set_node(pos,{name = "mydeck:stairs_icorners_"..col, param2=node.param2})
|
||||
end
|
||||
|
||||
if node.name == "mydeck:stairs_icorner" then
|
||||
minetest.set_node(pos,{name = "mydeck:stairs_icorners_"..col, param2=node.param2})
|
||||
end
|
||||
|
||||
if node.name == "mydeck:stairs_railr" then
|
||||
minetest.set_node(pos,{name = "mydeck:stairs_railrs_"..col, param2=node.param2})
|
||||
end
|
||||
|
||||
if node.name == "mydeck:stairs_raill" then
|
||||
minetest.set_node(pos,{name = "mydeck:stairs_raills_"..col, param2=node.param2})
|
||||
end
|
||||
|
||||
if node.name == "mydeck:lattice" then
|
||||
minetest.set_node(pos,{name = "mydeck:lattices_"..col, param2=node.param2})
|
||||
end
|
||||
|
||||
if node.name == "mydeck:stairs_raill_end" then
|
||||
minetest.set_node(pos,{name = "mydeck:stairs_raill_ends_"..col, param2=node.param2})
|
||||
end
|
||||
|
||||
if node.name == "mydeck:stairs_railr_end" then
|
||||
minetest.set_node(pos,{name = "mydeck:stairs_railr_ends_"..col, param2=node.param2})
|
||||
end
|
||||
|
||||
if node.name == "mydeck:deck_beam" then
|
||||
minetest.set_node(pos,{name = "mydeck:deck_beams_"..col, param2=node.param2})
|
||||
end
|
||||
|
||||
if node.name == "mydeck:deck_boardss" then
|
||||
minetest.set_node(pos,{name = "mydeck:deck_boardss_"..col, param2=node.param2})
|
||||
end
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
itemstack:add_wear(65535 / (USES - 1))
|
||||
end
|
||||
return itemstack
|
||||
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_node("mydeck:deck_boardss_"..col, {
|
||||
|
Loading…
x
Reference in New Issue
Block a user