mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-11-21 09:59:44 +00:00
replace 'units' with 'blocks', 'items' for some reason
This commit is contained in:
parent
8268118735
commit
ecc4c1794e
4 changed files with 39 additions and 16 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue