replace 'units' with 'blocks', 'items' for some reason

This commit is contained in:
MihailRis 2026-11-03 22:01:43 +03:00
parent 8268118735
commit ecc4c1794e
4 changed files with 39 additions and 16 deletions

View file

@ -1,12 +1,19 @@
content_report = nil
function delete_content()
local units = {}
local blocks = {}
local items = {}
for i, entry in ipairs(content_report.content) do
table.insert(units, entry.name)
local type = entry.type
if type == "block" then
table.insert(blocks, entry.name)
elseif type == "item" then
table.insert(items, entry.name)
end
end
local request = {
units = units
blocks = blocks,
items = items
}
app.delete_world_content(content_report.world, request, true)
end