Skip to content

Commit

Permalink
Gunmod test (#76370)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>

* 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 <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Sep 23, 2024
1 parent 73cd4f2 commit 0a77471
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 3 deletions.
10 changes: 9 additions & 1 deletion data/json/itemgroups/Weapons_Mods_Ammo/gunmod.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]
]
},
{
Expand Down Expand Up @@ -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",
Expand Down
8 changes: 6 additions & 2 deletions data/json/itemgroups/Weapons_Mods_Ammo/guns.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand All @@ -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",
Expand Down
41 changes: 41 additions & 0 deletions data/json/items/gunmod/stock.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
21 changes: 21 additions & 0 deletions data/json/items/gunmod/underbarrel.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 ] ]
}
]
24 changes: 24 additions & 0 deletions data/json/recipes/weapon/mods.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 ] ] ]
}
]

0 comments on commit 0a77471

Please sign in to comment.