Say I have the following:
Code: Select all
for i=1,20 do
local Item = table.deepcopy(data.raw.item["iron-chest"])
Item .name="bio-"..Item .name.."-"..i
data:extend({Item})
end
global.Created_Items = {
"bio-iron-chest-1",
"bio-iron-chest-2",
"bio-iron-chest-3",
"bio-iron-chest-4",
---
"bio-iron-chest-20
}
How would I populate the table dynamically with the item names created?
Thanks,.