Skip to content

Commit

Permalink
Add old school slings (CleverRaven#69788)
Browse files Browse the repository at this point in the history
* add old school slings, sprinkle em in

* SPS sling is a thing

* recipe n stuff

* Apply suggestions from code review

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update professions.json

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
tenmillimaster and github-actions[bot] authored Nov 27, 2023
1 parent da41ccb commit 4687be0
Show file tree
Hide file tree
Showing 10 changed files with 77 additions and 51 deletions.
1 change: 1 addition & 0 deletions data/json/itemgroups/Weapons_Mods_Ammo/gunmod.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
[ "pistol_grip", 30 ],
[ "rifle_scope", 30 ],
[ "shoulder_strap", 50 ],
[ "shoulder_strap_simple", 70 ],
[ "single_sling", 50 ],
[ "butt_hook", 30 ],
[ "match_trigger", 20 ],
Expand Down
10 changes: 8 additions & 2 deletions data/json/itemgroups/Weapons_Mods_Ammo/guns.json
Original file line number Diff line number Diff line change
Expand Up @@ -963,9 +963,15 @@
"type": "item_group",
"id": "guns_launcher_flame",
"//": "Factory manufactured incendiary liquid projectors (excludes improvised weapons)",
"items": [ { "item": "flamethrower", "prob": 50, "charges-min": 100, "charges-max": 8000 } ]
},
{
"type": "item_group",
"id": "guns_launcher_flame_xedra",
"//": "Factory manufactured incendiary liquid projectors (excludes improvised weapons)",
"items": [
{ "item": "flamethrower", "prob": 50, "charges-min": 100, "charges-max": 1500 },
{ "item": "rm451_flamethrower", "prob": 40, "charges-min": 100, "charges-max": 1500 }
{ "item": "flamethrower", "prob": 50, "charges-min": 100, "charges-max": 8000 },
{ "item": "rm451_flamethrower", "prob": 40, "charges-min": 100, "charges-max": 9000 }
]
},
{
Expand Down
1 change: 1 addition & 0 deletions data/json/itemgroups/military.json
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,7 @@
{ "item": "survnote", "prob": 1 },
{ "item": "rm11b_sniper_rifle", "prob": 1 },
{ "item": "shoulder_strap", "prob": 16 },
{ "item": "shoulder_strap_simple", "prob": 4 },
{ "item": "single_sling", "prob": 16 },
{ "item": "bot_manhack", "prob": 1 },
{ "item": "bot_grenade_hack", "prob": 1 },
Expand Down
32 changes: 21 additions & 11 deletions data/json/items/gunmod/sling.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[
{
"id": "shoulder_strap",
"id": "shoulder_strap_simple",
"type": "GUNMOD",
"name": { "str": "shoulder strap" },
"description": "A shoulder strap allows the rifle to be worn over your shoulders like a piece of clothing. However, it offers no protection.",
"name": { "str": "two point sling" },
"description": "A shoulder strap allows the rifle to be worn over a shoulder like a piece of clothing. However, it offers no protection.",
"weight": "100 g",
"volume": "250 ml",
"integral_volume": "250 ml",
Expand All @@ -16,13 +16,6 @@
"location": "sling",
"mod_targets": [ "rifle", "shotgun", "smg", "crossbow", "launcher" ],
"flags": [ "IS_ARMOR", "BELTED", "OVERSIZE", "WATER_FRIENDLY" ],
"use_action": {
"type": "transform",
"msg": "You shift the weapon to the front of your body.",
"menu_text": "Adjust",
"target": "shoulder_strap_front",
"moves": 120
},
"armor_data": {
"armor": [
{
Expand All @@ -35,10 +28,27 @@
]
}
},
{
"id": "shoulder_strap",
"type": "GUNMOD",
"name": { "str": "adjustable sling" },
"description": "An adjustable strap that allows the rifle to be worn over your shoulders like a piece of clothing. However, it offers no protection.",
"copy-from": "shoulder_strap_simple",
"price": 3500,
"price_postapoc": 20,
"material": [ "nylon" ],
"use_action": {
"type": "transform",
"msg": "You shift the weapon to the front of your body.",
"menu_text": "Adjust",
"target": "shoulder_strap_front",
"moves": 120
}
},
{
"id": "shoulder_strap_front",
"type": "GUNMOD",
"name": { "str": "shoulder strap (front)", "str_pl": "shoulder straps (front)" },
"name": { "str": "adjustable sling (front)", "str_pl": "adjustable slings (front)" },
"description": "A shoulder strap allows the rifle to be worn over your shoulders like a piece of clothing. Currently adjusted so the weapon hangs off your front.",
"copy-from": "shoulder_strap",
"use_action": {
Expand Down
9 changes: 7 additions & 2 deletions data/json/monsterdrops/misc.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,14 @@
"distribution": [
{
"distribution": [
{ "item": "rifle_flintlock", "charges": [ 0, 1 ], "contents-item": "shoulder_strap", "prob": 50 },
{ "item": "rifle_flintlock", "charges": [ 0, 1 ], "contents-item": "shoulder_strap_simple", "prob": 50 },
{ "item": "pistol_flintlock", "charges": [ 0, 1 ], "prob": 20 },
{ "item": "longrifle_flintlock", "charges": [ 0, 1 ], "contents-item": "shoulder_strap", "prob": 30 }
{
"item": "longrifle_flintlock",
"charges": [ 0, 1 ],
"contents-item": "shoulder_strap_simple",
"prob": 30
}
],
"prob": 50
},
Expand Down
2 changes: 1 addition & 1 deletion data/json/monsterdrops/zombie_naval_personnel.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
},
{
"group": "military_standard_lmgs",
"contents-item": "shoulder_strap",
"contents-item": "shoulder_strap_simple",
"prob": 10,
"damage": [ 0, 4 ],
"dirt": [ 0, 6000 ]
Expand Down
2 changes: 1 addition & 1 deletion data/json/monsterdrops/zombie_survivor.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
{ "group": "guns_pistol_common", "prob": 100 },
{ "group": "guns_rifle_common_worn", "prob": 20, "contents-item": "shoulder_strap" },
{ "group": "guns_smg_common_worn", "prob": 5, "contents-item": "shoulder_strap" },
{ "group": "guns_shotgun_common_worn", "prob": 40, "contents-item": "shoulder_strap" }
{ "group": "guns_shotgun_common_worn", "prob": 40, "contents-item": "shoulder_strap_simple" }
],
"prob": 24
},
Expand Down
52 changes: 20 additions & 32 deletions data/json/professions.json
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@
{ "item": "water_clean", "container-item": "canteen" },
{ "item": "m1911", "ammo-item": "45_acp", "charges": 7, "container-item": "holster" },
{ "item": "45_acp", "charges": 23 },
{ "item": "garand", "ammo-item": "3006", "charges": 8, "contents-item": "shoulder_strap" },
{ "item": "garand", "ammo-item": "3006", "charges": 8, "contents-item": "shoulder_strap_simple" },
{ "item": "garandclip", "ammo-item": "3006", "charges": 8 },
{ "item": "3006", "charges": 4 }
]
Expand Down Expand Up @@ -1774,7 +1774,8 @@
"socks",
"boots_combat",
"dive_bag",
"diving_watch"
"diving_watch",
"single_sling"
],
"entries": [
{ "group": "charged_two_way_radio" },
Expand All @@ -1783,12 +1784,7 @@
{ "item": "glasses_bal", "custom-flags": [ "no_auto_equip" ] },
{ "item": "kukri", "container-item": "sheath" },
{ "item": "chestrig", "contents-group": "army_mags_mp5" },
{
"item": "hk_mp5",
"ammo-item": "9mm",
"charges": 30,
"contents-item": [ "shoulder_strap", "suppressor", "holo_sight" ]
}
{ "item": "hk_mp5", "ammo-item": "9mm", "charges": 30, "contents-item": [ "suppressor", "holo_sight" ] }
]
},
"male": [ "boxer_shorts" ],
Expand Down Expand Up @@ -2369,7 +2365,8 @@
"wristwatch",
"pants_tactical",
"elbow_pads",
"knee_pads"
"knee_pads",
"single_sling"
],
"entries": [
{ "group": "swat_ballistic_vest_pristine" },
Expand All @@ -2380,12 +2377,7 @@
{ "item": "ear_plugs", "custom-flags": [ "no_auto_equip" ] },
{ "item": "grenadebandolier", "contents-item": [ "flashbang", "flashbang" ] },
{ "item": "usp_9mm", "ammo-item": "9mm", "charges": 15, "container-item": "holster" },
{
"item": "hk_mp5",
"ammo-item": "9mm",
"charges": 30,
"contents-item": [ "shoulder_strap", "rail_laser_sight" ]
}
{ "item": "hk_mp5", "ammo-item": "9mm", "charges": 30, "contents-item": [ "rail_laser_sight" ] }
]
},
"male": [ "boxer_shorts" ],
Expand Down Expand Up @@ -2699,14 +2691,14 @@
],
"items": {
"both": {
"items": [ "knit_scarf", "socks", "boots_steel", "pants_cargo", "jacket_flannel", "hat_hunting", "wristwatch", "single_sling" ],
"items": [ "knit_scarf", "socks", "boots_steel", "pants_cargo", "jacket_flannel", "hat_hunting", "wristwatch" ],
"entries": [
{ "group": "charged_smart_phone" },
{
"item": "compcrossbow",
"ammo-item": "bolt_steel",
"charges": 1,
"contents-item": "shoulder_strap",
"contents-item": "shoulder_strap_simple",
"custom-flags": [ "no_auto_equip" ]
},
{ "item": "quiver", "contents-group": "quiver_crossbow_hunter" },
Expand Down Expand Up @@ -2737,7 +2729,7 @@
"item": "remington_870",
"ammo-item": "shot_00",
"charges": 5,
"contents-item": "shoulder_strap",
"contents-item": "shoulder_strap_simple",
"custom-flags": [ "no_auto_equip" ]
},
{ "item": "bandolier_shotgun", "contents-group": "bandolier_shotgun_hunter" },
Expand Down Expand Up @@ -2768,7 +2760,7 @@
"item": "remington700_270",
"ammo-item": "270win_jsp",
"charges": 4,
"contents-item": "shoulder_strap",
"contents-item": "shoulder_strap_simple",
"custom-flags": [ "no_auto_equip" ]
},
{ "item": "bandolier_rifle", "contents-group": "bandolier_rifle_hunter" },
Expand Down Expand Up @@ -2809,7 +2801,7 @@
"item": "ar15_50",
"ammo-item": "50beowulf_xtp",
"charges": 10,
"contents-item": "shoulder_strap",
"contents-item": "shoulder_strap_simple",
"custom-flags": [ "no_auto_equip" ]
},
{ "item": "chestrig", "contents-group": "mags_50beowulf_ar15" },
Expand Down Expand Up @@ -2842,7 +2834,7 @@
{ "group": "charged_smart_phone" },
{ "item": "shot_00", "charges": 25 },
{ "item": "beer", "count": 6 },
{ "item": "remington_870", "ammo-item": "shot_00", "charges": 5, "contents-item": "shoulder_strap" }
{ "item": "remington_870", "ammo-item": "shot_00", "charges": 5, "contents-item": "shoulder_strap_simple" }
]
},
"male": [ "boxer_shorts" ],
Expand Down Expand Up @@ -4642,7 +4634,7 @@
"pipe_cleaner"
],
"entries": [
{ "item": "rifle_flintlock", "ammo-item": "flintlock_ammo", "charges": 1, "contents-item": "shoulder_strap" },
{ "item": "rifle_flintlock", "ammo-item": "flintlock_ammo", "charges": 1, "contents-item": "shoulder_strap_simple" },
{ "item": "flintlock_pouch", "contents-group": "flintlock_pouch_reenactor" },
{ "item": "flintlock_ammo", "charges": 15 },
{ "item": "vinegar", "container-item": "bottle_plastic_small" },
Expand Down Expand Up @@ -5460,7 +5452,7 @@
"item": "m249",
"ammo-item": "556",
"charges": 200,
"contents-item": [ "shoulder_strap", "holo_sight", "bipod" ]
"contents-item": [ "shoulder_strap_simple", "holo_sight", "bipod" ]
},
{ "item": "ear_plugs", "custom-flags": [ "no_auto_equip" ] },
{ "item": "m17", "ammo-item": "9mm", "charges": 17, "container-item": "holster" }
Expand Down Expand Up @@ -5521,7 +5513,7 @@
"item": "m320",
"ammo-item": "40x46mm_m433",
"charges": 1,
"contents-item": [ "shoulder_strap", "holo_sight" ]
"contents-item": [ "shoulder_strap_simple", "holo_sight" ]
},
{ "item": "ear_plugs", "custom-flags": [ "no_auto_equip" ] },
{ "item": "grenade_pouch", "contents-group": [ "army_grenades_40x46" ] },
Expand Down Expand Up @@ -5702,19 +5694,15 @@
"boots_combat",
"diving_watch",
"molle_pack",
"multitool"
"multitool",
"single_sling"
],
"entries": [
{ "group": "charged_two_way_radio" },
{ "group": "us_ballistic_vest_pristine" },
{ "group": "army_mags_mp7" },
{ "item": "water_clean", "container-item": "canteen" },
{
"item": "hk_mp7",
"ammo-item": "46mm",
"charges": 20,
"contents-item": [ "shoulder_strap", "holo_sight", "suppressor" ]
},
{ "item": "hk_mp7", "ammo-item": "46mm", "charges": 20, "contents-item": [ "holo_sight", "suppressor" ] },
{ "item": "ear_plugs", "custom-flags": [ "no_auto_equip" ] },
{ "item": "knife_combat_marine", "container-item": "sheath" },
{ "item": "XL_holster", "contents-group": "holster_supp_MEU" },
Expand Down Expand Up @@ -6618,7 +6606,7 @@
{ "group": "charged_ref_lighter" },
{ "item": "chestrig", "contents-group": "army_mags_m14" },
{ "item": "knife_combat", "container-item": "sheath" },
{ "item": "m1a", "ammo-item": "762_51", "charges": 20, "contents-item": [ "shoulder_strap" ] }
{ "item": "m1a", "ammo-item": "762_51", "charges": 20, "contents-item": [ "shoulder_strap_simple" ] }
]
},
"male": [ "briefs" ],
Expand Down
2 changes: 1 addition & 1 deletion data/json/recipes/recipe_deconstruction.json
Original file line number Diff line number Diff line change
Expand Up @@ -5186,7 +5186,7 @@
"time": "6 m",
"qualities": [ { "id": "SCREW", "level": 1 }, { "id": "CUT", "level": 2 } ],
"components": [
[ [ "shoulder_strap", 1 ] ],
[ [ "shoulder_strap_simple", 1 ] ],
[ [ "2x4", 1 ] ],
[ [ "amplifier", 1 ] ],
[ [ "cable", 10 ] ],
Expand Down
17 changes: 16 additions & 1 deletion data/json/recipes/weapon/mods.json
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@
{
"type": "recipe",
"activity_level": "LIGHT_EXERCISE",
"result": "shoulder_strap",
"result": "shoulder_strap_simple",
"category": "CC_WEAPON",
"subcategory": "CSC_WEAPON_MODS",
"skill_used": "fabrication",
Expand All @@ -668,6 +668,21 @@
"qualities": [ { "id": "CUT", "level": 1 } ],
"components": [ [ [ "rope_natural_short", 1, "LIST" ], [ "cotton_patchwork", 3 ], [ "cordage", 6, "LIST" ] ] ]
},
{
"result": "shoulder_strap",
"type": "recipe",
"activity_level": "LIGHT_EXERCISE",
"category": "CC_WEAPON",
"subcategory": "CSC_WEAPON_MODS",
"skill_used": "tailor",
"difficulty": 3,
"time": "2 h",
"autolearn": true,
"using": [ [ "tailoring_nylon_patchwork", 3 ] ],
"qualities": [ { "id": "HAMMER", "level": 2 } ],
"//": "This should be using plastic sliders, but we don't have any.",
"components": [ [ [ "scrap", 2 ] ], [ [ "plastic_chunk", 2 ] ] ]
},
{
"type": "recipe",
"activity_level": "LIGHT_EXERCISE",
Expand Down

0 comments on commit 4687be0

Please sign in to comment.