Add in lapis, emerald, sapphire, ruby tools/armor along with blocks of every ore crafterd from 9 of the drops

This commit is contained in:
oilboi 2020-06-19 01:56:00 -04:00
parent ba1eb33f80
commit 5c11701f46
89 changed files with 300 additions and 46 deletions

View File

@ -219,7 +219,7 @@ minetest.register_allow_player_inventory_action(function(player, action, invento
end
end)
local materials = {["iron"]=4,["chain"]=6,["gold"]=2,["diamond"]=8} --max 8
local materials = {["coal"]=1,["lapis"]=2,["iron"]=3,["chain"]=4,["gold"]=2,["diamond"]=5,["emerald"]=6,["sapphire"]=7,["ruby"]=8} --max 8
local armor_type = {["helmet"]=2,["chestplate"]=4,["leggings"]=3,["boots"]=1} --max 4
local function bool_int(state)

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

@ -1,3 +1,4 @@
local minetest,pairs = minetest,pairs
--crafting recipes
--cooking
@ -115,10 +116,12 @@ minetest.register_craft({
}
})
local tool = {"wood","stone", "iron","gold","diamond"}--the tool name
local material = {"wood","cobble","iron","gold","diamond"}--material to craft
local tool = {"coal","wood","stone" ,"lapis","iron","gold","diamond","emerald","sapphire","ruby"}--the tool name
local material = {"coal","wood","cobble","lapis","iron","gold","diamond","emerald","sapphire","ruby"}--material to craft
for id,tool in pairs(tool) do
minetest.register_craft({
output = "main:"..tool.."pick",
recipe = {
@ -197,3 +200,19 @@ minetest.register_craft({
local raw_material = {"coal","lapis","iron","gold","diamond","emerald","sapphire","ruby"}
for _,name in pairs(raw_material) do
minetest.register_craft({
output = "main:"..name.."block",
recipe = {
{"main:"..name, "main:"..name, "main:"..name},
{"main:"..name, "main:"..name, "main:"..name},
{"main:"..name, "main:"..name, "main:"..name},
}
})
minetest.register_craft({
type = "shapeless",
output = "main:"..name.." 9",
recipe = {"main:"..name.."block"},
})
end

View File

@ -55,3 +55,21 @@ minetest.register_craftitem("main:flint", {
description = "Flint",
inventory_image = "flint.png",
})
minetest.register_craftitem("main:lapis", {
description = "Lapis Lazuli",
inventory_image = "lapis.png",
})
minetest.register_craftitem("main:emerald", {
description = "Emerald",
inventory_image = "emerald.png",
})
minetest.register_craftitem("main:sapphire", {
description = "Sapphire",
inventory_image = "sapphire.png",
})
minetest.register_craftitem("main:ruby", {
description = "Ruby",
inventory_image = "ruby.png",
})

View File

@ -1,25 +1,53 @@
--ore def with required tool
local ores = {"coal","iron","gold","diamond"}
local tool = {"main:woodpick","main:stonepick","main:ironpick","main:goldpick","main:diamondpick"}
for id,ore in pairs(ores) do
local tool_required = {}
for i = id,5 do
table.insert(tool_required, tool[i])
end
local experience
local tool = {"main:woodpick","main:coalpick","main:stonepick","main:ironpick","main:lapispick","main:goldpick","main:diamondpick","main:emeraldpick","main:sapphirepick","main:rubypick"}
local ores = {
["coal"]={"main:woodpick","main:coalpick","main:stonepick","main:ironpick","main:lapispick","main:goldpick","main:diamondpick","main:emeraldpick","main:sapphirepick","main:rubypick"},
["iron"]={"main:coalpick","main:stonepick","main:ironpick","main:lapispick","main:goldpick","main:diamondpick","main:emeraldpick","main:sapphirepick","main:rubypick"},
["lapis"]={"main:ironpick","main:lapispick","main:goldpick","main:diamondpick","main:emeraldpick","main:sapphirepick","main:rubypick"},
["gold"]={"main:ironpick","main:lapispick","main:goldpick","main:diamondpick","main:emeraldpick","main:sapphirepick","main:rubypick"},
["diamond"]={"main:ironpick","main:lapispick","main:diamondpick","main:emeraldpick","main:sapphirepick","main:rubypick"},
["emerald"]={"main:diamondpick","main:emeraldpick","main:sapphirepick","main:rubypick"},
["sapphire"]={"main:diamondpick","main:emeraldpick","main:sapphirepick","main:rubypick"},
["ruby"]={"main:diamondpick","main:emeraldpick","main:sapphirepick","main:rubypick"},
}
local drops ={
["coal"]={"main:coal"},
["iron"]={"main:ironore"},
["lapis"]={"main:lapis"},
["gold"]={"main:goldore"},
["diamond"]={"main:diamond"},
["emerald"]={"main:emerald"},
["sapphire"]={"main:sapphire"},
["ruby"]={"main:ruby"},
}
local levels = {
["coal"]=1,
["iron"]=2,
["lapis"]=2,
["gold"]=2,
["diamond"]=3,
["emerald"]=4,
["sapphire"]=5,
["ruby"]=6,
}
local level = 0
local experience
for ore,tool_required in pairs(ores) do
level = levels[ore]
if ore == "iron" or ore == "gold" then
experience = 0
else
experience = id
experience = level
end
local drops = {"main:"..ore.."ore"}
if ore == "diamond" then drops = {"main:diamond"} elseif ore == "coal" then drops = {"main:coal"} end
minetest.register_node("main:"..ore.."ore", {
description = ore:gsub("^%l", string.upper).." Ore",
tiles = {"stone.png^"..ore.."ore.png"},
groups = {stone = id, pathable = 1,experience=experience},
minetest.register_node("main:"..ore.."block", {
description = ore:gsub("^%l", string.upper).." Block",
tiles = {ore.."block.png"},
groups = {stone = level, pathable = 1},
sounds = main.stoneSound(),
--light_source = 14,--debugging ore spawn
drop = {
@ -28,7 +56,25 @@ for id,ore in pairs(ores) do
{
rarity = 0,
tools = tool_required,
items = drops,
items = {"main:"..ore.."ore"},
},
},
},
})
minetest.register_node("main:"..ore.."ore", {
description = ore:gsub("^%l", string.upper).." Ore",
tiles = {"stone.png^"..ore.."ore.png"},
groups = {stone = level, pathable = 1,experience=experience},
sounds = main.stoneSound(),
--light_source = 14,--debugging ore spawn
drop = {
max_items = 1,
items= {
{
rarity = 0,
tools = tool_required,
items = drops[ore],
},
},
},

View File

@ -134,6 +134,17 @@ minetest.register_ore({
y_min = -255,
})
minetest.register_ore({
ore_type = "scatter",
ore = "main:lapisore",
wherein = "main:stone",
clust_scarcity = 15 * 15 * 15,
clust_num_ores = 3,
clust_size = 2,
y_max = -128,
y_min = -10032,
})
minetest.register_ore({
ore_type = "scatter",
ore = "main:ironore",
@ -250,3 +261,35 @@ minetest.register_ore({
y_min = -10032,
})
minetest.register_ore({
ore_type = "scatter",
ore = "main:emeraldore",
wherein = "main:stone",
clust_scarcity = 17 * 17 * 17,
clust_num_ores = 4,
clust_size = 3,
y_max = -1024,
y_min = -10032,
})
minetest.register_ore({
ore_type = "scatter",
ore = "main:sapphireore",
wherein = "main:stone",
clust_scarcity = 17 * 17 * 17,
clust_num_ores = 4,
clust_size = 3,
y_max = -3096,
y_min = -10032,
})
minetest.register_ore({
ore_type = "scatter",
ore = "main:rubyore",
wherein = "main:stone",
clust_scarcity = 17 * 17 * 17,
clust_num_ores = 4,
clust_size = 3,
y_max = -5012,
y_min = -10032,
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 956 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 838 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 796 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 806 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

BIN
mods/main/textures/ruby.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 781 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 768 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 841 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 795 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -1,7 +1,7 @@
--Quick definition of tools
local tool = {"shovel","axe","pick"}
local material = {"wood","stone","iron","gold","diamond"}
local sword_durability ={52,131,250,32,1561}
local material = {"coal","wood","stone","lapis","iron","gold","diamond","emerald","sapphire","ruby"}
local sword_durability ={10 ,52 ,131 ,200 ,250 ,32 ,1561 ,2300 ,3000 ,5000 }
for level_id,material in pairs(material) do
for id,tool in pairs(tool) do
@ -30,6 +30,24 @@ for level_id,material in pairs(material) do
}
damage = 3.5
wear = 400
elseif material == "coal" then
groupcaps2={
dirt = {times={[1]=0.02,[2]=0.02,[3]=1.5,[4]=3,[5]=6}, uses=10, maxlevel=1},
snow = {times={[1]=0.02,[2]=0.02,[3]=1.5,[4]=3,[5]=6}, uses=10, maxlevel=1},
grass = {times={[1]=0.025,[2]=0.025,[3]=1.5,[4]=3,[5]=6}, uses=10, maxlevel=1},
sand = {times={[1]=0.02,[2]=0.02,[3]=1.5,[4]=3,[5]=6}, uses=10, maxlevel=1},
}
damage = 3.5
wear = 2000
elseif material == "lapis" then
groupcaps2={
dirt = {times={[1]=0.17,[2]=0.17,[3]=0.17,[4]=1.5,[5]=4.5}, uses=190, maxlevel=1},
snow = {times={[1]=0.17,[2]=0.17,[3]=0.17,[4]=1.5,[5]=4.5}, uses=190, maxlevel=1},
grass = {times={[1]=0.17,[2]=0.17,[3]=0.17,[4]=1.5,[5]=4.5}, uses=190, maxlevel=1},
sand = {times={[1]=0.17,[2]=0.17,[3]=0.17,[4]=1.5,[5]=4.5}, uses=190, maxlevel=1},
}
damage = 4
wear = 350
elseif material == "iron" then
groupcaps2={
dirt = {times={[1]=0.15,[2]=0.15,[3]=0.15,[4]=1.5,[5]=3}, uses=250, maxlevel=1},
@ -57,6 +75,33 @@ for level_id,material in pairs(material) do
}
damage = 5.5
wear = 100
elseif material == "emerald" then
groupcaps2={
dirt = {times={[1]= 0.05,[2]=0.05,[3]=0.05,[4]=0.05,[5]=0.05}, uses=2300, maxlevel=1},
snow = {times={[1]= 0.05,[2]=0.05,[3]=0.05,[4]=0.05,[5]=0.05}, uses=2300, maxlevel=1},
grass = {times={[1]= 0.05,[2]=0.05,[3]=0.05,[4]=0.05,[5]=0.05}, uses=2300, maxlevel=1},
sand = {times={[1]= 0.05,[2]=0.05,[3]=0.05,[4]=0.05,[5]=0.05}, uses=2300, maxlevel=1},
}
damage = 7
wear = 50
elseif material == "sapphire" then
groupcaps2={
dirt = {times={[1]= 0.025,[2]=0.025,[3]=0.025,[4]=0.025,[5]=0.025}, uses=3000, maxlevel=1},
snow = {times={[1]= 0.025,[2]=0.025,[3]=0.025,[4]=0.025,[5]=0.025}, uses=3000, maxlevel=1},
grass = {times={[1]= 0.025,[2]=0.025,[3]=0.025,[4]=0.025,[5]=0.025}, uses=3000, maxlevel=1},
sand = {times={[1]= 0.025,[2]=0.025,[3]=0.025,[4]=0.025,[5]=0.025}, uses=3000, maxlevel=1},
}
damage = 9
wear = 25
elseif material == "ruby" then
groupcaps2={
dirt = {times={[1]= 0.01,[2]=0.01,[3]=0.01,[4]=0.01,[5]=0.01}, uses=5000, maxlevel=1},
snow = {times={[1]= 0.01,[2]=0.01,[3]=0.01,[4]=0.01,[5]=0.01}, uses=5000, maxlevel=1},
grass = {times={[1]= 0.01,[2]=0.01,[3]=0.01,[4]=0.01,[5]=0.01}, uses=5000, maxlevel=1},
sand = {times={[1]= 0.01,[2]=0.01,[3]=0.01,[4]=0.01,[5]=0.01}, uses=5000, maxlevel=1},
}
damage = 12
wear = 10
end
end
--axe
@ -65,19 +110,31 @@ for level_id,material in pairs(material) do
groupcaps2={
wood = {times={[1]=1.5,[2]=3,[3]=6,[4]=9,[5]=12}, uses=59, maxlevel=1}
}
damage = 7
damage = 4
wear = 500
elseif material == "stone" then
groupcaps2={
wood = {times={[1]=0.75,[2]=0.75,[3]=3,[4]=6,[5]=9}, uses=131, maxlevel=1}
}
damage=9
damage=6
wear = 400
elseif material == "coal" then
groupcaps2={
wood = {times={[1]=0.075,[2]=0.075,[3]=3,[4]=6,[5]=9}, uses=10, maxlevel=1}
}
damage=3
wear = 2000
elseif material == "lapis" then
groupcaps2={
wood = {times={[1]=0.6,[2]=0.6,[3]=1,[4]=4,[5]=7}, uses=200, maxlevel=1}
}
damage=7
wear = 350
elseif material == "iron" then
groupcaps2={
wood = {times={[1]=0.5,[2]=0.5,[3]=0.5,[4]=3,[5]=6}, uses=250, maxlevel=1}
}
damage = 9
damage = 8
wear = 300
elseif material == "gold" then
groupcaps2={
@ -91,6 +148,24 @@ for level_id,material in pairs(material) do
}
damage = 9
wear = 100
elseif material == "emerald" then
groupcaps2={
wood = {times={[1]= 0.2,[2]=0.2,[3]=0.2,[4]=0.2,[5]=1.5}, uses=2300, maxlevel=1}
}
damage = 12
wear = 50
elseif material == "sapphire" then
groupcaps2={
wood = {times={[1]= 0.1,[2]=0.1,[3]=0.1,[4]=0.1,[5]=1}, uses=3000, maxlevel=1}
}
damage = 14
wear = 25
elseif material == "ruby" then
groupcaps2={
wood = {times={[1]= 0.05,[2]=0.05,[3]=0.05,[4]=0.05,[5]=05}, uses=5000, maxlevel=1}
}
damage = 18
wear = 10
end
end
--pickaxe
@ -99,44 +174,84 @@ for level_id,material in pairs(material) do
groupcaps2={
--ore hardness
--1 stone, 1 coal, 2 iron, 3 gold, 4 diamond, 5 obsidian
stone = {times={[1]=1.15,[2]=16,[3]=32,[4]=64,[5]=128}, uses=59, maxlevel=1},
glass = {times={[1]=0.575,[2]=16,[3]=32,[4]=64,[5]=128}, uses=59, maxlevel=1},
netherrack = {times={[1]=0.2875,[2]=16,[3]=32,[4]=64,[5]=128}, uses=59, maxlevel=1},
stone = {times={[1]=1.15,[2]=16,[3]=32,[4]=64,[5]=128,[6]=512}, uses=59, maxlevel=1},
glass = {times={[1]=0.575,[2]=16,[3]=32,[4]=64,[5]=128,[6]=512}, uses=59, maxlevel=1},
netherrack = {times={[1]=0.2875,[2]=16,[3]=32,[4]=64,[5]=128,[6]=512}, uses=59, maxlevel=1},
}
damage = 3
wear = 500
elseif material == "stone" then
groupcaps2={
stone = {times={[1]=0.6,[2]=0.6,[3]=32,[4]=64,[5]=128}, uses=131, maxlevel=1},
glass = {times={[1]=0.3,[2]=0.3,[3]=32,[4]=64,[5]=128}, uses=131, maxlevel=1},
netherrack = {times={[1]=0.15,[2]=0.15,[3]=32,[4]=64,[5]=128}, uses=131, maxlevel=1},
stone = {times={[1]=0.6,[2]=0.6,[3]=32,[4]=64,[5]=128,[6]=512}, uses=131, maxlevel=1},
glass = {times={[1]=0.3,[2]=0.3,[3]=32,[4]=64,[5]=128,[6]=512}, uses=131, maxlevel=1},
netherrack = {times={[1]=0.15,[2]=0.15,[3]=32,[4]=64,[5]=128,[6]=512}, uses=131, maxlevel=1},
}
damage=4
wear = 400
elseif material == "coal" then
groupcaps2={
stone = {times={[1]=0.6,[2]=0.6,[3]=32,[4]=64,[5]=128,[6]=512}, uses=10, maxlevel=1},
glass = {times={[1]=0.3,[2]=0.3,[3]=32,[4]=64,[5]=128,[6]=512}, uses=10, maxlevel=1},
netherrack = {times={[1]=0.15,[2]=0.15,[3]=32,[4]=64,[5]=128,[6]=512}, uses=10, maxlevel=1},
}
damage=2
wear = 2000
elseif material == "lapis" then
groupcaps2={
stone = {times={[1]=0.5,[2]=0.5,[3]=4,[4]=64,[5]=128,[6]=512}, uses=200, maxlevel=1},
glass = {times={[1]=0.25,[2]=0.25,[3]=2.5,[4]=64,[5]=128,[6]=512}, uses=200, maxlevel=1},
netherrack = {times={[1]=0.125,[2]=0.125,[3]=3,[4]=64,[5]=128,[6]=512}, uses=200, maxlevel=1},
}
damage=4
wear = 400
elseif material == "iron" then
groupcaps2={
stone = {times={[1]=0.4,[2]=0.4,[3]=0.4,[4]=32,[5]=64}, uses=250, maxlevel=1},
glass = {times={[1]=0.2,[2]=0.2,[3]=0.2,[4]=32,[5]=64}, uses=250, maxlevel=1},
netherrack = {times={[1]=0.1,[2]=0.1,[3]=0.1,[4]=32,[5]=64}, uses=250, maxlevel=1},
stone = {times={[1]=0.4,[2]=0.4,[3]=0.4,[4]=32,[5]=64,[6]=512}, uses=250, maxlevel=1},
glass = {times={[1]=0.2,[2]=0.2,[3]=0.2,[4]=32,[5]=64,[6]=512}, uses=250, maxlevel=1},
netherrack = {times={[1]=0.1,[2]=0.1,[3]=0.1,[4]=32,[5]=64,[6]=512}, uses=250, maxlevel=1},
}
damage = 5
wear = 300
elseif material == "gold" then
groupcaps2={
stone = {times={[1]=0.2,[2]=0.2,[3]=0.2,[4]=0.2,[5]=32}, uses=32, maxlevel=1},
glass = {times={[1]=0.1,[2]=0.1,[3]=0.1,[4]=0.1,[5]=32}, uses=32, maxlevel=1},
netherrack = {times={[1]=0.05,[2]=0.05,[3]=0.05,[4]=0.05,[5]=32}, uses=32, maxlevel=1},
stone = {times={[1]=0.2,[2]=0.2,[3]=0.2,[4]=32,[5]=32,[6]=512}, uses=32, maxlevel=1},
glass = {times={[1]=0.1,[2]=0.1,[3]=0.1,[4]=32,[5]=32,[6]=512}, uses=32, maxlevel=1},
netherrack = {times={[1]=0.05,[2]=0.05,[3]=0.05,[4]=0.05,[5]=32,[6]=512}, uses=32, maxlevel=1},
}
damage = 3
wear = 1000
elseif material == "diamond" then
groupcaps2={
stone = {times={[1]= 0.3,[2]=0.3,[3]=0.3,[4]=0.3,[5]=4}, uses=1561, maxlevel=1},
glass = {times={[1]= 0.15,[2]=0.15,[3]=0.15,[4]=0.15,[5]=4}, uses=1561, maxlevel=1},
netherrack = {times={[1]= 0.075,[2]=0.075,[3]=0.075,[4]=0.075,[5]=4}, uses=1561, maxlevel=1},
stone = {times={[1]= 0.3,[2]=0.3,[3]=0.3,[4]=0.3,[5]=4,[6]=32}, uses=1561, maxlevel=1},
glass = {times={[1]= 0.15,[2]=0.15,[3]=0.15,[4]=0.15,[5]=4,[6]=32}, uses=1561, maxlevel=1},
netherrack = {times={[1]= 0.075,[2]=0.075,[3]=0.075,[4]=0.075,[5]=4,[6]=32}, uses=1561, maxlevel=1},
}
damage = 6
wear = 100
elseif material == "emerald" then
groupcaps2={
stone = {times={[1]= 0.15,[2]=0.15,[3]=0.15,[4]=0.15,[5]=0.15,[6]=5}, uses=2300, maxlevel=1},
glass = {times={[1]= 0.05,[2]=0.05,[3]=0.05,[4]=0.05,[5]=2,[6]=5}, uses=2300, maxlevel=1},
netherrack = {times={[1]= 0.05,[2]=0.05,[3]=0.05,[4]=0.05,[5]=2,[6]=5}, uses=2300, maxlevel=1},
}
damage = 8
wear = 50
elseif material == "sapphire" then
groupcaps2={
stone = {times={[1]= 0.05,[2]=0.05,[3]=0.05,[4]=0.05,[5]=0.05,[6]=1}, uses=3000, maxlevel=1},
glass = {times={[1]= 0.025,[2]=0.025,[3]=0.025,[4]=0.025,[5]=1,[6]=1}, uses=3000, maxlevel=1},
netherrack = {times={[1]= 0.025,[2]=0.025,[3]=0.025,[4]=0.025,[5]=0.025,[6]=1}, uses=3000, maxlevel=1},
}
damage = 10
wear = 25
elseif material == "ruby" then
groupcaps2={
stone = {times={[1]= 0.025,[2]=0.025,[3]=0.025,[4]=0.025,[5]=0.025,[6]=0.25}, uses=5000, maxlevel=1},
glass = {times={[1]= 0.025,[2]=0.025,[3]=0.025,[4]=0.025,[5]=0.025,[6]=0.25}, uses=5000, maxlevel=1},
netherrack = {times={[1]= 0.025,[2]=0.025,[3]=0.025,[4]=0.025,[5]=0.025,[6]=0.25}, uses=5000, maxlevel=1},
}
damage = 16
wear = 10
end
end
minetest.register_tool("main:"..material..tool, {
@ -193,6 +308,12 @@ for level_id,material in pairs(material) do
elseif material == "stone" then
damage = 5
wear = 400
elseif material == "coal" then
damage = 2
wear = 2000
elseif material == "lapis" then
damage = 5
wear = 350
elseif material == "iron" then
damage = 6
wear = 300
@ -202,6 +323,12 @@ for level_id,material in pairs(material) do
elseif material == "diamond" then
damage = 7
wear = 100
elseif material == "emerald" then
damage = 9
wear = 50
elseif material == "sapphire" then
damage = 11
wear = 25
end

View File

@ -30,27 +30,27 @@ for i = 0,1 do
items= {
{
--rarity = 0,
tools = {"main:ironpick","main:goldpick","main:diamondpick"},
tools = {"main:coalpick","main:ironpick","main:lapispick","main:goldpick","main:diamondpick","main:emeraldpick","main:sapphirepick","main:rubypick"},
items = {"redstone:dust"},
},
{
--rarity = 0,
tools = {"main:ironpick","main:goldpick","main:diamondpick"},
tools = {"main:coalpick","main:ironpick","main:lapispick","main:goldpick","main:diamondpick","main:emeraldpick","main:sapphirepick","main:rubypick"},
items = {"redstone:dust"},
},
{
--rarity = 0,
tools = {"main:ironpick","main:goldpick","main:diamondpick"},
tools = {"main:coalpick","main:ironpick","main:lapispick","main:goldpick","main:diamondpick","main:emeraldpick","main:sapphirepick","main:rubypick"},
items = {"redstone:dust"},
},
{
--rarity = 0,
tools = {"main:ironpick","main:goldpick","main:diamondpick"},
tools = {"main:coalpick","main:ironpick","main:lapispick","main:goldpick","main:diamondpick","main:emeraldpick","main:sapphirepick","main:rubypick"},
items = {"redstone:dust"},
},
{
rarity = 5,
tools = {"main:ironpick","main:goldpick","main:diamondpick"},
tools = {"main:coalpick","main:ironpick","main:lapispick","main:goldpick","main:diamondpick","main:emeraldpick","main:sapphirepick","main:rubypick"},
items = {"redstone:dust"},
},
},

View File

@ -201,6 +201,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
end
minetest.show_formspec(name,id, form..tmi_master_inventory["page_"..temp_pool.page]..cheat_button(name))
minetest.sound_play("lever", {to_player = name,gain=0.7})
player:set_inventory_formspec(base_inv..tmi_master_inventory["page_"..temp_pool.page]..cheat_button(name))
--"prev" button
elseif fields["toomanyitems.prev"] then
temp_pool.page = temp_pool.page - 1
@ -211,6 +212,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
minetest.show_formspec(name,id, form..tmi_master_inventory["page_"..temp_pool.page]..cheat_button(name))
minetest.sound_play("lever", {to_player = name,gain=0.7})
player:set_inventory_formspec(base_inv..tmi_master_inventory["page_"..temp_pool.page]..cheat_button(name))
elseif fields["toomanyitems.back"] then
minetest.show_formspec(name,id, form..tmi_master_inventory["page_"..temp_pool.page]..cheat_button(name))
@ -256,7 +258,6 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
else
craft_inv = create_craft_formspec(item)
if craft_inv and craft_inv ~= "" then
print(tmi_master_inventory["page_"..temp_pool.page])
minetest.show_formspec(name, id, tmi_master_inventory["page_"..temp_pool.page]..craft_inv..cheat_button(name))
minetest.sound_play("lever", {to_player = name,gain=0.7})
end