Drills should now have proper energy storage & consumption
This commit is contained in:
parent
a45d66210a
commit
1368c2ef00
11
tools.lua
11
tools.lua
@ -70,6 +70,11 @@ minetest.register_tool("industrialtest:drill",
|
||||
},
|
||||
damage_groups = {cracky=3,crubmly=3,fleshy=3},
|
||||
},
|
||||
after_use =
|
||||
{
|
||||
meta:set_int("industrialtest.powerAmount", math.max(meta:get_int("industrialtest.powerAmount") - 80,0))
|
||||
industrialtest.api.updateItemPowerText(itemstack)
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_tool("industrialtest:drill_diamond",
|
||||
@ -98,6 +103,12 @@ minetest.register_tool("industrialtest:drill_diamond",
|
||||
},
|
||||
damage_groups = {cracky=3,crubmly=3,fleshy=3},
|
||||
},
|
||||
|
||||
after_use =
|
||||
{
|
||||
meta:set_int("industrialtest.powerAmount", math.max(meta:get_int("industrialtest.powerAmount") - 80,0))
|
||||
industrialtest.api.updateItemPowerText(itemstack)
|
||||
}
|
||||
})
|
||||
|
||||
if industrialtest.mtgAvailable then
|
||||
|
Loading…
Reference in New Issue
Block a user