forked from minetest-mods/moreores
commit
b391e707e1
@ -1 +1,2 @@
|
|||||||
default
|
default
|
||||||
|
mg?
|
||||||
|
15
init.lua
15
init.lua
@ -61,7 +61,7 @@ local function hoe_on_use(itemstack, user, pointed_thing, uses)
|
|||||||
pos = pt.under,
|
pos = pt.under,
|
||||||
gain = 0.5,
|
gain = 0.5,
|
||||||
})
|
})
|
||||||
--itemstack:add_wear(65535/(uses-1))
|
itemstack:add_wear(65535/(uses-1))
|
||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -175,13 +175,13 @@ local function add_ore(modname, description, mineral_name, oredef)
|
|||||||
|
|
||||||
minetest.register_ore(oredef.oredef)
|
minetest.register_ore(oredef.oredef)
|
||||||
|
|
||||||
for toolname, tdef in pairs(oredef.tools) do
|
for toolname, tooldef in pairs(oredef.tools) do
|
||||||
local tdef = {
|
local tdef = {
|
||||||
description = "",
|
description = "",
|
||||||
inventory_image = toolimg_base .. toolname .. ".png",
|
inventory_image = toolimg_base .. toolname .. ".png",
|
||||||
tool_capabilities = {
|
tool_capabilities = {
|
||||||
max_drop_level=3,
|
max_drop_level=3,
|
||||||
groupcaps=tdef
|
groupcaps=tooldef
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -204,8 +204,8 @@ local function add_ore(modname, description, mineral_name, oredef)
|
|||||||
|
|
||||||
if toolname == "hoe" then
|
if toolname == "hoe" then
|
||||||
tdef.description = S("%s Hoe"):format(S(description))
|
tdef.description = S("%s Hoe"):format(S(description))
|
||||||
local uses = tdef.uses
|
local uses = tooldef.uses
|
||||||
tdef.uses = nil
|
tooldef.uses = nil
|
||||||
tdef.on_use = function(itemstack, user, pointed_thing)
|
tdef.on_use = function(itemstack, user, pointed_thing)
|
||||||
return hoe_on_use(itemstack, user, pointed_thing, uses)
|
return hoe_on_use(itemstack, user, pointed_thing, uses)
|
||||||
end
|
end
|
||||||
@ -359,4 +359,9 @@ minetest.register_node("moreores:copper_rail", {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- mg suppport
|
||||||
|
if minetest.get_modpath("mg") then
|
||||||
|
dofile(modpath.."/mg.lua")
|
||||||
|
end
|
||||||
|
|
||||||
print(S("[moreores] loaded."))
|
print(S("[moreores] loaded."))
|
||||||
|
46
mg.lua
Normal file
46
mg.lua
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
mg.register_ore({
|
||||||
|
name = "moreores:mineral_tin",
|
||||||
|
wherein = "default:stone",
|
||||||
|
seeddiff = 8,
|
||||||
|
maxvdistance = 10.5,
|
||||||
|
maxheight = 8,
|
||||||
|
seglenghtn = 15,
|
||||||
|
seglenghtdev = 6,
|
||||||
|
segincln = 0,
|
||||||
|
segincldev = 0.6,
|
||||||
|
turnangle = 57,
|
||||||
|
forkturnangle = 57,
|
||||||
|
numperblock = 2
|
||||||
|
})
|
||||||
|
|
||||||
|
mg.register_ore({
|
||||||
|
name = "moreores:mineral_silver",
|
||||||
|
wherein = "default:stone",
|
||||||
|
seeddiff = 9,
|
||||||
|
maxvdistance = 10.5,
|
||||||
|
maxheight = -2,
|
||||||
|
seglenghtn = 15,
|
||||||
|
seglenghtdev = 6,
|
||||||
|
sizen = 60,
|
||||||
|
sizedev = 30,
|
||||||
|
segincln = 0,
|
||||||
|
segincldev = 0.6,
|
||||||
|
turnangle = 57,
|
||||||
|
forkturnangle = 57,
|
||||||
|
numperblock = 2
|
||||||
|
})
|
||||||
|
|
||||||
|
mg.register_ore({
|
||||||
|
name = "moreores:mineral_mithril",
|
||||||
|
wherein = "default:stone",
|
||||||
|
seeddiff = 10,
|
||||||
|
maxvdistance = 10.5,
|
||||||
|
maxheight = -512,
|
||||||
|
seglenghtn = 2,
|
||||||
|
seglenghtdev = 4,
|
||||||
|
sizen = 12,
|
||||||
|
sizedev = 5,
|
||||||
|
segincln = 0,
|
||||||
|
segincldev = 0.6,
|
||||||
|
turnangle = 57,
|
||||||
|
})
|
Loading…
Reference in New Issue
Block a user