World Gen #3, Inventory #2

-- Added item interaction
-- Changed inventory management slightly
-- Added slide-show system to world, world can now "move" to show more space.
This commit is contained in:
Hannah-Dagemark 2023-10-16 08:44:17 +02:00
commit 3a3bea1ead
8 changed files with 164 additions and 22 deletions

View file

@ -1,8 +1,15 @@
function item.create(type, commands)
itemgen = {}
function itemgen.create(type, commands)
local object = {}
for i = 1, #commands do
object[commands]
i = i + 1
for i=1, #commands do
object[commands][i][1] = commands[i][2]
end
return object
end
function itemgen.createFromWorld(id)
item = {}
item.name = World.map.items[id][1]
return item
end