correction of item register

master
A. Demant 2018-11-19 17:55:19 +01:00
parent e6109df3b7
commit 8c80dc4931
5 changed files with 86 additions and 62 deletions

View File

@ -3,6 +3,6 @@ title = Minerdream
author = ademant
description = A mod, that makes minig way more fun, and is a replacement for Xtraores, which I abandoned.
depends = default,3d_armor,shields,mana,mobs
optional_depends = intllib,awards,hbhunger,hunber,technic,basic_materials
optional_depends = intllib,awards,hbhunger,hunber,technic,basic_materials,technic_aluminum
license = MIT
version = 1.0.0

View File

@ -1,41 +1,40 @@
name,tier,overrides,orig_mod,drop_as_lump,crack,has_dust,has_block,has_nugget,has_rich,in_desert,has_brick,has_bar_block,has_dust,scarcity,num_ores,clust_size,y_min,y_max,tier,has_lump,has_bar,lump_cooking_time,has_pick,has_axe,has_sword,has_shovel,has_spear,has_bow,tool_stick,tool_cotton,has_helmet,has_chestplate,has_leggings,has_boots,has_shield,has_brick
default,,,,,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
rhodium,6,,,1,5,1,1,,,,3,3,3,16,3,3,-31000,-1500,6,1,1,64,1,1,1,,1,1,minerdream:expensivestick,steel_wire,1,1,1,1,1,
calcium,,,,1,5,1,1,,,,3,3,3,12,5,2,-31000,420,1,1,1,2,,,,,,,,,,,,,,
tantalum,6,,,1,5,1,1,,,,3,3,3,16,3,3,-31000,-1500,6,1,1,64,1,1,1,,1,1,minerdream:expensivestick,steel_wire,1,1,1,1,1,
ruthenium,5,,,1,4,1,1,,,,3,3,3,15,3,3,-31000,-500,5,1,1,32,1,1,1,1,1,1,minerdream:steelstick,steel_wire,1,1,1,1,1,
cobalt,5,,,1,4,1,1,,,,3,3,3,15,3,3,-31000,-500,5,1,1,32,1,1,1,1,1,1,minerdream:steelstick,steel_wire,1,1,1,1,1,
platinum,4,,,1,1,1,1,,,,3,3,3,14,4,3,-31000,-300,4,1,1,16,1,1,1,1,1,1,,,1,1,1,1,1,
aluminium,4,,,1,1,1,1,,,,3,3,3,14,4,3,-31000,-250,4,1,1,32,1,1,1,1,1,1,,,1,1,1,1,1,
zinc,,,,1,1,1,1,,,,3,3,3,14,7,3,-31000,-50,2,1,1,4,,,,,,1,,,,,,,,
lead,3,technic:mineral_lead,,1,2,1,1,,,,3,3,3,13,7,3,-31000,-70,3,1,1,4,,,,,1,1,,,,,,,,
silver,3,moreores:mineral_silver,,1,2,1,1,,,,3,3,3,14,3,2,-31000,-64,3,1,1,8,,,,,1,1,,,,,,,,
potassium,,,,1,3,1,1,,,,3,3,3,12,7,3,-31000,420,1,1,1,2,,,,,,1,,,,,,,,
nickel,2,,,1,2,1,1,,,,3,3,3,13,7,3,-31000,-40,2,1,1,4,,,,,1,1,,,,,,,,
flint,1,,,,,,,,,,,,,,,,,,,,,,1,1,1,1,1,,,,1,1,1,1,1,
tin,2,,technic,,,,,,,,3,3,3,,,,,,,,,,,,,,,,,,,,,,,
gold,3,,default,,,,,,,,3,3,,,,,,,,,,,,,,,1,1,,,,,,,,
copper,2,,default,,,,3,,,,3,3,,,,,,,,,,,,,,,,1,,,,,,,,
steel,2,,default,,,,,,,,,3,,,,,,,,,,,,,,,1,1,,,,,,,,
diamond,3,,,,,,,,,,,,,,,,,,,,,,,,,,1,1,,,,,,,,
mese,3,,,,,,,,,,,,,,,,,,,,,,,,,,1,1,,,,,,,,
stainlesssteel,2,,,,,,,,,,,,,,,,,,,,,,1,1,1,1,1,1,,,1,1,1,1,1,
bronze,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
brass,,,,,,,3,,,,3,3,,,,,,,,,,,,,,,,,,,,,,,,
coal,1,,,,,,,,,1,,,,,,,,,,,,,,,,,,,,,,,,,,
sulfur,,,,,3,1,,,,1,,,,,,,,,2,1,,,,,,,,,,,,,,,,
lapislazuli,,,,,3,,3,,,1,3,,,,,,,,2,1,,,,,,,,,,,,,,,,
saltpeter,,,,,3,1,1,,,1,,,,,,,,,2,1,,,,,,,,,,,,,,,,
spinel,6,,,,5,,1,,,,3,,,16,1,1,-31000,-1700,,,,,,,,,,,,,,,,,,
garnet,5,,,,4,,1,,,,3,,,15,1,1,-31000,-650,,,,,,,,,,,,,,,,,,
bituminous_coal,,,,,4,,,,,,,,,13,10,3,-31000,-500,5,1,,,,,,,,,,,,,,,,
jade,5,,,,4,,1,,,,3,,,15,1,1,-31000,-650,,,,,,,,,,,,,,,,,,
amethyst,5,,,,4,,1,,,,3,,,15,1,1,-31000,-650,,,,,,,,,,,,,,,,,,
onyx,6,,,,,,1,,,,3,,,16,1,1,-31000,-1700,,,,,,,,,,,,,,,,,,
aquamarine,6,,,,,,1,,,,3,,,16,1,1,-31000,-1700,,,,,,,,,,,,,,,,,,
topaz,6,,,,,,1,,,,3,,,15,1,1,-31000,-1700,,,,,,,,,,,,,,,,,,
treasure1,,,,,,,,,,,,,,8,1,1,-200,50,,,,,,,,,,,,,,,,,,
treasure2,,,,,,,,,,,,,,10,1,1,-400,-100,,,,,,,,,,,,,,,,,,
treasure3,,,,,,,,,,,,,,12,1,1,-750,-250,,,,,,,,,,,,,,,,,,
treasure4,,,,,,,,,,,,,,14,1,1,-2000,-500,,,,,,,,,,,,,,,,,,
treasure5,,,,,,,,,,,,,,15,1,1,-2500,-1500,,,,,,,,,,,,,,,,,,
name,tier,disabled_by_mod,overrides,orig_mod,drop_as_lump,crack,has_dust,has_block,has_nugget,has_rich,in_desert,has_brick,has_bar_block,has_dust,scarcity,num_ores,clust_size,y_min,y_max,tier,has_lump,has_bar,lump_cooking_time,has_pick,has_axe,has_sword,has_shovel,has_spear,has_bow,tool_stick,tool_cotton,has_helmet,has_chestplate,has_leggings,has_boots,has_shield,has_brick
default,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
rhodium,6,,,,1,5,1,1,,,,3,3,3,16,3,3,-31000,-1500,6,1,1,64,1,1,1,,1,1,minerdream:expensivestick,steel_wire,1,1,1,1,1,
calcium,,,,,1,5,1,1,,,,3,3,3,12,5,2,-31000,420,1,1,1,2,,,,,,,,,,,,,,
tantalum,6,,,,1,5,1,1,,,,3,3,3,16,3,3,-31000,-1500,6,1,1,64,1,1,1,,1,1,minerdream:expensivestick,steel_wire,1,1,1,1,1,
ruthenium,5,,,,1,4,1,1,,,,3,3,3,15,3,3,-31000,-500,5,1,1,32,1,1,1,1,1,1,minerdream:steelstick,steel_wire,1,1,1,1,1,
cobalt,5,,,,1,4,1,1,,,,3,3,3,15,3,3,-31000,-500,5,1,1,32,1,1,1,1,1,1,minerdream:steelstick,steel_wire,1,1,1,1,1,
platinum,4,,,,1,1,1,1,,,,3,3,3,14,4,3,-31000,-300,4,1,1,16,1,1,1,1,1,1,,,1,1,1,1,1,
aluminium,4,technic_aluminum,,,1,1,1,1,,,,3,3,3,14,4,3,-31000,-250,4,1,1,32,1,1,1,1,1,1,,,1,1,1,1,1,
zinc,,,,,1,1,1,1,,,,3,3,3,14,7,3,-31000,-50,2,1,1,4,,,,,,1,,,,,,,,
lead,3,,technic:mineral_lead,,1,2,1,1,,,,3,3,3,13,7,3,-31000,-70,3,1,1,4,,,,,1,1,,,,,,,,
silver,3,,moreores:mineral_silver,,1,2,1,1,,,,3,3,3,14,3,2,-31000,-64,3,1,1,8,,,,,1,1,,,,,,,,
potassium,,,,,1,3,1,1,,,,3,3,3,12,7,3,-31000,420,1,1,1,2,,,,,,1,,,,,,,,
nickel,2,,,,1,2,1,1,,,,3,3,3,13,7,3,-31000,-40,2,1,1,4,,,,,1,1,,,,,,,,
flint,1,,,default,,,,,,,,,,,,,,,,,,,,1,1,1,1,1,,,,1,1,1,1,1,
tin,2,,,technic,,,,,,,,3,3,3,,,,,,,,,,,,,,,,,,,,,,,
gold,3,,,default,,,,,,,,3,3,,,,,,,,,,,,,,,1,1,,,,,,,,
copper,2,,,default,,,,,,,,3,3,,,,,,,,,,,,,,,,1,,,,,,,,
steel,2,,,default,,,,,,,,,3,,,,,,,,,,,,,,,1,1,,,,,,,,
diamond,3,,,,,,,,,,,,,,,,,,,,,,,,,,,1,1,,,,,,,,
mese,3,,,,,,,,,,,,,,,,,,,,,,,,,,,1,1,,,,,,,,
stainlesssteel,2,,,,,,,,,,,,,,,,,,,,,,,1,1,1,1,1,1,,,1,1,1,1,1,
bronze,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
brass,,,,,,,,3,,,,3,3,,,,,,,,,,,,,,,,,,,,,,,,
sulfur,,,technic:mineral_sulfur,,1,3,,,,,1,,,,,,,,,2,1,,,,,,,,,,,,,,,,
lapislazuli,,,,,,3,,3,,,1,3,,,,,,,,2,1,,,,,,,,,,,,,,,,
saltpeter,,,,,,3,1,1,,,1,,,,,,,,,2,1,,,,,,,,,,,,,,,,
spinel,6,,,,,5,,1,,,,3,,,16,1,1,-31000,-1700,,,,,,,,,,,,,,,,,,
garnet,5,,,,,4,,1,,,,3,,,15,1,1,-31000,-650,,,,,,,,,,,,,,,,,,
bituminous_coal,,,,,,4,,,,,,,,,13,10,3,-31000,-500,5,1,,,,,,,,,,,,,,,,
jade,5,,,,,4,,1,,,,3,,,15,1,1,-31000,-650,,,,,,,,,,,,,,,,,,
amethyst,5,,,,,4,,1,,,,3,,,15,1,1,-31000,-650,,,,,,,,,,,,,,,,,,
onyx,6,,,,,,,1,,,,3,,,16,1,1,-31000,-1700,,,,,,,,,,,,,,,,,,
aquamarine,6,,,,,,,1,,,,3,,,16,1,1,-31000,-1700,,,,,,,,,,,,,,,,,,
topaz,6,,,,,,,1,,,,3,,,15,1,1,-31000,-1700,,,,,,,,,,,,,,,,,,
treasure1,,,,,,,,,,,,,,,8,1,1,-200,50,,,,,,,,,,,,,,,,,,
treasure2,,,,,,,,,,,,,,,10,1,1,-400,-100,,,,,,,,,,,,,,,,,,
treasure3,,,,,,,,,,,,,,,12,1,1,-750,-250,,,,,,,,,,,,,,,,,,
treasure4,,,,,,,,,,,,,,,14,1,1,-2000,-500,,,,,,,,,,,,,,,,,,
treasure5,,,,,,,,,,,,,,,15,1,1,-2500,-1500,,,,,,,,,,,,,,,,,,

View File

@ -81,6 +81,7 @@ local local_get_recipe=function(tool,material,stick)
if stick == nil then
stick="group:stick"
end
local out_recipe={}
if tool == "spear" then
out_recipe={
{'', material, material},
@ -149,13 +150,28 @@ local local_get_recipe=function(tool,material,stick)
end
for i,tdef in pairs(miner_definition) do
if i ~= "default" then
local is_enabled = true
if tdef.disabled_by_mod ~= nil then
print(tdef.disabled_by_mod)
print(dump2(minetest.get_modnames()))
if minetest.get_modpath(tdef.disabled_by_mod)~=nil then
is_enabled=false
end
end
if (i ~= "default") and (is_enabled) then
minerdream.items[i]={}
local ore_modname=minerdream.modname
if tdef.orig_modname then
ore_modname=tdef.orig_modname
end
local needs_mapgen=false
local mapgen_name=""
-- register ores within stone
if tdef.crack ~= nil then
-- base config of ore found in normal stone
local lump_name=minerdream.modname..":"..i
local lump_name=ore_modname..":"..i
if tdef.groups.drop_as_lump ~= nil then
lump_name=minerdream.modname..":"..i.."_lump"
lump_name=lump_name.."_lump"
end
ore_def={description=i.." ore",
name=minerdream.modname..":stone_with_"..i,
@ -169,7 +185,6 @@ for i,tdef in pairs(miner_definition) do
inventory_image=lump_name:gsub(":","_")..".png",
stack_max=minerdream.lump_max_stack,
}
-- print(lump_name)
-- override existing ore?
local to_override = false
if tdef.overrides ~= nil then
@ -201,18 +216,8 @@ for i,tdef in pairs(miner_definition) do
-- if not already defined, then add mapgen parameter
if tdef.scarcity ~= nil then
local map_def={ore_type = "scatter",
ore = ore_name,
wherein = "default:stone",
clust_scarcity = tdef.scarcity * tdef.scarcity * tdef.scarcity,
clust_num_ores = tdef.num_ores or 1,
clust_size = tdef.clust_size or 1,
y_min = tdef.y_min or (-31000),
y_max = tdef.y_max or 0,
}
local_item_insert(i,"map_def",map_def)
minetest.register_ore(map_def)
needs_mapgen = true
mapgen_name=ore_def.name
end
end
local_item_insert(i,"ore_def",ore_def)
@ -223,9 +228,29 @@ for i,tdef in pairs(miner_definition) do
desertore_def.name=minerdream.modname..":desertstone_with_"..i
desertore_def.tiles={"default_desert_stone.png^"..minerdream.modname.."_"..i.."_ore.png"}
local_item_insert(i,"desertore_def",desertore_def)
print(desertore_def.name)
minetest.register_node(desertore_def.name,desertore_def)
end
else
-- if not already defined, then add mapgen parameter
if tdef.scarcity ~= nil then
needs_mapgen = true
mapgen_name=minerdream.modname..":"..i
end
end
-- define mapgeneration for ores
if needs_mapgen then
local map_def={ore_type = "scatter",
ore = mapgen_name,
wherein = "default:stone",
clust_scarcity = tdef.scarcity * tdef.scarcity * tdef.scarcity,
clust_num_ores = tdef.num_ores or 1,
clust_size = tdef.clust_size or 1,
y_min = tdef.y_min or (-31000),
y_max = tdef.y_max or 0,
}
local_item_insert(i,"map_def",map_def)
minetest.register_ore(map_def)
end
-- define ore dust
@ -310,7 +335,7 @@ for i,tdef in pairs(miner_definition) do
local_item_insert(i,"block_def",block_def)
minetest.register_node(minerdream.modname..":"..i.."_block",block_def)
local in_def=minerdream.items[i].ingot_def
if ingot_def == nil and minerdream.items[i].lump_def ~= nil then
if in_def == nil and minerdream.items[i].lump_def ~= nil then
local in_def=minerdream.items[i].lump_def
end
if in_def ~= nil then
@ -332,7 +357,7 @@ for i,tdef in pairs(miner_definition) do
end
end
if minerdream.items[i].ingot_def then
if minerdream.items[i].ingot_def ~= nil then
local ingot_name=minerdream.items[i].ingot_def.name
for _,tool in ipairs({"spear","pick","axe","sword","shovel","helmet","chestplate","leggings","boots","shield"}) do
if tdef.groups["has_"..tool] ~= nil then

View File

@ -57,7 +57,7 @@ for i,tdef in pairs(tool_definition) do
uses=tooldef.uses,max_level=ml}
end
end
print(dump2(tt_def))
-- print(dump2(tt_def))
toolname=minerdream.modname..":"..tool.."_"..i
minetest.register_tool(toolname,tt_def)
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 B