Skip to content
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

getplants fixes #2731

Merged
merged 5 commits into from
Jan 29, 2023
Merged

getplants fixes #2731

merged 5 commits into from
Jan 29, 2023

Conversation

gearsix
Copy link

@gearsix gearsix commented Jan 27, 2023

Hey, just some small first-timer fixing issues I found for the getplants plugin.

Fixes #1805
ID parameters are now added to plantNames with a toUppercase call, so case doesn't matter for input.

Fixes #2043
The designate call was returning false for all trees because the ripe check was failing.
My guess is that the trees either have a different lifetime or aren't ripe but it doesn't matter because they can still be chopped. I'm wasn't sure what the best way to fix this one was, so I added an istree check for the tile and now the check passes if istree || isripe.

I did some brief testing and it seems good.

gearsix added 2 commits January 27, 2023 14:44
Now `toUpper` is called on user input when it's added to `plantNames`
to ensure it matches the ID fields which are all in upper-case.
The `ripe` call was returning false on tree tiles, resulting in an
inability to designate trees for chopping with `getplants`.
This change adds a check to see if the tile is a tree or not and
if it is, then the ripe check is ignored.
Copy link
Member

@myk002 myk002 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good! Thank you for this! Are there any updates that need to be made to the documentation in docs/plugins/getplants.rst?

Also, could you add these fixes/improvements to docs/changelog.txt?

@gearsix
Copy link
Author

gearsix commented Jan 28, 2023

looks good! Thank you for this! Are there any updates that need to be made to the documentation in docs/plugins/getplants.rst?

I don't believe so, no big changes have been made to it's behaviour.

Also, could you add these fixes/improvements to docs/changelog.txt?

Updated the changelog & merged develop :)

docs/changelog.txt Outdated Show resolved Hide resolved
docs/changelog.txt Outdated Show resolved Hide resolved
@myk002 myk002 merged commit 4e1fc1c into DFHack:develop Jan 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

getplants will not designate trees Make getplants plugin case-insensitive
2 participants