Drills should now have proper energy storage & consumption

This commit is contained in:
Functioning Member of Society 2023-03-19 17:36:19 -04:00
parent a45d66210a
commit 1368c2ef00

View File

@ -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