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

Forward grip for KSG and other shotguns with pump-rail #23725

Merged
merged 7 commits into from
Jun 9, 2018
Merged

Forward grip for KSG and other shotguns with pump-rail #23725

merged 7 commits into from
Jun 9, 2018

Conversation

Night-Pryanik
Copy link
Contributor

Hopefully this PR solves issues mentioned by @kevingranade in #22150.

@Night-Pryanik Night-Pryanik added <Enhancement / Feature> New features, or enhancements on existing [JSON] Changes (can be) made in JSON Items: Gunmod / Toolmod Weapon and tool attachments, and add-ons labels May 13, 2018
@kevingranade
Copy link
Member

Special casing it for the ksg isn't an option.
A new slot type would work, like "grip-only-rail".

@Night-Pryanik
Copy link
Contributor Author

How about adding new flag to KSG and the same guns like PUMP_ACTION_RAIL and special-case flag instead of a gun in question? Or new slot type is better?

@kevingranade
Copy link
Member

A new slot type is cleaner code wise, but requires things like rail mounted flashlights to be adjusted as well.

@Night-Pryanik
Copy link
Contributor Author

We don't have rail-mounted flashlights, or did you mean rail-mounted laser sight?

@Wishbringer
Copy link
Contributor

Wishbringer commented May 15, 2018

Both laser and flashlight mods generally use the same type of rail, which is why they often come in combos to save rail slots.

@Night-Pryanik
Copy link
Contributor Author

New slot type requires creating duplicates of forward grip and laser sight (and maybe some other compatible mods) that have the same characteristics as the originals, but can be mounted only on this new slot, right? At the moment a mod can't be installed on several slots, right? Also, it seems that now we could install, say, aux flamethrower, on other pump-action shotguns like Mossberg 500.

I feel that variant with adding new flag to pump-action shotguns and special-casing it would work better.

@Night-Pryanik Night-Pryanik changed the title Forward grip for KSG Forward grip for KSG and other shotguns with pump-rail May 17, 2018
@mlangsdorf
Copy link
Contributor

special casing this to only support grips seems very weird to me. You can mount a rail laser spot on a KSG's pump rail.

Wouldn't it make more sense to flag mods that can be mounted on the pump rail with a new flag in the JSON, and then check against that flag instead of grip? Something like

+    } else if( has_flag( "PUMP_ACTION" ) && mod.type->gunmod->location.str() == "underbarrel" && !mod.has_flag( "PUMP_ACTION" ) ) {
+        return ret_val<bool>::make_failure( _("can only accept small mods on that slot") );

grips and rail laser sights would get the PUMP_ACTION flag, but underbarrel crossbows and grenade launchers wouldn't.

@Night-Pryanik
Copy link
Contributor Author

You can mount a rail laser spot on a KSG's pump rail.

You can, yes (and many other underbarrel mods too), but wouldn't it stand in a way of pumping its action?

@mlangsdorf
Copy link
Contributor

No, the forearm grip rail is about 6" long, so a 2" laser spot still leaves you about 4" of space to hold the pump. See http://blog.cheaperthandirt.com/wp-content/uploads/2011/11/KSG_ammo_4401web.jpg

@Night-Pryanik
Copy link
Contributor Author

Night-Pryanik commented May 29, 2018

Ok, now only mods with PUMP_RAIL_COMPATIBLE, such as forward grip and laser sight, flag can be installed on underbarrel slot of guns with rails on their pump action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Enhancement / Feature> New features, or enhancements on existing Items: Gunmod / Toolmod Weapon and tool attachments, and add-ons [JSON] Changes (can be) made in JSON
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants