Files
jailsadventure2/data/objects.lua
2024-02-14 14:34:28 +01:00

39 lines
888 B
Lua

require "balloon"
objects={
list={},
collect=function(obj)
table.insert(objects.list, obj)
balloon.narrator(object[obj])
end,
leave=function(name)
for i,obj in ipairs(objects.list) do
if object[obj].name and object[obj].name==name then
table.remove(objects.list,i)
return
end
end
end,
search=function(name)
for i,obj in ipairs(objects.list) do
if object[obj].name and object[obj].name==name then
return object[obj]
end
end
end,
collected=function(obj)
for i,o in ipairs(objects.list) do
if o==obj then return true end
end
return false
end,
}
object={
diskito_knunk={name="DISQUITO DE KNUNK",x=0,y=0},
diskito_usufondo={name="DISQUITO DE USUFONDO",x=16,y=0}
}