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

Zone activity - farm plot harvesting #27278

Merged
merged 11 commits into from
Jan 5, 2019

Conversation

prutschman
Copy link
Contributor

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.

@mlangsdorf
Copy link
Contributor

Can you add fertilizing?

@mlangsdorf mlangsdorf added <Enhancement / Feature> New features, or enhancements on existing [C++] Changes (can be) made in C++. Previously named `Code` Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style labels Dec 23, 2018
@prutschman
Copy link
Contributor Author

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
Copy link
Contributor Author

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.

@kevingranade
Copy link
Member

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

@prutschman
Copy link
Contributor Author

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?

@kevingranade kevingranade merged commit c1b26b1 into CleverRaven:master Jan 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style <Enhancement / Feature> New features, or enhancements on existing Fields / Furniture / Terrain / Traps Objects that are part of the map or its features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants