Open
Conversation
Contributor
Author
|
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New Feature:
Upon exporting a stockpile settings, a new popup window one step before "Please enter a filename" has been added.
It allows handling the quite neat
stockpiles export --includeoption that is in the code since I remember it, but absent from the current UI.Default view:

Full toggled view:

Comments/issues:
There is an unavailable gui/stockpiles piece of code that approximately tried to do what the new UI does.
I'm wondering if the UI elements of this script shouldn't be moved to and replace the old gui/stockpiles. Or implement a new structure?
Background note:
In my latest playthroughs I have observed issues where imported stockpile settings - with for example 64 max bins set on a 3x3 stockpile - would prevent the dwarves from ever starting to haul stuff to the stockpile. Only
stockpiles importis able to set more containers than there are available tiles in a given stockpile. The game prevents it.This is why I thought of this feature.
The real fix though could be added after the parsing of the .dfstock file, which could avoid setting more containers than there are available tiles in the selected stockpile.
It seems a pretty easy fix computing the value with the help of the vector
stockpile.room.extents, but this is C++ and I have zero clue.Disclaimer:
I'm not a professional programmer. Started learning basic coding 12 years ago in the hope of becoming a DFHack contributor someday (true story). Got sidetracked by life.
This is my first bigger lua piece of code, go ahead and be critical.
Until 2 weeks ago I was only Skill: Adequate Python (rusty).
Eager to learn along the way.
Thank you for your attention.