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

More accurate checking in layering conflicts #54897

Merged
merged 2 commits into from
Jan 30, 2022

Conversation

bombasticSlacks
Copy link
Contributor

@bombasticSlacks bombasticSlacks commented Jan 29, 2022

Summary

Bugfixes "More accurate checking in armor layering conflicts"

Purpose of change

fixes #54871

Describe the solution

The really low level layer conflict code was using a simple convenience function, originally used for if items should display a UI element, to test if it should do sublimb testing on the items in question or just assume they conflict. This was dumb and wrong of me.

Some test needs to be there since some limbs don't have sublocations.

So I removed the incorrect it.has_sublocations() test and instead just test if the bodypart has sublimbs a much simpler solution which is also correct.

Describe alternatives you've considered

Testing

Try the heavy load bearing vest and a duffel bag.

Heavy Ballistic Vest with an attached pouch and a shoulder strapped rifle is the test with just about the most edge case opportunity and it works.

Additional context

I need to spend some time at some point writing a bunch of test items and tests for this.

@github-actions github-actions bot added json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Jan 29, 2022
@Maleclypse Maleclypse added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Mechanics: Character / Player Character / Player mechanics labels Jan 30, 2022
@kevingranade kevingranade merged commit cd4b712 into CleverRaven:master Jan 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` json-styled JSON lint passed, label assigned by github actions Mechanics: Character / Player Character / Player mechanics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unspecified strapped items conflicting with "hanging off" items
3 participants