-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 harvesting #27278
Conversation
Can you add fertilizing? |
Fertilization is a tad more complicated, since I'll need to prompt the player for a fertilizer type. It's next on my list. |
Now you don't have to keep re-specifiying fertilizer type
Okay. Fertilization now works. If you only have one fertilizer type, it will use that. If you have more than one fertilizer type, you are prompted for which to use. If you run out of that type, it will ask you if you have more than one type remaining, otherwise it automatically picks. There are only two item types tagged "FERTILIZER" at the moment. (I did test the above logic by wishing for explicitly fertilizer-tagged objects, so I did confirm that it would prompt if there are two types remaining). If I'm going to bother to ask the user which one to use, it seems like I should maybe give the user the chance to not use up whichever one they didn't pick. Alternately, maybe it doesn't make sense to ask the user which one to use? There are also getting to be a fair number of helper functions. I'm not sure at what point it might make sense to break some of this off into its own file/namespace. |
This pull request has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there: https://discourse.cataclysmdda.org/t/hybrid-inventory-2018-12-26/15953/76 |
It looks like the mention on discourse was just thanking me for working on it (much appreciated!) but no specific feedback. Are there changes people would like to see before merging this? |
Summary
SUMMARY: Features "Adds Zone Activity to harvest plots"
Purpose of change
Addresses a farming QoL issue from #24826
Describe the solution
I refactored the harvesting code from
iexamine::aggie_plant
into its own function so it could also be called from a zone activity. The implementation for ACT_HARVEST_PLOT ended up sharing a lot of similarities with ACT_TILL_PLOT and ACT_PLANT_PLOT, so I extracted the common code into a driver function, including the pathing logic.