Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upZone activity - farm plot harvesting #27278
Conversation
prutschman
added some commits
Dec 21, 2018
This comment has been minimized.
This comment has been minimized.
|
Can you add fertilizing? |
This comment has been minimized.
This comment has been minimized.
|
Fertilization is a tad more complicated, since I'll need to prompt the player for a fertilizer type. It's next on my list. |
prutschman
added some commits
Dec 24, 2018
This comment has been minimized.
This comment has been minimized.
|
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. |
prutschman
referenced this pull request
Dec 26, 2018
Open
Farming plot zone - QoL improvement features #24826
This comment has been minimized.
This comment has been minimized.
|
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 |
This comment has been minimized.
This comment has been minimized.
|
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? |
prutschman commentedDec 23, 2018
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_plantinto 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.