Code cleanup

This commit is contained in:
DonBatman 2016-04-13 08:22:52 -07:00
parent b8b422165f
commit d060aef5b2
5 changed files with 172 additions and 970 deletions

View File

@ -2,11 +2,3 @@ mymillwork = {}
dofile(minetest.get_modpath("mymillwork").."/millwork.lua")
dofile(minetest.get_modpath("mymillwork").."/machines.lua")
dofile(minetest.get_modpath("mymillwork").."/register.lua")

View File

@ -21,17 +21,17 @@ minetest.register_node("mymillwork:machine", {
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.1875, -0.5, 0.5, -0.0625, 0.5}, -- Table
{-0.5, -0.5, -0.5, -0.3125, -0.1875, -0.3125}, -- leg
{-0.5, -0.5, 0.3125, -0.3125, -0.1875, 0.5}, -- leg
{0.3125, -0.5, 0.3125, 0.5, -0.1875, 0.5}, -- leg
{0.3125, -0.5, -0.5, 0.5, -0.1875, -0.3125}, -- leg
{0, -0.0625, 0.25, 0.0625, 0.375, 0.5}, -- verticle
{-0.125, -0.0625, 0.25, -0.0625, 0.375, 0.5}, -- verticle
{-0.1875, 0.125, -0.3125, 0.125, 0.5, 0.0625}, -- motor
{-0.125, 0.375, 0.0625, 0.0625, 0.5, 0.5}, -- arm
{-0.0625, 0.0625, -0.3125, 0, 0.125, 0.0625}, -- blade
{-0.0625, 0, -0.25, 0, 0.125, 0}, -- blade
{-0.5, -0.1875, -0.5, 0.5, -0.0625, 0.5},
{-0.5, -0.5, -0.5, -0.3125, -0.1875, -0.3125},
{-0.5, -0.5, 0.3125, -0.3125, -0.1875, 0.5},
{0.3125, -0.5, 0.3125, 0.5, -0.1875, 0.5},
{0.3125, -0.5, -0.5, 0.5, -0.1875, -0.3125},
{0, -0.0625, 0.25, 0.0625, 0.375, 0.5},
{-0.125, -0.0625, 0.25, -0.0625, 0.375, 0.5},
{-0.1875, 0.125, -0.3125, 0.125, 0.5, 0.0625},
{-0.125, 0.375, 0.0625, 0.0625, 0.5, 0.5},
{-0.0625, 0.0625, -0.3125, 0, 0.125, 0.0625},
{-0.0625, 0, -0.25, 0, 0.125, 0},
}
},
@ -44,9 +44,8 @@ minetest.register_node("mymillwork:machine", {
can_dig = function(pos,player)
local meta = minetest.get_meta(pos);
local inv = meta:get_inventory()
if not inv:is_empty("ingot") then
return false
elseif not inv:is_empty("res") then
if not inv:is_empty("ingot") or
not inv:is_empty("res") then
return false
end
return true
@ -104,531 +103,205 @@ on_receive_fields = function(pos, formname, fields, sender)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
-----------------------------
if fields["crownmould"]
if fields["crownmould"]
or fields["crownmould_ic"]
or fields["crownmould_oc"]
or fields["crownmould_beam"]
or fields["column"]
or fields["column"]
or fields["column_base"]
or fields["column_half"]
or fields["column_half"]
or fields["column_half_base"]
or fields["column_half_wbeam"]
or fields["column_quarter"]
or fields["column_quarter_base"]
or fields["column_half_wbeam"]
or fields["column_quarter"]
or fields["column_quarter_base"]
or fields["column_quarter_wbase"]
or fields["column_quarter_fancybase"]
or fields["ceiling"]
or fields["ceiling_post"]
or fields["beam"]
or fields["beam_t"]
or fields["ceiling"]
or fields["ceiling_post"]
or fields["beam"]
or fields["beam_t"]
or fields["beam_ceiling_t"]
or fields["base"]
or fields["base_ic"]
or fields["base_oc"]
or fields["base"]
or fields["base_ic"]
or fields["base_oc"]
or fields["base_fancy"]
or fields["base_fancy_ic"]
or fields["base_fancy_oc"]
or fields["base_fancy_oc"]
then
--Crown Mould-----------------------------------------
if inv:is_empty("ingot") then
return
end
--Crown Mould
if fields["crownmould"] then
make_ok = "0"
anzahl = "1"
shape = "mymillwork:crownmould_"
if inv:is_empty("ingot") then
return
end
end
if fields["crownmould_ic"] then
elseif fields["crownmould_ic"] then
make_ok = "0"
anzahl = "1"
shape = "mymillwork:crownmould_ic_"
if inv:is_empty("ingot") then
return
end
end
if fields["crownmould_oc"] then
elseif fields["crownmould_oc"] then
make_ok = "0"
anzahl = "1"
shape = "mymillwork:crownmould_oc_"
if inv:is_empty("ingot") then
return
end
end
if fields["crownmould_beam"] then
elseif fields["crownmould_beam"] then
make_ok = "0"
anzahl = "1"
shape = "mymillwork:crownmould_beam_"
if inv:is_empty("ingot") then
return
end
end
--Columns----------------------------------------------
--Columns
if fields["column"] then
elseif fields["column"] then
make_ok = "0"
anzahl = "1"
shape = "mymillwork:column_"
if inv:is_empty("ingot") then
return
end
end
if fields["column_base"] then
elseif fields["column_base"] then
make_ok = "0"
anzahl = "1"
shape = "mymillwork:column_base_"
if inv:is_empty("ingot") then
return
end
end
if fields["column_half"] then
elseif fields["column_half"] then
make_ok = "0"
anzahl = "2"
shape = "mymillwork:column_half_"
if inv:is_empty("ingot") then
return
end
end
if fields["column_half_base"] then
elseif fields["column_half_base"] then
make_ok = "0"
anzahl = "2"
shape = "mymillwork:column_half_base_"
if inv:is_empty("ingot") then
return
end
end
if fields["column_half_wbeam"] then
elseif fields["column_half_wbeam"] then
make_ok = "0"
anzahl = "1"
shape = "mymillwork:column_half_wbeam_"
if inv:is_empty("ingot") then
return
end
end
if fields["column_quarter"] then
elseif fields["column_quarter"] then
make_ok = "0"
anzahl = "4"
shape = "mymillwork:column_quarter_"
if inv:is_empty("ingot") then
return
end
end
if fields["column_quarter_base"] then
elseif fields["column_quarter_base"] then
make_ok = "0"
anzahl = "4"
shape = "mymillwork:column_quarter_base_"
if inv:is_empty("ingot") then
return
end
end
if fields["column_quarter_wbase"] then
elseif fields["column_quarter_wbase"] then
make_ok = "0"
anzahl = "2"
shape = "mymillwork:column_quarter_wbase_"
if inv:is_empty("ingot") then
return
end
end
if fields["column_quarter_fancybase"] then
elseif fields["column_quarter_fancybase"] then
make_ok = "0"
anzahl = "2"
shape = "mymillwork:column_quarter_fancybase_"
if inv:is_empty("ingot") then
return
end
end
--Ceiling--------------------------------------------------
--Ceiling
if fields["ceiling"] then
elseif fields["ceiling"] then
make_ok = "0"
anzahl = "6"
shape = "mymillwork:ceiling_"
if inv:is_empty("ingot") then
return
end
end
if fields["ceiling_post"] then
elseif fields["ceiling_post"] then
make_ok = "0"
anzahl = "4"
shape = "mymillwork:ceiling_post_"
if inv:is_empty("ingot") then
return
end
end
--Beam----------------------------------------------
--Beam
if fields["beam"] then
elseif fields["beam"] then
make_ok = "0"
anzahl = "2"
shape = "mymillwork:beam_"
if inv:is_empty("ingot") then
return
end
end
if fields["beam_t"] then
elseif fields["beam_t"] then
make_ok = "0"
anzahl = "2"
shape = "mymillwork:beam_t_"
if inv:is_empty("ingot") then
return
end
end
if fields["beam_ceiling_t"] then
elseif fields["beam_ceiling_t"] then
make_ok = "0"
anzahl = "2"
shape = "mymillwork:beam_ceiling_t_"
if inv:is_empty("ingot") then
return
end
end
--Base----------------------------------------------
--Base
if fields["base"] then
elseif fields["base"] then
make_ok = "0"
anzahl = "8"
shape = "mymillwork:base_"
if inv:is_empty("ingot") then
return
end
end
if fields["base_ic"] then
elseif fields["base_ic"] then
make_ok = "0"
anzahl = "4"
shape = "mymillwork:base_ic_"
if inv:is_empty("ingot") then
return
end
end
if fields["base_oc"] then
elseif fields["base_oc"] then
make_ok = "0"
anzahl = "10"
shape = "mymillwork:base_oc_"
if inv:is_empty("ingot") then
return
end
end
if fields["base_fancy"] then
elseif fields["base_fancy"] then
make_ok = "0"
anzahl = "6"
shape = "mymillwork:base_fancy_"
if inv:is_empty("ingot") then
return
end
end
if fields["base_fancy_ic"] then
elseif fields["base_fancy_ic"] then
make_ok = "0"
anzahl = "3"
shape = "mymillwork:base_fancy_ic_"
if inv:is_empty("ingot") then
return
end
end
if fields["base_fancy_oc"] then
elseif fields["base_fancy_oc"] then
make_ok = "0"
anzahl = "8"
shape = "mymillwork:base_fancy_oc_"
if inv:is_empty("ingot") then
return
end
end
local ingotstack = inv:get_stack("ingot", 1)
local resstack = inv:get_stack("res", 1)
----------------------------------------------------------------------
--Register Items
----------------------------------------------------------------------
if ingotstack:get_name()=="default:sandstone" then
material = "default_sandstone"
make_ok = "1"
end
--[[
if ingotstack:get_name()=="default:desert_sand" then
material = "default_desert_sand"
make_ok = "1"
end
--]]
if ingotstack:get_name()=="default:clay" then
material = "default_clay"
make_ok = "1"
end
if ingotstack:get_name()=="default:desert_stone" then
material = "default_desert_stone"
make_ok = "1"
end
local items = {
{"default:stone", "default_stone"},
{"default:desert_stone", "default_desert_stone"},
{"default:sandstone", "default_sandstone"},
{"default:clay", "default_clay"},
{"default:wood", "default_wood"},
{"default:junglewood", "default_junglewood"},
{"default:pine_wood", "default_pine_wood"},
{"default:pine_acacia", "default_acacia_wood"},
{"default:aspen_wood", "default_aspen_wood"},
{"default:coalblock", "default_coal_block"},
{"default:obsidian", "default_obsidian"}
}
if ingotstack:get_name()=="default:cobble" then
material = "default_cobble"
for i in ipairs(items) do
local itm = items[i][1]
local mat = items[i][2]
if ingotstack:get_name()== itm then
material = mat
make_ok = "1"
end
end
if ingotstack:get_name()=="default:stone" then
material = "default_stone"
make_ok = "1"
end
--[[
if ingotstack:get_name()=="default:cactus" then
material = "default_cactus"
make_ok = "1"
end
--]]
--[[
if ingotstack:get_name()=="default:sand" then
material = "default_sand"
make_ok = "1"
end
--]]
if ingotstack:get_name()=="default:wood" then
material = "default_wood"
make_ok = "1"
end
if ingotstack:get_name()=="default:pinewood" then
material = "default_pinewood"
make_ok = "1"
end
--[[
if ingotstack:get_name()=="default:dirt" then
material = "default_dirt"
make_ok = "1"
end
--]]
if ingotstack:get_name()=="default:brick" then
material = "default_brick"
make_ok = "1"
end
--[[
if ingotstack:get_name()=="default:bronzeblock" then
material = "default_bronze_block"
make_ok = "1"
end
--]]
if ingotstack:get_name()=="default:coalblock" then
material = "default_coal_block"
make_ok = "1"
end
--[[
if ingotstack:get_name()=="default:copperblock" then
material = "default_copper_block"
make_ok = "1"
end
--]]
if ingotstack:get_name()=="default:desert_cobble" then
material = "default_desert_cobble"
make_ok = "1"
end
--[[
if ingotstack:get_name()=="default:diamondblock" then
material = "default_diamond_block"
make_ok = "1"
end
--]]
--[[
if ingotstack:get_name()=="default:glass" then
material = "default_glass"
make_ok = "1"
end
--]]
--[[
if ingotstack:get_name()=="default:goldblock" then
material = "default_gold_block"
make_ok = "1"
end
--]]
--[[
if ingotstack:get_name()=="default:gravel" then
material = "default_gravel"
make_ok = "1"
end
--]]
--[[
if ingotstack:get_name()=="default:ice" then
material = "default_ice"
make_ok = "1"
end
--]]
if ingotstack:get_name()=="default:jungletree" then
material = "default_jungletree"
make_ok = "1"
end
if ingotstack:get_name()=="default:junglewood" then
material = "default_junglewood"
make_ok = "1"
end
--[[
if ingotstack:get_name()=="default:lava_source" then
material = "default_lava"
make_ok = "1"
end
--]]
--[[
if ingotstack:get_name()=="default:mese" then
material = "default_mese"
make_ok = "1"
end
--]]
if ingotstack:get_name()=="default:mossycobble" then
material = "default_mossycobble"
make_ok = "1"
end
if ingotstack:get_name()=="default:obsidian" then
material = "default_obsidian"
make_ok = "1"
end
--[[
if ingotstack:get_name()=="default:obsidian_glass" then
material = "default_obsidian_glass"
make_ok = "1"
end
--]]
if ingotstack:get_name()=="default:obsidianbrick" then
material = "default_obsidian_brick"
make_ok = "1"
end
if ingotstack:get_name()=="default:pinetree" then
material = "default_pinetree"
make_ok = "1"
end
if ingotstack:get_name()=="default:sandstonebrick" then
material = "default_sandstone_brick"
make_ok = "1"
end
--[[
if ingotstack:get_name()=="default:snowblock" then
material = "default_snow"
make_ok = "1"
end
--]]
--[[
if ingotstack:get_name()=="default:steelblock" then
material = "default_steel_block"
make_ok = "1"
end
--]]
if ingotstack:get_name()=="default:stonebrick" then
material = "default_stone_brick"
make_ok = "1"
end
if ingotstack:get_name()=="default:tree" then
material = "default_tree"
make_ok = "1"
end
--[[
if ingotstack:get_name()=="default:water_source" then
material = "default_water"
make_ok = "1"
end
--]]
--[[
if ingotstack:get_name()=="farming:straw" then
material = "farming_straw"
make_ok = "1"
end
--]]
----------------------------------------------------------------------------
--wool
--[[
if ingotstack:get_name()=="wool:white" then
material = "wool_white"
make_ok = "1"
end
if ingotstack:get_name()=="wool:black" then
material = "wool_black"
make_ok = "1"
end
if ingotstack:get_name()=="wool:blue" then
material = "wool_blue"
make_ok = "1"
end
if ingotstack:get_name()=="wool:brown" then
material = "wool_brown"
make_ok = "1"
end
if ingotstack:get_name()=="wool:cyan" then
material = "wool_cyan"
make_ok = "1"
end
if ingotstack:get_name()=="wool:dark_green" then
material = "wool_dark_green"
make_ok = "1"
end
if ingotstack:get_name()=="wool:dark_grey" then
material = "wool_dark_grey"
make_ok = "1"
end
if ingotstack:get_name()=="wool:green" then
material = "wool_green"
make_ok = "1"
end
if ingotstack:get_name()=="wool:grey" then
material = "wool_grey"
make_ok = "1"
end
if ingotstack:get_name()=="wool:magenta" then
material = "wool_magenta"
make_ok = "1"
end
if ingotstack:get_name()=="wool:orange" then
material = "wool_orange"
make_ok = "1"
end
if ingotstack:get_name()=="wool:pink" then
material = "wool_pink"
make_ok = "1"
end
if ingotstack:get_name()=="wool:red" then
material = "wool_red"
make_ok = "1"
end
if ingotstack:get_name()=="wool:violet" then
material = "wool_violet"
make_ok = "1"
end
if ingotstack:get_name()=="wool:yellow" then
material = "wool_yellow"
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..material)
end
ingotstack:take_item()
if not minetest.setting_getbool("creative_mode") then
ingotstack:take_item()
end
inv:set_stack("ingot",1,ingotstack)
end
end
end
end
@ -640,21 +313,8 @@ end
minetest.register_craft({
output = 'mymillwork:machine',
recipe = {
{'', 'default:steel_ingot',''},
{'default:steelblock', 'default:steelblock', 'default:steelblock'},
{'default:steelblock', 'default:steel_ingot', 'default:steelblock'},
{'default:steelblock', "default:steelblock", 'default:steelblock'},
{'default:steel_ingot','' , 'default:steel_ingot'},
},
})

View File

@ -1,5 +1,5 @@
function mymillwork.register_all(mat, desc, image, groups, craft)
function mymillwork.register_all(mat, desc, image, group, itm)
minetest.register_node("mymillwork:crownmould_"..mat, {
description = desc.." Crown Mould",
@ -9,7 +9,7 @@ minetest.register_node("mymillwork:crownmould_"..mat, {
paramtype2 = "facedir",
sunlight_propagates = true,
is_ground_content = true,
groups = {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1},
groups = group,
node_box = {
type = "fixed",
fixed = {
@ -43,7 +43,7 @@ minetest.register_node("mymillwork:crownmould_ic_"..mat, {
paramtype2 = "facedir",
sunlight_propagates = true,
is_ground_content = true,
groups = {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1},
groups = group,
node_box = {
type = "fixed",
fixed = {
@ -87,7 +87,7 @@ minetest.register_node("mymillwork:crownmould_oc_"..mat, {
paramtype2 = "facedir",
sunlight_propagates = true,
is_ground_content = true,
groups = {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1},
groups = group,
node_box = {
type = "fixed",
fixed = {
@ -122,7 +122,7 @@ minetest.register_node("mymillwork:crownmould_beam_"..mat, {
paramtype2 = "facedir",
sunlight_propagates = true,
is_ground_content = true,
groups = {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1},
groups = group,
node_box = {
type = "fixed",
fixed = {
@ -159,7 +159,7 @@ minetest.register_node("mymillwork:column_" ..mat, {
paramtype2 = "facedir",
sunlight_propagates = true,
is_ground_content = true,
groups = {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1},
groups = group,
node_box = {
type = "fixed",
fixed = {
@ -188,7 +188,7 @@ minetest.register_node("mymillwork:column_base_"..mat, {
paramtype2 = "facedir",
sunlight_propagates = true,
is_ground_content = true,
groups = {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1},
groups = group,
node_box = {
type = "fixed",
fixed = {
@ -218,7 +218,7 @@ minetest.register_node("mymillwork:column_half_"..mat, {
paramtype2 = "facedir",
sunlight_propagates = true,
is_ground_content = true,
groups = {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1},
groups = group,
node_box = {
type = "fixed",
fixed = {
@ -247,7 +247,7 @@ minetest.register_node("mymillwork:column_half_base_"..mat, {
paramtype2 = "facedir",
sunlight_propagates = true,
is_ground_content = true,
groups = {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1},
groups = group,
node_box = {
type = "fixed",
fixed = {
@ -277,7 +277,7 @@ minetest.register_node("mymillwork:column_half_wbeam_"..mat, {
paramtype2 = "facedir",
sunlight_propagates = true,
is_ground_content = true,
groups = {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1},
groups = group,
node_box = {
type = "fixed",
fixed = {
@ -315,7 +315,7 @@ minetest.register_node("mymillwork:column_quarter_"..mat, {
paramtype2 = "facedir",
sunlight_propagates = true,
is_ground_content = true,
groups = {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1},
groups = group,
node_box = {
type = "fixed",
fixed = {
@ -344,7 +344,7 @@ minetest.register_node("mymillwork:column_quarter_base_"..mat, {
paramtype2 = "facedir",
sunlight_propagates = true,
is_ground_content = true,
groups = {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1},
groups = group,
node_box = {
type = "fixed",
fixed = {
@ -374,7 +374,7 @@ minetest.register_node("mymillwork:column_quarter_wbase_"..mat, {
paramtype2 = "facedir",
sunlight_propagates = true,
is_ground_content = true,
groups = {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1},
groups = group,
node_box = {
type = "fixed",
fixed = {
@ -406,7 +406,7 @@ minetest.register_node("mymillwork:column_quarter_fancybase_"..mat, {
paramtype2 = "facedir",
sunlight_propagates = true,
is_ground_content = true,
groups = {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1},
groups = group,
node_box = {
type = "fixed",
fixed = {
@ -443,7 +443,7 @@ minetest.register_node("mymillwork:ceiling_" ..mat, {
paramtype2 = "facedir",
sunlight_propagates = true,
is_ground_content = true,
groups = {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1},
groups = group,
node_box = {
type = "fixed",
fixed = {
@ -468,7 +468,7 @@ minetest.register_node("mymillwork:ceiling_post_"..mat, {
paramtype2 = "facedir",
sunlight_propagates = true,
is_ground_content = true,
groups = {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1},
groups = group,
node_box = {
type = "fixed",
fixed = {
@ -497,7 +497,7 @@ minetest.register_node("mymillwork:beam_ceiling_"..mat, {
paramtype2 = "facedir",
sunlight_propagates = true,
is_ground_content = true,
groups = {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1},
groups = group,
node_box = {
type = "fixed",
fixed = {
@ -525,7 +525,7 @@ minetest.register_node("mymillwork:beam_ceiling_t_"..mat, {
paramtype2 = "facedir",
sunlight_propagates = true,
is_ground_content = true,
groups = {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1},
groups = group,
node_box = {
type = "fixed",
fixed = {
@ -557,7 +557,7 @@ minetest.register_node("mymillwork:beam_" ..mat, {
paramtype2 = "facedir",
sunlight_propagates = true,
is_ground_content = true,
groups = {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1},
groups = group,
node_box = {
type = "fixed",
fixed = {
@ -584,7 +584,7 @@ minetest.register_node("mymillwork:beam_t_"..mat, {
paramtype2 = "facedir",
sunlight_propagates = true,
is_ground_content = true,
groups = {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1},
groups = group,
node_box = {
type = "fixed",
fixed = {
@ -615,7 +615,7 @@ minetest.register_node("mymillwork:base_" ..mat, {
paramtype2 = "facedir",
sunlight_propagates = true,
is_ground_content = true,
groups = {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1},
groups = group,
node_box = {
type = "fixed",
fixed = {
@ -640,7 +640,7 @@ minetest.register_node("mymillwork:base_ic_"..mat, {
paramtype2 = "facedir",
sunlight_propagates = true,
is_ground_content = true,
groups = {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1},
groups = group,
node_box = {
type = "fixed",
fixed = {
@ -667,7 +667,7 @@ minetest.register_node("mymillwork:base_oc_"..mat, {
paramtype2 = "facedir",
sunlight_propagates = true,
is_ground_content = true,
groups = {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1},
groups = group,
node_box = {
type = "fixed",
fixed = {
@ -692,7 +692,7 @@ minetest.register_node("mymillwork:base_fancy_"..mat, {
paramtype2 = "facedir",
sunlight_propagates = true,
is_ground_content = true,
groups = {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1},
groups = group,
node_box = {
type = "fixed",
fixed = {
@ -720,7 +720,7 @@ minetest.register_node("mymillwork:base_fancy_ic_"..mat, {
paramtype2 = "facedir",
sunlight_propagates = true,
is_ground_content = true,
groups = {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1},
groups = group,
node_box = {
type = "fixed",
fixed = {
@ -753,7 +753,7 @@ minetest.register_node("mymillwork:base_fancy_oc_"..mat, {
paramtype2 = "facedir",
sunlight_propagates = true,
is_ground_content = true,
groups = {cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1},
groups = group,
node_box = {
type = "fixed",
fixed = {

View File

@ -1,538 +1,88 @@
---[[
mymillwork.register_all(
"default_sandstone",
"Sandstone",
"default_sandstone.png",
{crumbly=2, cracky = 3, not_in_creative_inventory=1},
"default:sandstone",
"normal"
)
--]]
--[[
mymillwork.register_all(
"default_desert_sand",
"Desert Sand",
"default_desert_sand.png",
{crumbly=3,not_in_creative_inventory=1},
"default:desert_sand",
"normal"
)
--]]
---[[
mymillwork.register_all(
"default_clay",
"Clay",
"default_clay.png",
{crumbly=3,not_in_creative_inventory=1},
"default:clay",
"normal"
)
--]]
---[[
mymillwork.register_all(
"default_cobble",
"Cobble",
"default_cobble.png",
{cracky = 3, not_in_creative_inventory=1},
"default:cobble",
"normal"
)
--]]
---[[
mymillwork.register_all(
"default_stone",
"Stone",
"default_stone",
"Stone",
"default_stone.png",
{cracky = 3,not_in_creative_inventory=1},
"default:stone",
"normal"
"default:stone"
)
--]]
--[[
mymillwork.register_all(
"default_cactus",
"Cactus",
"default_cactus_side.png",
{choppy = 3,not_in_creative_inventory=1},
"default:cactus",
"normal"
)
--]]
--[[
mymillwork.register_all(
"default_sand",
"Sand",
"default_sand.png",
{crumbly=3,not_in_creative_inventory=1},
"default:sand",
"normal"
)
--]]
---[[
mymillwork.register_all(
"default_desert_stone",
"Desert Stone",
"default_desert_stone",
"Desert Stone",
"default_desert_stone.png",
{cracky = 3,not_in_creative_inventory=1},
"default:desert_stone",
"normal"
"default:desert_stone"
)
--]]
---[[
mymillwork.register_all(
"default_wood",
"Wood",
"default_sandstone",
"Sandstone",
"default_sandstone.png",
{crumbly=2, cracky = 3, not_in_creative_inventory=1},
"default:sandstone"
)
mymillwork.register_all(
"default_clay",
"Clay",
"default_clay.png",
{crumbly=3,not_in_creative_inventory=1},
"default:clay"
)
mymillwork.register_all(
"default_wood",
"Wood",
"default_wood.png",
{choppy = 3,not_in_creative_inventory=1},
"default:wood",
"normal"
"default:wood"
)
--]]
---[[
mymillwork.register_all(
"default_pine_wood",
"Pine Wood",
"default_pine_wood.png",
{choppy = 3,not_in_creative_inventory=1},
"default:pine_wood",
"normal"
)
--]]
---[[
mymillwork.register_all(
"default_acacia_wood",
"Acacia Wood",
"default_acacia_wood.png",
{choppy = 3,not_in_creative_inventory=1},
"default:pine_acacia",
"normal"
)
--]]
---[[
mymillwork.register_all(
"default_aspen_wood",
"Aspen Wood",
"default_aspen_wood.png",
{choppy = 3,not_in_creative_inventory=1},
"default:pine_aspen",
"normal"
)
--]]
--[[
mymillwork.register_all(
"default_dirt",
"Dirt",
"default_dirt.png",
{crumbly = 3,not_in_creative_inventory=1},
"default:dirt",
"normal"
)
--]]
---[[
mymillwork.register_all(
"default_brick",
"Brick",
"default_brick.png",
{cracky = 2,not_in_creative_inventory=1},
"default:brick",
"normal"
)
--]]
--[[
mymillwork.register_all(
"default_bronze_block",
"Bronze Block",
"default_bronze_block.png",
{cracky = 1,not_in_creative_inventory=1},
"default:bronzeblock",
"normal"
)
--]]
--[[
mymillwork.register_all(
"default_coal_block",
"Coal Block",
"default_coal_block.png",
{cracky = 3,not_in_creative_inventory=1},
"default:coalblock",
"normal"
)
--]]
--[[
mymillwork.register_all(
"default_copper_block",
"Copper Block",
"default_copper_block.png",
{cracky = 1,not_in_creative_inventory=1},
"default:copperblock",
"normal"
)
--]]
---[[
mymillwork.register_all(
"default_desert_cobble",
"Desert Cobble",
"default_desert_cobble.png",
{cracky = 3,not_in_creative_inventory=1},
"default:desert_cobble",
"normal"
)
--]]
--[[
mymillwork.register_all(
"default_diamond_block",
"Diamond Block",
"default_diamond_block.png",
{cracky = 1, level=3,not_in_creative_inventory=1},
"default:diamondblock",
"normal"
)
--]]
--[[
mymillwork.register_all(
"default_glass",
"Glass",
"default_glass.png",
{cracky = 3, oddly_breakable_by_hand = 3,not_in_creative_inventory=1},
"default:glass",
"glasslike"
)
--]]
--[[
mymillwork.register_all(
"default_gold_block",
"Gold Block",
"default_gold_block.png",
{cracky = 1,not_in_creative_inventory=1},
"default:goldblock",
"normal"
)
--]]
--[[
mymillwork.register_all(
"default_gravel",
"Gravel",
"default_gravel.png",
{crumbly = 2, falling_node=1, not_in_creative_inventory=1},
"default:gravel",
"normal"
)
--]]
--[[
mymillwork.register_all(
"default_ice",
"Ice",
"default_ice.png",
{cracky = 3, not_in_creative_inventory=1},
"default:ice",
"normal"
)
--]]
--[[
mymillwork.register_all(
"default_jungletree",
"Jungle Tree",
"default_jungletree.png",
{choppy=2,oddly_breakable_by_hand=1,flammable=2,not_in_creative_inventory=1},
"default:jungletree",
"normal"
)
--]]
---[[
mymillwork.register_all(
"default_junglewood",
"Jungle Wood",
"default_junglewood",
"Jungle Wood",
"default_junglewood.png",
{choppy=2,oddly_breakable_by_hand=2,flammable=2,not_in_creative_inventory=1},
"default:junglewood",
"normal"
"default:junglewood"
)
--]]
--[[
mymillwork.register_all(
"default_lava",
"Lava",
"default_lava.png",
{cracky = 1, oddly_breakable_by_hand = 1,not_in_creative_inventory=1},
"default:lava_source",
"normal"
)
--]]
--[[
mymillwork.register_all(
"default_mese",
"Mese",
"default_mese_block.png",
{cracky = 1,not_in_creative_inventory=1},
"default:mese",
"normal"
)
--]]
---[[
mymillwork.register_all(
"default_mossycobble",
"Mossy Cobble",
"default_mossycobble.png",
{cracky = 3,not_in_creative_inventory=1},
"default:mossycobble",
"normal"
)
--]]
--[[
mymillwork.register_all(
"default_obsidian",
"Obsidian",
"default_obsidian.png",
{cracky = 1, level = 2,not_in_creative_inventory=1},
"default:obsidian",
"normal"
)
--]]
--[[
mymillwork.register_all(
"default_obsidian_glass",
"Obsidian Glass",
"default_obsidian_glass.png",
{cracky = 3, oddly_breakable_by_hand = 3,not_in_creative_inventory=1},
"default:obsidian_glass",
"glasslike"
)
--]]
--[[
mymillwork.register_all(
"default_obsidian_brick",
"Obsidian Brick",
"default_obsidian_brick.png",
{cracky = 1, level = 2,not_in_creative_inventory=1},
"default:obsidianbrick",
"normal"
)
--]]
--[[
mymillwork.register_all(
"default_pinetree",
"Pine Tree",
"default_pinetree.png",
{choppy=2,oddly_breakable_by_hand=2,flammable=2,not_in_creative_inventory=1},
"default:pinetree",
"normal"
)
--]]
---[[
mymillwork.register_all(
"default_sandstone_brick",
"Sandstone Brick",
"default_sandstone_brick.png",
{cracky = 2,not_in_creative_inventory=1},
"default:sandstonebrick",
"normal"
)
--]]
---[[
mymillwork.register_all(
"default_desert_stone_brick",
"Desert Stone Brick",
"default_desert_stone_brick.png",
{cracky = 2,not_in_creative_inventory=1},
"default:desert_stonebrick",
"normal"
)
--]]
--[[
mymillwork.register_all(
"default_snow",
"Snow",
"default_snow.png",
{crumbly = 3, not_in_creative_inventory=1},
"default:snowblock",
"normal"
)
--]]
--[[
mymillwork.register_all(
"default_steel_block",
"Steel Block",
"default_steel_block.png",
{cracky = 1, level = 2,not_in_creative_inventory=1},
"default:steelblock",
"normal"
)
--]]
---[[
mymillwork.register_all(
"default_stone_brick",
"Stone Brick",
"default_stone_brick.png",
{cracky = 2,not_in_creative_inventory=1},
"default:stonebrick",
"normal"
)
--]]
--[[
mymillwork.register_all(
"default_tree",
"Tree",
"default_tree.png",
{choppy=2,oddly_breakable_by_hand=1,flammable=2,not_in_creative_inventory=1},
"default:tree",
"normal"
)
--]]
--[[
mymillwork.register_all(
"default_water",
"Water",
"default_water.png",
{cracky = 3,not_in_creative_inventory=1},
"default:water_source",
"normal"
)
--]]
--[[
mymillwork.register_all(
"farming_straw",
"Straw",
"farming_straw.png",
{snappy = 3,not_in_creative_inventory=1},
"farming:straw",
"normal"
)
--]]
-----------------------------------------------------------------------------------------------------
--wool
--[[
mymillwork.register_all(
"wool_white",
"White Wool",
"wool_white.png",
{snappy=2,choppy=2,oddly_breakable_by_hand=3,flammable=3,not_in_creative_inventory=1},
"wool_white"
"default_pine_wood",
"Pine Wood",
"default_pine_wood.png",
{choppy = 3,not_in_creative_inventory=1},
"default:pine_wood"
)
--]]
--[[
mymillwork.register_all(
"wool_black",
"Black Wool",
"wool_black.png",
{snappy=2,choppy=2,oddly_breakable_by_hand=3,flammable=3,not_in_creative_inventory=1},
"wool_black"
"default_acacia_wood",
"Acacia Wood",
"default_acacia_wood.png",
{choppy = 3,not_in_creative_inventory=1},
"default:pine_acacia"
)
--]]
--[[
mymillwork.register_all(
"wool_blue",
"Blue Wool",
"wool_blue.png",
{snappy=2,choppy=2,oddly_breakable_by_hand=3,flammable=3,not_in_creative_inventory=1},
"wool_blue"
"default_aspen_wood",
"Aspen Wood",
"default_aspen_wood.png",
{choppy = 3,not_in_creative_inventory=1},
"default:aspen_wood"
)
--]]
--[[
mymillwork.register_all(
"wool_brown",
"Brown Wool",
"wool_brown.png",
{snappy=2,choppy=2,oddly_breakable_by_hand=3,flammable=3,not_in_creative_inventory=1},
"wool_brown"
"default_coal_block",
"Coal Block",
"default_coal_block.png",
{choppy = 3,not_in_creative_inventory=1},
"default:coalblock"
)
--]]
--[[
mymillwork.register_all(
"wool_cyan",
"Cyan Wool",
"wool_cyan.png",
{snappy=2,choppy=2,oddly_breakable_by_hand=3,flammable=3,not_in_creative_inventory=1},
"wool_cyan"
"default_obsidian",
"Obsidian",
"default_obsidian.png",
{choppy = 3,not_in_creative_inventory=1},
"default:obsidian"
)
--]]
--[[
mymillwork.register_all(
"wool_dark_green",
"Dark Green Wool",
"wool_dark_green.png",
{snappy=2,choppy=2,oddly_breakable_by_hand=3,flammable=3,not_in_creative_inventory=1},
"wool_dark_green"
)
--]]
--[[
mymillwork.register_all(
"wool_dark_grey",
"Dark Grey Wool",
"wool_dark_grey.png",
{snappy=2,choppy=2,oddly_breakable_by_hand=3,flammable=3,not_in_creative_inventory=1},
"wool_dark_grey"
)
--]]
--[[
mymillwork.register_all(
"wool_green",
"Green Wool",
"wool_green.png",
{snappy=2,choppy=2,oddly_breakable_by_hand=3,flammable=3,not_in_creative_inventory=1},
"wool_green"
)
--]]
--[[
mymillwork.register_all(
"wool_grey",
"Grey Wool",
"wool_grey.png",
{snappy=2,choppy=2,oddly_breakable_by_hand=3,flammable=3,not_in_creative_inventory=1},
"wool_grey"
)
--]]
--[[
mymillwork.register_all(
"wool_magenta",
"Magenta Wool",
"wool_magenta.png",
{snappy=2,choppy=2,oddly_breakable_by_hand=3,flammable=3,not_in_creative_inventory=1},
"wool_magenta"
)
--]]
--[[
mymillwork.register_all(
"wool_orange",
"Orange Wool",
"wool_orange.png",
{snappy=2,choppy=2,oddly_breakable_by_hand=3,flammable=3,not_in_creative_inventory=1},
"wool_orange"
)
--]]
--[[
mymillwork.register_all(
"wool_pink",
"Pink Wool",
"wool_pink.png",
{snappy=2,choppy=2,oddly_breakable_by_hand=3,flammable=3,not_in_creative_inventory=1},
"wool_pink"
)
--]]
--[[
mymillwork.register_all(
"wool_red",
"Red Wool",
"wool_red.png",
{snappy=2,choppy=2,oddly_breakable_by_hand=3,flammable=3,not_in_creative_inventory=1},
"wool_red"
)
--]]
--[[
mymillwork.register_all(
"wool_violet",
"Violet Wool",
"wool_violet.png",
{snappy=2,choppy=2,oddly_breakable_by_hand=3,flammable=3,not_in_creative_inventory=1},
"wool_violet"
)
--]]
--[[
mymillwork.register_all(
"wool_yellow",
"Yellow Wool",
"wool_yellow.png",
{snappy=2,choppy=2,oddly_breakable_by_hand=3,flammable=3,not_in_creative_inventory=1},
"wool_yellow"
)
--]]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 KiB

After

Width:  |  Height:  |  Size: 136 KiB