fix: don't un-XL clothes you're wearing if you're Huge #3979
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.
Purpose of change
This adds a bit of sanity-checking for a problem found out while testing the implementation of #3967
Describe the solution
In iuse_actor.cpp, updated
sew_advanced_actor::use
so that the if/else statements that check whether you can proceed with installing or removing aclothing_mod
also check whether the mod would result in the item becoming unwearable, and if so preventing you from doing so if you're also currently wearing the offending item.Also had to move the definition of
t_lower
a bit so that the destroy part of the if/else block can also use it.Describe alternatives you've considered
Adding support for resizing for smol characters too. I think I'd want to wait on that one and add it along with some more properties and fixes, like support for making a gunmod not need materials to apply, volume/weight multiplier, etc.
Testing
Additional context
Checklist