264 lines
12 KiB
Lua
264 lines
12 KiB
Lua
|
local S = minetest.get_translator(minetest.get_current_modname())
|
||
|
local name = minetest.get_current_modname()
|
||
|
local path = minetest.get_modpath(name)
|
||
|
--delite vanila ores (dont foget make confige for it)
|
||
|
--[[local ore_for_delite ={"mcl_core:stone_with_coal","mcl_core:stone_with_iron","mcl_core:stone_with_redstone","mcl_core:stone_with_lapis","mcl_core:stone_with_diamond",}
|
||
|
for i, value in ipairs(ore_for_delite) do
|
||
|
minetest.unregister_item(ore_for_delite[i])
|
||
|
end]]
|
||
|
--wanila res remove !!!!
|
||
|
|
||
|
-- 1)tech_name 2)useal name 3)ineed ore ? 4)pickasxe_level 5)color
|
||
|
local metals_ore_array={
|
||
|
{"iron","Iron ",true,3,"#f7f7f7"},
|
||
|
{"copper","Copper ",true,2,"#ff5e00"},
|
||
|
{"tin","Tin ",true,2,"#c9c9c9"},
|
||
|
{"gold","Gold ",true,2,"#ffe600"},
|
||
|
{"silver","Silver ",true,3,"#d1d1d1"},
|
||
|
{"lead","Lead ",true,3,"#9092ab"},
|
||
|
{"steal","Steal ",false,3,"#575757"},
|
||
|
{"bronze","Bronze ",false,3,"#a35900"},
|
||
|
}
|
||
|
--make metals ALL
|
||
|
for i, value in ipairs(metals_ore_array) do
|
||
|
--ore
|
||
|
if metals_ore_array[i][3] then
|
||
|
minetest.register_node("owl_tech:"..metals_ore_array[i][1].."_ore", {
|
||
|
description = S(metals_ore_array[i][2].." ore"),
|
||
|
_doc_items_longdesc = S(metals_ore_array[i][2]..' ore'),
|
||
|
_doc_items_hidden = false,
|
||
|
tiles = {"default_stone.png^(owl_tech_ore_base.png^[colorize:"..metals_ore_array[i][5]..":128)"},
|
||
|
is_ground_content = true,
|
||
|
stack_max = 64,
|
||
|
groups = {pickaxey=metals_ore_array[i][4], building_block=1, material_stone=1, blast_furnace_smeltable=1},
|
||
|
drop = "owl_tech:"..metals_ore_array[i][1].."_ore",
|
||
|
sounds = mcl_sounds.node_sound_stone_defaults(),
|
||
|
_mcl_blast_resistance = 3,
|
||
|
_mcl_hardness = 3,
|
||
|
_mcl_silk_touch_drop = true,
|
||
|
})
|
||
|
end
|
||
|
--Nugget
|
||
|
minetest.register_craftitem("owl_tech:"..metals_ore_array[i][1].."_nugget", {
|
||
|
description = S(metals_ore_array[i][2].. " Nugget"),
|
||
|
_doc_items_longdesc = S(metals_ore_array[i][2].. " Nugget"),
|
||
|
inventory_image = "mcl_core_iron_nugget.png^[colorize:"..metals_ore_array[i][5]..":128",
|
||
|
stack_max = 64,
|
||
|
groups = { craftitem=1 },
|
||
|
})
|
||
|
--Ingot
|
||
|
minetest.register_craftitem("owl_tech:"..metals_ore_array[i][1].."_ingot", {
|
||
|
description = S(metals_ore_array[i][2].. " Ingot"),
|
||
|
_doc_items_longdesc = S(metals_ore_array[i][2].. " Ingot"),
|
||
|
inventory_image = "default_steel_ingot.png^[colorize:"..metals_ore_array[i][5]..":128",
|
||
|
stack_max = 64,
|
||
|
groups = { craftitem=1 },
|
||
|
})
|
||
|
--dust
|
||
|
minetest.register_craftitem("owl_tech:"..metals_ore_array[i][1].."_dust", {
|
||
|
description = S(metals_ore_array[i][2].. " dust"),
|
||
|
_doc_items_longdesc = S(metals_ore_array[i][2].. " dust"),
|
||
|
inventory_image = "owl_tech_dust.png^[colorize:"..metals_ore_array[i][5]..":128",
|
||
|
stack_max = 64,
|
||
|
groups = { craftitem=1 },
|
||
|
})
|
||
|
--dirt dust
|
||
|
minetest.register_craftitem("owl_tech:"..metals_ore_array[i][1].."_dirt_dust", {
|
||
|
description = S(metals_ore_array[i][2].. " dirt dust"),
|
||
|
_doc_items_longdesc = S(metals_ore_array[i][2].. " dirt dust"),
|
||
|
inventory_image = "owl_tech_dirt_dust.png^[colorize:"..metals_ore_array[i][5]..":128",
|
||
|
stack_max = 64,
|
||
|
groups = { craftitem=1 },
|
||
|
})
|
||
|
--plate
|
||
|
minetest.register_craftitem("owl_tech:"..metals_ore_array[i][1].."_plate", {
|
||
|
description = S(metals_ore_array[i][2].. " plate"),
|
||
|
_doc_items_longdesc = S(metals_ore_array[i][2].. " plate"),
|
||
|
inventory_image = "owl_tech_plate.png^[colorize:"..metals_ore_array[i][5]..":128",
|
||
|
stack_max = 64,
|
||
|
groups = { craftitem=1 },
|
||
|
})
|
||
|
--stick
|
||
|
minetest.register_craftitem("owl_tech:"..metals_ore_array[i][1].."_stick", {
|
||
|
description = S(metals_ore_array[i][2].. " stick"),
|
||
|
_doc_items_longdesc = S(metals_ore_array[i][2].. " stick"),
|
||
|
inventory_image = "owl_tech_stick.png^[colorize:"..metals_ore_array[i][5]..":128",
|
||
|
stack_max = 64,
|
||
|
groups = { craftitem=1 },
|
||
|
})
|
||
|
--Block
|
||
|
minetest.register_node("owl_tech:"..metals_ore_array[i][1].."block", {
|
||
|
description = S("Block of "..metals_ore_array[i][2]),
|
||
|
_doc_items_longdesc = S("Block of "..metals_ore_array[i][2]),
|
||
|
tiles = {"default_steel_block.png^[colorize:"..metals_ore_array[i][5]..":128"},
|
||
|
is_ground_content = false,
|
||
|
stack_max = 64,
|
||
|
groups = {pickaxey=metals_ore_array[i][4], building_block=1},
|
||
|
sounds = mcl_sounds.node_sound_metal_defaults(),
|
||
|
_mcl_blast_resistance = 6,
|
||
|
_mcl_hardness = 5,
|
||
|
})
|
||
|
--Block dust
|
||
|
minetest.register_node("owl_tech:"..metals_ore_array[i][1].."_dust_block", {
|
||
|
description = S("Dust block of "..metals_ore_array[i][2]),
|
||
|
_doc_items_longdesc = S("Block of "..metals_ore_array[i][2]),
|
||
|
tiles = {"owl_tech_dust_block_1.png^[colorize:"..metals_ore_array[i][5]..":128"},
|
||
|
is_ground_content = false,
|
||
|
stack_max = 64,
|
||
|
groups = {pickaxey=metals_ore_array[i][4], building_block=1},
|
||
|
sounds = mcl_sounds.node_sound_metal_defaults(),
|
||
|
_mcl_blast_resistance = 6,
|
||
|
_mcl_hardness = 5,
|
||
|
})
|
||
|
--Crafte ingot from nugets
|
||
|
minetest.register_craft({
|
||
|
type = "shaped",
|
||
|
output = "owl_tech:"..metals_ore_array[i][1].."_ingot",
|
||
|
recipe = {
|
||
|
{"owl_tech:"..metals_ore_array[i][1].."_nugget","owl_tech:"..metals_ore_array[i][1].."_nugget","owl_tech:"..metals_ore_array[i][1].."_nugget"},
|
||
|
{"owl_tech:"..metals_ore_array[i][1].."_nugget","owl_tech:"..metals_ore_array[i][1].."_nugget","owl_tech:"..metals_ore_array[i][1].."_nugget"},
|
||
|
{"owl_tech:"..metals_ore_array[i][1].."_nugget","owl_tech:"..metals_ore_array[i][1].."_nugget","owl_tech:"..metals_ore_array[i][1].."_nugget"}
|
||
|
}
|
||
|
})
|
||
|
--Crafte block from ingots
|
||
|
minetest.register_craft({
|
||
|
type = "shaped",
|
||
|
output = "owl_tech:"..metals_ore_array[i][1].."block",
|
||
|
recipe = {
|
||
|
{"owl_tech:"..metals_ore_array[i][1].."_ingot","owl_tech:"..metals_ore_array[i][1].."_ingot","owl_tech:"..metals_ore_array[i][1].."_ingot"},
|
||
|
{"owl_tech:"..metals_ore_array[i][1].."_ingot","owl_tech:"..metals_ore_array[i][1].."_ingot","owl_tech:"..metals_ore_array[i][1].."_ingot"},
|
||
|
{"owl_tech:"..metals_ore_array[i][1].."_ingot","owl_tech:"..metals_ore_array[i][1].."_ingot","owl_tech:"..metals_ore_array[i][1].."_ingot"}
|
||
|
}
|
||
|
})
|
||
|
--Crafte block dust from ingots
|
||
|
minetest.register_craft({
|
||
|
type = "shaped",
|
||
|
output = "owl_tech:"..metals_ore_array[i][1].."_dust_block",
|
||
|
recipe = {
|
||
|
{"owl_tech:"..metals_ore_array[i][1].."_dust","owl_tech:"..metals_ore_array[i][1].."_dust","owl_tech:"..metals_ore_array[i][1].."_dust"},
|
||
|
{"owl_tech:"..metals_ore_array[i][1].."_dust","owl_tech:"..metals_ore_array[i][1].."_dust","owl_tech:"..metals_ore_array[i][1].."_dust"},
|
||
|
{"owl_tech:"..metals_ore_array[i][1].."_dust","owl_tech:"..metals_ore_array[i][1].."_dust","owl_tech:"..metals_ore_array[i][1].."_dust"}
|
||
|
}
|
||
|
})
|
||
|
--Crafte ingots from block
|
||
|
minetest.register_craft({
|
||
|
type = "shapeless",
|
||
|
output = "owl_tech:"..metals_ore_array[i][1].."_ingot 9",
|
||
|
recipe = {"owl_tech:"..metals_ore_array[i][1].."block"}
|
||
|
})
|
||
|
--Crafte dust from block
|
||
|
minetest.register_craft({
|
||
|
type = "shapeless",
|
||
|
output = "owl_tech:"..metals_ore_array[i][1].."_dust 9",
|
||
|
recipe = {"owl_tech:"..metals_ore_array[i][1].."_dust_block"}
|
||
|
})
|
||
|
|
||
|
end
|
||
|
-- 1)tech_name 2)useal name 3)need ore ? 4)pickasxe_level 5)color 6)gem_base 7)gem_block_base 8)dust_block 9)burn fuel
|
||
|
|
||
|
local gems_orew_array={
|
||
|
{"coal","Coal ",true,1,"#1b1b1b","owl_tech_gem_1.png","owl_tech_gem_block_1.png","owl_tech_dust_block_1.png",80},
|
||
|
{"sulfur","Sulfur ",true,1,"#c2a800","owl_tech_gem_1.png","owl_tech_gem_block_1.png","owl_tech_dust_block_1.png",0},
|
||
|
{"saltpeter","Saltpeter ",true,1,"#b3e6ee","owl_tech_gem_1.png","owl_tech_gem_block_1.png","owl_tech_dust_block_1.png",0},
|
||
|
{"diamond","Diamond ",true,3,"#77cefb","owl_tech_gem_2.png","owl_tech_gem_block_2.png","owl_tech_dust_block_1.png",0},
|
||
|
|
||
|
}
|
||
|
for i, value in ipairs(gems_orew_array) do
|
||
|
--ore
|
||
|
if gems_orew_array[i][3] then
|
||
|
minetest.register_node("owl_tech:"..gems_orew_array[i][1].."_ore", {
|
||
|
description = S(gems_orew_array[i][2].." ore"),
|
||
|
_doc_items_longdesc = S(gems_orew_array[i][2]..' ore'),
|
||
|
_doc_items_hidden = false,
|
||
|
tiles = {"default_stone.png^(owl_tech_ore_base.png^[colorize:"..gems_orew_array[i][5]..":128)"},
|
||
|
is_ground_content = true,
|
||
|
stack_max = 64,
|
||
|
groups = {pickaxey=gems_orew_array[i][4], building_block=1, material_stone=1, blast_furnace_smeltable=1},
|
||
|
drop = "owl_tech:coal_ore",
|
||
|
sounds = mcl_sounds.node_sound_stone_defaults(),
|
||
|
_mcl_blast_resistance = 3,
|
||
|
_mcl_hardness = 3,
|
||
|
_mcl_silk_touch_drop = true,
|
||
|
})
|
||
|
end
|
||
|
--dust
|
||
|
minetest.register_craftitem("owl_tech:"..gems_orew_array[i][1].."_dust", {
|
||
|
description = S(gems_orew_array[i][2].. " dust"),
|
||
|
_doc_items_longdesc = S(gems_orew_array[i][2].. " dust"),
|
||
|
inventory_image = "owl_tech_dust.png^[colorize:"..gems_orew_array[i][5]..":128",
|
||
|
stack_max = 64,
|
||
|
groups = { craftitem=1 },
|
||
|
})
|
||
|
--dirt dust
|
||
|
minetest.register_craftitem("owl_tech:"..gems_orew_array[i][1].."_dirt_dust", {
|
||
|
description = S(gems_orew_array[i][2].. " dirt dust"),
|
||
|
_doc_items_longdesc = S(gems_orew_array[i][2].. " dirt dust"),
|
||
|
inventory_image = "owl_tech_dirt_dust.png^[colorize:"..gems_orew_array[i][5]..":128",
|
||
|
stack_max = 64,
|
||
|
groups = { craftitem=1 },
|
||
|
})
|
||
|
--gem
|
||
|
minetest.register_craftitem("owl_tech:"..gems_orew_array[i][1], {
|
||
|
description = S(gems_orew_array[i][2]),
|
||
|
_doc_items_longdesc = S(gems_orew_array[i][2]),
|
||
|
inventory_image = gems_orew_array[i][6].."^[colorize:"..gems_orew_array[i][5]..":128",
|
||
|
stack_max = 64,
|
||
|
groups = { craftitem=1 },
|
||
|
})
|
||
|
--plate
|
||
|
minetest.register_craftitem("owl_tech:"..gems_orew_array[i][1].."_plate", {
|
||
|
description = S(gems_orew_array[i][2].. " plate"),
|
||
|
_doc_items_longdesc = S(gems_orew_array[i][2].. " plate"),
|
||
|
inventory_image = "owl_tech_plate.png^[colorize:"..gems_orew_array[i][5]..":128",
|
||
|
stack_max = 64,
|
||
|
groups = { craftitem=1 },
|
||
|
})
|
||
|
--stick
|
||
|
minetest.register_craftitem("owl_tech:"..gems_orew_array[i][1].."_stick", {
|
||
|
description = S(gems_orew_array[i][2].. " stick"),
|
||
|
_doc_items_longdesc = S(gems_orew_array[i][2].. " stick"),
|
||
|
inventory_image = "owl_tech_stick.png^[colorize:"..gems_orew_array[i][5]..":128",
|
||
|
stack_max = 64,
|
||
|
groups = { craftitem=1 },
|
||
|
})
|
||
|
--burn time gem
|
||
|
if gems_orew_array[i][9]>0 then
|
||
|
minetest.register_craft({
|
||
|
type = "fuel",
|
||
|
recipe = "owl_tech:"..gems_orew_array[i][1],
|
||
|
burntime = gems_orew_array[i][9],
|
||
|
})
|
||
|
end
|
||
|
--Block
|
||
|
minetest.register_node("owl_tech:"..gems_orew_array[i][1].."_block", {
|
||
|
description = S("Block of "..gems_orew_array[i][2]),
|
||
|
_doc_items_longdesc = S("Block of "..gems_orew_array[i][2]),
|
||
|
tiles = {gems_orew_array[i][7].."^[colorize:"..gems_orew_array[i][5]..":128"},
|
||
|
is_ground_content = false,
|
||
|
stack_max = 64,
|
||
|
groups = {pickaxey=gems_orew_array[i][4], building_block=1},
|
||
|
sounds = mcl_sounds.node_sound_metal_defaults(),
|
||
|
_mcl_blast_resistance = 6,
|
||
|
_mcl_hardness = 5,
|
||
|
})
|
||
|
--burn time block
|
||
|
if gems_orew_array[i][9]>0 then
|
||
|
minetest.register_craft({
|
||
|
type = "fuel",
|
||
|
recipe = "owl_tech:"..gems_orew_array[i][1].."_block",
|
||
|
burntime = gems_orew_array[i][9]*9,
|
||
|
})
|
||
|
end
|
||
|
--Block dust
|
||
|
minetest.register_node("owl_tech:"..gems_orew_array[i][1].."_dust_block", {
|
||
|
description = S("Block of "..gems_orew_array[i][2]),
|
||
|
_doc_items_longdesc = S("Block of "..gems_orew_array[i][2]),
|
||
|
tiles = {gems_orew_array[i][8].."^[colorize:"..gems_orew_array[i][5]..":128"},
|
||
|
is_ground_content = false,
|
||
|
stack_max = 64,
|
||
|
groups = {pickaxey=gems_orew_array[i][4], building_block=1},
|
||
|
sounds = mcl_sounds.node_sound_metal_defaults(),
|
||
|
_mcl_blast_resistance = 6,
|
||
|
_mcl_hardness = 5,
|
||
|
})
|
||
|
end
|