Refactor Mining Laser

This commit is contained in:
2025-04-19 20:18:02 +02:00
parent 000cff6940
commit 6e1d0b5229
2 changed files with 91 additions and 68 deletions

View File

@@ -46,6 +46,13 @@ end
function industrialtest.ElectricTool.onUse(self,itemstack,user,pointed)
self:prepare(itemstack)
if user:is_player() then
local controls=user:get_player_control()
if controls.sneak and self:changeMode(itemstack) then
return true
end
end
local meta=itemstack:get_meta()
local opPower=self:getOpPower(itemstack)
if meta:get_int("industrialtest.powerAmount")<opPower then
@@ -58,6 +65,11 @@ function industrialtest.ElectricTool.onUse(self,itemstack,user,pointed)
return true
end
function industrialtest.ElectricTool.changeMode(self,itemstack)
-- dummy function
return false
end
function industrialtest.ElectricTool.getOpPower(self,itemstack)
-- dummy function
return 0