#4 - try to fix weapons

master
ademant 2018-11-29 15:02:44 +01:00
parent 9070c4fc0e
commit ba44e3a53f
1 changed files with 4 additions and 2 deletions

View File

@ -36,8 +36,9 @@ for i,tdef in pairs(tool_definition) do
-- tt_def={description=i.." "..tool,
inventory_image=minerdream.modname.."_"..tool.."_"..i..".png",
range=tooldef.range or 2,
tool_capabilities={max_drop_level = 1},
tool_capabilities={max_drop_level = 1,groupcaps={}},
damage_groups = {fleshy = ttv.fleshy or 4},
-- damage_groups = {fleshy=6.25},
}
for _,gc in pairs({"cracky","crumbly","choppy","snappy"}) do
if ttv[gc] ~= nil then
@ -48,11 +49,12 @@ for i,tdef in pairs(tool_definition) do
if ttv.maxlevel ~= nil then
ml = ttv.maxlevel
end
tt_def.tool_capabilities[gc]={times=table.copy(ttv[gc]),
tt_def.tool_capabilities.groupcaps[gc]={times=table.copy(ttv[gc]),
uses=tooldef.uses,max_level=ml}
end
end
toolname=minerdream.modname..":"..tool.."_"..i
-- print(dump2(tt_def))
minetest.register_tool(toolname,tt_def)
end
end