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

Add planters, allow plants to be grown on furniture #30225

Merged
merged 8 commits into from May 15, 2019

Conversation

@anothersimulacrum
Copy link
Contributor

commented May 4, 2019

Summary

SUMMARY: Content "Adds planters"

Purpose of change

Resolves #29972
The game was missing options to grow plants anywhere but on t_dirt

Describe the solution

Add two new fields plant_transform and plant_base to furniture
Add 5 new flags - GROWTH_ SEED, SEEDLING, MATURE, HARVEST, and PLANTABLE
Adjust iexamine::plant_seed, iexamine::aggie_plant, map::grow_plant, activity_handlers::harvest_plot_do_turn, activity_handlers::plant_plot_do_turn, iexamine::harvest_plant, and mattack::eat_crop to use the new fields and flags to do their functions
Add planter terrains

Amount of soil used in planter recipe based on calculations from this with dimensions of 3'x3'x18"

Describe alternatives you've considered

Leaving planting as only allowing terrain ( a simpler solution ), but that doesn't really address the issue

Additional context

I don't know C++, so I probably broke style rules and did things in a less than optimal manner
Thanks @curstwist for the planter furniture

@DracoGriffin
Copy link
Member

left a comment

I think the fact that you're willing to try and learn says a lot, and starting with a Draft PR was a smarter choice.

Make sure to add the definitions for these new JSON flags in /doc/JSON_FLAGS.md.

Did not review code --- will leave that to more experienced people.

Show resolved Hide resolved data/json/furniture.json Outdated
Show resolved Hide resolved data/json/furniture.json Outdated
Show resolved Hide resolved data/json/terrain.json Outdated

@anothersimulacrum anothersimulacrum marked this pull request as ready for review May 5, 2019

@anothersimulacrum anothersimulacrum force-pushed the anothersimulacrum:planters branch from 9cb81de to 15b2076 May 5, 2019

@anothersimulacrum

This comment has been minimized.

Copy link
Contributor Author

commented May 5, 2019

As far as I can tell, everything works now, so I think this is ready for review.

Show resolved Hide resolved src/monattack.cpp Outdated
Show resolved Hide resolved src/activity_handlers.cpp Outdated
Show resolved Hide resolved src/mapdata.h Outdated
Show resolved Hide resolved src/iexamine.cpp Outdated

anothersimulacrum added some commits May 3, 2019

Add planters
Add planter furniture for growing plants
Add support for planting on furniture
Make plants grow into the proper 'plant' furniture

Adjust planters from review
Make planters harvest properly
Remove testing planters

Remove unecessary variable
Update documentation
Adjust planter furnitures
Adjust from review
Try to fix things

fix merge conflict

squash me

@anothersimulacrum anothersimulacrum force-pushed the anothersimulacrum:planters branch 5 times, most recently from bda3412 to 4439a03 May 11, 2019

@ZhilkinSerg ZhilkinSerg self-assigned this May 12, 2019

@ZhilkinSerg ZhilkinSerg merged commit 9dbe860 into CleverRaven:master May 15, 2019

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
gorgon-ghprb Build finished.
Details

@ZhilkinSerg ZhilkinSerg removed their assignment May 15, 2019

@kevingranade

This comment has been minimized.

Copy link
Member

commented May 16, 2019

This pull request has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there:

https://discourse.cataclysmdda.org/t/what-are-some-things-that-should-be-in-the-cataclysm/18792/216

@anothersimulacrum anothersimulacrum deleted the anothersimulacrum:planters branch May 29, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.