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

Adds system for gunmod conflicts #69373

Merged
merged 5 commits into from
Nov 21, 2023

Conversation

tenmillimaster
Copy link
Member

@tenmillimaster tenmillimaster commented Nov 14, 2023

Summary

Features "Gunmod conflicts, with Bayonets Conflicts"

Purpose of change

It would be cool to be able to install a bayonet in addition to, say, a VFG. But it would not be cool to install an M203 with a bayonet, as they physically do not fit together, and in some other cases bayonets might obstruct the path of the barrel of other underslung projectile weapons.

It would also be nice to eliminate the need for the modified bayonets.

see #69221

Describe the solution

Adds a function for conflicts on gunmods to conflict with other installed gunmods.
Ironically The function I didn't find so useful, Gunmod conflicts with pre-existing slots, I found a use for when adding a rail bayonet mount. I didn't want to end up with 2 bayonet lugs on a gun, so I used the renamed blacklist_slot function to prevent this.
Renamed the Json entry for blacklist_mod to blacklist_slot for the gunmod conflicts with slots function, as I found this more descriptive.
Added bayonet lug slots to all appropriate guns and conversion kits.
Added a recipe for making a bayonet lug adapter.
Obsoleted all "modified" bayonet recipes and items. We can control where bayonets go with the bayonet lug location now, instead.

Describe alternatives you've considered

Doing nothing?

Testing

Attempting to install a bayonet on an AR with an m203 attached:
image

Attempting to install an M203 on an AR with a bayonet attached:
image

MP5 with a bayonet lug rail adapter, and a bayonet.
image

Attempting to install a rail bayonet lug on a gun that already has such a lug:
image

Attempting to install a suppressor on a gun that has a bayonet installed:
image

Attempting to install a bayonet on a gun that has a suppressor attached:
image

Checked that the migrations are happening correctly with the modified sword, USMC, NG, and Army bayonets.

Additional context

This is a redo of #69335

I'm aware that these exist and have no intention of adding support for them. https://www.thefirearmblog.com/blog/wp-content/uploads/2017/11/538954_10150992389200628_585168848_n.jpg

@github-actions github-actions bot added <Documentation> Design documents, internal info, guides and help. [JSON] Changes (can be) made in JSON [C++] Changes (can be) made in C++. Previously named `Code` [Markdown] Markdown issues and PRs <Enhancement / Feature> New features, or enhancements on existing labels Nov 14, 2023
data/json/items/gunmod/underbarrel.json Outdated Show resolved Hide resolved
data/json/items/gunmod/underbarrel.json Outdated Show resolved Hide resolved
data/json/items/gunmod/underbarrel.json Outdated Show resolved Hide resolved
data/json/items/gunmod/underbarrel.json Outdated Show resolved Hide resolved
data/json/items/gunmod/underbarrel.json Outdated Show resolved Hide resolved
data/json/items/melee/swords_and_blades.json Outdated Show resolved Hide resolved
src/item.cpp Outdated Show resolved Hide resolved
src/item.cpp Outdated Show resolved Hide resolved
src/item.cpp Outdated Show resolved Hide resolved
src/itype.h Outdated Show resolved Hide resolved
@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 Nov 14, 2023
Co-Authored-By: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@github-actions github-actions bot removed json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Nov 16, 2023
@github-actions github-actions bot added json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Nov 16, 2023
Co-authored-by: Vaskritaya <metroidfan121@gmail.com>
Copy link
Contributor

Spell checker encountered unrecognized words in the in-game text added in this pull request. See below for details.

Click to expand
  • A one-piece mount for attaching a bayonet to a firearm's accessory rail, in case that was a thing you wanted. Ideal for making newer guns pointier.

This alert is automatically generated. You can simply disregard if this is inaccurate, or (optionally) you can also add the new words to tools/spell_checker/dictionary.txt so they will not trigger an alert next time.

@tenmillimaster tenmillimaster changed the title Bayonets conflict with some other gunmods Adds system for gunmod conflicts Nov 19, 2023
@Maleclypse Maleclypse merged commit 3849726 into CleverRaven:master Nov 21, 2023
@tenmillimaster tenmillimaster deleted the bayonet_lugs branch November 21, 2023 05:44
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 [C++] Changes (can be) made in C++. Previously named `Code` <Documentation> Design documents, internal info, guides and help. <Enhancement / Feature> New features, or enhancements on existing [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions [Markdown] Markdown issues and PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants