-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor salvage_actor::cut_up (#58414)
* Refactor cut_up Move mat_set outside of the loop Invert if Remove useless braces * Move uniform distribution into own function * Refactor into lambdas Efficiency is calculated once and assigned to a const The recipe is found in a separate function, more clearly separating that functionality from what should be done if no recipe is found * Move find_recipe into own function * Commenting + renaming * Hide cut_up and unify try_to_cut and valid_to_cut * Remove cutter item from cut_up * Remove one const from function declaration * Rebalance fab skill, update comments Fab skill now has a more severe effect but is completely eliminated at lvl 5 * Unsalvageable or count_by_charges items unsalavgeable * Check uncraft before crafting recipes * Limit mass returned from cut up * Combine num, efficiency into num_adjusted * cut_up_comp handles eff, remove extra loop * Add chance to always salvage smth * Use items count_by_charges instead of discarding * Formatting * Check for salvageable before count_by_charges * Fix error and always round yields down * Fix usage of get_wielded_item
- Loading branch information
1 parent
64ff577
commit dcfd78b
Showing
8 changed files
with
176 additions
and
194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.