Fix machines not triggered when item with power storage is placed in inventory

This commit is contained in:
mrkubax10 2025-03-16 20:20:54 +01:00
parent 3a1cfad7d4
commit 4c6b4b9df0

@ -128,6 +128,20 @@ function industrialtest.ElectricMachine.allowMetadataInventoryPut(self,pos,listn
return industrialtest.Machine.allowMetadataInventoryPut(self,pos,listname,index,stack,player)
end
function industrialtest.ElectricMachine.onMetadataInventoryMove(self,pos,fromList,fromIndex,toList,toIndex,count)
if toList=="charged" then
self:trigger(pos)
end
industrialtest.Machine.onMetadataInventoryMove(self,pos,fromList,fromIndex,toList,toIndex,count)
end
function industrialtest.ElectricMachine.onMetadataInventoryPut(self,pos,listname,index,stack)
if listname=="charged" then
self:trigger(pos)
end
industrialtest.Machine.onMetadataInventoryPut(self,pos,listname,index,stack)
end
function industrialtest.ElectricMachine.requestPower(self,pos)
if not self.hasPowerOutput then
return