Some Miner tweaks

This commit is contained in:
2025-05-07 18:51:00 +02:00
parent 65e0304c9e
commit ea422c5999
2 changed files with 13 additions and 2 deletions

View File

@@ -173,8 +173,9 @@ function industrialtest.Miner.onDestruct(self,pos)
industrialtest.ElectricMachine.onDestruct(self,pos)
end
function industrialtest.Miner.afterDigNode(self,pos,oldnode,oldmetadata,digger)
function industrialtest.Miner.onDig(self,pos,node,digger)
destructMiningPipe(vector.new(pos.x,pos.y-1,pos.z),digger)
return industrialtest.ElectricMachine.onDig(self,pos,node,digger)
end
function industrialtest.Miner.getFormspec(self,pos)
@@ -199,6 +200,8 @@ function industrialtest.Miner.getFormspec(self,pos)
or "image[9.1,2.29;1,1;industrialtest_gui_electricity_bg.png]"),
"list[context;powerStorage;9.1,3.5;1,1]",
industrialtest.internal.getItemSlotBg(9.1,3.5,1,1),
"listring[context;src]",
"listring[context;dst]"
}
return parentFormspec..table.concat(formspec,"")
end
@@ -245,7 +248,7 @@ function industrialtest.Miner.allowMetadataInventoryPut(self,pos,listname,index,
if listname=="dst" then
return 0
end
return industrialtest.ElectricMachine.allowMetadataInventoryPut(self,pos,listname,index,stack,player)
return industrialtest.ElectricMachine.allowMetadataInventoryPut(self,pos,listname,index,itemstack,player)
end
function industrialtest.Miner.onMetadataInventoryMove(self,pos,fromList,fromIndex,toList,toIndex,count)