Skip to content

Commit

Permalink
Fix CI failures, blazemod errors, fix speedloaders (#35804)
Browse files Browse the repository at this point in the history
* Fix CI failures

The install time for all other gunmods is commented out, it doesn't
appear to work right now.

One description was missing a space.

Add an uncomfortable grip gunmod and have it installed by default on the
remington 870 MCS, instead of the handling modifier which does not work.

* Update blazemod for shotguns

* Fix speedloaders

Done at the request of tenmillimaster

* Remove dead reference to l_def_12 in no rivtech

* Fix shotgun tests
  • Loading branch information
anothersimulacrum authored and ZhilkinSerg committed Dec 2, 2019
1 parent cd0e8cd commit 689a417
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 15 deletions.
5 changes: 3 additions & 2 deletions data/json/items/gun/shot.json
Original file line number Diff line number Diff line change
Expand Up @@ -303,14 +303,15 @@
"//": "dispersion should be 300 moa, but CDDA exaggerates dispersion.",
"sight_dispersion": 750,
"clip_size": 4,
"handling_modifier": -6,
"price": 53800,
"barrel_length": 0,
"built_in_mods": [ "breacher_grip" ],
"valid_mod_locations": [
[ "accessories", 4 ],
[ "barrel", 1 ],
[ "bore", 1 ],
[ "brass catcher", 1 ],
[ "grip", 1 ],
[ "grip mount", 1 ],
[ "loading port", 1 ],
[ "mechanism", 4 ],
Expand Down Expand Up @@ -340,7 +341,7 @@
"copy-from": "shotgun_base",
"type": "GUN",
"name": "Remington 1100 competiton",
"description": "This semi-automatic shotgun features a self compensating gas system that will feed a wide array of shells while also reducing recoil. Introduced in 1963, it is favored by law enforcement, hunters and competition shooters, and has been the best selling autoloading shotgun in U.S. history. This is the nickel finished, teflon coated competition model, with a full length magazine tube and 30 inch barrel.",
"description": "This semi-automatic shotgun features a self compensating gas system that will feed a wide array of shells while also reducing recoil. Introduced in 1963, it is favored by law enforcement, hunters and competition shooters, and has been the best selling autoloading shotgun in U.S. history. This is the nickel finished, teflon coated competition model, with a full length magazine tube and 30 inch barrel.",
"weight": "3742 g",
"volume": "3285 ml",
"looks_like": "remington_870",
Expand Down
17 changes: 17 additions & 0 deletions data/json/items/gunmod/grip.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,22 @@
"mod_targets": [ "smg", "rifle", "pistol", "shotgun", "crossbow", "launcher", "bow" ],
"handling_modifier": 2,
"min_skills": [ [ "weapon", 2 ] ]
},
{
"id": "breacher_grip",
"type": "GUNMOD",
"name": "breacher grip",
"description": "A very uncomfortable straight grip. Clearly not intended for regular use.",
"weight": "125 g",
"volume": "250 ml",
"integral_volume": 0,
"integral_weight": 0,
"price": 38000,
"material": [ "steel" ],
"symbol": ":",
"color": "dark_gray",
"location": "grip",
"mod_targets": [ "pistol" ],
"handling_modifier": -6
}
]
2 changes: 1 addition & 1 deletion data/json/items/gunmod/loading_port.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
"volume": "149 ml",
"integral_volume": "149 ml",
"price": 15700,
"//install_time": "8 m",
"material": "aluminum",
"symbol": ":",
"color": "green",
"location": "loading port",
"mod_targets": [ "pistol", "shotgun" ],
"acceptable_ammo": [ "shot" ],
"install_time": "8 m",
"magazine_adaptor": [ [ "shot", [ "shot_speedloader6", "shot_speedloader8" ] ] ],
"min_skills": [ [ "weapon", 2 ], [ "mechanics", 1 ] ]
}
Expand Down
1 change: 0 additions & 1 deletion data/mods/No_Rivtech_Guns/modinfo.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
"l_long_45",
"l_HFPack",
"l_bak_223",
"l_def_12",
"lw12mag",
"lw21mag",
"l_base_223",
Expand Down
12 changes: 6 additions & 6 deletions data/mods/blazemod/blaze_autoweapons_parts.json
Original file line number Diff line number Diff line change
Expand Up @@ -751,18 +751,18 @@
"id": "l_def_12",
"copy-from": "turret_blaze",
"type": "vehicle_part",
"name": "L12 Defender turret",
"item": "l_def_12",
"breaks_into": [ { "item": "l_def_12", "count": [ 0, 1 ] } ],
"name": "Tavor TS12 turret",
"item": "tavor_12",
"breaks_into": [ { "item": "tavor_12", "count": [ 0, 1 ] } ],
"requirements": { "install": { "skills": [ [ "mechanics", 3 ] ] }, "removal": { "skills": [ [ "mechanics", 1 ] ] } }
},
{
"id": "l_def_12nc",
"copy-from": "turret_blaze",
"type": "vehicle_part",
"name": "automated L12 Defender",
"item": "l_def_12",
"breaks_into": [ { "item": "l_def_12", "count": [ 0, 1 ] } ],
"name": "automated Tavor TS12",
"item": "tavor_12",
"breaks_into": [ { "item": "tavor_12", "count": [ 0, 1 ] } ],
"requirements": { "install": { "skills": [ [ "mechanics", 3 ] ] }, "removal": { "skills": [ [ "mechanics", 1 ] ] } }
},
{
Expand Down
2 changes: 1 addition & 1 deletion data/mods/blazemod/blaze_override.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
},
{
"id": "auto_abzats",
"copy-from": "mounted_abzats",
"copy-from": "mounted_bigun",
"type": "vehicle_part",
"name": "auto-shotgun turret",
"broken_symbol": "#",
Expand Down
4 changes: 3 additions & 1 deletion src/item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6707,7 +6707,9 @@ std::string item::ammo_sort_name() const

bool item::magazine_integral() const
{
// If a mod sets a magazine type, we're not integral.
if( is_gun() && type->gun->clip > 0 ) {
return true;
}
for( const item *m : is_gun() ? gunmods() : toolmods() ) {
if( !m->type->mod->magazine_adaptor.empty() ) {
return false;
Expand Down
6 changes: 3 additions & 3 deletions tests/ranged_balance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ static void assert_encumbrance( npc &shooter, int encumbrance )
TEST_CASE( "unskilled_shooter_accuracy", "[ranged] [balance]" )
{
clear_map();
standard_npc shooter( "Shooter", {}, 0, 8, 8, 8, 8 );
standard_npc shooter( "Shooter", {}, 0, 8, 8, 8, 7 );
equip_shooter( shooter, { "bastsandals", "armguard_chitin", "armor_chitin", "beekeeping_gloves", "fencing_mask" } );
assert_encumbrance( shooter, 10 );

Expand All @@ -259,7 +259,7 @@ TEST_CASE( "unskilled_shooter_accuracy", "[ranged] [balance]" )
test_fast_shooting( shooter, 40, 0.3 );
}
SECTION( "an unskilled shooter with an inaccurate shotgun" ) {
arm_shooter( shooter, "shotgun_d" );
arm_shooter( shooter, "winchester_1897" );
test_shooting_scenario( shooter, 4, 6, 17 );
test_fast_shooting( shooter, 50, 0.3 );
}
Expand Down Expand Up @@ -290,7 +290,7 @@ TEST_CASE( "competent_shooter_accuracy", "[ranged] [balance]" )
SECTION( "a skilled shooter with an accurate shotgun" ) {
arm_shooter( shooter, "ksg", { "red_dot_sight" } );
test_shooting_scenario( shooter, 9, 15, 33 );
test_fast_shooting( shooter, 50, 0.5 );
test_fast_shooting( shooter, 50, 0.45 );
}
SECTION( "a skilled shooter with an accurate smg" ) {
arm_shooter( shooter, "hk_mp5", { "tele_sight" } );
Expand Down

0 comments on commit 689a417

Please sign in to comment.