Files
jailsadventure2/data/objects.lua

24 lines
507 B
Lua

objects={
list={},
collect=function(obj)
table.insert(objects.list, obj)
end,
search=function(name)
for i,obj in ipairs(objects.list) do
if obj.name and obj.name==name then
table.remove(objects.list,i)
return
end
end
end,
leave=function(name)
for i,obj in ipairs(objects.list) do
if obj.name and obj.name==name then
return obj
end
end
end
}