mirror of
https://gitea.your-land.de/whosit/cmd_eval.git
synced 2025-06-19 16:18:06 +02:00
actually use oir for oir
This commit is contained in:
parent
65e1e684d3
commit
7892615f3c
11
init.lua
11
init.lua
@ -164,16 +164,7 @@ oir(radius) -- return iterator for objects around you
|
||||
oir = function(radius)
|
||||
local me = core.get_player_by_name(player_name)
|
||||
if me then
|
||||
local objs = core.get_objects_inside_radius(me:get_pos(), radius)
|
||||
local nextkey, v
|
||||
--local i = 1
|
||||
return function()
|
||||
-- FIXME skip invalid objects here?
|
||||
nextkey, v = next(objs, nextkey)
|
||||
return v
|
||||
-- i = i + 1
|
||||
-- return objs[i]
|
||||
end
|
||||
return core.objects_inside_radius(me:get_pos(), radius)
|
||||
else
|
||||
return function() return nil end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user