BLIND_EASY and BLIND_HARD flags work with no primary skill crafts #61179
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.
Summary
None
Purpose of change
Make crafting flags BLIND_EASY and BLIND_HARD work when no primary skill exists for the craft.
Fix #61178
Describe the solution
Checked whether a primary skill existed before applying BLIND_EASY and BLIND_HARD penalties to crafting. This causes BLIND_EASY crafting to be done without penalties in darkness, and BLIND_HARD crafting to take an arbitrarily selected twice as long when no primary skill exists.
Without this change BLIND_EASY would always be penalized for being two levels lacking of full speed, and BLIND_HARD being impossible for not being at least two levels above the required non existent level.
Describe alternatives you've considered
Write in some obscure documentation that when these flags are applied a primary skill always have to be present as well, and not be surprised that the documentation has been neither read nor followed.
Testing
Modified the two fire drill "recharging" recipes to be BLIND_EASY and BLIND_HARD respectively. Verified that the BLIND_EASY recipe took 4 minutes and the BLIND_HARD one 8 minutes in darkness at a 50% crafting rate.
Be confused by the reduced rate and checking them in daytime to see them at a 50% penalty there as well, and then check some arbitrary recent crafting, and see the 50% penalty was a base state of the character, not a result of the recipes themselves.
Additional context
#61177 could be changed to use the BLIND_HARD flag, but probably not before this PR has been merged, as setting this flag before that would not fix the inability to recharge the tools until this PR has been merged.