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
Zone activity - farm plot planting #25181
Conversation
|
I'm still planning to separate >Watering, weeding and fertilizing into new functions, so you will be able to use your tumba-jumba zone magic and apply them over every tile. I suppose it will be faster to commit such changes into your branch rather then opening new PR. |
I think if you'l make tiny PR only with refactoring of a function into two, @ZhilkinSerg can review and merge something like this quite fast? |
src/iexamine.cpp
Outdated
|
|
||
| // if true, it works fine for normal planting, but closes immediately if called | ||
| // from parent uimenu when adding new planting zone | ||
| smenu.return_invalid = false; |
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.
What comment says.
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 guess it is because there's a timeout set in the input manager (for blinking), so when the timeout is triggered in the submenu, it thinks it is an unbound key, and returns because return_invalid is true.
I'll let uimenu handle it properly in my PR. For now you may want to temporarily disable the timeout before calling up the submenu.
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.
Your guess was correct. That was indeed a problem.
Thank you very much for helping me out.
(I see you are going to handle it on the uimenu side, cool.)
|
#25204 is merged |
|
Thank you guys. On the weeding I go... it will be in separate PR though, this one is big enough as it is. |
much easier to add more than one extra option to zones this way
when zone manager is open, zones which support marking show selected mark in its tiles
break the code into multiple functions to allow calling the same code from outside
while I prefer distinct naming convention for interfaces, it looked incredibly odd with naming conventions in this project
gorgon fix CleverRaven#2 gorgon fix
to prevent possible infinite loop
|
Given that PR #24291 was rolled back, I updated this PR to work with the old planting system. |
src/iexamine.cpp
Outdated
| g->m.add_item_or_charges( examp, used_seed.front() ); | ||
| g->m.set( examp, t_dirt, f_plant_seed ); | ||
| p.moves -= 500; | ||
| add_msg( _( "Planted %s" ), item::nname( seed_id ).c_str() ); |
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.
Should probably add period after Planted %s
|
No feedback for player (in message log or popup) when |
New commits changes
|
damn you, astyling in Visual Studio

Summary
SUMMARY: Features "adds new option for Farm: Plot zone to attach specific seed and new activity to plant in nearby plot zones"Purpose of change
As outlined in #24826 , this PR aims at reducing tedium of farming. Follow up of #25125 . Planting activity for Farm: Plot zone. Watering, weeding and fertilizing will follow in separate PRs.
Describe the solution
Update
Watering, weeding and fertilizing will follow if / when the improved crop farming is implemented again.