diff --git a/bricks.lua b/bricks.lua index ae687c2..cefed8a 100644 --- a/bricks.lua +++ b/bricks.lua @@ -5,7 +5,6 @@ minetest.register_node("mybricks:brick_"..mat, { description = desc.." Brick", drawtype = drawtype, tiles = { - image.."^mybricks_pattern13.png", image.."^mybricks_pattern13.png^[transformR90", image.."^mybricks_pattern1.png", @@ -24,7 +23,6 @@ minetest.register_node("mybricks:smbrick_"..mat, { description = desc.." Small Brick", drawtype = drawtype, tiles = { - image.."^mybricks_pattern11.png", image.."^mybricks_pattern12.png", image.."^mybricks_pattern9.png", @@ -43,7 +41,6 @@ minetest.register_node("mybricks:tbrick_"..mat, { description = desc.." Tiny Brick", drawtype = drawtype, tiles = { - image.."^mybricks_pattern14.png", image.."^mybricks_pattern15.png", image.."^mybricks_pattern10.png^[transformFX", @@ -127,13 +124,10 @@ minetest.register_node("mybricks:brick_vsplit_"..mat, { sounds = default.node_sound_stone_defaults(), }) ------------------------------------------------------------------------------------------- - minetest.register_node("mybricks:brickw_"..mat, { description = desc.." Brick", drawtype = drawtype, tiles = { - image.."^mybricks_pattern13_w.png", image.."^mybricks_pattern13_w.png^[transformR90", image.."^mybricks_pattern1_w.png", @@ -152,7 +146,6 @@ minetest.register_node("mybricks:smbrickw_"..mat, { description = desc.." Small Brick", drawtype = drawtype, tiles = { - image.."^mybricks_pattern11_w.png", image.."^mybricks_pattern12_w.png", image.."^mybricks_pattern9_w.png", @@ -171,7 +164,6 @@ minetest.register_node("mybricks:tbrickw_"..mat, { description = desc.." Tiny Brick", drawtype = drawtype, tiles = { - image.."^mybricks_pattern14_w.png", image.."^mybricks_pattern15_w.png", image.."^mybricks_pattern10_w.png", @@ -254,4 +246,5 @@ minetest.register_node("mybricks:brick_vsplitw_"..mat, { groups = mygroups, sounds = default.node_sound_stone_defaults(), }) + end diff --git a/init.lua b/init.lua index d13273e..a53da88 100644 --- a/init.lua +++ b/init.lua @@ -1,21 +1,16 @@ mybricks = {} + dofile(minetest.get_modpath("mybricks").."/bricks.lua") dofile(minetest.get_modpath("mybricks").."/machine.lua") dofile(minetest.get_modpath("mybricks").."/register.lua") - -local mod_hardenedclay = minetest.get_modpath("hardenedclay") -local mod_ores = minetest.get_modpath("ores") - -if mod_hardenedclay then +if minetest.get_modpath("hardenedclay") then dofile(minetest.get_modpath("mybricks").."/hardenedclay.lua") - - end +end -if mod_ores then +if minetest.get_modpath("ores") then dofile(minetest.get_modpath("mybricks").."/ores.lua") - - end +end diff --git a/machine.lua b/machine.lua index 664b7b3..a6e9729 100644 --- a/machine.lua +++ b/machine.lua @@ -38,401 +38,359 @@ minetest.register_node("mybricks:machine", { }, after_place_node = function(pos, placer) - local meta = minetest.get_meta(pos); + local meta = minetest.get_meta(pos); meta:set_string("owner", (placer:get_player_name() or "")); meta:set_string("infotext", "Brick Machine (owned by " .. (placer:get_player_name() or "") .. ")"); - end, + end, -can_dig = function(pos,player) - local meta = minetest.get_meta(pos); - local inv = meta:get_inventory() - if player:get_player_name() == meta:get_string("owner") and - inv:is_empty("ingot") and - inv:is_empty("res") then - return true - else - return false - end -end, - -on_construct = function(pos) - local meta = minetest.get_meta(pos) - meta:set_string("formspec", "invsize[10,11;]".. - "background[-0.15,-0.25;10.40,11.75;mybricks_background.png]".. - "list[current_name;ingot;7,2;1,1;]".. - "list[current_name;res;7,4;1,1;]".. - "label[7,1.5;Input:]".. - "label[7,3.5;Output:]".. - "label[0,0;Choose Brick Stye:]".. - "image_button[1,1;1,1;mybricks_mach1.png;brick; ]".. - "image_button[1,2;1,1;mybricks_mach8.png;smbrick; ]".. - "image_button[1,3;1,1;mybricks_mach7.png;tbrick; ]".. - "image_button[2.5,1;1,1;mybricks_mach4.png;tile; ]".. - "image_button[2.5,2;1,1;mybricks_mach2.png;square; ]".. - "image_button[2.5,3;1,1;mybricks_mach3.png;square_sm; ]".. - "image_button[4,1;1,1;mybricks_mach5.png;split; ]".. - "image_button[4,2;1,1;mybricks_mach6.png;vsplit; ]".. - "image_button[1,4;1,1;mybricks_mach9.png;brickw; ]".. - "image_button[1,5;1,1;mybricks_mach10.png;smbrickw; ]".. - "image_button[1,6;1,1;mybricks_mach11.png;tbrickw; ]".. - "image_button[2.5,4;1,1;mybricks_mach12.png;tilew; ]".. - "image_button[2.5,5;1,1;mybricks_mach13.png;squarew; ]".. - "image_button[2.5,6;1,1;mybricks_mach14.png;square_smw; ]".. - "image_button[4,4;1,1;mybricks_mach15.png;splitw; ]".. - "image_button[4,5;1,1;mybricks_mach16.png;vsplitw; ]".. - "list[current_player;main;1,7;8,4;]") - meta:set_string("infotext", "Brick Machine") - local inv = meta:get_inventory() - inv:set_size("ingot", 1) - inv:set_size("res", 1) -end, - -on_receive_fields = function(pos, formname, fields, sender) - local meta = minetest.get_meta(pos) - local inv = meta:get_inventory() - -if fields["brick"] -or fields["smbrick"] -or fields["tbrick"] -or fields["square"] -or fields["square_sm"] -or fields["tile"] -or fields["split"] -or fields["vsplit"] -or fields["brickw"] -or fields["smbrickw"] -or fields["tbrickw"] -or fields["squarew"] -or fields["square_smw"] -or fields["tilew"] -or fields["splitw"] -or fields["vsplitw"] -then - - if fields["brick"] then - make_ok = "0" - anzahl = "1" - shape = "mybricks:brick_" - if inv:is_empty("ingot") then - return - end - end - - if fields["smbrick"] then - make_ok = "0" - anzahl = "1" - shape = "mybricks:smbrick_" - if inv:is_empty("ingot") then - return - end - end - - if fields["tbrick"] then - make_ok = "0" - anzahl = "1" - shape = "mybricks:tbrick_" - if inv:is_empty("ingot") then - return - end - end - - if fields["square"] then - make_ok = "0" - anzahl = "1" - shape = "mybricks:brick_square_" - if inv:is_empty("ingot") then - return - end - end - - if fields["square_sm"] then - make_ok = "0" - anzahl = "1" - shape = "mybricks:brick_square_sm_" - if inv:is_empty("ingot") then - return - end - end - - if fields["tile"] then - make_ok = "0" - anzahl = "1" - shape = "mybricks:brick_tile_" - if inv:is_empty("ingot") then - return - end - end - - if fields["split"] then - make_ok = "0" - anzahl = "1" - shape = "mybricks:brick_split_" - if inv:is_empty("ingot") then - return - end - end - - if fields["vsplit"] then - make_ok = "0" - anzahl = "1" - shape = "mybricks:brick_vsplit_" - if inv:is_empty("ingot") then - return - end - end - - if fields["brickw"] then - make_ok = "0" - anzahl = "1" - shape = "mybricks:brickw_" - if inv:is_empty("ingot") then - return - end - end - - if fields["smbrickw"] then - make_ok = "0" - anzahl = "1" - shape = "mybricks:smbrickw_" - if inv:is_empty("ingot") then - return - end - end - - if fields["tbrickw"] then - make_ok = "0" - anzahl = "1" - shape = "mybricks:tbrickw_" - if inv:is_empty("ingot") then - return - end - end - - if fields["squarew"] then - make_ok = "0" - anzahl = "1" - shape = "mybricks:brick_squarew_" - if inv:is_empty("ingot") then - return - end - end - - if fields["square_smw"] then - make_ok = "0" - anzahl = "1" - shape = "mybricks:brick_squarew_sm_" - if inv:is_empty("ingot") then - return - end - end - - if fields["tilew"] then - make_ok = "0" - anzahl = "1" - shape = "mybricks:brick_tilew_" - if inv:is_empty("ingot") then - return - end - end - - if fields["splitw"] then - make_ok = "0" - anzahl = "1" - shape = "mybricks:brick_splitw_" - if inv:is_empty("ingot") then - return - end - end - - if fields["vsplitw"] then - make_ok = "0" - anzahl = "1" - shape = "mybricks:brick_vsplitw_" - 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 mat_tab = { - {"default:leaves", "default_leaves"}, - {"default:jungleleaves", "default_jungleleaves"}, - {"default:pine_needles", "default_pine_needles"}, - --{"default:brick", "default_brick"}, - --{"default:bronzeblock", "default_bronze_block"}, - --{"default:cactus", "default_cactus"}, - {"default:clay", "default_clay"}, - {"default:coalblock", "default_coal_block"}, - {"default:cobble", "default_cobble"}, - --{"default:copperblock", "default_copper_block"}, - {"default:desert_cobble", "default_desert_cobble"}, - --{"default:desert_sand", "default_desert_sand"}, - {"default:desert_stone", "default_desert_stone"}, - --{"default:diamondblock", "default_diamond_block"}, - {"default:dirt", "default_dirt"}, - {"default:glass", "default_glass"}, - --{"default:goldblock", "default_gold_block"}, - {"default:gravel", "default_gravel"}, - --{"default:ice", "default_ice"}, - --{"default:jungletree", "default_jungletree"}, - {"default:junglewood", "default_junglewood"}, - --{"default:lava_source", "default_lava"}, - --{"default:mese", "default_mese"}, - {"default:mossycobble", "default_mossycobble"}, - {"default:obsidian", "default_obsidian"}, - --{"default:obsidian_glass", "default_obsidian_glass"}, - --{"default:obsidianbrick", "default_obsidian_brick"}, - --{"default:pine_tree", "default_pine_tree"}, - {"default:pine_wood", "default_pine_wood"}, - {"default:aspen_wood", "default_aspen_wood"}, - {"default:acacia_wood", "default_acacia_wood"}, - --{"default:sand", "default_sand"}, - {"default:sandstone", "default_sandstone"}, - --{"default:sandstonebrick", "default_sandstone_brick"}, - --{"default:snowblock", "default_snow"}, - --{"default:steelblock", "default_steel_block"}, - {"default:stone", "default_stone"}, - --{"default:stonebrick", "default_stone_brick"}, - --{"default:tree", "default_tree"}, - --{"default:water_source", "default_water"}, - {"default:wood", "default_wood"}, - {"farming:straw", "farming_straw"}, - {"wool:black", "wool_black"}, - {"wool:blue", "wool_blue"}, - {"wool:brown", "wool_brown"}, - {"wool:cyan", "wool_cyan"}, - {"wool:dark_green", "wool_dark_green"}, - {"wool:dark_grey", "wool_dark_grey"}, - {"wool:green", "wool_green"}, - {"wool:grey", "wool_grey"}, - {"wool:magenta", "wool_magenta"}, - {"wool:orange", "wool_orange"}, - {"wool:pink", "wool_pink"}, - {"wool:red", "wool_red"}, - {"wool:violet", "wool_violet"}, - {"wool:white", "wool_white"}, - {"wool:yellow", "wool_yellow"}, - ---Batmod - - {"bat_blocks:bat_cobble", "bat_cobble"}, - {"bat_blocks:bat_cobble_white", "bat_cobble_white"}, - {"bat_blocks:bat_cobble_tan", "bat_cobble_tan"}, - {"bat_blocks:bat_pavers", "bat_pavers"}, - {"bat_blocks:bat_block", "bat_block"}, - {"bat_blocks:bat_tile", "bat_tile"}, - {"bat_blocks:bat_diag", "bat_diag"}, - {"bat_blocks:bat_x", "bat_x_block"}, - {"bat_blocks:bat_brick", "bat_brick"}, - {"bat_blocks:bat_smbrick", "bat_smbrick"}, - ---castle - - {"castle:dungeon_stone", "dungeon_stone"}, - {"castle:pavement", "pavement_brick"}, - {"castle:rubble", "rubble"}, - {"castle:roofslate", "slate"}, - {"castle:stonewall", "stonewall"}, - ---moreblocks - - {"moreblocks:cactus_brick", "cactus_brick"}, - {"moreblocks:cactus_checker", "cactus_checker"}, - {"moreblocks:coal_stone_bricks", "coal_stone_bricks"}, - {"moreblocks:circle_stone_bricks", "circle_stone_bricks"}, - {"moreblocks:iron_checker", "iron_checker"}, - {"moreblocks:iron_stone_bricks", "iron_stone_bricks"}, - {"moreblocks:plankstone", "plankstone"}, - {"moreblocks:stone_tile", "stone_tile"}, - {"moreblocks:wood_tile_center", "wood_tile_center"}, - {"moreblocks:wood_tile_full", "wood_tile_full"}, - ---moretrees - - {"moretrees:apple_planks", "apple_tree"}, - {"moretrees:beech_planks", "beech"}, - {"moretrees:oak_planks", "oak"}, - {"moretrees:sequoia_planks", "sequoia"}, - {"moretrees:birch_planks", "birch"}, - {"moretrees:palm_planks", "palm"}, - {"moretrees:spruce_planks", "spruce"}, - {"moretrees:willow_planks", "willow"}, - {"moretrees:rubber_tree_planks","rubber_tree"}, - {"moretrees:fir_planks", "fir"}, - ---hardened clay - - {"hardenedclay:hardened_clay" , "hardened_clay"}, - {"hardenedclay:hardened_clay_white" , "hardened_clay_white"}, - {"hardenedclay:hardened_clay_black" , "hardened_clay_black"}, - {"hardenedclay:hardened_clay_light_blue" , "hardened_clay_light_blue"}, - {"hardenedclay:hardened_clay_green" , "hardened_clay_green"}, - {"hardenedclay:hardened_clay_red" , "hardened_clay_red"}, - {"hardenedclay:hardened_clay_light_grey" , "hardened_clay_light_grey"}, - {"hardenedclay:hardened_clay_violet" , "hardened_clay_violet"}, - {"hardenedclay:hardened_clay_lime" , "hardened_clay_lime"}, - {"hardenedclay:hardened_clay_magenta" , "hardened_clay_magenta"}, - {"hardenedclay:hardened_clay_orange" , "hardened_clay_orange"}, - {"hardenedclay:hardened_clay_brown" , "hardened_clay_brown"}, - {"hardenedclay:hardened_clay_blue" , "hardened_clay_blue"}, - {"hardenedclay:hardened_clay_yellow" , "hardened_clay_yellow"}, - {"hardenedclay:hardened_clay_pink" , "hardened_clay_pink"}, - {"hardenedclay:hardened_clay_cyan" , "hardened_clay_cyan"}, - {"hardenedclay:hardened_clay_grey" , "hardened_clay_grey"}, ---Ores - - {"ores:slate", "slate"}, - {"ores:silt", "silt"}, - {"ores:shale", "shale"}, - {"ores:schist", "schist"}, - {"ores:redsandstone", "redsandstone"}, - {"ores:gneiss", "gneiss"}, - {"ores:basalt", "basalt"}, - {"ores:granite", "granite"}, - {"ores:marble", "marble"}, - - } -for i in ipairs (mat_tab) do - local titem = mat_tab[i][1] - local tmat = mat_tab[i][2] - - if ingotstack:get_name()==titem then - mater = tmat - make_ok = "1" - end - - -end ----------------------------------------------------------------------- - - if sender:get_player_name() == meta:get_string("owner") and - make_ok == "1" then - local give = {} - for i = 0, anzahl-1 do - give[i+1]=inv:add_item("res",shape..mater) + can_dig = function(pos,player) + local meta = minetest.get_meta(pos); + local inv = meta:get_inventory() + if player:get_player_name() == meta:get_string("owner") and + inv:is_empty("ingot") and + inv:is_empty("res") then + return true + else + return false end - ingotstack:take_item() - inv:set_stack("ingot",1,ingotstack) - end -end -end + end, + on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", "invsize[10,11;]".. + "background[-0.15,-0.25;10.40,11.75;mybricks_background.png]".. + "list[current_name;ingot;7,2;1,1;]".. + "list[current_name;res;7,4;1,1;]".. + "label[7,1.5;Input:]".. + "label[7,3.5;Output:]".. + "label[0,0;Choose Brick Stye:]".. + "image_button[1,1;1,1;mybricks_mach1.png;brick; ]".. + "image_button[1,2;1,1;mybricks_mach8.png;smbrick; ]".. + "image_button[1,3;1,1;mybricks_mach7.png;tbrick; ]".. + "image_button[2.5,1;1,1;mybricks_mach4.png;tile; ]".. + "image_button[2.5,2;1,1;mybricks_mach2.png;square; ]".. + "image_button[2.5,3;1,1;mybricks_mach3.png;square_sm; ]".. + "image_button[4,1;1,1;mybricks_mach5.png;split; ]".. + "image_button[4,2;1,1;mybricks_mach6.png;vsplit; ]".. + "image_button[1,4;1,1;mybricks_mach9.png;brickw; ]".. + "image_button[1,5;1,1;mybricks_mach10.png;smbrickw; ]".. + "image_button[1,6;1,1;mybricks_mach11.png;tbrickw; ]".. + "image_button[2.5,4;1,1;mybricks_mach12.png;tilew; ]".. + "image_button[2.5,5;1,1;mybricks_mach13.png;squarew; ]".. + "image_button[2.5,6;1,1;mybricks_mach14.png;square_smw; ]".. + "image_button[4,4;1,1;mybricks_mach15.png;splitw; ]".. + "image_button[4,5;1,1;mybricks_mach16.png;vsplitw; ]".. + "list[current_player;main;1,7;8,4;]") + meta:set_string("infotext", "Brick Machine") + local inv = meta:get_inventory() + inv:set_size("ingot", 1) + inv:set_size("res", 1) + end, + on_receive_fields = function(pos, formname, fields, sender) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + + if fields["brick"] + or fields["smbrick"] + or fields["tbrick"] + or fields["square"] + or fields["square_sm"] + or fields["tile"] + or fields["split"] + or fields["vsplit"] + or fields["brickw"] + or fields["smbrickw"] + or fields["tbrickw"] + or fields["squarew"] + or fields["square_smw"] + or fields["tilew"] + or fields["splitw"] + or fields["vsplitw"] + then + + if fields["brick"] then + make_ok = "0" + anzahl = "1" + shape = "mybricks:brick_" + if inv:is_empty("ingot") then + return + end + end + + if fields["smbrick"] then + make_ok = "0" + anzahl = "1" + shape = "mybricks:smbrick_" + if inv:is_empty("ingot") then + return + end + end + + if fields["tbrick"] then + make_ok = "0" + anzahl = "1" + shape = "mybricks:tbrick_" + if inv:is_empty("ingot") then + return + end + end + + if fields["square"] then + make_ok = "0" + anzahl = "1" + shape = "mybricks:brick_square_" + if inv:is_empty("ingot") then + return + end + end + + if fields["square_sm"] then + make_ok = "0" + anzahl = "1" + shape = "mybricks:brick_square_sm_" + if inv:is_empty("ingot") then + return + end + end + + if fields["tile"] then + make_ok = "0" + anzahl = "1" + shape = "mybricks:brick_tile_" + if inv:is_empty("ingot") then + return + end + end + + if fields["split"] then + make_ok = "0" + anzahl = "1" + shape = "mybricks:brick_split_" + if inv:is_empty("ingot") then + return + end + end + + if fields["vsplit"] then + make_ok = "0" + anzahl = "1" + shape = "mybricks:brick_vsplit_" + if inv:is_empty("ingot") then + return + end + end + + if fields["brickw"] then + make_ok = "0" + anzahl = "1" + shape = "mybricks:brickw_" + if inv:is_empty("ingot") then + return + end + end + + if fields["smbrickw"] then + make_ok = "0" + anzahl = "1" + shape = "mybricks:smbrickw_" + if inv:is_empty("ingot") then + return + end + end + + if fields["tbrickw"] then + make_ok = "0" + anzahl = "1" + shape = "mybricks:tbrickw_" + if inv:is_empty("ingot") then + return + end + end + + if fields["squarew"] then + make_ok = "0" + anzahl = "1" + shape = "mybricks:brick_squarew_" + if inv:is_empty("ingot") then + return + end + end + + if fields["square_smw"] then + make_ok = "0" + anzahl = "1" + shape = "mybricks:brick_squarew_sm_" + if inv:is_empty("ingot") then + return + end + end + + if fields["tilew"] then + make_ok = "0" + anzahl = "1" + shape = "mybricks:brick_tilew_" + if inv:is_empty("ingot") then + return + end + end + + if fields["splitw"] then + make_ok = "0" + anzahl = "1" + shape = "mybricks:brick_splitw_" + if inv:is_empty("ingot") then + return + end + end + + if fields["vsplitw"] then + make_ok = "0" + anzahl = "1" + shape = "mybricks:brick_vsplitw_" + if inv:is_empty("ingot") then + return + end + end + + local ingotstack = inv:get_stack("ingot", 1) + local resstack = inv:get_stack("res", 1) + + local mat_tab = { + {"default:leaves", "default_leaves"}, + {"default:jungleleaves", "default_jungleleaves"}, + {"default:pine_needles", "default_pine_needles"}, + {"default:clay", "default_clay"}, + {"default:coalblock", "default_coal_block"}, + {"default:cobble", "default_cobble"}, + {"default:desert_cobble", "default_desert_cobble"}, + {"default:desert_stone", "default_desert_stone"}, + {"default:dirt", "default_dirt"}, + {"default:glass", "default_glass"}, + {"default:gravel", "default_gravel"}, + {"default:junglewood", "default_junglewood"}, + {"default:mossycobble", "default_mossycobble"}, + {"default:obsidian", "default_obsidian"}, + {"default:pine_wood", "default_pine_wood"}, + {"default:aspen_wood", "default_aspen_wood"}, + {"default:acacia_wood", "default_acacia_wood"}, + {"default:sandstone", "default_sandstone"}, + {"default:stone", "default_stone"}, + {"default:wood", "default_wood"}, + {"farming:straw", "farming_straw"}, + {"wool:black", "wool_black"}, + {"wool:blue", "wool_blue"}, + {"wool:brown", "wool_brown"}, + {"wool:cyan", "wool_cyan"}, + {"wool:dark_green", "wool_dark_green"}, + {"wool:dark_grey", "wool_dark_grey"}, + {"wool:green", "wool_green"}, + {"wool:grey", "wool_grey"}, + {"wool:magenta", "wool_magenta"}, + {"wool:orange", "wool_orange"}, + {"wool:pink", "wool_pink"}, + {"wool:red", "wool_red"}, + {"wool:violet", "wool_violet"}, + {"wool:white", "wool_white"}, + {"wool:yellow", "wool_yellow"}, + + {"bat_blocks:bat_cobble", "bat_cobble"}, + {"bat_blocks:bat_cobble_white", "bat_cobble_white"}, + {"bat_blocks:bat_cobble_tan", "bat_cobble_tan"}, + {"bat_blocks:bat_pavers", "bat_pavers"}, + {"bat_blocks:bat_block", "bat_block"}, + {"bat_blocks:bat_tile", "bat_tile"}, + {"bat_blocks:bat_diag", "bat_diag"}, + {"bat_blocks:bat_x", "bat_x_block"}, + {"bat_blocks:bat_brick", "bat_brick"}, + {"bat_blocks:bat_smbrick", "bat_smbrick"}, + + {"castle:dungeon_stone", "dungeon_stone"}, + {"castle:pavement", "pavement_brick"}, + {"castle:rubble", "rubble"}, + {"castle:roofslate", "slate"}, + {"castle:stonewall", "stonewall"}, + + {"moreblocks:cactus_brick", "cactus_brick"}, + {"moreblocks:cactus_checker", "cactus_checker"}, + {"moreblocks:coal_stone_bricks", "coal_stone_bricks"}, + {"moreblocks:circle_stone_bricks", "circle_stone_bricks"}, + {"moreblocks:iron_checker", "iron_checker"}, + {"moreblocks:iron_stone_bricks", "iron_stone_bricks"}, + {"moreblocks:plankstone", "plankstone"}, + {"moreblocks:stone_tile", "stone_tile"}, + {"moreblocks:wood_tile_center", "wood_tile_center"}, + {"moreblocks:wood_tile_full", "wood_tile_full"}, + + {"moretrees:apple_planks", "apple_tree"}, + {"moretrees:beech_planks", "beech"}, + {"moretrees:oak_planks", "oak"}, + {"moretrees:sequoia_planks", "sequoia"}, + {"moretrees:birch_planks", "birch"}, + {"moretrees:palm_planks", "palm"}, + {"moretrees:spruce_planks", "spruce"}, + {"moretrees:willow_planks", "willow"}, + {"moretrees:rubber_tree_planks", "rubber_tree"}, + {"moretrees:fir_planks", "fir"}, + + {"hardenedclay:hardened_clay", "hardened_clay"}, + {"hardenedclay:hardened_clay_white", "hardened_clay_white"}, + {"hardenedclay:hardened_clay_black", "hardened_clay_black"}, + {"hardenedclay:hardened_clay_light_blue", "hardened_clay_light_blue"}, + {"hardenedclay:hardened_clay_green", "hardened_clay_green"}, + {"hardenedclay:hardened_clay_red", "hardened_clay_red"}, + {"hardenedclay:hardened_clay_light_grey", "hardened_clay_light_grey"}, + {"hardenedclay:hardened_clay_violet", "hardened_clay_violet"}, + {"hardenedclay:hardened_clay_lime", "hardened_clay_lime"}, + {"hardenedclay:hardened_clay_magenta", "hardened_clay_magenta"}, + {"hardenedclay:hardened_clay_orange", "hardened_clay_orange"}, + {"hardenedclay:hardened_clay_brown", "hardened_clay_brown"}, + {"hardenedclay:hardened_clay_blue", "hardened_clay_blue"}, + {"hardenedclay:hardened_clay_yellow", "hardened_clay_yellow"}, + {"hardenedclay:hardened_clay_pink", "hardened_clay_pink"}, + {"hardenedclay:hardened_clay_cyan", "hardened_clay_cyan"}, + {"hardenedclay:hardened_clay_grey", "hardened_clay_grey"}, + + {"ores:slate", "slate"}, + {"ores:silt", "silt"}, + {"ores:shale", "shale"}, + {"ores:schist", "schist"}, + {"ores:redsandstone", "redsandstone"}, + {"ores:gneiss", "gneiss"}, + {"ores:basalt", "basalt"}, + {"ores:granite", "granite"}, + {"ores:marble", "marble"}, + } + + for i in ipairs (mat_tab) do + local titem = mat_tab[i][1] + local tmat = mat_tab[i][2] + + if ingotstack:get_name()==titem then + mater = tmat + make_ok = "1" + end + end + + if sender:get_player_name() == meta:get_string("owner") and + make_ok == "1" then + local give = {} + for i = 0, anzahl-1 do + give[i+1]=inv:add_item("res",shape..mater) + end + ingotstack:take_item() + inv:set_stack("ingot",1,ingotstack) + end + end + end }) ---Craft - minetest.register_craft({ output = 'mybricks:machine', recipe = { {'default:brick', 'default:brick', 'default:brick'}, {'default:brick', 'default:steel_ingot', 'default:brick'}, - {'default:brick', "default:brick", 'default:brick'}, + {'default:brick', "default:brick", 'default:brick'}, }, }) diff --git a/ores.lua b/ores.lua index 076ea32..da9660b 100644 --- a/ores.lua +++ b/ores.lua @@ -1,6 +1,6 @@ -mybricks.register_block(--material, description, image, groups, craft item +mybricks.register_block( "slate", "Slate", "ores_slate.png", @@ -8,7 +8,7 @@ mybricks.register_block(--material, description, image, groups, craft item "ores:slate", "normal" ) -mybricks.register_block(--material, description, image, groups, craft item +mybricks.register_block( "silt", "Silt", "ores_silt.png", @@ -16,7 +16,7 @@ mybricks.register_block(--material, description, image, groups, craft item "ores:silt", "normal" ) -mybricks.register_block(--material, description, image, groups, craft item +mybricks.register_block( "shale", "Shale", "ores_shale.png", @@ -24,7 +24,7 @@ mybricks.register_block(--material, description, image, groups, craft item "ores:shale", "normal" ) -mybricks.register_block(--material, description, image, groups, craft item +mybricks.register_block( "schist", "Schist", "ores_schist.png", @@ -32,7 +32,7 @@ mybricks.register_block(--material, description, image, groups, craft item "ores:schist", "normal" ) -mybricks.register_block(--material, description, image, groups, craft item +mybricks.register_block( "redsandstone", "Red Sandstone", "ores_redsandstone.png", @@ -40,7 +40,7 @@ mybricks.register_block(--material, description, image, groups, craft item "ores:redsandstone", "normal" ) -mybricks.register_block(--material, description, image, groups, craft item +mybricks.register_block( "gneiss", "Gneiss", "ores_gneiss.png", @@ -48,7 +48,7 @@ mybricks.register_block(--material, description, image, groups, craft item "ores:gneiss", "normal" ) -mybricks.register_block(--material, description, image, groups, craft item +mybricks.register_block( "basalt", "Basalt", "ores_basalt.png", @@ -56,7 +56,7 @@ mybricks.register_block(--material, description, image, groups, craft item "ores:basalt", "normal" ) -mybricks.register_block(--material, description, image, groups, craft item +mybricks.register_block( "granite", "Granite", "ores_granite.png", @@ -64,7 +64,7 @@ mybricks.register_block(--material, description, image, groups, craft item "ores:granite", "normal" ) -mybricks.register_block(--material, description, image, groups, craft item +mybricks.register_block( "marble", "Marble", "ores_marble.png", diff --git a/register.lua b/register.lua index 0e0f256..f2e247d 100644 --- a/register.lua +++ b/register.lua @@ -1,5 +1,5 @@ ----[[ -mybricks.register_block(--material, description, image, groups, craft item + +mybricks.register_block( "default_sandstone", "Sandstone", "default_sandstone.png", @@ -7,19 +7,8 @@ mybricks.register_block(--material, description, image, groups, craft item "default:sandstone", "normal" ) ---]] ---[[ -mybricks.register_block(--material, description, image, groups, craft item - "default_desert_sand", - "Desert Sand", - "default_desert_sand.png", - {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1}, - "default:desert_sand", - "normal" - ) ---]] ----[[ -mybricks.register_block(--material, description, image, groups, craft item + +mybricks.register_block( "default_clay", "Clay", "default_clay.png", @@ -27,9 +16,8 @@ mybricks.register_block(--material, description, image, groups, craft item "default:clay", "normal" ) ---]] ----[[ -mybricks.register_block(--material, description, image, groups, craft item + +mybricks.register_block( "default_cobble", "Cobble", "default_cobble.png", @@ -37,9 +25,8 @@ mybricks.register_block(--material, description, image, groups, craft item "default:cobble", "normal" ) ---]] ----[[ -mybricks.register_block(--material, description, image, groups, craft item + +mybricks.register_block( "default_stone", "Stone", "default_stone.png", @@ -47,29 +34,8 @@ mybricks.register_block(--material, description, image, groups, craft item "default:stone", "normal" ) ---]] ---[[ -mybricks.register_block(--material, description, image, groups, craft item - "default_cactus", - "Cactus", - "default_cactus_side.png", - {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1}, - "default:cactus", - "normal" - ) ---]] ---[[ -mybricks.register_block(--material, description, image, groups, craft item - "default_sand", - "Sand", - "default_sand.png", - {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1}, - "default:sand", - "normal" - ) ---]] ----[[ -mybricks.register_block(--material, description, image, groups, craft item + +mybricks.register_block( "default_desert_stone", "Desert Stone", "default_desert_stone.png", @@ -77,9 +43,8 @@ mybricks.register_block(--material, description, image, groups, craft item "default:desert_stone", "normal" ) ---]] ----[[ -mybricks.register_block(--material, description, image, groups, craft item + +mybricks.register_block( "default_wood", "Wood", "default_wood.png", @@ -87,9 +52,8 @@ mybricks.register_block(--material, description, image, groups, craft item "default:wood", "normal" ) ---]] ----[[ -mybricks.register_block(--material, description, image, groups, craft item + +mybricks.register_block( "default_pine_wood", "Pine Wood", "default_pine_wood.png", @@ -97,9 +61,8 @@ mybricks.register_block(--material, description, image, groups, craft item "default:pine_wood", "normal" ) ---]] ----[[ -mybricks.register_block(--material, description, image, groups, craft item + +mybricks.register_block( "default_aspen_wood", "Aspen Wood", "default_aspen_wood.png", @@ -107,9 +70,8 @@ mybricks.register_block(--material, description, image, groups, craft item "default:aspen_wood", "normal" ) ---]] ----[[ -mybricks.register_block(--material, description, image, groups, craft item + +mybricks.register_block( "default_acacia_wood", "Acacia Wood", "default_acacia_wood.png", @@ -117,9 +79,8 @@ mybricks.register_block(--material, description, image, groups, craft item "default:acacia_wood", "normal" ) ---]] ----[[ -mybricks.register_block(--material, description, image, groups, craft item + +mybricks.register_block( "default_dirt", "Dirt", "default_dirt.png", @@ -127,29 +88,8 @@ mybricks.register_block(--material, description, image, groups, craft item "default:dirt", "normal" ) ---]] ---[[ -mybricks.register_block(--material, description, image, groups, craft item - "default_brick", - "Brick", - "default_brick.png", - {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1}, - "default:brick", - "normal" - ) ---]] ---[[ -mybricks.register_block(--material, description, image, groups, craft item - "default_bronze_block", - "Bronze Block", - "default_bronze_block.png", - {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1}, - "default:bronzeblock", - "normal" - ) ---]] ----[[ -mybricks.register_block(--material, description, image, groups, craft item + +mybricks.register_block( "default_coal_block", "Coal Block", "default_coal_block.png", @@ -157,19 +97,8 @@ mybricks.register_block(--material, description, image, groups, craft item "default:coalblock", "normal" ) ---]] ---[[ -mybricks.register_block(--material, description, image, groups, craft item - "default_copper_block", - "Copper Block", - "default_copper_block.png", - {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1}, - "default:copperblock", - "normal" - ) ---]] ----[[ -mybricks.register_block(--material, description, image, groups, craft item + +mybricks.register_block( "default_desert_cobble", "Desert Cobble", "default_desert_cobble.png", @@ -177,19 +106,8 @@ mybricks.register_block(--material, description, image, groups, craft item "default:desert_cobble", "normal" ) ---]] ---[[ -mybricks.register_block(--material, description, image, groups, craft item - "default_diamond_block", - "Diamond Block", - "default_diamond_block.png", - {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1}, - "default:diamondblock", - "normal" - ) ---]] ----[[ -mybricks.register_block(--material, description, image, groups, craft item + +mybricks.register_block( "default_glass", "Glass", "default_glass.png", @@ -197,19 +115,8 @@ mybricks.register_block(--material, description, image, groups, craft item "default:glass", "glasslike" ) ---]] ---[[ -mybricks.register_block(--material, description, image, groups, craft item - "default_gold_block", - "Gold Block", - "default_gold_block.png", - {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1}, - "default:goldblock", - "normal" - ) ---]] ----[[ -mybricks.register_block(--material, description, image, groups, craft item + +mybricks.register_block( "default_gravel", "Gravel", "default_gravel.png", @@ -217,29 +124,8 @@ mybricks.register_block(--material, description, image, groups, craft item "default:gravel", "normal" ) ---]] ---[[ -mybricks.register_block(--material, description, image, groups, craft item - "default_ice", - "Ice", - "default_ice.png", - {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1}, - "default:ice", - "normal" - ) ---]] ---[[ -mybricks.register_block(--material, description, image, groups, craft item - "default_jungletree", - "Jungle Tree", - "default_jungletree.png", - {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1}, - "default:jungletree", - "normal" - ) ---]] ----[[ -mybricks.register_block(--material, description, image, groups, craft item + +mybricks.register_block( "default_junglewood", "Jungle Wood", "default_junglewood.png", @@ -247,29 +133,8 @@ mybricks.register_block(--material, description, image, groups, craft item "default:junglewood", "normal" ) ---]] ---[[ -mybricks.register_block(--material, description, image, groups, craft item - "default_lava", - "Lava", - "default_lava.png", - {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1}, - "default:lava_source", - "normal" - ) ---]] ---[[ -mybricks.register_block(--material, description, image, groups, craft item - "default_mese", - "Mese", - "default_mese_block.png", - {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1}, - "default:mese", - "normal" - ) ---]] ----[[ -mybricks.register_block(--material, description, image, groups, craft item + +mybricks.register_block( "default_mossycobble", "Mossy Cobble", "default_mossycobble.png", @@ -277,9 +142,8 @@ mybricks.register_block(--material, description, image, groups, craft item "default:mossycobble", "normal" ) ---]] ----[[ -mybricks.register_block(--material, description, image, groups, craft item + +mybricks.register_block( "default_obsidian", "Obsidian", "default_obsidian.png", @@ -287,119 +151,8 @@ mybricks.register_block(--material, description, image, groups, craft item "default:obsidian", "normal" ) ---]] ---[[ -mybricks.register_block(--material, description, image, groups, craft item, drawtype - "default_obsidian_glass", - "Obsidian Glass", - "default_obsidian_glass.png", - {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1}, - "default:obsidian_glass", - "glasslike" - ) ---]] ---[[ -mybricks.register_block(--material, description, image, groups, craft item - "default_obsidian_brick", - "Obsidian Brick", - "default_obsidian_brick.png", - {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1}, - "default:obsidianbrick", - "normal" - ) ---]] ---[[ -mybricks.register_block(--material, description, image, groups, craft item - "default_pine_tree", - "Pine Tree", - "default_pine_tree.png", - {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1}, - "default:pine_tree", - "normal" - ) ---]] ---[[ -mybricks.register_block(--material, description, image, groups, craft item - "default_aspen_tree", - "Aspen Tree", - "default_aspen_tree.png", - {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1}, - "default:aspen_tree", - "normal" - ) ---]] ---[[ -mybricks.register_block(--material, description, image, groups, craft item - "default_acacia_tree", - "Acacia Tree", - "default_acacia_tree.png", - {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1}, - "default:acacia_tree", - "normal" - ) ---]] ---[[ -mybricks.register_block(--material, description, image, groups, craft item - "default_sandstone_brick", - "Sandstone Brick", - "default_sandstone_brick.png", - {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1}, - "default:sandstonebrick", - "normal" - ) ---]] ---[[ -mybricks.register_block(--material, description, image, groups, craft item - "default_snow", - "Snow", - "default_snow.png", - {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1}, - "default:snowblock", - "normal" - ) ---]] ---[[ -mybricks.register_block(--material, description, image, groups, craft item - "default_steel_block", - "Steel Block", - "default_steel_block.png", - {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1}, - "default:steelblock", - "normal" - ) ---]] ---[[ -mybricks.register_block(--material, description, image, groups, craft item - "default_stone_brick", - "Stone Brick", - "default_stone_brick.png", - {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1}, - "default:stonebrick", - "normal" - ) ---]] ---[[ -mybricks.register_block(--material, description, image, groups, craft item - "default_tree", - "Tree", - "default_tree.png", - {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1}, - "default:tree", - "normal" - ) ---]] ---[[ -mybricks.register_block(--material, description, image, groups, craft item - "default_water", - "Water", - "default_water.png", - {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1}, - "default:water_source", - "normal" - ) ---]] ----[[ -mybricks.register_block(--material, description, image, groups, craft item + +mybricks.register_block( "farming_straw", "Straw", "farming_straw.png", @@ -407,14 +160,10 @@ mybricks.register_block(--material, description, image, groups, craft item "farming:straw", "normal" ) ---]] - ------------------------------------------------------------------------------------------------------ --wool - -mybricks.register_block(--material, description, image, groups, craft item +mybricks.register_block( "wool_white", "White Wool", "wool_white.png", @@ -422,7 +171,7 @@ mybricks.register_block(--material, description, image, groups, craft item "wool:white", "normal" ) -mybricks.register_block(--material, description, image, groups, craft item +mybricks.register_block( "wool_black", "Black Wool", "wool_black.png", @@ -430,7 +179,7 @@ mybricks.register_block(--material, description, image, groups, craft item "wool:black", "normal" ) -mybricks.register_block(--material, description, image, groups, craft item +mybricks.register_block( "wool_blue", "Blue Wool", "wool_blue.png", @@ -438,7 +187,7 @@ mybricks.register_block(--material, description, image, groups, craft item "wool:blue", "normal" ) -mybricks.register_block(--material, description, image, groups, craft item +mybricks.register_block( "wool_brown", "Brown Wool", "wool_brown.png", @@ -446,7 +195,7 @@ mybricks.register_block(--material, description, image, groups, craft item "wool:brown", "normal" ) -mybricks.register_block(--material, description, image, groups, craft item +mybricks.register_block( "wool_cyan", "Cyan Wool", "wool_cyan.png", @@ -454,7 +203,7 @@ mybricks.register_block(--material, description, image, groups, craft item "wool:cyan", "normal" ) -mybricks.register_block(--material, description, image, groups, craft item +mybricks.register_block( "wool_dark_green", "Dark Green Wool", "wool_dark_green.png", @@ -462,7 +211,7 @@ mybricks.register_block(--material, description, image, groups, craft item "wool:dark_green", "normal" ) -mybricks.register_block(--material, description, image, groups, craft item +mybricks.register_block( "wool_dark_grey", "Dark Grey Wool", "wool_dark_grey.png", @@ -470,7 +219,7 @@ mybricks.register_block(--material, description, image, groups, craft item "wool:dark_grey", "normal" ) -mybricks.register_block(--material, description, image, groups, craft item +mybricks.register_block( "wool_green", "Green Wool", "wool_green.png", @@ -478,7 +227,7 @@ mybricks.register_block(--material, description, image, groups, craft item "wool:green", "normal" ) -mybricks.register_block(--material, description, image, groups, craft item +mybricks.register_block( "wool_grey", "Grey Wool", "wool_grey.png", @@ -486,7 +235,7 @@ mybricks.register_block(--material, description, image, groups, craft item "wool:grey", "normal" ) -mybricks.register_block(--material, description, image, groups, craft item +mybricks.register_block( "wool_magenta", "Magenta Wool", "wool_magenta.png", @@ -494,7 +243,7 @@ mybricks.register_block(--material, description, image, groups, craft item "wool:magenta", "normal" ) -mybricks.register_block(--material, description, image, groups, craft item +mybricks.register_block( "wool_orange", "Orange Wool", "wool_orange.png", @@ -502,7 +251,7 @@ mybricks.register_block(--material, description, image, groups, craft item "wool:orange", "normal" ) -mybricks.register_block(--material, description, image, groups, craft item +mybricks.register_block( "wool_pink", "Pink Wool", "wool_pink.png", @@ -510,7 +259,7 @@ mybricks.register_block(--material, description, image, groups, craft item "wool:pink", "normal" ) -mybricks.register_block(--material, description, image, groups, craft item +mybricks.register_block( "wool_red", "Red Wool", "wool_red.png", @@ -518,7 +267,7 @@ mybricks.register_block(--material, description, image, groups, craft item "wool:red", "normal" ) -mybricks.register_block(--material, description, image, groups, craft item +mybricks.register_block( "wool_violet", "Violet Wool", "wool_violet.png", @@ -526,7 +275,7 @@ mybricks.register_block(--material, description, image, groups, craft item "wool:violet", "normal" ) -mybricks.register_block(--material, description, image, groups, craft item +mybricks.register_block( "wool_yellow", "Yellow Wool", "wool_yellow.png",