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
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion data/json/items/gun/223.json
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,15 @@
"min_cycle_recoil": 1350,
"default_mods": [ "retool_ar15_223rem" ],
"modes": [ [ "DEFAULT", "semi-auto", 1 ], [ "AUTO", "auto", 4 ] ],
"valid_mod_locations": [ [ "bore", 1 ], [ "grip", 1 ], [ "mechanism", 4 ], [ "sling", 1 ], [ "stock accessory", 2 ], [ "stock", 1 ] ],
"valid_mod_locations": [
[ "bore", 1 ],
[ "bayonet lug", 1 ],
[ "grip", 1 ],
[ "mechanism", 4 ],
[ "sling", 1 ],
[ "stock accessory", 2 ],
[ "stock", 1 ]
],
"flags": [ "NO_TURRET" ],
"//3": "This should be removed once vehicle turrets are capable of mounting guns with mods attached. As it stands, trying to mount this style of weapon would require the player to remove the conversion kit, thus rendering it unusable anyhow.",
"pocket_data": [
Expand Down
2 changes: 2 additions & 0 deletions data/json/items/gun/3006.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"reload": 150,
"valid_mod_locations": [
[ "barrel", 1 ],
[ "bayonet lug", 1 ],
[ "brass catcher", 1 ],
[ "grip mount", 1 ],
[ "mechanism", 4 ],
Expand Down Expand Up @@ -106,6 +107,7 @@
"valid_mod_locations": [
[ "barrel", 1 ],
[ "bore", 1 ],
[ "bayonet lug", 1 ],
[ "brass catcher", 1 ],
[ "mechanism", 4 ],
[ "muzzle", 1 ],
Expand Down
1 change: 1 addition & 0 deletions data/json/items/gun/300BLK.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
"valid_mod_locations": [
[ "barrel", 1 ],
[ "bore", 1 ],
[ "bayonet lug", 1 ],
[ "brass catcher", 1 ],
[ "grip", 1 ],
[ "mechanism", 4 ],
Expand Down
2 changes: 2 additions & 0 deletions data/json/items/gun/303.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"flags": [ "EASY_CLEAN" ],
"valid_mod_locations": [
[ "barrel", 1 ],
[ "bayonet lug", 1 ],
[ "bore", 1 ],
[ "brass catcher", 1 ],
[ "mechanism", 4 ],
Expand Down Expand Up @@ -78,6 +79,7 @@
"valid_mod_locations": [
[ "barrel", 1 ],
[ "bore", 1 ],
[ "bayonet lug", 1 ],
[ "brass catcher", 1 ],
[ "mechanism", 4 ],
[ "muzzle", 1 ],
Expand Down
1 change: 1 addition & 0 deletions data/json/items/gun/30carbine.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"valid_mod_locations": [
[ "barrel", 1 ],
[ "bore", 1 ],
[ "bayonet lug", 1 ],
[ "brass catcher", 1 ],
[ "mechanism", 4 ],
[ "muzzle", 1 ],
Expand Down
2 changes: 2 additions & 0 deletions data/json/items/gun/545x39.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"valid_mod_locations": [
[ "barrel", 1 ],
[ "bore", 1 ],
[ "bayonet lug", 1 ],
[ "brass catcher", 1 ],
[ "grip", 1 ],
[ "mechanism", 4 ],
Expand Down Expand Up @@ -65,6 +66,7 @@
"valid_mod_locations": [
[ "barrel", 1 ],
[ "bore", 1 ],
[ "bayonet lug", 1 ],
[ "brass catcher", 1 ],
[ "grip", 1 ],
[ "mechanism", 4 ],
Expand Down
5 changes: 5 additions & 0 deletions data/json/items/gun/762.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"valid_mod_locations": [
[ "barrel", 1 ],
[ "bore", 1 ],
[ "bayonet lug", 1 ],
[ "brass catcher", 1 ],
[ "grip", 1 ],
[ "mechanism", 4 ],
Expand Down Expand Up @@ -62,6 +63,7 @@
"valid_mod_locations": [
[ "barrel", 1 ],
[ "bore", 1 ],
[ "bayonet lug", 1 ],
[ "brass catcher", 1 ],
[ "grip", 1 ],
[ "mechanism", 4 ],
Expand Down Expand Up @@ -148,6 +150,7 @@
"valid_mod_locations": [
[ "barrel", 1 ],
[ "bore", 1 ],
[ "bayonet lug", 1 ],
[ "brass catcher", 1 ],
[ "grip", 1 ],
[ "mechanism", 4 ],
Expand Down Expand Up @@ -269,6 +272,7 @@
"valid_mod_locations": [
[ "barrel", 1 ],
[ "bore", 1 ],
[ "bayonet lug", 1 ],
[ "brass catcher", 1 ],
[ "grip", 1 ],
[ "mechanism", 4 ],
Expand Down Expand Up @@ -339,6 +343,7 @@
"valid_mod_locations": [
[ "barrel", 1 ],
[ "bore", 1 ],
[ "bayonet lug", 1 ],
[ "brass catcher", 1 ],
[ "grip", 1 ],
[ "mechanism", 4 ],
Expand Down
3 changes: 3 additions & 0 deletions data/json/items/gun/762R.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"built_in_mods": [ "inter_bayonet" ],
"valid_mod_locations": [
[ "barrel", 1 ],
[ "bayonet lug", 1 ],
[ "brass catcher", 1 ],
[ "grip mount", 1 ],
[ "mechanism", 4 ],
Expand Down Expand Up @@ -92,6 +93,7 @@
"barrel_volume": "1000 ml",
"valid_mod_locations": [
[ "barrel", 1 ],
[ "bayonet lug", 1 ],
[ "brass catcher", 1 ],
[ "grip mount", 1 ],
[ "mechanism", 4 ],
Expand Down Expand Up @@ -132,6 +134,7 @@
"valid_mod_locations": [
[ "barrel", 1 ],
[ "bore", 1 ],
[ "bayonet lug", 1 ],
[ "brass catcher", 1 ],
[ "grip", 1 ],
[ "mechanism", 4 ],
Expand Down
1 change: 1 addition & 0 deletions data/json/items/gun/9mm.json
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,7 @@
"valid_mod_locations": [
[ "barrel", 1 ],
[ "bore", 1 ],
[ "bayonet lug", 1 ],
[ "brass catcher", 1 ],
[ "grip", 1 ],
[ "mechanism", 4 ],
Expand Down
15 changes: 15 additions & 0 deletions data/json/items/gun/exodii.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,21 @@
"dispersion": 190,
"durability": 9,
"modes": [ [ "DEFAULT", "burst", 2 ], [ "SEMI", "semi-auto", 1 ], [ "AUTO", "auto", 5 ] ],
"valid_mod_locations": [
[ "barrel", 1 ],
[ "bore", 1 ],
[ "bayonet lug", 1 ],
[ "brass catcher", 1 ],
[ "grip", 1 ],
[ "mechanism", 4 ],
[ "muzzle", 1 ],
[ "rail", 1 ],
[ "sights", 1 ],
[ "sling", 1 ],
[ "stock", 1 ],
[ "stock accessory", 2 ],
[ "underbarrel", 1 ]
],
"barrel_volume": "1200 ml",
"faults": [ "fault_gun_dirt", "fault_gun_chamber_spent" ],
"pocket_data": [ { "pocket_type": "MAGAZINE_WELL", "item_restriction": [ "exodiiBRmag" ] } ],
Expand Down
2 changes: 2 additions & 0 deletions data/json/items/gun/flintlock.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"description": "This short rifle design once dominated the battlefields of ancient Europe, and may yet re-earn its feared status due to its ease of handling and ability to use easily-crafted ammunition.",
"valid_mod_locations": [
[ "sling", 1 ],
[ "bayonet lug", 1 ],
[ "grip mount", 1 ],
[ "rail mount", 1 ],
[ "sights mount", 1 ],
Expand Down Expand Up @@ -95,6 +96,7 @@
"reload": 3000,
"valid_mod_locations": [
[ "sling", 1 ],
[ "bayonet lug", 1 ],
[ "underbarrel", 1 ],
[ "grip mount", 1 ],
[ "rail mount", 1 ],
Expand Down
17 changes: 17 additions & 0 deletions data/json/items/gun/shot.json
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,22 @@
"price_postapoc": 2400,
"barrel_volume": "0 ml",
"clip_size": 9,
"valid_mod_locations": [
[ "barrel", 1 ],
[ "bore", 1 ],
[ "bayonet lug", 1 ],
[ "brass catcher", 1 ],
[ "grip mount", 1 ],
[ "mechanism", 4 ],
[ "muzzle", 1 ],
[ "loading port", 1 ],
[ "rail mount", 1 ],
[ "sights mount", 1 ],
[ "sling", 1 ],
[ "stock mount", 1 ],
[ "stock accessory", 2 ],
[ "underbarrel mount", 1 ]
],
"pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "shot": 9 } } ]
},
{
Expand Down Expand Up @@ -765,6 +781,7 @@
"clip_size": 6,
"valid_mod_locations": [
[ "stock mount", 1 ],
[ "bayonet lug", 1 ],
[ "mechanism", 2 ],
[ "barrel", 1 ],
[ "muzzle", 1 ],
Expand Down
22 changes: 13 additions & 9 deletions data/json/items/gunmod/conversions.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"install_time": "5 m",
"ammo_modifier": [ "223" ],
"min_skills": [ [ "weapon", 2 ] ],
"add_mod": [ [ "brass catcher", 1 ], [ "rail", 2 ], [ "sights", 1 ], [ "underbarrel", 1 ], [ "muzzle", 1 ] ]
"add_mod": [ [ "brass catcher", 1 ], [ "bayonet lug", 1 ], [ "rail", 2 ], [ "sights", 1 ], [ "underbarrel", 1 ], [ "muzzle", 1 ] ]
},
{
"id": "retool_ar15_223rem_medium",
Expand Down Expand Up @@ -84,7 +84,8 @@
"integral_weight": "1819 g",
"integral_longest_side": "262 mm",
"barrel_length": "262 mm",
"price": 26999
"price": 26999,
"add_mod": [ [ "brass catcher", 1 ], [ "rail", 2 ], [ "sights", 1 ], [ "underbarrel", 1 ], [ "muzzle", 1 ] ]
},
{
"id": "retool_ar15_300blk",
Expand Down Expand Up @@ -128,7 +129,7 @@
"install_time": "5 m",
"ammo_modifier": [ "300blk" ],
"min_skills": [ [ "weapon", 2 ] ],
"add_mod": [ [ "brass catcher", 1 ], [ "rail", 2 ], [ "sights", 1 ], [ "underbarrel", 1 ], [ "muzzle", 1 ] ]
"add_mod": [ [ "brass catcher", 1 ], [ "bayonet lug", 1 ], [ "rail", 2 ], [ "sights", 1 ], [ "underbarrel", 1 ], [ "muzzle", 1 ] ]
},
{
"id": "retool_ar15_300blk_medium",
Expand All @@ -154,7 +155,8 @@
"longest_side": "240 mm",
"integral_weight": "1590 g",
"integral_longest_side": "191 mm",
"barrel_length": "191 mm"
"barrel_length": "191 mm",
"add_mod": [ [ "brass catcher", 1 ], [ "rail", 2 ], [ "sights", 1 ], [ "underbarrel", 1 ], [ "muzzle", 1 ] ]
},
{
"id": "retool_ar15_50beowulf",
Expand Down Expand Up @@ -199,7 +201,7 @@
"dispersion_modifier": 15,
"ammo_modifier": [ "50beowulf" ],
"min_skills": [ [ "weapon", 2 ] ],
"add_mod": [ [ "brass catcher", 1 ], [ "rail", 2 ], [ "sights", 1 ], [ "underbarrel", 1 ], [ "muzzle", 1 ] ]
"add_mod": [ [ "brass catcher", 1 ], [ "bayonet lug", 1 ], [ "rail", 2 ], [ "sights", 1 ], [ "underbarrel", 1 ], [ "muzzle", 1 ] ]
},
{
"id": "retool_ar15_50beowulf_medium",
Expand Down Expand Up @@ -229,7 +231,8 @@
"integral_weight": "1615 g",
"integral_longest_side": "191 mm",
"barrel_length": "191 mm",
"price": 10999
"price": 10999,
"add_mod": [ [ "brass catcher", 1 ], [ "rail", 2 ], [ "sights", 1 ], [ "underbarrel", 1 ], [ "muzzle", 1 ] ]
},
{
"id": "retool_ar15_450",
Expand Down Expand Up @@ -274,7 +277,7 @@
"dispersion_modifier": 15,
"ammo_modifier": [ "450" ],
"min_skills": [ [ "weapon", 2 ] ],
"add_mod": [ [ "brass catcher", 1 ], [ "rail", 2 ], [ "sights", 1 ], [ "underbarrel", 1 ], [ "muzzle", 1 ] ]
"add_mod": [ [ "brass catcher", 1 ], [ "bayonet lug", 1 ], [ "rail", 2 ], [ "sights", 1 ], [ "underbarrel", 1 ], [ "muzzle", 1 ] ]
},
{
"id": "retool_ar15_450_medium",
Expand Down Expand Up @@ -304,7 +307,8 @@
"integral_volume": "850 ml",
"integral_longest_side": "191 mm",
"barrel_length": "191 mm",
"price": 10699
"price": 10699,
"add_mod": [ [ "brass catcher", 1 ], [ "rail", 2 ], [ "sights", 1 ], [ "underbarrel", 1 ], [ "muzzle", 1 ] ]
},
{
"id": "retool_ar15_762",
Expand Down Expand Up @@ -348,7 +352,7 @@
"install_time": "5 m",
"ammo_modifier": [ "762" ],
"min_skills": [ [ "weapon", 2 ] ],
"add_mod": [ [ "brass catcher", 1 ], [ "rail", 2 ], [ "sights", 1 ], [ "underbarrel", 1 ], [ "muzzle", 1 ] ]
"add_mod": [ [ "brass catcher", 1 ], [ "bayonet lug", 1 ], [ "rail", 2 ], [ "sights", 1 ], [ "underbarrel", 1 ], [ "muzzle", 1 ] ]
},
{
"id": "retool_mdrx_223rem",
Expand Down
19 changes: 19 additions & 0 deletions data/json/items/gunmod/mount.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,5 +133,24 @@
"min_skills": [ [ "gun", 3 ] ],
"add_mod": [ [ "underbarrel", 1 ] ],
"flags": [ "INSTALL_DIFFICULT", "IRREMOVABLE" ]
},
{
"id": "rail_bayonet_lug",
"type": "GUNMOD",
"name": { "str": "rail bayonet mount" },
"description": "A one-piece mount for attaching a bayonet to a firearms accessory rail, in case that was a thing you wanted. Ideal for making newer guns pointier.",
tenmillimaster marked this conversation as resolved.
Show resolved Hide resolved
"weight": "162 g",
"volume": "40 ml",
"price": 15000,
"price_postapoc": 150,
"material": [ "steel" ],
"symbol": ":",
"color": "light_gray",
"location": "rail",
"mod_targets": [ "smg", "rifle", "pistol", "shotgun", "crossbow", "launcher" ],
"install_time": "5 m",
"min_skills": [ [ "gun", 1 ] ],
"blacklist_slot": [ "bayonet lug" ],
"add_mod": [ [ "bayonet lug", 1 ] ]
}
]
7 changes: 7 additions & 0 deletions data/json/items/gunmod/muzzle.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"color": "dark_gray",
"location": "muzzle",
"mod_targets": [ "pistol", "smg", "rifle" ],
"blacklist_mod": [ "knife_combat_army", "knife_combat", "knife_combat_marine", "makeshift_bayonet", "sword_bayonet" ],
"consume_chance": 20,
"consume_divisor": 110,
"damage_modifier": { "damage_type": "bullet", "amount": -5 },
Expand Down Expand Up @@ -74,6 +75,7 @@
"color": "dark_gray",
"location": "muzzle",
"mod_targets": [ "pistol", "smg", "rifle" ],
"blacklist_mod": [ "knife_combat_army", "knife_combat", "knife_combat_marine", "makeshift_bayonet", "sword_bayonet" ],
"consume_chance": 100,
"consume_divisor": 40,
"dispersion_modifier": 10,
Expand All @@ -99,6 +101,7 @@
"color": "cyan",
"location": "muzzle",
"mod_targets": [ "pistol", "smg", "rifle" ],
"blacklist_mod": [ "knife_combat_army", "knife_combat", "knife_combat_marine", "makeshift_bayonet", "sword_bayonet" ],
"consume_chance": 1,
"consume_divisor": 1,
"damage_modifier": { "damage_type": "bullet", "amount": -2 },
Expand Down Expand Up @@ -142,6 +145,7 @@
"color": "dark_gray",
"location": "muzzle",
"mod_targets": [ "shotgun" ],
"blacklist_mod": [ "knife_combat_army", "knife_combat", "knife_combat_marine", "makeshift_bayonet", "sword_bayonet" ],
"handling_modifier": 2,
"consume_chance": 5000,
"consume_divisor": 235,
Expand All @@ -167,8 +171,10 @@
"color": "dark_gray",
"location": "muzzle",
"mod_targets": [ "pistol", "smg", "rifle" ],
"blacklist_mod": [ "knife_combat_army", "knife_combat", "knife_combat_marine", "makeshift_bayonet", "sword_bayonet" ],
"install_time": "30 s",
"handling_modifier": 2,
"consume_chance": 1,
"consume_divisor": 840,
"loudness_modifier": -50,
"flags": [ "CONSUMABLE" ],
Expand Down Expand Up @@ -209,6 +215,7 @@
"color": "dark_gray",
"location": "muzzle",
"mod_targets": [ "pistol", "smg" ],
"blacklist_mod": [ "knife_combat_army", "knife_combat", "knife_combat_marine", "makeshift_bayonet", "sword_bayonet" ],
"install_time": "30 s",
"consume_chance": 7000,
"consume_divisor": 85,
Expand Down
Loading