power line protection bugfix
This commit is contained in:
parent
56ed4ccad0
commit
5911dcadbe
@ -186,11 +186,11 @@ minetest.register_node("techage:power_pole", {
|
||||
},
|
||||
},
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
M(pos):set_string("owner", placer:get_player_name())
|
||||
if techage.is_protected(pos, placer:get_player_name()) then
|
||||
minetest.remove_node(pos)
|
||||
return true
|
||||
end
|
||||
M(pos):set_string("owner", placer:get_player_name())
|
||||
end,
|
||||
can_dig = function(pos, digger)
|
||||
local meta = minetest.get_meta(pos)
|
||||
@ -235,6 +235,7 @@ minetest.register_node("techage:power_pole2", {
|
||||
end,
|
||||
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
M(pos):set_string("owner", placer:get_player_name())
|
||||
if techage.is_protected(pos, placer:get_player_name()) then
|
||||
minetest.remove_node(pos)
|
||||
return true
|
||||
@ -243,7 +244,6 @@ minetest.register_node("techage:power_pole2", {
|
||||
minetest.remove_node(pos)
|
||||
return true
|
||||
end
|
||||
M(pos):set_string("owner", placer:get_player_name())
|
||||
return false
|
||||
end,
|
||||
can_dig = function(pos, digger)
|
||||
|
@ -20,7 +20,7 @@ local IsNodeUnderObservation = {}
|
||||
|
||||
-- Register all nodes, which should be protected by the "techage:power_pole"
|
||||
function techage.register_powerline_node(name)
|
||||
IsNodeUnderObservation[name] = true
|
||||
IsNodeUnderObservation[name] = true
|
||||
end
|
||||
|
||||
local function powerpole_found(pos, name, range)
|
||||
|
Loading…
Reference in New Issue
Block a user