Implement Electric Chainsaw

This commit is contained in:
2023-04-08 19:09:15 +02:00
parent 40d0e578c4
commit 90c9779bf0
2 changed files with 127 additions and 1 deletions

View File

@@ -331,7 +331,7 @@ registerMachine({
local shouldUpdateFormspec=flowTransferred
local shouldRerunTimer=(afterFlow and meta:get_int("industrialtest.powerAmount")>0)
if chargedSlot:get_count()>0 and not industrialtest.api.isFullyCharged(chargedSlot:get_meta()) and meta:get_int("industrialtest.powerAmount")>0 then
industrialtest.api.transferPowerToItem(meta,chargedSlot,powerFlow)
industrialtest.api.transferPowerToItem(meta,chargedSlot,chargedSlot:get_meta():get_int("industrialtest.powerFlow"))
inv:set_stack("charged",1,chargedSlot)
shouldUpdateFormspec=true
shouldRerunTimer=true