Closed periodically-makes-puns closed 2 months ago
Thank you for your contribution! This looks great!
About the issues you listed:
u16::saturating_sub
to guarantee that the quality never goes over max quality. I wanted to avoid using quality = std::cmp::min(max_quality, quality)
I should have reverted this when implementing the quality overflow view. Right now, it works by using an ugly hack: for the simulation view, settings.max_quality
is set to u16::MAX
, the state is generated from the action list, then settings.max_quality
is set back to normal.You're welcome to change state.missing_quality
to state.quality
. Or, if you don\t want to do it., create another PR for the develop
branch and I will take it from there :)
Resolves #33.
Most of the file changes are due to the signature of
ActionMask::from_level
changing to accommodate Trained Eye.The
level
attribute inRecipe
is possibly redundant, since I think it can be computed fromrecipe_level
. I'm not sure whether this is actually true or not, so right now it just reads the level from the RecipeLevelTable.The two tests in
game_data/tests/test_get_game_settings.rs
cover the case where Trained Eye is not applicable due to being an expert craft, and the case where Trained Eye is applicable. The Ponzecake test should cover the case where Trained Eye is not applicable due to insufficient level difference.Issues:
10000 / 10000 (55535 overflow)
. This occurs whenever Trained Eye is used. I am unsure as to exactly why this happens.