diff --git a/data/objects.lua b/data/objects.lua new file mode 100644 index 0000000..f090bd5 --- /dev/null +++ b/data/objects.lua @@ -0,0 +1,24 @@ +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 +} \ No newline at end of file