Merge pull request #27 from Thomas--S/tank_protection

Liquid Tanks: Add protection support
master
Joachim Stolberg 2020-09-09 22:00:21 +02:00 committed by GitHub
commit be8e9b3b8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -203,6 +203,10 @@ local function empty_on_punch(pos, nvm, full_container, item_count)
end end
function techage.liquid.on_punch(pos, node, puncher, pointed_thing) function techage.liquid.on_punch(pos, node, puncher, pointed_thing)
if minetest.is_protected(pos, puncher:get_player_name()) then
return
end
local nvm = techage.get_nvm(pos) local nvm = techage.get_nvm(pos)
local mem = techage.get_mem(pos) local mem = techage.get_mem(pos)
mem.blocking_time = mem.blocking_time or 0 mem.blocking_time = mem.blocking_time or 0