Skip to content

Commit

Permalink
Miniscule optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
WorkingRobot committed Jul 29, 2024
1 parent ca4bd6d commit 05560c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Solver/Simulator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ private bool ShouldUseAction(ActionType action, BaseAction baseAction)
if (wouldFinish)
{
// don't allow finishing the craft if there is significant quality remaining
if (Quality < Input.Recipe.MaxQuality / 5)
if (Quality * 5 < Input.Recipe.MaxQuality)
return false;
}
else
Expand Down Expand Up @@ -166,7 +166,7 @@ private bool ShouldUseAction(ActionType action, BaseAction baseAction)
return false;

if (action is ActionType.QuickInnovation &&
Quality <= Input.Recipe.MaxQuality / 3)
Quality * 3 <= Input.Recipe.MaxQuality)
return false;

return baseAction.CouldUse(this);
Expand Down

0 comments on commit 05560c9

Please sign in to comment.