Improve TA4 movecontroller
This commit is contained in:
parent
acb54d7e8d
commit
ff7e30a1c0
@ -475,7 +475,7 @@ minetest.register_entity("techage:move_item", {
|
|||||||
self.object:set_properties({wield_item = self.item})
|
self.object:set_properties({wield_item = self.item})
|
||||||
--print("tbl.respawn", tbl.respawn)
|
--print("tbl.respawn", tbl.respawn)
|
||||||
if tbl.respawn then
|
if tbl.respawn then
|
||||||
entity_to_node(self.start_pos, self.object)
|
entity_to_node(self.dest_pos, self.object)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
@ -20,11 +20,13 @@ local Cable = techage.ElectricCable
|
|||||||
local power = networks.power
|
local power = networks.power
|
||||||
|
|
||||||
local function can_dig(pos, digger)
|
local function can_dig(pos, digger)
|
||||||
if M(pos):get_string("owner") == digger:get_player_name() then
|
if digger and digger:is_player() then
|
||||||
return true
|
if M(pos):get_string("owner") == digger:get_player_name() then
|
||||||
end
|
return true
|
||||||
if minetest.check_player_privs(digger:get_player_name(), "powerline") then
|
end
|
||||||
return true
|
if minetest.check_player_privs(digger:get_player_name(), "powerline") then
|
||||||
|
return true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user