mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-30 06:21:05 +01:00
23 lines
731 B
Lua
23 lines
731 B
Lua
|
-- register extra flavours of a base nodedef
|
||
|
local timer = 0
|
||
|
minetest.register_globalstep(function(dtime)
|
||
|
timer = timer + dtime;
|
||
|
if timer >= 0.3 then
|
||
|
for _,player in pairs(minetest.get_connected_players()) do
|
||
|
local loc = vector.add(player:getpos(),{x=0,y=-1,z=0})
|
||
|
if loc ~= nil then
|
||
|
|
||
|
local nodeiamon = minetest.get_node(loc)
|
||
|
if nodeiamon ~= nil then
|
||
|
local def = minetest.registered_nodes[nodeiamon.name]
|
||
|
if def ~= nil and def.on_walk_over ~= nil then
|
||
|
def.on_walk_over(loc, nodeiamon, player)
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
|
||
|
timer = 0
|
||
|
end
|
||
|
end)
|