Replace the horribly outdated minetest.env stuff
This commit is contained in:
parent
c13823bcfc
commit
bc0879911f
35 changed files with 335 additions and 335 deletions
|
@ -209,7 +209,7 @@ function mesecon:update_autoconnect(pos, secondcall, replace_old)
|
|||
mesecon:update_autoconnect(zmympos, true)
|
||||
end
|
||||
|
||||
nodename = minetest.env:get_node(pos).name
|
||||
nodename = minetest.get_node(pos).name
|
||||
if string.find(nodename, "mesecons:wire_") == nil and not replace_old then return nil end
|
||||
|
||||
if mesecon:rules_link_anydir(pos, xppos) then xp = 1 else xp = 0 end
|
||||
|
@ -237,9 +237,9 @@ function mesecon:update_autoconnect(pos, secondcall, replace_old)
|
|||
|
||||
|
||||
if string.find(nodename, "_off") ~= nil then
|
||||
minetest.env:set_node(pos, {name = "mesecons:wire_"..nodeid.."_off"})
|
||||
minetest.set_node(pos, {name = "mesecons:wire_"..nodeid.."_off"})
|
||||
else
|
||||
minetest.env:set_node(pos, {name = "mesecons:wire_"..nodeid.."_on" })
|
||||
minetest.set_node(pos, {name = "mesecons:wire_"..nodeid.."_on" })
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue