Cleaned up code
Fixed a bug
This commit is contained in:
parent
19c3107e76
commit
b8443e8c68
18
beam.lua
18
beam.lua
@ -28,34 +28,26 @@ minetest.register_node("mydeck:beam", {
|
|||||||
|
|
||||||
|
|
||||||
if nodeu == "mydeck:post" then
|
if nodeu == "mydeck:post" then
|
||||||
minetest.set_node(pos,{name = "mydeck:beam_wbracket", param2=node.param2})
|
minetest.set_node(pos,{name = "mydeck:beam_wbracket", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||||
end
|
end
|
||||||
|
|
||||||
if nodea == "mydeck:joists" then
|
if nodea == "mydeck:joists" then
|
||||||
minetest.set_node(pos,{name = "air"})
|
minetest.remove_node(pos)
|
||||||
end
|
|
||||||
if nodea == "mydeck:joists" then
|
|
||||||
minetest.set_node({x=pos.x, y=pos.y+1, z=pos.z},{name = "mydeck:joists_beam", param2=node.param2})
|
minetest.set_node({x=pos.x, y=pos.y+1, z=pos.z},{name = "mydeck:joists_beam", param2=node.param2})
|
||||||
end
|
end
|
||||||
|
|
||||||
if nodea == "mydeck:joists_side" then
|
if nodea == "mydeck:joists_side" then
|
||||||
minetest.set_node(pos,{name = "air"})
|
minetest.remove_node(pos)
|
||||||
end
|
|
||||||
if nodea == "mydeck:joists_side" then
|
|
||||||
minetest.set_node({x=pos.x, y=pos.y+1, z=pos.z},{name = "mydeck:joists_side_beam", param2=node.param2})
|
minetest.set_node({x=pos.x, y=pos.y+1, z=pos.z},{name = "mydeck:joists_side_beam", param2=node.param2})
|
||||||
end
|
end
|
||||||
|
|
||||||
if nodea == "mydeck:deck_joists" then
|
if nodea == "mydeck:deck_joists" then
|
||||||
minetest.set_node(pos,{name = "air"})
|
minetest.remove_node(pos)
|
||||||
end
|
|
||||||
if nodea == "mydeck:deck_joists" then
|
|
||||||
minetest.set_node({x=pos.x, y=pos.y+1, z=pos.z},{name = "mydeck:deck_joists_beam", param2=node.param2})
|
minetest.set_node({x=pos.x, y=pos.y+1, z=pos.z},{name = "mydeck:deck_joists_beam", param2=node.param2})
|
||||||
end
|
end
|
||||||
|
|
||||||
if nodea == "mydeck:deck_joists_side" then
|
if nodea == "mydeck:deck_joists_side" then
|
||||||
minetest.set_node(pos,{name = "air"})
|
minetest.remove_node(pos)
|
||||||
end
|
|
||||||
if nodea == "mydeck:deck_joists_side" then
|
|
||||||
minetest.set_node({x=pos.x, y=pos.y+1, z=pos.z},{name = "mydeck:deck_joists_side_beam", param2=node.param2})
|
minetest.set_node({x=pos.x, y=pos.y+1, z=pos.z},{name = "mydeck:deck_joists_side_beam", param2=node.param2})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -40,77 +40,55 @@ minetest.register_node("mydeck:deck_boards", {
|
|||||||
|
|
||||||
|
|
||||||
if nodeu == "mydeck:joists" then
|
if nodeu == "mydeck:joists" then
|
||||||
minetest.set_node(pos,{name = "air"})
|
minetest.remove_node(pos)
|
||||||
end
|
|
||||||
if nodeu == "mydeck:joists" then
|
|
||||||
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists", param2=node.param2})
|
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists", param2=node.param2})
|
||||||
end
|
end
|
||||||
if nodeu == "mydeck:joists_side" then
|
if nodeu == "mydeck:joists_side" then
|
||||||
minetest.set_node(pos,{name = "air"})
|
minetest.remove_node(pos)
|
||||||
end
|
|
||||||
if nodeu == "mydeck:joists_side" then
|
|
||||||
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_side", param2=node.param2})
|
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_side", param2=node.param2})
|
||||||
end
|
end
|
||||||
if nodeu == "mydeck:joists_beam" then
|
if nodeu == "mydeck:joists_beam" then
|
||||||
minetest.set_node(pos,{name = "air"})
|
minetest.remove_node(pos)
|
||||||
end
|
|
||||||
if nodeu == "mydeck:joists_beam" then
|
|
||||||
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_beam", param2=node.param2})
|
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_beam", param2=node.param2})
|
||||||
end
|
end
|
||||||
|
|
||||||
if nodeu == "mydeck:joists_side_beam" then
|
if nodeu == "mydeck:joists_side_beam" then
|
||||||
minetest.set_node(pos,{name = "air"})
|
minetest.remove_node(pos)
|
||||||
end
|
|
||||||
if nodeu == "mydeck:joists_side_beam" then
|
|
||||||
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_side_beam", param2=node.param2})
|
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_side_beam", param2=node.param2})
|
||||||
end
|
end
|
||||||
|
|
||||||
if nodeu == "mydeck:joists_end" then
|
if nodeu == "mydeck:joists_end" then
|
||||||
minetest.set_node(pos,{name = "air"})
|
minetest.remove_node(pos)
|
||||||
end
|
|
||||||
if nodeu == "mydeck:joists_end" then
|
|
||||||
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_end", param2=node.param2})
|
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_end", param2=node.param2})
|
||||||
end
|
end
|
||||||
|
|
||||||
if nodeu == "mydeck:joists_side_end" then
|
if nodeu == "mydeck:joists_side_end" then
|
||||||
minetest.set_node(pos,{name = "air"})
|
minetest.remove_node(pos)
|
||||||
end
|
|
||||||
if nodeu == "mydeck:joists_side_end" then
|
|
||||||
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_side_end", param2=node.param2})
|
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_side_end", param2=node.param2})
|
||||||
end
|
end
|
||||||
|
|
||||||
if nodeu == "mydeck:joists_endr" then
|
if nodeu == "mydeck:joists_endr" then
|
||||||
minetest.set_node(pos,{name = "air"})
|
minetest.remove_node(pos)
|
||||||
end
|
|
||||||
if nodeu == "mydeck:joists_endr" then
|
|
||||||
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_endr", param2=node.param2})
|
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_endr", param2=node.param2})
|
||||||
end
|
end
|
||||||
|
|
||||||
if nodeu == "mydeck:joists_side_endr" then
|
if nodeu == "mydeck:joists_side_endr" then
|
||||||
minetest.set_node(pos,{name = "air"})
|
minetest.remove_node(pos)
|
||||||
end
|
|
||||||
if nodeu == "mydeck:joists_side_endr" then
|
|
||||||
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_side_endr", param2=node.param2})
|
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_side_endr", param2=node.param2})
|
||||||
end
|
end
|
||||||
|
|
||||||
if nodeu == "mydeck:joists_beam_wbracket" then
|
if nodeu == "mydeck:joists_beam_wbracket" then
|
||||||
minetest.set_node(pos,{name = "air"})
|
minetest.remove_node(pos)
|
||||||
end
|
|
||||||
if nodeu == "mydeck:joists_beam_wbracket" then
|
|
||||||
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_beam_wbracket", param2=node.param2})
|
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_beam_wbracket", param2=node.param2})
|
||||||
end
|
end
|
||||||
|
|
||||||
if nodeu == "mydeck:joists_side_beam_wbracket" then
|
if nodeu == "mydeck:joists_side_beam_wbracket" then
|
||||||
minetest.set_node(pos,{name = "air"})
|
minetest.remove_node(pos)
|
||||||
end
|
|
||||||
if nodeu == "mydeck:joists_side_beam_wbracket" then
|
|
||||||
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_side_beam_wbracket", param2=node.param2})
|
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_side_beam_wbracket", param2=node.param2})
|
||||||
end
|
end
|
||||||
|
|
||||||
if nodeu == "mydeck:beam" then
|
if nodeu == "mydeck:beam" then
|
||||||
minetest.set_node(pos,{name = "air"})
|
minetest.remove_node(pos)
|
||||||
end
|
|
||||||
if nodeu == "mydeck:beam" then
|
|
||||||
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_beam", param2=node.param2})
|
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_beam", param2=node.param2})
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
32
joists.lua
32
joists.lua
@ -30,21 +30,16 @@ minetest.register_node("mydeck:joists", {
|
|||||||
},
|
},
|
||||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||||
|
|
||||||
local deck = minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).name
|
local nodeu = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name
|
||||||
local node = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name
|
|
||||||
|
|
||||||
|
|
||||||
if node == "mydeck:beam" then
|
if nodeu == "mydeck:beam" then
|
||||||
minetest.set_node(pos,{name = "air"})
|
minetest.remove_node(pos)
|
||||||
|
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:joists_beam", param2=nodeu.param2})
|
||||||
end
|
end
|
||||||
if node == "mydeck:beam" then
|
if nodeu == "mydeck:beam_wbracket" then
|
||||||
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:joists_beam", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
minetest.remove_node(pos)
|
||||||
end
|
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:joists_beam_wbracket", param2=nodeu.param2})
|
||||||
if node == "mydeck:beam_wbracket" then
|
|
||||||
minetest.set_node(pos,{name = "air"})
|
|
||||||
end
|
|
||||||
if node == "mydeck:beam_wbracket" then
|
|
||||||
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:joists_beam_wbracket", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
@ -81,21 +76,16 @@ minetest.register_node("mydeck:joists_side", {
|
|||||||
},
|
},
|
||||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||||
|
|
||||||
local deck = minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).name
|
|
||||||
local node = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name
|
local node = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name
|
||||||
|
|
||||||
|
|
||||||
if node == "mydeck:beam_wbracket" then
|
if node == "mydeck:beam_wbracket" then
|
||||||
minetest.set_node(pos,{name = "air"})
|
minetest.remove_node(pos)
|
||||||
end
|
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:joists_side_beam_wbracket", param2=node.param2})
|
||||||
if node == "mydeck:beam_wbracket" then
|
|
||||||
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:joists_side_beam_wbracket", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
|
||||||
end
|
end
|
||||||
if node == "mydeck:beam" then
|
if node == "mydeck:beam" then
|
||||||
minetest.set_node(pos,{name = "air"})
|
minetest.remove_node(pos)
|
||||||
end
|
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:joists_side_beam", param2=node.param2})
|
||||||
if node == "mydeck:beam" then
|
|
||||||
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:joists_side_beam", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
129
machine.lua
129
machine.lua
@ -1,12 +1,30 @@
|
|||||||
local material = {}
|
local material = {}
|
||||||
local shape = {}
|
local shape = {}
|
||||||
local make_ok = {}
|
local make_ok = 0
|
||||||
local make_ok2 = {}
|
local make_ok2 = 0
|
||||||
local make_ok3 = {}
|
local make_ok3 = 0
|
||||||
local anzahl = {}
|
local anzahl = {}
|
||||||
local brushcount = {}
|
local brushcount = {}
|
||||||
local cbruchcount = {}
|
local cbruchcount = {}
|
||||||
|
|
||||||
|
local color_tab = {
|
||||||
|
{"black", "Black", "^[colorize:black:200"},
|
||||||
|
{"blue", "Blue", "^[colorize:#0B0B3B:150"},
|
||||||
|
{"brown", "Brown", "^[colorize:#190B07:140"},
|
||||||
|
{"cyan", "Cyan", "^[colorize:cyan:75"},
|
||||||
|
{"dark_green", "Dark Green", "^[colorize:#071907:150"},
|
||||||
|
{"dark_grey", "Dark Grey", "^[colorize:#1C1C1C:150"},
|
||||||
|
{"green", "Green", "^[colorize:green:75"},
|
||||||
|
{"grey", "Grey", "^[colorize:#848484:100"},
|
||||||
|
{"magenta", "Magenta", "^[colorize:magenta:75"},
|
||||||
|
{"orange", "Orange", "^[colorize:orange:75"},
|
||||||
|
{"pink", "Pink", "^[colorize:#FE2E9A:75"},
|
||||||
|
{"red", "Red", "^[colorize:#B40404:75"},
|
||||||
|
{"violet", "Violet", "^[colorize:#08088A:100"},
|
||||||
|
{"white", "White", "^[colorize:white:100"},
|
||||||
|
{"yellow", "Yellow", "^[colorize:yellow:75"},
|
||||||
|
}
|
||||||
|
|
||||||
minetest.register_node("mydeck:machine", {
|
minetest.register_node("mydeck:machine", {
|
||||||
description = "Deck Machine",
|
description = "Deck Machine",
|
||||||
tiles = {
|
tiles = {
|
||||||
@ -53,24 +71,18 @@ minetest.register_node("mydeck:machine", {
|
|||||||
can_dig = function(pos,player)
|
can_dig = function(pos,player)
|
||||||
local meta = minetest.env:get_meta(pos);
|
local meta = minetest.env:get_meta(pos);
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
if not inv:is_empty("ingot") then
|
if inv:is_empty("ingot") and
|
||||||
return false
|
inv:is_empty("res") and
|
||||||
elseif not inv:is_empty("res") then
|
inv:is_empty("wool") and
|
||||||
return false
|
inv:is_empty("steel") and
|
||||||
elseif not inv:is_empty("wool") then
|
inv:is_empty("stick") and
|
||||||
return false
|
inv:is_empty("brush") and
|
||||||
elseif not inv:is_empty("steel") then
|
inv:is_empty("dye") and
|
||||||
return false
|
inv:is_empty("cbrush") then
|
||||||
elseif not inv:is_empty("stick") then
|
|
||||||
return false
|
|
||||||
elseif not inv:is_empty("brush") then
|
|
||||||
return false
|
|
||||||
elseif not inv:is_empty("dye") then
|
|
||||||
return false
|
|
||||||
elseif not inv:is_empty("cbrush") then
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
return true
|
return true
|
||||||
|
else
|
||||||
|
return false
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
@ -88,15 +100,20 @@ on_construct = function(pos)
|
|||||||
"item_image_button[3.5,1;1,1;mydeck:joists_side_end;joistsidend; ]"..
|
"item_image_button[3.5,1;1,1;mydeck:joists_side_end;joistsidend; ]"..
|
||||||
"item_image_button[4.5,1;1,1;mydeck:joists_endr;joistendr; ]"..
|
"item_image_button[4.5,1;1,1;mydeck:joists_endr;joistendr; ]"..
|
||||||
"item_image_button[5.5,1;1,1;mydeck:joists_side_endr;joistsidendr; ]"..
|
"item_image_button[5.5,1;1,1;mydeck:joists_side_endr;joistsidendr; ]"..
|
||||||
|
|
||||||
|
"label[7.5,0.5;Pile]"..
|
||||||
|
"item_image_button[7.5,1;1,1;mydeck:pile;pile; ]"..
|
||||||
|
"label[7.5,2;Requires]"..
|
||||||
|
"label[7.5,2.5;Stone]"..
|
||||||
|
|
||||||
"label[0.5,2;Pile Post Beam and Stairs]"..
|
"label[0.5,2;Pile Post Beam and Stairs]"..
|
||||||
"item_image_button[0.5,2.5;1,1;mydeck:pile;pile; ]"..
|
"item_image_button[0.5,2.5;1,1;mydeck:post;post; ]"..
|
||||||
"item_image_button[1.5,2.5;1,1;mydeck:post;post; ]"..
|
"item_image_button[1.5,2.5;1,1;mydeck:beam;beam; ]"..
|
||||||
"item_image_button[2.5,2.5;1,1;mydeck:beam;beam; ]"..
|
"item_image_button[2.5,2.5;1,1;mydeck:stairs;stairs; ]"..
|
||||||
"item_image_button[3.5,2.5;1,1;mydeck:stairs;stairs; ]"..
|
"item_image_button[3.5,2.5;1,1;mydeck:stairs_ocorner;stairso; ]"..
|
||||||
"item_image_button[4.5,2.5;1,1;mydeck:stairs_ocorner;stairso; ]"..
|
"item_image_button[4.5,2.5;1,1;mydeck:stairs_icorner;stairsi; ]"..
|
||||||
"item_image_button[5.5,2.5;1,1;mydeck:stairs_icorner;stairsi; ]"..
|
"item_image_button[5.5,2.5;1,1;mydeck:stairs_raill;sraill; ]"..
|
||||||
"item_image_button[6.5,2.5;1,1;mydeck:stairs_raill;sraill; ]"..
|
"item_image_button[6.5,2.5;1,1;mydeck:stairs_railr;srailr; ]"..
|
||||||
"item_image_button[7.5,2.5;1,1;mydeck:stairs_railr;srailr; ]"..
|
|
||||||
"label[0.5,3.5;Deck Boards and Rail]"..
|
"label[0.5,3.5;Deck Boards and Rail]"..
|
||||||
"item_image_button[0.5,4;1,1;mydeck:deck_boards;deckb; ]"..
|
"item_image_button[0.5,4;1,1;mydeck:deck_boards;deckb; ]"..
|
||||||
"item_image_button[1.5,4;1,1;mydeck:rail;rail; ]"..
|
"item_image_button[1.5,4;1,1;mydeck:rail;rail; ]"..
|
||||||
@ -143,7 +160,6 @@ or fields["joistsidend"]
|
|||||||
or fields["joistendr"]
|
or fields["joistendr"]
|
||||||
or fields["joistsidendr"]
|
or fields["joistsidendr"]
|
||||||
|
|
||||||
or fields["pile"]
|
|
||||||
or fields["post"]
|
or fields["post"]
|
||||||
or fields["beam"]
|
or fields["beam"]
|
||||||
or fields["stairs"]
|
or fields["stairs"]
|
||||||
@ -213,15 +229,6 @@ then
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if fields["pile"] then
|
|
||||||
make_ok = "0"
|
|
||||||
anzahl = "1"
|
|
||||||
shape = "mydeck:pile"
|
|
||||||
if inv:is_empty("ingot") then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if fields["post"] then
|
if fields["post"] then
|
||||||
make_ok = "0"
|
make_ok = "0"
|
||||||
anzahl = "4"
|
anzahl = "4"
|
||||||
@ -343,11 +350,10 @@ local gwood = minetest.registered_aliases[ingotstack:get_name()]
|
|||||||
local allwood = minetest.registered_items[gwood]
|
local allwood = minetest.registered_items[gwood]
|
||||||
|
|
||||||
if allwood and allwood.groups and allwood.groups["wood"] then
|
if allwood and allwood.groups and allwood.groups["wood"] then
|
||||||
-- if ingotstack:get_name()=="default:wood" then
|
|
||||||
make_ok = "1"
|
make_ok = "1"
|
||||||
end
|
end
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
-----------------------------------------------------------------------
|
||||||
if make_ok == "1" then
|
if make_ok == "1" then
|
||||||
local give = {}
|
local give = {}
|
||||||
for i = 0, anzahl-1 do
|
for i = 0, anzahl-1 do
|
||||||
@ -357,24 +363,33 @@ local allwood = minetest.registered_items[gwood]
|
|||||||
inv:set_stack("ingot",1,ingotstack)
|
inv:set_stack("ingot",1,ingotstack)
|
||||||
end
|
end
|
||||||
end --if fields
|
end --if fields
|
||||||
|
----------------------------------------------------------------------
|
||||||
|
if fields["pile"] then
|
||||||
|
make_ok = "0"
|
||||||
|
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
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
|
||||||
local color_tab = {
|
|
||||||
{"black", "Black", "^[colorize:black:200"},
|
|
||||||
{"blue", "Blue", "^[colorize:#0B0B3B:150"},
|
|
||||||
{"brown", "Brown", "^[colorize:#190B07:140"},
|
|
||||||
{"cyan", "Cyan", "^[colorize:cyan:75"},
|
|
||||||
{"dark_green", "Dark Green", "^[colorize:#071907:150"},
|
|
||||||
{"dark_grey", "Dark Grey", "^[colorize:#1C1C1C:150"},
|
|
||||||
{"green", "Green", "^[colorize:green:75"},
|
|
||||||
{"grey", "Grey", "^[colorize:#848484:100"},
|
|
||||||
{"magenta", "Magenta", "^[colorize:magenta:75"},
|
|
||||||
{"orange", "Orange", "^[colorize:orange:75"},
|
|
||||||
{"pink", "Pink", "^[colorize:#FE2E9A:75"},
|
|
||||||
{"red", "Red", "^[colorize:#B40404:75"},
|
|
||||||
{"violet", "Violet", "^[colorize:#08088A:100"},
|
|
||||||
{"white", "White", "^[colorize:white:100"},
|
|
||||||
{"yellow", "Yellow", "^[colorize:yellow:75"},
|
|
||||||
}
|
|
||||||
for i in ipairs (color_tab) do
|
for i in ipairs (color_tab) do
|
||||||
local col = color_tab[i][1]
|
local col = color_tab[i][1]
|
||||||
local coldesc = color_tab[i][2]
|
local coldesc = color_tab[i][2]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user