local item = {} local item_base = { get_desc = function(self) return self.desc end, } local item_m = {__index = item_base} function item.create_new(name,desc,location) local ret = {name=name,desc=desc,location=location} setmetatable(ret,item_m) return ret end item.meta = item_m return item