-
Notifications
You must be signed in to change notification settings - Fork 193
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
Exports legends into folders #152
Conversation
Solves: DFHack/dfhack#1416 If no folder name given, default is of simial patern to `region1-00125-01-01` `exportlegends all` will use default path `exportlegends all myfolder_name` will create and use the "myfolder_name" folder `exportlegends all .` will not put the files in a folder. (tested on linux) This works for all arguments. **TODO: Test this on windows systems**
Im loll in discord. I just replaced the lua file to your new one. \PeridexisErrant's Starter Pack 0.47.04-r03\Dwarf Fortress 0.47.04\hack\scripts\exportlegends.lua replaced to your new version. https://raw.githubusercontent.com/ralpha/scripts/e02cb4beb8b2fd52c4569a4063f9df879dd9b513/exportlegends.lua copied here. and I runed "exportlegends info" I think new folder appeared. But there is error message in DFhack command line. here is "https://pastebin.com/a80SijiG" Actually im not a coder but just let you know. OS : Windows 10 |
Your DFHack version is too old - identity_type was added after 0.47.04-beta1 was released. You could upgrade DFHack manually, or wait for a new pack to include a 0.47.04-r1 (which should be out soon). |
@neo6633 You could try with |
Got conformation from @neo6633 that it worked fine on Windows after updating DFHack. |
The changing of folders to save the files is now very local and only changes for a shot amount of time. This is makes the chance of something going wrong because of an error less likely to effect DFHack.
Updated the script to be more robust when changing folders. This is also ready to be merged. Tested it on:
|
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.
Noticed a couple things worth mentioning when I was going through PRs - not hugely important, and I can make the changes later if needed
I resolved the changes you asked for. |
Conflicts: exportlegends.lua
v2 uses the wrong commit sometimes (seen on #152 and #159 so far): actions/checkout#299
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 took care of the merge conflict, and then another issue causing tests to run on the wrong commit - apologies for the noise)
@lethosor Thanks for all the help with getting this into DFHack. (and all the other very nice work you are doing for DF Hack) |
This allows restoring the working directory to its original value, which may not actually be the DF root. See DFHack#1671, DFHack/scripts#152
Fixes DFHack/dfhack#1416
If no folder name given, default is of similar pattern to
region1-00125-01-01
exportlegends all
will use default pathexportlegends all myfolder_name
will create and use the"myfolder_name" folder
exportlegends all .
will not put the files in a folder. (tested onlinux)
This works for all arguments.
Tested on Linux and works fine.
TODO: Test this on windows systems. It should work but it should also be tested.