forked from mtcontrib/tsm_pyramids
Replace minetest.env with minetest
This commit is contained in:
@ -26,7 +26,7 @@ for i=1,3 do
|
||||
end
|
||||
|
||||
local trap_on_timer = function (pos, elapsed)
|
||||
local objs = minetest.env:get_objects_inside_radius(pos, 2)
|
||||
local objs = minetest.get_objects_inside_radius(pos, 2)
|
||||
for i, obj in pairs(objs) do
|
||||
if obj:is_player() then
|
||||
local n = minetest.get_node(pos)
|
||||
@ -49,7 +49,7 @@ minetest.register_node("tsm_pyramids:trap", {
|
||||
groups = {crumbly=3,cracky=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
on_construct = function(pos)
|
||||
minetest.env:get_node_timer(pos):start(0.1)
|
||||
minetest.get_node_timer(pos):start(0.1)
|
||||
end,
|
||||
_tsm_pyramids_crack = 1,
|
||||
on_timer = trap_on_timer,
|
||||
|
Reference in New Issue
Block a user