Revise durability messages again, showing before/after transitions #30183
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
SUMMARY: Interface "Revise durability messages again, showing before/after transitions"
Purpose of change
In the comments of #30167, when I last touched these messages, there was feedback suggesting the new format of the messages was not universally intuitive, and requested a 'before and after' version. On reflection I realized a variation to that effect should be more generally communicative to players what has changed and how.
Describe the solution
Shifted the majority of the messages from the format of the
You action your ?? thing!
toYou action your thing! ( ?? -> ??)
, with the exception of vehicle repairs, which simply append(was ??)
of the messages I added (since vehicle repairs cannot presently fail, only be interrupted).To further enable this, moved a lot of the prefix logic out of
item::tname()
into a new method,item::durability_indicator()
, which works whether the player has the Item Health Bars configuration setting enabled or not.Describe alternatives you've considered
Coulda left well enough alone? While I'm reasonably confident the last change I made was a benefit to more people than a detriment, I'd rather try to make it a genuine improvement for as many people as possible.
Additional context
Unsuccessful repair:
Successful repairs:
Without item health bars:
Vehicle: