I'd be very happy to hear your ideas on how to structure the code better, make the creation of entities, items and such be handled by functions.
I've already done it for the items.lua and I'll upload the code either here or on github tommorow so you guys can look into it and help me figure out how to make it perfect^^
It's been about 7 or 8 years since I last coded in lua so I'm pretty out of loop XD