Fix machines not triggered when item with power storage is placed in inventory
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user