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

[WIP] [CR] forage test functions #27801

Closed
wants to merge 7 commits into from

Conversation

Projects
None yet
6 participants
@KorGgenT
Copy link
Contributor

commented Jan 23, 2019

Created new functions in forage_tests.cpp to aid testing.
moved some functions out of their parent functions to aid in testing.

Summary

SUMMARY: Build "created functions to aid in forage rate testing"

Purpose of change

The purpose of this is to have a saner approach to balancing foraging as a whole: underbrush and harvesting (fruits, berries, and nuts)

Describe the solution

I have created several functions that generate a forest map tile and simulated harvesting everything that's harvestable in the map tile, and counted up all the calories you would get from it. Nuts are a slight outlier, because they aren't directly edible, but they are easy enough to cook (and there's a small enough number of them) that i checked for those specific items.
NOTE: The calorie values here are based on #27542 but the test itself does not necessarily require that PR to be merged as of yet.

Additional context

The main reason this is WIP is that Kevin mentioned it needs to be optimized.
There are not any test cases as of now, as i felt the statistics required were a little bit beyond my ability.

forage test functions
Created new functions in forage_tests.cpp to aid testing.
moved some functions out of their parent functions to aid in testing.
@KITbutler

This comment has been minimized.

Copy link

commented Jan 23, 2019

Nuts are a slight outlier, because they aren't directly edible, but they are easy enough to cook

Shouldn't you multiply the stated values by 4? Or do they divide the calories by the portion size now?

KorGgenT added some commits Jan 23, 2019

Show resolved Hide resolved tests/map_helpers.cpp Outdated
Show resolved Hide resolved tests/forage_tests.cpp Outdated
Show resolved Hide resolved src/iexamine.cpp Outdated
Show resolved Hide resolved src/activity_handlers.cpp

KorGgenT added some commits Jan 23, 2019

@kevingranade

This comment has been minimized.

Copy link
Member

commented Feb 16, 2019

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

https://discourse.cataclysmdda.org/t/forest-food-over-abundance/17266/3

@ifreund ifreund removed the 0.D Freeze label Mar 8, 2019

@ZhilkinSerg

This comment has been minimized.

Copy link
Contributor

commented May 18, 2019

Marking as Stalled to clean up PR queue. Reopen when necessary.

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.