Adds extra QoL features to maintain weapon menu + fixes 2 bugs there. #409
+1,224
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Tested for v0.9.3.1
This PR directly overwrites
zzzz_arti_jamming_repairs.script
since monkey patching seemed to hurt readibility/maintability.+ I saw this approach made by others. I have no intention to rip off anyones work.
I can also make a monkey patch version if that's preferred.
I think this would make a nice QoL addon in one of the upcoming versions of G.A.M.M.A
The only file not created from scratch was
zzzz_arti_jamming_repairs.script
+ the
serious_utils_ui_modified.script
this is a modified version used (probably not needed honestly because I could've just initializedutils_ui.UICellProperties
, right?)My starting point was to copy
Momopate's Barrel Condition Effects Display
and start editing that (since that is the last mod that directly overwrites thezzzz_arti_jamming_repairs.script
)True diffs between the file I copied and the changes I made in
zzzz_arti_jamming_repairs.script
I used WinMerge to check the actual diffs.
Line 17
Line 652
Line 667 - 668
Line 683
function maintain_all_parts
didn't exist beforefunction init_maintenance_menu
basically completely reworkedfunction part_name_to_human_form
didn't exist beforefunction remove_name
ModifiedIn order for this mod to work
SaloEater's Replace Shows Parts Health
needs to be turned off.Otherwise the game crashes as soon as maintain parts are opened (this is because the monkey patch I guess overrides priority)
In the PR I didn't delete the mod since IMO his name is rightfully there in the modlist as a contributor.
The following was grabbed straight from the addon's GitHub page. An even more detailed description can be found there, but for the context of the PR I think this is enough.
Detailed description
Fixes
New Features
(This is already present in G.A.M.M.A v0.9.3.1 courtesy of - SaloEater)
This process also follows a worst-to-best condition priority.
All of the above will go from lowest charge kit in stack -> highest charge.
Also it will go from lowest condition part -> highest condition part.
Configurability
Clean all minimum condition (default: 80%): Determines the minimum part condition threshold (%) for batch cleaning weapon parts.
So if this option is set to 80% "Clean all" will only clean parts that are equal to or lower than this threshold.
Replace all minimum condition (default: 59%): Determines the minimum part condition threshold (%) for batch replacing weapon parts.
So if this option is set to 80% "Repair all" will only clean parts that are equal to or lower than this threshold.
Disable the "maintain all" option (default: OFF): If you never want to use "maintain all" or if you're an avid misclicker then this one is for you! Removes the "maintain all" option from the "maintain parts" context menu.
Allow "maintain all" to use repair kits for cleaning (default: OFF): Maintain all consists of 3 steps: Clean all, Repair all and Repair uncleaned (When clean kits run out, but there are still parts left to clean)
Allows the "Repair uncleaned" step to consume charges of the repair kit to "replace parts".
The part condition would still have to be below or equal to the "Clean all minimum condition" option.
Part replacing should prioritize barrel (default: ON): The barrel will always be the first part to be replaced when batch replacing (if it is below or equal to the condition threshold configured).
"Maintain all" will take this into consideration too!
De-clutter menu (default: OFF): Removes the "<= x %" part from the "clean all" and "replace all" menu options.