mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
🐛 Additional items will not be saved into quickbar sync
This commit is contained in:
@@ -37,11 +37,28 @@ Commands.new_command('save-quickbar', 'Saves your Quickbar preset items to file'
|
||||
:add_alias('save-toolbar')
|
||||
:register(function(player)
|
||||
local filters = {}
|
||||
local ignoredItems = {
|
||||
"blueprint",
|
||||
"blueprint-book",
|
||||
"deconstruction-planner",
|
||||
"spidertron-remote",
|
||||
"upgrade-planner"
|
||||
}
|
||||
local function contains(list, x)
|
||||
for _, v in pairs(list) do
|
||||
if v == x then return true end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
for i = 1, 100 do
|
||||
local slot = player.get_quick_bar_slot(i)
|
||||
-- Need to filter out blueprint and blueprint books because the slot is a LuaItemPrototype and does not contain a way to export blueprint data
|
||||
if slot ~= nil and slot.name ~= "blueprint" and slot.name ~= "blueprint-book" then
|
||||
filters[i] = slot.name
|
||||
if slot ~= nil then
|
||||
local ignored = contains(ignoredItems, slot.name)
|
||||
if ignored == false then
|
||||
filters[i] = slot.name
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user