diff --git a/data/json/items/gun/223.json b/data/json/items/gun/223.json index 9dee8952ad2a4..9a9ef7e50d8f8 100644 --- a/data/json/items/gun/223.json +++ b/data/json/items/gun/223.json @@ -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": [ diff --git a/data/json/items/gun/3006.json b/data/json/items/gun/3006.json index 2c482c0c7c933..a1bdd78ee460e 100644 --- a/data/json/items/gun/3006.json +++ b/data/json/items/gun/3006.json @@ -66,6 +66,7 @@ "reload": 150, "valid_mod_locations": [ [ "barrel", 1 ], + [ "bayonet lug", 1 ], [ "brass catcher", 1 ], [ "grip mount", 1 ], [ "mechanism", 4 ], @@ -106,6 +107,7 @@ "valid_mod_locations": [ [ "barrel", 1 ], [ "bore", 1 ], + [ "bayonet lug", 1 ], [ "brass catcher", 1 ], [ "mechanism", 4 ], [ "muzzle", 1 ], diff --git a/data/json/items/gun/300BLK.json b/data/json/items/gun/300BLK.json index 7c589fc660d23..0461259ff8f7a 100644 --- a/data/json/items/gun/300BLK.json +++ b/data/json/items/gun/300BLK.json @@ -73,6 +73,7 @@ "valid_mod_locations": [ [ "barrel", 1 ], [ "bore", 1 ], + [ "bayonet lug", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], [ "mechanism", 4 ], diff --git a/data/json/items/gun/303.json b/data/json/items/gun/303.json index dc6359595bd36..c472d0b4d62ec 100644 --- a/data/json/items/gun/303.json +++ b/data/json/items/gun/303.json @@ -31,6 +31,7 @@ "flags": [ "EASY_CLEAN" ], "valid_mod_locations": [ [ "barrel", 1 ], + [ "bayonet lug", 1 ], [ "bore", 1 ], [ "brass catcher", 1 ], [ "mechanism", 4 ], @@ -78,6 +79,7 @@ "valid_mod_locations": [ [ "barrel", 1 ], [ "bore", 1 ], + [ "bayonet lug", 1 ], [ "brass catcher", 1 ], [ "mechanism", 4 ], [ "muzzle", 1 ], diff --git a/data/json/items/gun/30carbine.json b/data/json/items/gun/30carbine.json index 77daa2951ccb9..6a30c3027df01 100644 --- a/data/json/items/gun/30carbine.json +++ b/data/json/items/gun/30carbine.json @@ -22,6 +22,7 @@ "valid_mod_locations": [ [ "barrel", 1 ], [ "bore", 1 ], + [ "bayonet lug", 1 ], [ "brass catcher", 1 ], [ "mechanism", 4 ], [ "muzzle", 1 ], diff --git a/data/json/items/gun/545x39.json b/data/json/items/gun/545x39.json index d1e6326f2c762..2666c78dbcf84 100644 --- a/data/json/items/gun/545x39.json +++ b/data/json/items/gun/545x39.json @@ -24,6 +24,7 @@ "valid_mod_locations": [ [ "barrel", 1 ], [ "bore", 1 ], + [ "bayonet lug", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], [ "mechanism", 4 ], @@ -65,6 +66,7 @@ "valid_mod_locations": [ [ "barrel", 1 ], [ "bore", 1 ], + [ "bayonet lug", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], [ "mechanism", 4 ], diff --git a/data/json/items/gun/762.json b/data/json/items/gun/762.json index db4018ee5cd47..013d17bb9490c 100644 --- a/data/json/items/gun/762.json +++ b/data/json/items/gun/762.json @@ -22,6 +22,7 @@ "valid_mod_locations": [ [ "barrel", 1 ], [ "bore", 1 ], + [ "bayonet lug", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], [ "mechanism", 4 ], @@ -62,6 +63,7 @@ "valid_mod_locations": [ [ "barrel", 1 ], [ "bore", 1 ], + [ "bayonet lug", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], [ "mechanism", 4 ], @@ -148,6 +150,7 @@ "valid_mod_locations": [ [ "barrel", 1 ], [ "bore", 1 ], + [ "bayonet lug", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], [ "mechanism", 4 ], @@ -269,6 +272,7 @@ "valid_mod_locations": [ [ "barrel", 1 ], [ "bore", 1 ], + [ "bayonet lug", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], [ "mechanism", 4 ], @@ -339,6 +343,7 @@ "valid_mod_locations": [ [ "barrel", 1 ], [ "bore", 1 ], + [ "bayonet lug", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], [ "mechanism", 4 ], diff --git a/data/json/items/gun/762R.json b/data/json/items/gun/762R.json index be5830b73cb44..01b5ca22d2a4c 100644 --- a/data/json/items/gun/762R.json +++ b/data/json/items/gun/762R.json @@ -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 ], @@ -92,6 +93,7 @@ "barrel_volume": "1000 ml", "valid_mod_locations": [ [ "barrel", 1 ], + [ "bayonet lug", 1 ], [ "brass catcher", 1 ], [ "grip mount", 1 ], [ "mechanism", 4 ], @@ -132,6 +134,7 @@ "valid_mod_locations": [ [ "barrel", 1 ], [ "bore", 1 ], + [ "bayonet lug", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], [ "mechanism", 4 ], diff --git a/data/json/items/gun/9mm.json b/data/json/items/gun/9mm.json index 3f55c87ce96aa..90601c0a7ef97 100644 --- a/data/json/items/gun/9mm.json +++ b/data/json/items/gun/9mm.json @@ -885,6 +885,7 @@ "valid_mod_locations": [ [ "barrel", 1 ], [ "bore", 1 ], + [ "bayonet lug", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], [ "mechanism", 4 ], diff --git a/data/json/items/gun/exodii.json b/data/json/items/gun/exodii.json index fba776bbb5148..d4ea15403f27b 100644 --- a/data/json/items/gun/exodii.json +++ b/data/json/items/gun/exodii.json @@ -155,6 +155,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" ] } ], diff --git a/data/json/items/gun/flintlock.json b/data/json/items/gun/flintlock.json index 55c387162736f..a00726c4d1a9f 100644 --- a/data/json/items/gun/flintlock.json +++ b/data/json/items/gun/flintlock.json @@ -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 ], @@ -95,6 +96,7 @@ "reload": 3000, "valid_mod_locations": [ [ "sling", 1 ], + [ "bayonet lug", 1 ], [ "underbarrel", 1 ], [ "grip mount", 1 ], [ "rail mount", 1 ], diff --git a/data/json/items/gun/shot.json b/data/json/items/gun/shot.json index 4842175a50d66..79fe72c81fc09 100644 --- a/data/json/items/gun/shot.json +++ b/data/json/items/gun/shot.json @@ -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 } } ] }, { @@ -765,6 +781,7 @@ "clip_size": 6, "valid_mod_locations": [ [ "stock mount", 1 ], + [ "bayonet lug", 1 ], [ "mechanism", 2 ], [ "barrel", 1 ], [ "muzzle", 1 ], diff --git a/data/json/items/gunmod/conversions.json b/data/json/items/gunmod/conversions.json index 0fe1387da028c..7fe27a4d42a1c 100644 --- a/data/json/items/gunmod/conversions.json +++ b/data/json/items/gunmod/conversions.json @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", diff --git a/data/json/items/gunmod/mount.json b/data/json/items/gunmod/mount.json index 10fed0eef9ff5..691e483eb3250 100644 --- a/data/json/items/gunmod/mount.json +++ b/data/json/items/gunmod/mount.json @@ -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 firearm's accessory rail, in case that was a thing you wanted. Ideal for making newer guns pointier.", + "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 ] ] } ] diff --git a/data/json/items/gunmod/muzzle.json b/data/json/items/gunmod/muzzle.json index 480a022f5b955..18dd35ce896d6 100644 --- a/data/json/items/gunmod/muzzle.json +++ b/data/json/items/gunmod/muzzle.json @@ -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 }, @@ -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, @@ -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 }, @@ -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, @@ -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" ], @@ -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, diff --git a/data/json/items/gunmod/underbarrel.json b/data/json/items/gunmod/underbarrel.json index d54829b9e72c0..8eb01a3f04edd 100644 --- a/data/json/items/gunmod/underbarrel.json +++ b/data/json/items/gunmod/underbarrel.json @@ -417,6 +417,7 @@ "color": "light_red", "location": "underbarrel", "mod_targets": [ "rifle", "crossbow" ], + "blacklist_mod": [ "knife_combat_army", "knife_combat", "knife_combat_marine", "makeshift_bayonet", "sword_bayonet" ], "gun_data": { "ammo": "40x46mm", "skill": "launcher", @@ -454,6 +455,7 @@ "color": "dark_gray", "location": "underbarrel", "mod_targets": [ "rifle", "crossbow" ], + "blacklist_mod": [ "knife_combat_army", "knife_combat", "knife_combat_marine", "makeshift_bayonet", "sword_bayonet" ], "gun_data": { "ammo": "40x46mm", "skill": "launcher", @@ -503,7 +505,7 @@ "longest_side": "12 cm", "integral_longest_side": "12 cm", "gunmod_data": { - "location": "underbarrel", + "location": "bayonet lug", "mod_targets": [ "shotgun", "rifle", "smg", "launcher", "crossbow" ], "mode_modifier": [ [ "REACH", "bayonet", 2, [ "MELEE", "REACH_ATTACK" ] ] ], "install_time": "5 m" @@ -526,6 +528,7 @@ "color": "light_red", "location": "underbarrel", "mod_targets": [ "rifle", "crossbow" ], + "blacklist_mod": [ "knife_combat_army", "knife_combat", "knife_combat_marine", "makeshift_bayonet", "sword_bayonet" ], "gun_data": { "ammo": "shot", "skill": "shotgun", "dispersion": 330, "durability": 10, "clip_size": 4 }, "min_skills": [ [ "weapon", 1 ], [ "shotgun", 1 ] ], "flags": [ "RELOAD_ONE" ], @@ -555,6 +558,7 @@ "symbol": ":", "color": "white", "location": "underbarrel", + "blacklist_mod": [ "knife_combat_army", "knife_combat", "knife_combat_marine", "makeshift_bayonet", "sword_bayonet" ], "mod_targets": [ "rifle" ], "gun_data": { "ammo": "shot", "skill": "shotgun", "dispersion": 310, "durability": 10, "clip_size": 5 }, "min_skills": [ [ "weapon", 1 ], [ "shotgun", 1 ] ], @@ -583,6 +587,7 @@ "symbol": ":", "color": "light_gray", "location": "underbarrel", + "blacklist_mod": [ "knife_combat_army", "knife_combat", "knife_combat_marine", "makeshift_bayonet", "sword_bayonet" ], "mod_targets": [ "smg", "rifle", "shotgun", "launcher", "crossbow" ], "gun_data": { "ammo": "40x46mm", @@ -635,6 +640,7 @@ "symbol": ":", "color": "dark_gray", "location": "underbarrel", + "blacklist_mod": [ "knife_combat_army", "knife_combat", "knife_combat_marine", "makeshift_bayonet", "sword_bayonet" ], "mod_targets": [ "rifle", "crossbow" ], "gun_data": { "ammo": "20x66mm", "skill": "shotgun", "dispersion": 320, "durability": 9, "reload": 125 }, "min_skills": [ [ "weapon", 2 ], [ "shotgun", 2 ] ], @@ -664,6 +670,7 @@ "symbol": ":", "color": "light_red", "location": "underbarrel", + "blacklist_mod": [ "knife_combat_army", "knife_combat", "knife_combat_marine", "makeshift_bayonet", "sword_bayonet" ], "mod_targets": [ "rifle", "crossbow" ], "gun_data": { "ammo": "shot", "skill": "shotgun", "dispersion": 375, "durability": 10, "clip_size": 2 }, "min_skills": [ [ "weapon", 1 ], [ "shotgun", 1 ] ], diff --git a/data/json/items/melee/swords_and_blades.json b/data/json/items/melee/swords_and_blades.json index 5e5e4ea858a76..e972f42e9a29b 100644 --- a/data/json/items/melee/swords_and_blades.json +++ b/data/json/items/melee/swords_and_blades.json @@ -291,8 +291,31 @@ "symbol": ";", "color": "dark_gray", "gunmod_data": { - "location": "underbarrel", - "mod_targets": [ "shotgun", "rifle", "smg", "crossbow" ], + "location": "bayonet lug", + "mod_targets": [ "pistol", "smg", "rifle", "shotgun", "launcher", "crossbow" ], + "blacklist_mod": [ + "crafted_suppressor", + "filter_suppressor", + "bottle_suppressor", + "shot_suppressor", + "suppressor", + "suppressor_compact", + "m203", + "m203_mod", + "m320_mod_mod", + "m320_mod", + "M6_shotgun", + "makeshift_bayonet", + "m26_mass", + "m26_mass_mod", + "pipe_launcher40mm", + "rm121aux", + "rm121aux_mod", + "masterkey", + "masterkey_mod", + "u_shotgun", + "u_shotgun_mod" + ], "mode_modifier": [ [ "REACH", "bayonet", 1, [ "MELEE", "REACH_ATTACK" ] ] ], "install_time": "5 s" }, @@ -300,24 +323,18 @@ "techniques": [ "RAPID" ], "qualities": [ [ "CUT", 2 ], [ "SAW_W", 1 ], [ "CUT_FINE", 1 ], [ "BUTCHER", 19 ] ], "thrown_damage": [ { "damage_type": "stab", "amount": 14 } ], - "flags": [ "DURABLE_MELEE", "SHEATH_KNIFE", "NPC_THROWN", "ALLOWS_BODY_BLOCK", "NO_SALVAGE", "CONDUCTIVE" ], + "flags": [ + "DURABLE_MELEE", + "SHEATH_KNIFE", + "NPC_THROWN", + "ALLOWS_BODY_BLOCK", + "PUMP_RAIL_COMPATIBLE", + "NO_SALVAGE", + "CONDUCTIVE" + ], "weapon_category": [ "KNIVES" ], "melee_damage": { "stab": 22 } }, - { - "id": "knife_combat_marine_mod", - "copy-from": "knife_combat_marine", - "type": "TOOL", - "name": { "str": "modified USMC bayonet" }, - "description": "A modern bayonet in use with the US Marine Corps, adopted in an effort to improve USMC hand-to-hand fighting capabilities. The bayonet is optimized to function as a fighting knife, sporting an ergonomic handle that will minimize hand fatigue during combat. The blade tip is sharper in profile than other bayonets to assist in penetrating body armor, and also features a small serrated section to provide for some utility. This one was modified and customized to mount on pretty much any weapon other than pistols, if you so want.", - "gunmod_data": { - "location": "underbarrel", - "mod_targets": [ "smg", "rifle", "shotgun", "launcher", "crossbow" ], - "mode_modifier": [ [ "REACH", "bayonet", 1, [ "MELEE", "REACH_ATTACK" ] ] ], - "install_time": "5 s" - }, - "extend": { "flags": [ "PUMP_RAIL_COMPATIBLE" ] } - }, { "id": "knife_combat_army", "type": "TOOL", @@ -335,8 +352,31 @@ "symbol": ";", "color": "dark_gray", "gunmod_data": { - "location": "underbarrel", - "mod_targets": [ "shotgun", "rifle", "smg", "crossbow" ], + "location": "bayonet lug", + "mod_targets": [ "pistol", "smg", "rifle", "shotgun", "launcher", "crossbow" ], + "blacklist_mod": [ + "crafted_suppressor", + "filter_suppressor", + "bottle_suppressor", + "shot_suppressor", + "suppressor", + "suppressor_compact", + "m203", + "m203_mod", + "m320_mod_mod", + "m320_mod", + "M6_shotgun", + "makeshift_bayonet", + "m26_mass", + "m26_mass_mod", + "pipe_launcher40mm", + "rm121aux", + "rm121aux_mod", + "masterkey", + "masterkey_mod", + "u_shotgun", + "u_shotgun_mod" + ], "mode_modifier": [ [ "REACH", "bayonet", 1, [ "MELEE", "REACH_ATTACK" ] ] ], "install_time": "5 s" }, @@ -344,24 +384,18 @@ "techniques": [ "RAPID" ], "qualities": [ [ "CUT", 2 ], [ "SAW_M", 1 ], [ "CUT_FINE", 1 ], [ "BUTCHER", 15 ] ], "thrown_damage": [ { "damage_type": "stab", "amount": 14 } ], - "flags": [ "DURABLE_MELEE", "SHEATH_KNIFE", "NPC_THROWN", "ALLOWS_BODY_BLOCK", "NO_SALVAGE", "CONDUCTIVE" ], + "flags": [ + "DURABLE_MELEE", + "SHEATH_KNIFE", + "NPC_THROWN", + "ALLOWS_BODY_BLOCK", + "PUMP_RAIL_COMPATIBLE", + "NO_SALVAGE", + "CONDUCTIVE" + ], "weapon_category": [ "KNIVES" ], "melee_damage": { "stab": 20 } }, - { - "id": "knife_combat_army_mod", - "copy-from": "knife_combat_army", - "type": "TOOL", - "name": { "str": "modified Army bayonet" }, - "description": "The current issue Army bayonet, before the Cataclysm anyways. It is thick, heavy, and surprisingly sharp. The M9 bayonet also functions as a wire cutter, a mediocre saw, and an unwieldy screwdriver. That the handle and tang can be completely disassembled from the blade is surely a fact of great comfort to the soldier, survivalist, and you. This one was modified and customized to mount on pretty much any weapon other than pistols, if you so want.", - "gunmod_data": { - "location": "underbarrel", - "mod_targets": [ "smg", "rifle", "shotgun", "launcher", "crossbow" ], - "mode_modifier": [ [ "REACH", "bayonet", 1, [ "MELEE", "REACH_ATTACK" ] ] ], - "install_time": "5 s" - }, - "extend": { "flags": [ "PUMP_RAIL_COMPATIBLE" ] } - }, { "id": "knife_combat", "type": "TOOL", @@ -379,8 +413,31 @@ "symbol": ";", "color": "dark_gray", "gunmod_data": { - "location": "underbarrel", - "mod_targets": [ "shotgun", "rifle", "smg", "crossbow" ], + "location": "bayonet lug", + "mod_targets": [ "pistol", "smg", "rifle", "shotgun", "launcher", "crossbow" ], + "blacklist_mod": [ + "crafted_suppressor", + "filter_suppressor", + "bottle_suppressor", + "shot_suppressor", + "suppressor", + "suppressor_compact", + "m203", + "m203_mod", + "m320_mod_mod", + "m320_mod", + "M6_shotgun", + "makeshift_bayonet", + "m26_mass", + "m26_mass_mod", + "pipe_launcher40mm", + "rm121aux", + "rm121aux_mod", + "masterkey", + "masterkey_mod", + "u_shotgun", + "u_shotgun_mod" + ], "mode_modifier": [ [ "REACH", "bayonet", 1, [ "MELEE", "REACH_ATTACK" ] ] ], "install_time": "5 s" }, @@ -388,24 +445,18 @@ "techniques": [ "RAPID" ], "qualities": [ [ "CUT", 2 ], [ "CUT_FINE", 1 ], [ "BUTCHER", 19 ] ], "thrown_damage": [ { "damage_type": "stab", "amount": 14 } ], - "flags": [ "DURABLE_MELEE", "SHEATH_KNIFE", "NPC_THROWN", "ALLOWS_BODY_BLOCK", "NO_SALVAGE", "CONDUCTIVE" ], + "flags": [ + "DURABLE_MELEE", + "SHEATH_KNIFE", + "NPC_THROWN", + "ALLOWS_BODY_BLOCK", + "PUMP_RAIL_COMPATIBLE", + "NO_SALVAGE", + "CONDUCTIVE" + ], "weapon_category": [ "KNIVES" ], "melee_damage": { "stab": 22 } }, - { - "id": "knife_combat_mod", - "copy-from": "knife_combat", - "type": "TOOL", - "name": { "str": "modified National Guard bayonet" }, - "description": "A cold war era Army bayonet that has only partially been replaced by newer models. It has an apocalypse-proof full-tang, double-edged blade of high carbon steel terminating in a spear point. The no-frills design makes for both a good fighting knife and bayonet, a fact that was appreciated when reserve stocks of these were issued out to National Guardsmen. This one was modified and customized to mount on pretty much any weapon other than pistols, if you so want.", - "gunmod_data": { - "location": "underbarrel", - "mod_targets": [ "smg", "rifle", "shotgun", "launcher", "crossbow" ], - "mode_modifier": [ [ "REACH", "bayonet", 1, [ "MELEE", "REACH_ATTACK" ] ] ], - "install_time": "5 s" - }, - "extend": { "flags": [ "PUMP_RAIL_COMPATIBLE" ] } - }, { "id": "knife_hunting", "type": "TOOL", @@ -785,6 +836,7 @@ "name": { "str": "tempered combat machete" }, "description": "This common gardening tool has been customized, rebalanced and quench tempered to dramatically improve its performance as a weapon.", "color": "dark_gray", + "weight": 1, "append": false }, { @@ -1592,26 +1644,41 @@ "symbol": "/", "color": "light_gray", "gunmod_data": { - "location": "underbarrel", - "mod_targets": [ "shotgun", "rifle", "crossbow", "launcher" ], + "location": "bayonet lug", + "mod_targets": [ "pistol", "smg", "rifle", "shotgun", "launcher", "crossbow" ], + "blacklist_mod": [ + "crafted_suppressor", + "filter_suppressor", + "bottle_suppressor", + "shot_suppressor", + "suppressor", + "suppressor_compact", + "m203", + "m203_mod", + "m320_mod_mod", + "m320_mod", + "M6_shotgun", + "makeshift_bayonet", + "m26_mass", + "m26_mass_mod", + "pipe_launcher40mm", + "rm121aux", + "rm121aux_mod", + "masterkey", + "masterkey_mod", + "u_shotgun", + "u_shotgun_mod" + ], "mode_modifier": [ [ "REACH", "bayonet", 1, [ "MELEE", "REACH_ATTACK" ] ] ], "install_time": "5 s" }, "min_skills": [ [ "weapon", 2 ], [ "melee", 2 ] ], "techniques": [ "WBLOCK_1", "RAPID" ], "qualities": [ [ "CUT", 1 ], [ "COOK", 1 ], [ "BUTCHER", 7 ] ], - "flags": [ "DURABLE_MELEE", "SHEATH_SWORD" ], + "flags": [ "DURABLE_MELEE", "PUMP_RAIL_COMPATIBLE", "SHEATH_SWORD" ], "weapon_category": [ "SHORT_SWORDS" ], "melee_damage": { "bash": 7, "stab": 21 } }, - { - "id": "sword_bayonet_mod", - "copy-from": "sword_bayonet", - "type": "TOOL", - "name": { "str": "modified sword bayonet" }, - "description": "A long, knife bladed bayonet that can be attached to the front of a rifle, converting it into a pike. It is long enough to be used as a short sword when unmounted. This one was modified and customized to mount on pretty much any weapon other than pistols and SMGs, if you so want.", - "extend": { "flags": [ "PUMP_RAIL_COMPATIBLE" ] } - }, { "id": "tanto", "type": "TOOL", @@ -2924,8 +2991,31 @@ "symbol": "/", "color": "light_gray", "gunmod_data": { - "location": "underbarrel", + "location": "bayonet lug", "mod_targets": [ "number4_mki" ], + "blacklist_mod": [ + "crafted_suppressor", + "filter_suppressor", + "bottle_suppressor", + "shot_suppressor", + "suppressor", + "suppressor_compact", + "m203", + "m203_mod", + "m320_mod_mod", + "m320_mod", + "M6_shotgun", + "makeshift_bayonet", + "m26_mass", + "m26_mass_mod", + "pipe_launcher40mm", + "rm121aux", + "rm121aux_mod", + "masterkey", + "masterkey_mod", + "u_shotgun", + "u_shotgun_mod" + ], "mode_modifier": [ [ "REACH", "bayonet", 1, [ "MELEE", "REACH_ATTACK" ] ] ], "install_time": "5 s" }, diff --git a/data/json/obsoletion/migration_items.json b/data/json/obsoletion/migration_items.json index e3ca82a12edee..59e0142c62b45 100644 --- a/data/json/obsoletion/migration_items.json +++ b/data/json/obsoletion/migration_items.json @@ -255,6 +255,26 @@ "type": "MIGRATION", "replace": "broken_mininuke_hack" }, + { + "id": "knife_combat_marine_mod", + "type": "MIGRATION", + "replace": "knife_combat_marine" + }, + { + "id": "knife_combat_army_mod", + "type": "MIGRATION", + "replace": "knife_combat_army" + }, + { + "id": "knife_combat_mod", + "type": "MIGRATION", + "replace": "knife_combat" + }, + { + "id": "sword_bayonet_mod", + "type": "MIGRATION", + "replace": "sword_bayonet" + }, { "id": "20x66_bootleg_flechette", "type": "MIGRATION", diff --git a/data/json/recipes/nested.json b/data/json/recipes/nested.json index 90879900cf136..a1b229ca83d22 100644 --- a/data/json/recipes/nested.json +++ b/data/json/recipes/nested.json @@ -4517,6 +4517,7 @@ "nested_category_data": [ "grip_mount", "rail_mount", + "rail_bayonet_lug", "sights_mount", "sights_mount_launcher", "sights_mount_pistol", diff --git a/data/json/recipes/weapon/mods.json b/data/json/recipes/weapon/mods.json index af80856758243..ca5c7a1f17ed7 100644 --- a/data/json/recipes/weapon/mods.json +++ b/data/json/recipes/weapon/mods.json @@ -126,62 +126,6 @@ "tools": [ [ [ "large_repairkit", 50 ], [ "small_repairkit", 100 ] ] ], "components": [ [ [ "u_shotgun", 1 ] ], [ [ "scrap", 3 ] ], [ [ "plastic_chunk", 1 ] ] ] }, - { - "result": "knife_combat_mod", - "type": "recipe", - "activity_level": "MODERATE_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", - "skill_used": "fabrication", - "difficulty": 4, - "skills_required": [ [ "gun", 2 ], [ "melee", 1 ] ], - "time": "30 m", - "autolearn": true, - "tools": [ [ [ "large_repairkit", 25 ], [ "small_repairkit", 45 ] ] ], - "components": [ [ [ "knife_combat", 1 ] ], [ [ "scrap", 1 ] ], [ [ "plastic_chunk", 1 ] ] ] - }, - { - "result": "knife_combat_army_mod", - "type": "recipe", - "activity_level": "MODERATE_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", - "skill_used": "fabrication", - "difficulty": 4, - "skills_required": [ [ "gun", 2 ], [ "melee", 1 ] ], - "time": "30 m", - "autolearn": true, - "tools": [ [ [ "large_repairkit", 25 ], [ "small_repairkit", 45 ] ] ], - "components": [ [ [ "knife_combat_army", 1 ] ], [ [ "scrap", 1 ] ], [ [ "plastic_chunk", 1 ] ] ] - }, - { - "result": "knife_combat_marine_mod", - "type": "recipe", - "activity_level": "MODERATE_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", - "skill_used": "fabrication", - "difficulty": 4, - "skills_required": [ [ "gun", 2 ], [ "melee", 1 ] ], - "time": "30 m", - "autolearn": true, - "tools": [ [ [ "large_repairkit", 25 ], [ "small_repairkit", 45 ] ] ], - "components": [ [ [ "knife_combat_marine", 1 ] ], [ [ "scrap", 1 ] ], [ [ "plastic_chunk", 1 ] ] ] - }, - { - "result": "sword_bayonet_mod", - "type": "recipe", - "activity_level": "MODERATE_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", - "skill_used": "fabrication", - "difficulty": 4, - "skills_required": [ [ "gun", 2 ], [ "melee", 2 ] ], - "time": "30 m", - "autolearn": true, - "tools": [ [ [ "large_repairkit", 25 ], [ "small_repairkit", 45 ] ] ], - "components": [ [ [ "sword_bayonet", 1 ] ], [ [ "scrap", 1 ] ], [ [ "plastic_chunk", 1 ] ] ] - }, { "result": "offset_sight_rail_mod", "type": "recipe", @@ -1035,6 +979,27 @@ "qualities": [ { "id": "CUT", "level": 2 } ], "components": [ [ [ "plastic_chunk", 3 ] ] ] }, + { + "type": "recipe", + "activity_level": "BRISK_EXERCISE", + "result": "rail_bayonet_lug", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", + "skill_used": "fabrication", + "skills_required": [ [ "gun", 3 ] ], + "difficulty": 4, + "time": "3 h", + "autolearn": true, + "using": [ [ "blacksmithing_standard", 2 ], [ "steel_tiny", 1 ] ], + "proficiencies": [ + { "proficiency": "prof_metalworking" }, + { "proficiency": "prof_blacksmithing" }, + { "proficiency": "prof_toolsmithing" } + ], + "qualities": [ { "id": "FILE", "level": 2 }, { "id": "GRIND", "level": 1 } ], + "tools": [ [ [ "knife_combat", -1 ], [ "knife_combat_army", -1 ], [ "knife_combat_marine", -1 ], [ "sword_bayonet", -1 ] ] ], + "components": [ [ [ "nuts_bolts", 2 ] ], [ [ "scrap", 2 ] ] ] + }, { "type": "recipe", "activity_level": "MODERATE_EXERCISE", diff --git a/doc/JSON_INFO.md b/doc/JSON_INFO.md index f19bbb48d943f..9391cf2c3e718 100644 --- a/doc/JSON_INFO.md +++ b/doc/JSON_INFO.md @@ -4200,7 +4200,8 @@ Gun mods can be defined like this: "cooling_value_multiplier": 0.5, // Multiply gun's "cooling_value" by this number; works the same as overheat_threshold_multiplier "heat_per_shot_modifier": -2, // Add a flat amount to gun's "heat_per_shot"; works the same as overheat_threshold_modifier "heat_per_shot_multiplier": 2.0, // Multiply the gun's "heat_per_shot" by this number; works the same as overheat_threshold_multiplier -"blacklist_mod ": [ "rail", "underbarrel" ], // prevents installation of the gunmod if the specified slot(s) are present on the gun. +"blacklist_slot": [ "rail", "underbarrel" ], // prevents installation of the gunmod if the specified slot(s) are present on the gun. +"blacklist_mod": [ "m203", "m320" ], // prevents installation of the gunmod if the specified mods(s) are present on the gun. ``` Alternately, every item (book, tool, armor, even food) can be used as a gunmod if it has gunmod_data: diff --git a/src/item.cpp b/src/item.cpp index 16ef6d1b247f1..6dd2ab36f8baf 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -3447,15 +3447,29 @@ void item::gunmod_info( std::vector &info, const iteminfo_query *parts info.emplace_back( "GUNMOD", string_format( _( "Location: %s" ), mod.location.name() ) ); } + if( !mod.blacklist_slot.empty() && parts->test( iteminfo_parts::GUNMOD_BLACKLIST_SLOT ) ) { + std::string mod_black_str = _( "Incompatible with gunmods: " ); + + int iternum = 0; + for( const gunmod_location &black : mod.blacklist_slot ) { + if( iternum != 0 ) { + mod_black_str += ", "; + } + mod_black_str += string_format( "%s", ( black.name() ) ); + iternum++; + } + mod_black_str += "."; + info.emplace_back( "GUNMOD", mod_black_str ); + } if( !mod.blacklist_mod.empty() && parts->test( iteminfo_parts::GUNMOD_BLACKLIST_MOD ) ) { - std::string mod_black_str = _( "Incompatible with mod location: " ); + std::string mod_black_str = _( "Incompatible with slots: " ); int iternum = 0; - for( const gunmod_location &black : mod.blacklist_mod ) { + for( const itype_id &black : mod.blacklist_mod ) { if( iternum != 0 ) { mod_black_str += ", "; } - mod_black_str += string_format( "%s", black.name() ); + mod_black_str += string_format( "%s", ( black->nname( 1 ) ) ); iternum++; } mod_black_str += "."; @@ -11286,13 +11300,20 @@ ret_val item::is_gunmod_compatible( const item &mod ) const return ret_val::make_failure( _( "doesn't have a stock to attach this mod" ) ); } - for( const gunmod_location &slot : mod.type->gunmod->blacklist_mod ) { + for( const gunmod_location &slot : mod.type->gunmod->blacklist_slot ) { if( get_mod_locations().count( slot ) ) { return ret_val::make_failure( _( "cannot be installed on a weapon with \"%s\"" ), slot.name() ); } } + for( const itype_id &testmod : mod.type->gunmod->blacklist_mod ) { + if( gunmod_find( testmod ) ) { + return ret_val::make_failure( _( "cannot be installed on a weapon with a \"%s\"" ), + ( testmod->nname( 1 ) ) ); + } + } + return ret_val::make_success(); } diff --git a/src/item_factory.cpp b/src/item_factory.cpp index 12978ac2c3ebc..aed575c00bdc6 100644 --- a/src/item_factory.cpp +++ b/src/item_factory.cpp @@ -3463,6 +3463,7 @@ void Item_factory::load( islot_gunmod &slot, const JsonObject &jo, const std::st } } assign( jo, "blacklist_mod", slot.blacklist_mod ); + assign( jo, "blacklist_slot", slot.blacklist_slot ); assign( jo, "barrel_length", slot.barrel_length ); } diff --git a/src/iteminfo_query.h b/src/iteminfo_query.h index 4e607600fbf24..2ccae6357e684 100644 --- a/src/iteminfo_query.h +++ b/src/iteminfo_query.h @@ -135,6 +135,7 @@ enum class iteminfo_parts : size_t { GUNMOD_USEDON, GUNMOD_LOCATION, GUNMOD_BLACKLIST_MOD, + GUNMOD_BLACKLIST_SLOT, ARMOR_BODYGRAPH, ARMOR_BODYPARTS, diff --git a/src/itype.h b/src/itype.h index ec2363c38837e..4810d07589bae 100644 --- a/src/itype.h +++ b/src/itype.h @@ -892,8 +892,10 @@ struct islot_gunmod : common_ranged_data { std::map add_mod; /** Not compatible on weapons that have this mod slot */ - std::set blacklist_mod; + std::set blacklist_slot; + /** Not compatible on weapons that have these mods */ + std::set blacklist_mod; // hard coded barrel length from this mod units::length barrel_length = 0_mm;