mirror of
https://github.com/D00Med/scifi_nodes.git
synced 2024-12-22 16:10:18 +01:00
fix deprecated minetest.env
calls
This commit is contained in:
parent
c5c587d01a
commit
89f825d4e6
@ -131,8 +131,8 @@ minetest.register_abm({
|
|||||||
nodenames = {"scifi_nodes:egg"},
|
nodenames = {"scifi_nodes:egg"},
|
||||||
interval = 30, chance = 10,
|
interval = 30, chance = 10,
|
||||||
action = function(pos, node, _, _)
|
action = function(pos, node, _, _)
|
||||||
minetest.env:add_entity(pos, "scifi_mobs:xenomorph")
|
minetest.add_entity(pos, "scifi_mobs:xenomorph")
|
||||||
minetest.env:remove_node(pos)
|
minetest.remove_node(pos)
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
@ -189,12 +189,12 @@ minetest.register_node("scifi_nodes:pad", {
|
|||||||
if minetest.get_node({x=ppos.x, y=ppos.y, z=ppos.z}).name == "scifi_nodes:pad" then
|
if minetest.get_node({x=ppos.x, y=ppos.y, z=ppos.z}).name == "scifi_nodes:pad" then
|
||||||
clicker:setpos(position2)
|
clicker:setpos(position2)
|
||||||
end
|
end
|
||||||
local objs = minetest.env:get_objects_inside_radius(pos, 3)
|
local objs = minetest.get_objects_inside_radius(pos, 3)
|
||||||
for _, obj in pairs(objs) do
|
for _, obj in pairs(objs) do
|
||||||
if obj:get_luaentity() and not obj:is_player() then
|
if obj:get_luaentity() and not obj:is_player() then
|
||||||
if obj:get_luaentity().name == "__builtin:item" then
|
if obj:get_luaentity().name == "__builtin:item" then
|
||||||
local item1 = obj:get_luaentity().itemstring
|
local item1 = obj:get_luaentity().itemstring
|
||||||
local obj2 = minetest.env:add_entity(position2, "__builtin:item")
|
local obj2 = minetest.add_entity(position2, "__builtin:item")
|
||||||
obj2:get_luaentity():set_item(item1)
|
obj2:get_luaentity():set_item(item1)
|
||||||
obj:remove()
|
obj:remove()
|
||||||
end
|
end
|
||||||
@ -223,12 +223,12 @@ minetest.register_node("scifi_nodes:pad", {
|
|||||||
if minetest.get_node({x=ppos.x, y=ppos.y, z=ppos.z}).name == "scifi_nodes:pad" then
|
if minetest.get_node({x=ppos.x, y=ppos.y, z=ppos.z}).name == "scifi_nodes:pad" then
|
||||||
clicker:setpos(position1)
|
clicker:setpos(position1)
|
||||||
end
|
end
|
||||||
local objs = minetest.env:get_objects_inside_radius(pos, 3)
|
local objs = minetest.get_objects_inside_radius(pos, 3)
|
||||||
for _, obj in pairs(objs) do
|
for _, obj in pairs(objs) do
|
||||||
if obj:get_luaentity() and not obj:is_player() then
|
if obj:get_luaentity() and not obj:is_player() then
|
||||||
if obj:get_luaentity().name == "__builtin:item" then
|
if obj:get_luaentity().name == "__builtin:item" then
|
||||||
local item1 = obj:get_luaentity().itemstring
|
local item1 = obj:get_luaentity().itemstring
|
||||||
local obj2 = minetest.env:add_entity(position1, "__builtin:item")
|
local obj2 = minetest.add_entity(position1, "__builtin:item")
|
||||||
obj2:get_luaentity():set_item(item1)
|
obj2:get_luaentity():set_item(item1)
|
||||||
obj:remove()
|
obj:remove()
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user