From 0a774719ffbd9379d326103f7e2b3b6d30cf6869 Mon Sep 17 00:00:00 2001 From: reddragon7799 <124845757+reddragon7799@users.noreply.github.com> Date: Sun, 22 Sep 2024 18:09:59 -0600 Subject: [PATCH] Gunmod test (#76370) * Added some new gunmods * NONE * Fixed typos * Doing the bidding of the codebots Added a comma * More code fixes somebody took all my commas * More code fixes Could have sworn I fixed these * Apply suggestions from code review Co-authored-by: TheShadowFerret <99621099+TheShadowFerret@users.noreply.github.com> * Removed ammo storage mods It had to be done * Removed ammo storage gunmods It must be done * Remove ammo storage gunmods * Removed spawning of ammo storage gunmods * Removed recipes for ammo storage gunmods * Sanity check on muzzle weight density Also clarified design process * Sanity check on C96 stock density Also made description less repetitive * Clarified muzzle weight effects * Muzzle weight recipe changes * Changed C96 stock spawn rate * JSON formatting Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update guns.json * JSON formatting Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * JSON formatting * Changed "contents-item" to "contents-group" --------- Co-authored-by: TheShadowFerret <99621099+TheShadowFerret@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../itemgroups/Weapons_Mods_Ammo/gunmod.json | 10 ++++- .../itemgroups/Weapons_Mods_Ammo/guns.json | 8 +++- data/json/items/gunmod/stock.json | 41 +++++++++++++++++++ data/json/items/gunmod/underbarrel.json | 21 ++++++++++ data/json/recipes/weapon/mods.json | 24 +++++++++++ 5 files changed, 101 insertions(+), 3 deletions(-) diff --git a/data/json/itemgroups/Weapons_Mods_Ammo/gunmod.json b/data/json/itemgroups/Weapons_Mods_Ammo/gunmod.json index 17664f1b47589..7f87157f6bbd1 100644 --- a/data/json/itemgroups/Weapons_Mods_Ammo/gunmod.json +++ b/data/json/itemgroups/Weapons_Mods_Ammo/gunmod.json @@ -60,7 +60,8 @@ [ "rifle_scope_high_end_mount", 20 ], [ "modern_handguard", 20 ], [ "bipod_handguard", 10 ], - [ "high_end_folding_stock", 10 ] + [ "high_end_folding_stock", 10 ], + [ "muzzle_weight", 10 ] ] }, { @@ -162,6 +163,13 @@ "subtype": "collection", "entries": [ { "item": "stock_mount" }, { "item": "folding_stock" } ] }, + { + "type": "item_group", + "id": "c96_mods", + "//": "Default possible mods for the C96 and M714.", + "subtype": "distribution", + "entries": [ { "item": "stock_mauser", "prob": 40 } ] + }, { "type": "item_group", "id": "mosin_mods", diff --git a/data/json/itemgroups/Weapons_Mods_Ammo/guns.json b/data/json/itemgroups/Weapons_Mods_Ammo/guns.json index 42458801c1a34..fd2709f565a13 100644 --- a/data/json/itemgroups/Weapons_Mods_Ammo/guns.json +++ b/data/json/itemgroups/Weapons_Mods_Ammo/guns.json @@ -141,7 +141,7 @@ { "group": "nested_bfr", "prob": 100 }, { "group": "nested_m1911-460", "prob": 3 }, { "group": "nested_makarov", "prob": 100 }, - { "group": "nested_mauser_c96", "prob": 39 }, + { "group": "nested_mauser_c96", "prob": 39, "contents-group": "c96_mods" }, { "group": "nested_chiappa_rhino", "prob": 5 }, { "group": "nested_pistol_flintlock", "prob": 150 }, { "group": "nested_raging_bull", "prob": 100 }, @@ -161,7 +161,11 @@ "type": "item_group", "id": "guns_pistol_collectible", "//": "Highly rare or collectable factory-made pistols that are possible for civilians to own; only likely to show up in gun collections, museums or similar. Pistols that are of historic or collectors value and which fall under NFA regulations, i.e. pistols which are integrally suppressed, have a burst or fully-automatic capability, or have a non-detachable buttstock, can be placed within this item group. These weapons are always unloaded.", - "items": [ { "item": "mauser_c96", "prob": 50 }, { "item": "colt_navy", "prob": 40 }, { "item": "colt_army", "prob": 40 } ] + "items": [ + { "item": "mauser_c96", "prob": 50, "contents-group": "c96_mods" }, + { "item": "colt_navy", "prob": 40 }, + { "item": "colt_army", "prob": 40 } + ] }, { "type": "item_group", diff --git a/data/json/items/gunmod/stock.json b/data/json/items/gunmod/stock.json index 05ad1c2e83ccd..eefe4c30887ad 100644 --- a/data/json/items/gunmod/stock.json +++ b/data/json/items/gunmod/stock.json @@ -156,6 +156,47 @@ "handling_modifier": -10, "flags": [ "COLLAPSED_STOCK", "IRREMOVABLE" ] }, + { + "id": "stock_mauser", + "type": "GUNMOD", + "name": { "str": "Mauser C96 stock" }, + "description": "The hollow removable wooden pistol stock of the C96 Mauser pistol, which doubles as a holster. It fits both the original clip-loaded C96 and later magazine-fed reproductions, but a gun with an extended magazine won't fit without modification.", + "copy-from": "pistol_stock", + "volume": "700 ml", + "integral_volume": "700 ml", + "integral_weight": "590 g", + "integral_longest_side": "35 cm", + "weight": "590 g", + "material": [ "wood" ], + "color": "brown", + "location": "stock mount", + "mod_targets": [ "mauser_c96", "mauser_m714" ], + "min_skills": [ [ "weapon", 1 ] ], + "pocket_data": [ + { + "pocket_type": "CONTAINER", + "holster": true, + "rigid": true, + "item_restriction": [ "mauser_c96", "mauser_m714" ], + "max_contains_volume": "650 ml", + "max_contains_weight": "1815 g", + "max_item_length": "32 cm", + "moves": 50 + } + ], + "use_action": { "type": "holster" }, + "flags": [ "BELTED", "BELT_CLIP", "OVERSIZE" ], + "armor_data": { + "armor": [ + { + "material": [ { "type": "wood", "thickness": 5 } ], + "encumbrance": [ 3, 4 ], + "covers": [ "leg_l", "leg_r" ], + "specifically_covers": [ "leg_hip_r", "leg_hip_l" ] + } + ] + } + }, { "id": "stock_none", "type": "GUNMOD", diff --git a/data/json/items/gunmod/underbarrel.json b/data/json/items/gunmod/underbarrel.json index 649e3102fe431..0da178c056d2e 100644 --- a/data/json/items/gunmod/underbarrel.json +++ b/data/json/items/gunmod/underbarrel.json @@ -571,5 +571,26 @@ "moves": 150 }, "flags": [ "BIPOD", "SLOW_WIELD", "ZERO_WEIGHT" ] + }, + { + "id": "muzzle_weight", + "type": "GUNMOD", + "name": { "str": "muzzle weight" }, + "description": "A small weight attached below the barrel of a firearm to reduce muzzle climb, increasing bulk but allowing for faster follow-up shots. Mainly used on competition handguns, but it can be added to combat pistols, too.", + "//": "Based on https://stores.sjcguns.com/sjc-full-size-m-p-frame-weight/, which was selected as an 'average' WRT weight. This model does not extend beyond the barrel or the slide, and so is compatible with compensators, suppressors, etc. Realistically every distinct model and chambering of pistol would need a custom-made weight, but that level of granularity doesn't seem to square with that of existing gunmods.", + "weight": "179 g", + "volume": "68 ml", + "longest_side": "68 mm", + "integral_longest_side": "0 cm", + "handling_modifier": 2, + "price": "175 USD", + "price_postapoc": "5 USD", + "install_time": "1 m", + "material": [ "aluminum" ], + "symbol": ":", + "color": "white", + "location": "underbarrel", + "mod_targets": [ "smg", "pistol" ], + "min_skills": [ [ "weapon", 3 ], [ "gun", 1 ] ] } ] diff --git a/data/json/recipes/weapon/mods.json b/data/json/recipes/weapon/mods.json index ac7cdde466683..cc223b00bcba8 100644 --- a/data/json/recipes/weapon/mods.json +++ b/data/json/recipes/weapon/mods.json @@ -1459,5 +1459,29 @@ "using": [ [ "soldering_standard", 20 ], [ "welding_standard", 20 ] ], "tools": [ [ [ "m240", -1 ] ], [ [ "small_repairkit", 40 ], [ "large_repairkit", 40 ] ] ], "components": [ [ [ "sheet_metal_small", 5 ] ] ] + }, + { + "type": "recipe", + "activity_level": "MODERATE_EXERCISE", + "result": "muzzle_weight", + "category": "CC_WEAPON", + "subcategory": "CSC_WEAPON_MODS", + "skill_used": "fabrication", + "skills_required": [ [ "pistol", 3 ], [ "gun", 1 ] ], + "proficiencies": [ { "proficiency": "prof_metalworking" }, { "proficiency": "prof_blacksmithing" } ], + "difficulty": 4, + "time": "5 h", + "book_learn": [ [ "manual_pistol", 3 ], [ "text_gunsmith", 3 ] ], + "qualities": [ + { "id": "ANVIL", "level": 1 }, + { "id": "HAMMER", "level": 1 }, + { "id": "HAMMER_FINE", "level": 1 }, + { "id": "SAW_M", "level": 2 }, + { "id": "SAW_M_FINE", "level": 1 }, + { "id": "SCREW", "level": 1 } + ], + "tools": [ [ [ "forge", 150 ], [ "oxy_torch", 150 ] ], [ [ "metalworking_tongs_any", 1, "LIST" ] ] ], + "byproducts": [ [ "scrap_aluminum", 3 ] ], + "components": [ [ [ "material_aluminium_ingot", 1 ] ] ] } ]