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

Allow pocket_mods to add magazine or magazine well pockets to items without them #69828

Merged
merged 4 commits into from
Nov 29, 2023

Conversation

mqrause
Copy link
Contributor

@mqrause mqrause commented Nov 28, 2023

Summary

Bugfixes "Allow pocket_mods to add magazine or magazine well pockets to items without them"

Purpose of change

#69725 throws a ton of errors because gunmods could only alter magazine wells, but not add them.

Describe the solution

  • gunmods and toolmods will now also add magazine or magazine well pockets if they didn't have one before.
  • adds a test to check pocket_mods functionality
  • fixes a small oversight from Move the pocket_type enum to it's own header #69794
  • pocket_data::operator== also compares various restrictions

Describe alternatives you've considered

Testing

The new test passes.

Additional context

@github-actions github-actions bot added [JSON] Changes (can be) made in JSON Code: Tests Measurement, self-control, statistics, balancing. [C++] Changes (can be) made in C++. Previously named `Code` Items: Containers Things that hold other things <Bugfix> This is a fix for a bug (or closes open issue) labels Nov 28, 2023
data/mods/TEST_DATA/pocket_mods_test.json Outdated Show resolved Hide resolved
data/mods/TEST_DATA/pocket_mods_test.json Outdated Show resolved Hide resolved
data/mods/TEST_DATA/pocket_mods_test.json Outdated Show resolved Hide resolved
data/mods/TEST_DATA/pocket_mods_test.json Outdated Show resolved Hide resolved
data/mods/TEST_DATA/pocket_mods_test.json Outdated Show resolved Hide resolved
@github-actions github-actions bot added the astyled astyled PR, label is assigned by github actions label Nov 28, 2023
@github-actions github-actions bot added the json-styled JSON lint passed, label assigned by github actions label Nov 28, 2023
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Nov 28, 2023
@Maleclypse Maleclypse merged commit f17201a into CleverRaven:master Nov 29, 2023
26 checks passed
@mqrause mqrause deleted the pocket_mod_fix branch November 29, 2023 05:38
@GuardianDll
Copy link
Member

btw, what will happen if item has one pocket, but one try to add another one? is there a way to specify "this one should overwrite pocket, and that one add another pocket"?
tho it sound complicated as you need to specify which pocket exactly should be overwritten, if item has multiple

@mqrause
Copy link
Contributor Author

mqrause commented Nov 29, 2023

Container pockets can only be added currently, magazine/magazine well pockets only overridden.
It'd be pretty messy to allow both adding and overriding the same pocket type, I imagine.

@GuardianDll
Copy link
Member

That is better than i expected, thanks

@mqrause
Copy link
Contributor Author

mqrause commented Nov 29, 2023

I guess I should have added documentation for this, too.

@GuardianDll
Copy link
Member

I'll doing it already

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` Code: Tests Measurement, self-control, statistics, balancing. Items: Containers Things that hold other things [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants