-
Notifications
You must be signed in to change notification settings - Fork 432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[gearswap] Update export.lua #2346
base: dev
Are you sure you want to change the base?
Conversation
addons/GearSwap/export.lua
Outdated
function export_set(options) | ||
local item_list = T{} | ||
local targinv,all_items,minify,all_sets,use_job_in_filename,use_subjob_in_filename,overwrite_existing,named_file | ||
local targinv,all_items,wearable,all_sets,noaugments,onlyaugmented,minify,clipboard | ||
local use_job_in_filename,use_subjob_in_filename,overwrite_existing,named_file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is not your doing, but I would put these all on separate lines and initialize them with default values (false
for most of them).
addons/GearSwap/export.lua
Outdated
function export_set(options) | ||
local item_list = T{} | ||
local targinv,all_items,minify,all_sets,use_job_in_filename,use_subjob_in_filename,overwrite_existing,named_file | ||
local targinv,all_items,wearable,all_sets,noaugments,onlyaugmented,minify,clipboard | ||
local use_job_in_filename,use_subjob_in_filename,overwrite_existing,named_file | ||
if #options > 0 then | ||
for _,v in ipairs(options) do | ||
if S{'inventory','inv','i'}:contains(v:lower()) then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
v
is lowercased all the time. Define it once at the top and use that:
local option = v:lower()
Still working on this, hopefully I can submit the new code soonTM. |
Removed some code duplication and reordered some other code. Added a new `copy`/`clipboard` flag, which makes GS export the table to clipboard instead of to a file. INPUT NEEDED: I also added two new flags, `noaugments` and `onlyaugmented` which respectively do: - `noaugments`/`noaugs` exports the set without recording the augments on each item (useful if you mostly have single-path items so you don't get a spam of `Path: A` and such; or if you already have augmented items saved) - `onlyaugmented`/`onlyaugs` *only* exports items that have augments and ignores entirely non-augmented items (useful if you need to make variables for your augmented gear, or in combination with the `wearable` flag to export all augmented items that your current job can equip, to make a new gearswap file, etc) The issue I have is that I would like gearswap to print out a notice when provided one of these flags, but I can't come up with good ones myself 😄 input appreciated
Removed stray `log()` Tweaked argument parsing. Finalized displayed message.
Fixed markdown Added the newer options for the `export` command.
830737c
to
a4d05d0
Compare
Removed some code duplication and reordered some other code.
Added a new
copy
/clipboard
flag, which makes GS export the table to clipboard instead of to a file.INPUT NEEDED:
I also added two new flags,
noaugments
andonlyaugmented
which respectively do:noaugments
/noaugs
exports the set without recording the augments on each item. Useful if you mostly have single-path items so you don't get a spam ofaugments={'Path: A'}
and such; or if you already have augmented items saved.onlyaugmented
/onlyaugs
only exports items that have augments and ignores entirely non-augmented items. Useful if you need to make variables for your augmented gear, or in combination with thewearable
flag to export all augmented items that your current job can equip, to make a new gearswap file, etc.The issue I have is that I would like gearswap to print out a notice when provided one of these flags, but I can't come up with good ones myself 😄 input appreciated