Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: don't un-XL clothes you're wearing if you're Huge #3979

Merged
merged 1 commit into from
Dec 27, 2023

Conversation

chaosvolt
Copy link
Member

@chaosvolt chaosvolt commented Dec 26, 2023

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 a clothing_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

  1. Compiled and load-tested.
  2. Spawned in a tailor's kit and a bunch of rags.
  3. Applied and removed the resize mod to an item while a normal human bean, things went as normal.
  4. Enlarge-ified myself and modded my shirt to be XL, works as normal and can wear it.
  5. Try to revert the resize while wearing it, it won't let me.
  6. Wield the shirt, it now allows me to remove the resize mod.
  7. Checked affected file for astyle.

image

Additional context

Checklist

@github-actions github-actions bot added the src PR changes related to source code. label Dec 26, 2023
@chaosvolt
Copy link
Member Author

So I'm testing this and it seems super-smol characters currently no longer actually have gear restrictions for oversized gear, just encumbrance penalties, so resizing for smol characters seems to not be as vital as I thought it'd be.
image

Copy link
Member

@scarf005 scarf005 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Attempting to un-XLing worn clothes

image

Attempting to un-XLing not worn clothes

image

had save compatibility issue (#3988), but it's unrelated to the PR.
LGTM.

@scarf005 scarf005 merged commit a9c9b5f into cataclysmbnteam:main Dec 27, 2023
12 checks passed
@chaosvolt chaosvolt deleted the xl-resize-part-2 branch December 27, 2023 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
src PR changes related to source code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants