mirror of
https://github.com/minetest-mods/technic.git
synced 2025-06-30 23:30:38 +02:00
Add protection support to tools
This adds support to the chainsaw, mining drill, mining laser, sonic screwdriver, and tree tap.
This commit is contained in:
@ -203,6 +203,10 @@ end
|
||||
|
||||
-- Saw down trees entry point
|
||||
local function chainsaw_dig_it(pos, player,current_charge)
|
||||
if minetest.is_protected(pos, player:get_player_name()) then
|
||||
minetest.record_protection_violation(pos, player:get_player_name())
|
||||
return current_charge
|
||||
end
|
||||
local remaining_charge=current_charge
|
||||
|
||||
-- Save the currently installed dropping mechanism so we can restore it.
|
||||
|
Reference in New Issue
Block a user