Improve TA4 movecontroller

This commit is contained in:
Joachim Stolberg 2022-06-08 18:14:42 +02:00
parent acb54d7e8d
commit ff7e30a1c0
2 changed files with 8 additions and 6 deletions

View File

@ -475,7 +475,7 @@ minetest.register_entity("techage:move_item", {
self.object:set_properties({wield_item = self.item})
--print("tbl.respawn", tbl.respawn)
if tbl.respawn then
entity_to_node(self.start_pos, self.object)
entity_to_node(self.dest_pos, self.object)
end
end
end,

View File

@ -20,11 +20,13 @@ local Cable = techage.ElectricCable
local power = networks.power
local function can_dig(pos, digger)
if M(pos):get_string("owner") == digger:get_player_name() then
return true
end
if minetest.check_player_privs(digger:get_player_name(), "powerline") then
return true
if digger and digger:is_player() then
if M(pos):get_string("owner") == digger:get_player_name() then
return true
end
if minetest.check_player_privs(digger:get_player_name(), "powerline") then
return true
end
end
return false
end