--Loads map config form a file local chests = file.Read("artery/maps/" .. game.GetMap() .. "/chests.txt") local npcs = file.Read("artery/maps/" .. game.GetMap() .. "/npcs.txt") if chests == nil then return end if npcs == nil then return end for _,line in pairs(string.Explode("\n",chests,false)) do local chest = util.JSONToTable(line) local chestent = ents.Create("art_chest") for k,v in pairs(chest.data) do chestent[k] = v end for k,v in pairs(chest.procedures) do chestent[k](unpack(v)) end chestent:Spawn() end