fix 4 - checked that pick harm mobs
parent
1ba2e91a47
commit
d1c7395622
|
@ -7,8 +7,9 @@ local tool_cols={
|
|||
col_num={"range","uses"},
|
||||
as_numeric=1,
|
||||
}
|
||||
|
||||
-- reading config table
|
||||
local tool_definition = basic_functions.import_csv(minerdream.path.."/tools.txt",tool_cols)
|
||||
--print(dump2(tool_definition))
|
||||
|
||||
|
||||
for i,tdef in pairs(tool_definition) do
|
||||
|
@ -18,11 +19,13 @@ for i,tdef in pairs(tool_definition) do
|
|||
for col in pairs(tdef) do
|
||||
tooldef=basic_functions.parse_tree(tooldef,col,tdef[col])
|
||||
end
|
||||
-- check specific tools/weapons
|
||||
for _,tool in pairs({"pick","axe","sword","shovel","spear"}) do
|
||||
if tooldef[tool] ~= nil then
|
||||
local ttv=tooldef[tool]
|
||||
tdesc=core.colorize("#"..idef.tierdef.color, i.." "..tool.."\n")..
|
||||
core.colorize("#A0A0A0", "tier: "..idef.tierdef.name.." ("..idef.tierdef.desc..")")
|
||||
-- check special attributes of tool definition and use fallback definitions
|
||||
if tooldef.uses then
|
||||
tdesc=tdesc.."\n"..core.colorize("#A0A0A0","Uses: "..tooldef.uses)
|
||||
end
|
||||
|
@ -33,14 +36,13 @@ for i,tdef in pairs(tool_definition) do
|
|||
tdesc=tdesc.."\n"..core.colorize("#A0A0A0","Damage: "..ttv.fleshy)
|
||||
end
|
||||
tt_def={description=tdesc,
|
||||
-- tt_def={description=i.." "..tool,
|
||||
inventory_image=minerdream.modname.."_"..tool.."_"..i..".png",
|
||||
range=tooldef.range or 2,
|
||||
groups={weapon=1},
|
||||
tool_capabilities={max_drop_level = 1,groupcaps={},
|
||||
damage_groups = {fleshy = ttv.fleshy or 4},},
|
||||
-- damage_groups = {fleshy=6.25},
|
||||
}
|
||||
-- check if values for capabitlites exist
|
||||
for _,gc in pairs({"cracky","crumbly","choppy","snappy"}) do
|
||||
if ttv[gc] ~= nil then
|
||||
local ml = 1
|
||||
|
|
Loading…
Reference in New Issue