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

fix: Prevent silent solver failures. #259

Merged
merged 2 commits into from
Sep 4, 2024

Commits on Sep 4, 2024

  1. fix: Prevent silent solver failures

    Crafters with no energy source would halt the solver
    with silently-ignored exceptions.
    
    Turn them into user-visible errors, and let the solver
    do its best with the information it has.
    DaleStan authored and shpaass committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    78593bf View commit details
    Browse the repository at this point in the history
  2. refactor(ProductionTableView): rename recipe.entity.energy to energy

    The main idea of the commit is to change this:
    if ((recipe.entity.energy?.fuels.Length ?? 0) == 0)
    into this
    if (energy == null || energy.fuels.Length == 0)
    with the assumption that these two lines serve the identical purpose.
    If this assumption is wrong then this commit is wrong.
    
    The reason for this change is the desire to get rid of the "??" and
    make the understanding of the "if" easier.
    
    The rest of the changes are the application of the rename because
    why not.
    
    Also wrap a line, so it does not go beyond 120 character limit.
    shpaass committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    f320c78 View commit details
    Browse the repository at this point in the history