From faeffd2d9554756ef9f042731b81eea06d8280d8 Mon Sep 17 00:00:00 2001 From: Fesiug Date: Thu, 29 Feb 2024 20:47:24 -0500 Subject: [PATCH] Initial commit --- .gitattributes | 10 + .gitignore | 2 + README.md | 2 + .../shared/attachments/ud_870_barrel_long.lua | 33 + .../attachments/ud_870_barrel_sawnoff.lua | 40 + .../attachments/ud_870_optic_ringsight.lua | 9 + .../shared/attachments/ud_870_skin_dirty.lua | 5 + .../shared/attachments/ud_870_slide_long.lua | 32 + .../shared/attachments/ud_870_slide_moe.lua | 37 + .../shared/attachments/ud_870_slide_poly.lua | 28 + .../shared/attachments/ud_870_stock_poly.lua | 24 + .../attachments/ud_870_stock_raptor.lua | 36 + .../attachments/ud_870_stock_sawnoff.lua | 35 + .../shared/attachments/ud_870_tube_ext.lua | 24 + .../attachments/ud_870_tube_reduced.lua | 23 + .../attachments/ud_glock_caliber_10auto.lua | 69 + .../attachments/ud_glock_caliber_22lr.lua | 73 + .../attachments/ud_glock_caliber_357sig.lua | 66 + .../attachments/ud_glock_caliber_380acp.lua | 68 + .../attachments/ud_glock_caliber_40sw.lua | 71 + .../attachments/ud_glock_caliber_45acp.lua | 73 + .../attachments/ud_glock_frame_flared.lua | 32 + .../attachments/ud_glock_frame_subcompact.lua | 29 + .../shared/attachments/ud_glock_mag_10.lua | 38 + .../shared/attachments/ud_glock_mag_100.lua | 43 + .../shared/attachments/ud_glock_mag_33.lua | 44 + .../attachments/ud_glock_muzzle_kkm.lua | 32 + .../attachments/ud_glock_skin_custom.lua | 12 + .../attachments/ud_glock_skin_olive.lua | 10 + .../shared/attachments/ud_glock_skin_tan.lua | 9 + .../attachments/ud_glock_slide_auto.lua | 56 + .../attachments/ud_glock_slide_carbine.lua | 31 + .../attachments/ud_glock_slide_comp.lua | 30 + .../shared/attachments/ud_glock_slide_cs.lua | 77 + .../shared/attachments/ud_glock_slide_lb.lua | 34 + .../attachments/ud_glock_slide_nytesyte.lua | 34 + .../shared/attachments/ud_glock_slide_sd.lua | 86 + .../attachments/ud_glock_slide_subcompact.lua | 37 + .../attachments/ud_m1014_barrel_sawn.lua | 40 + .../attachments/ud_m1014_barrel_short.lua | 33 + .../attachments/ud_m1014_barrel_sport.lua | 33 + .../attachments/ud_m1014_handguard_sport.lua | 19 + .../attachments/ud_m1014_stock_buffer.lua | 34 + .../attachments/ud_m1014_stock_gripstock.lua | 25 + .../shared/attachments/ud_m1014_stock_in.lua | 27 + .../attachments/ud_m1014_stock_sport.lua | 25 + .../shared/attachments/ud_m1014_tube_ext.lua | 26 + .../attachments/ud_m14_barrel_short.lua | 29 + .../shared/attachments/ud_m16_barrel_10in.lua | 33 + .../shared/attachments/ud_m16_barrel_14in.lua | 31 + .../shared/attachments/ud_m16_barrel_sd.lua | 84 + .../shared/attachments/ud_m16_charm_ch.lua | 18 + .../shared/attachments/ud_m16_charm_ch2.lua | 18 + .../shared/attachments/ud_m16_charm_fs.lua | 15 + .../shared/attachments/ud_m16_charm_tl.lua | 30 + lua/arccw/shared/attachments/ud_m16_fs_3d.lua | 16 + .../shared/attachments/ud_m16_fs_kac.lua | 15 + .../shared/attachments/ud_m16_fs_magpul.lua | 15 + .../shared/attachments/ud_m16_fs_sclr.lua | 16 + .../shared/attachments/ud_m16_fs_sig.lua | 15 + .../shared/attachments/ud_m16_fs_utg.lua | 16 + .../shared/attachments/ud_m16_grip_ergo.lua | 19 + .../shared/attachments/ud_m16_grip_skel.lua | 20 + .../shared/attachments/ud_m16_grip_wood.lua | 19 + lua/arccw/shared/attachments/ud_m16_hg_a1.lua | 23 + .../shared/attachments/ud_m16_hg_adar.lua | 24 + .../shared/attachments/ud_m16_hg_fpw.lua | 19 + .../shared/attachments/ud_m16_hg_heat.lua | 25 + .../shared/attachments/ud_m16_hg_lmg.lua | 41 + .../shared/attachments/ud_m16_hg_ru556.lua | 31 + .../shared/attachments/ud_m16_hg_tactical.lua | 24 + .../shared/attachments/ud_m16_hg_wood.lua | 23 + .../shared/attachments/ud_m16_mag_100.lua | 48 + .../shared/attachments/ud_m16_mag_20.lua | 34 + .../shared/attachments/ud_m16_mag_40.lua | 31 + .../attachments/ud_m16_mag_50beo_12.lua | 29 + .../attachments/ud_m16_mag_50beo_15.lua | 32 + .../shared/attachments/ud_m16_mag_60.lua | 45 + .../shared/attachments/ud_m16_mag_9mm_32.lua | 29 + .../shared/attachments/ud_m16_mag_pmag.lua | 23 + .../shared/attachments/ud_m16_mag_usas_20.lua | 45 + .../shared/attachments/ud_m16_muzzle_605.lua | 27 + .../shared/attachments/ud_m16_muzzle_607.lua | 27 + .../attachments/ud_m16_muzzle_xm177.lua | 27 + .../attachments/ud_m16_receiver_22lr.lua | 79 + .../attachments/ud_m16_receiver_300blk.lua | 72 + .../attachments/ud_m16_receiver_50beo.lua | 130 ++ .../attachments/ud_m16_receiver_9mm.lua | 96 + .../shared/attachments/ud_m16_receiver_a1.lua | 47 + .../attachments/ud_m16_receiver_altburst.lua | 40 + .../attachments/ud_m16_receiver_auto.lua | 44 + .../ud_m16_receiver_autoburstsemi.lua | 50 + .../attachments/ud_m16_receiver_cali.lua | 46 + .../attachments/ud_m16_receiver_fpw.lua | 66 + .../attachments/ud_m16_receiver_semi.lua | 41 + lua/arccw/shared/attachments/ud_m16_rs.lua | 31 + lua/arccw/shared/attachments/ud_m16_rs_3d.lua | 31 + lua/arccw/shared/attachments/ud_m16_rs_ch.lua | 31 + .../shared/attachments/ud_m16_rs_kac.lua | 31 + .../shared/attachments/ud_m16_rs_magpul.lua | 31 + .../shared/attachments/ud_m16_rs_sclr.lua | 31 + .../shared/attachments/ud_m16_stock_231.lua | 46 + .../shared/attachments/ud_m16_stock_607.lua | 41 + .../shared/attachments/ud_m16_stock_608.lua | 29 + .../shared/attachments/ud_m16_stock_adar.lua | 52 + .../attachments/ud_m16_stock_buffer.lua | 33 + .../attachments/ud_m16_stock_carbine.lua | 42 + .../shared/attachments/ud_m16_stock_moe.lua | 46 + .../shared/attachments/ud_m16_stock_ru556.lua | 28 + .../attachments/ud_m16_stock_sopmod.lua | 49 + .../attachments/ud_m16_stock_waffle.lua | 47 + .../shared/attachments/ud_m16_stock_wood.lua | 26 + .../attachments/ud_m79_barrel_short.lua | 46 + .../shared/attachments/ud_m79_stock_sawn.lua | 32 + .../attachments/ud_mini14_barrel_long.lua | 27 + .../attachments/ud_mini14_barrel_short.lua | 29 + .../attachments/ud_mini14_barrel_stub.lua | 38 + .../shared/attachments/ud_mini14_mag_10.lua | 35 + .../attachments/ud_mini14_mag_10_762.lua | 34 + .../shared/attachments/ud_mini14_mag_30.lua | 34 + .../attachments/ud_mini14_mag_30_762.lua | 35 + .../attachments/ud_mini14_mag_30_pmag.lua | 34 + .../shared/attachments/ud_mini14_mag_42.lua | 44 + .../shared/attachments/ud_mini14_mag_60.lua | 45 + .../attachments/ud_mini14_receiver_22lr.lua | 104 + .../attachments/ud_mini14_receiver_762.lua | 69 + .../attachments/ud_mini14_receiver_auto.lua | 52 + .../attachments/ud_mini14_stock_polymer.lua | 29 + .../attachments/ud_mini14_stock_sawnoff.lua | 34 + .../attachments/ud_mini14_stock_tactical.lua | 33 + .../ud_mini14_stock_tactical_polymer.lua | 32 + .../attachments/ud_uzi_body_carbine.lua | 33 + .../shared/attachments/ud_uzi_body_civvy.lua | 44 + .../shared/attachments/ud_uzi_body_micro.lua | 53 + .../shared/attachments/ud_uzi_body_mini.lua | 42 + .../shared/attachments/ud_uzi_cal_22.lua | 70 + .../shared/attachments/ud_uzi_cal_45.lua | 67 + .../shared/attachments/ud_uzi_mag_100.lua | 46 + .../shared/attachments/ud_uzi_mag_20.lua | 36 + .../shared/attachments/ud_uzi_mag_40.lua | 37 + .../shared/attachments/ud_uzi_mag_45_12.lua | 37 + .../shared/attachments/ud_uzi_mag_45_22.lua | 38 + .../attachments/ud_uzi_stock_folded.lua | 31 + .../attachments/ud_uzi_stock_polymer.lua | 28 + .../attachments/ud_uzi_stock_remove.lua | 27 + .../shared/attachments/ud_uzi_stock_wood.lua | 28 + lua/arccw/shared/languages/ud_en.lua | 42 + lua/weapons/arccw_ud_870.lua | 657 ++++++ lua/weapons/arccw_ud_glock.lua | 1218 +++++++++++ lua/weapons/arccw_ud_m1014.lua | 776 +++++++ lua/weapons/arccw_ud_m14.lua | 994 +++++++++ lua/weapons/arccw_ud_m16.lua | 1808 +++++++++++++++++ lua/weapons/arccw_ud_m79.lua | 453 +++++ lua/weapons/arccw_ud_mini14.lua | 925 +++++++++ lua/weapons/arccw_ud_uzi.lua | 820 ++++++++ 155 files changed, 13104 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 README.md create mode 100644 lua/arccw/shared/attachments/ud_870_barrel_long.lua create mode 100644 lua/arccw/shared/attachments/ud_870_barrel_sawnoff.lua create mode 100644 lua/arccw/shared/attachments/ud_870_optic_ringsight.lua create mode 100644 lua/arccw/shared/attachments/ud_870_skin_dirty.lua create mode 100644 lua/arccw/shared/attachments/ud_870_slide_long.lua create mode 100644 lua/arccw/shared/attachments/ud_870_slide_moe.lua create mode 100644 lua/arccw/shared/attachments/ud_870_slide_poly.lua create mode 100644 lua/arccw/shared/attachments/ud_870_stock_poly.lua create mode 100644 lua/arccw/shared/attachments/ud_870_stock_raptor.lua create mode 100644 lua/arccw/shared/attachments/ud_870_stock_sawnoff.lua create mode 100644 lua/arccw/shared/attachments/ud_870_tube_ext.lua create mode 100644 lua/arccw/shared/attachments/ud_870_tube_reduced.lua create mode 100644 lua/arccw/shared/attachments/ud_glock_caliber_10auto.lua create mode 100644 lua/arccw/shared/attachments/ud_glock_caliber_22lr.lua create mode 100644 lua/arccw/shared/attachments/ud_glock_caliber_357sig.lua create mode 100644 lua/arccw/shared/attachments/ud_glock_caliber_380acp.lua create mode 100644 lua/arccw/shared/attachments/ud_glock_caliber_40sw.lua create mode 100644 lua/arccw/shared/attachments/ud_glock_caliber_45acp.lua create mode 100644 lua/arccw/shared/attachments/ud_glock_frame_flared.lua create mode 100644 lua/arccw/shared/attachments/ud_glock_frame_subcompact.lua create mode 100644 lua/arccw/shared/attachments/ud_glock_mag_10.lua create mode 100644 lua/arccw/shared/attachments/ud_glock_mag_100.lua create mode 100644 lua/arccw/shared/attachments/ud_glock_mag_33.lua create mode 100644 lua/arccw/shared/attachments/ud_glock_muzzle_kkm.lua create mode 100644 lua/arccw/shared/attachments/ud_glock_skin_custom.lua create mode 100644 lua/arccw/shared/attachments/ud_glock_skin_olive.lua create mode 100644 lua/arccw/shared/attachments/ud_glock_skin_tan.lua create mode 100644 lua/arccw/shared/attachments/ud_glock_slide_auto.lua create mode 100644 lua/arccw/shared/attachments/ud_glock_slide_carbine.lua create mode 100644 lua/arccw/shared/attachments/ud_glock_slide_comp.lua create mode 100644 lua/arccw/shared/attachments/ud_glock_slide_cs.lua create mode 100644 lua/arccw/shared/attachments/ud_glock_slide_lb.lua create mode 100644 lua/arccw/shared/attachments/ud_glock_slide_nytesyte.lua create mode 100644 lua/arccw/shared/attachments/ud_glock_slide_sd.lua create mode 100644 lua/arccw/shared/attachments/ud_glock_slide_subcompact.lua create mode 100644 lua/arccw/shared/attachments/ud_m1014_barrel_sawn.lua create mode 100644 lua/arccw/shared/attachments/ud_m1014_barrel_short.lua create mode 100644 lua/arccw/shared/attachments/ud_m1014_barrel_sport.lua create mode 100644 lua/arccw/shared/attachments/ud_m1014_handguard_sport.lua create mode 100644 lua/arccw/shared/attachments/ud_m1014_stock_buffer.lua create mode 100644 lua/arccw/shared/attachments/ud_m1014_stock_gripstock.lua create mode 100644 lua/arccw/shared/attachments/ud_m1014_stock_in.lua create mode 100644 lua/arccw/shared/attachments/ud_m1014_stock_sport.lua create mode 100644 lua/arccw/shared/attachments/ud_m1014_tube_ext.lua create mode 100644 lua/arccw/shared/attachments/ud_m14_barrel_short.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_barrel_10in.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_barrel_14in.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_barrel_sd.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_charm_ch.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_charm_ch2.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_charm_fs.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_charm_tl.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_fs_3d.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_fs_kac.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_fs_magpul.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_fs_sclr.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_fs_sig.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_fs_utg.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_grip_ergo.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_grip_skel.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_grip_wood.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_hg_a1.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_hg_adar.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_hg_fpw.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_hg_heat.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_hg_lmg.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_hg_ru556.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_hg_tactical.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_hg_wood.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_mag_100.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_mag_20.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_mag_40.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_mag_50beo_12.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_mag_50beo_15.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_mag_60.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_mag_9mm_32.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_mag_pmag.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_mag_usas_20.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_muzzle_605.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_muzzle_607.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_muzzle_xm177.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_receiver_22lr.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_receiver_300blk.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_receiver_50beo.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_receiver_9mm.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_receiver_a1.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_receiver_altburst.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_receiver_auto.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_receiver_autoburstsemi.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_receiver_cali.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_receiver_fpw.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_receiver_semi.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_rs.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_rs_3d.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_rs_ch.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_rs_kac.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_rs_magpul.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_rs_sclr.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_stock_231.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_stock_607.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_stock_608.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_stock_adar.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_stock_buffer.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_stock_carbine.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_stock_moe.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_stock_ru556.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_stock_sopmod.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_stock_waffle.lua create mode 100644 lua/arccw/shared/attachments/ud_m16_stock_wood.lua create mode 100644 lua/arccw/shared/attachments/ud_m79_barrel_short.lua create mode 100644 lua/arccw/shared/attachments/ud_m79_stock_sawn.lua create mode 100644 lua/arccw/shared/attachments/ud_mini14_barrel_long.lua create mode 100644 lua/arccw/shared/attachments/ud_mini14_barrel_short.lua create mode 100644 lua/arccw/shared/attachments/ud_mini14_barrel_stub.lua create mode 100644 lua/arccw/shared/attachments/ud_mini14_mag_10.lua create mode 100644 lua/arccw/shared/attachments/ud_mini14_mag_10_762.lua create mode 100644 lua/arccw/shared/attachments/ud_mini14_mag_30.lua create mode 100644 lua/arccw/shared/attachments/ud_mini14_mag_30_762.lua create mode 100644 lua/arccw/shared/attachments/ud_mini14_mag_30_pmag.lua create mode 100644 lua/arccw/shared/attachments/ud_mini14_mag_42.lua create mode 100644 lua/arccw/shared/attachments/ud_mini14_mag_60.lua create mode 100644 lua/arccw/shared/attachments/ud_mini14_receiver_22lr.lua create mode 100644 lua/arccw/shared/attachments/ud_mini14_receiver_762.lua create mode 100644 lua/arccw/shared/attachments/ud_mini14_receiver_auto.lua create mode 100644 lua/arccw/shared/attachments/ud_mini14_stock_polymer.lua create mode 100644 lua/arccw/shared/attachments/ud_mini14_stock_sawnoff.lua create mode 100644 lua/arccw/shared/attachments/ud_mini14_stock_tactical.lua create mode 100644 lua/arccw/shared/attachments/ud_mini14_stock_tactical_polymer.lua create mode 100644 lua/arccw/shared/attachments/ud_uzi_body_carbine.lua create mode 100644 lua/arccw/shared/attachments/ud_uzi_body_civvy.lua create mode 100644 lua/arccw/shared/attachments/ud_uzi_body_micro.lua create mode 100644 lua/arccw/shared/attachments/ud_uzi_body_mini.lua create mode 100644 lua/arccw/shared/attachments/ud_uzi_cal_22.lua create mode 100644 lua/arccw/shared/attachments/ud_uzi_cal_45.lua create mode 100644 lua/arccw/shared/attachments/ud_uzi_mag_100.lua create mode 100644 lua/arccw/shared/attachments/ud_uzi_mag_20.lua create mode 100644 lua/arccw/shared/attachments/ud_uzi_mag_40.lua create mode 100644 lua/arccw/shared/attachments/ud_uzi_mag_45_12.lua create mode 100644 lua/arccw/shared/attachments/ud_uzi_mag_45_22.lua create mode 100644 lua/arccw/shared/attachments/ud_uzi_stock_folded.lua create mode 100644 lua/arccw/shared/attachments/ud_uzi_stock_polymer.lua create mode 100644 lua/arccw/shared/attachments/ud_uzi_stock_remove.lua create mode 100644 lua/arccw/shared/attachments/ud_uzi_stock_wood.lua create mode 100644 lua/arccw/shared/languages/ud_en.lua create mode 100644 lua/weapons/arccw_ud_870.lua create mode 100644 lua/weapons/arccw_ud_glock.lua create mode 100644 lua/weapons/arccw_ud_m1014.lua create mode 100644 lua/weapons/arccw_ud_m14.lua create mode 100644 lua/weapons/arccw_ud_m16.lua create mode 100644 lua/weapons/arccw_ud_m79.lua create mode 100644 lua/weapons/arccw_ud_mini14.lua create mode 100644 lua/weapons/arccw_ud_uzi.lua diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..f8cf009 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,10 @@ +# Auto detect text files and perform LF normalization +* text=auto +*.ogg filter=lfs diff=lfs merge=lfs -text +*.wav filter=lfs diff=lfs merge=lfs -text +*.mdl filter=lfs diff=lfs merge=lfs -text +*.dx90.vtx filter=lfs diff=lfs merge=lfs -text +*.phy filter=lfs diff=lfs merge=lfs -text +*.vvd filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.vtf filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d94de52 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.dx80.vtx +*.sw.vtx \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..3257a42 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# Decay + Urban Decay for Garry's Mod diff --git a/lua/arccw/shared/attachments/ud_870_barrel_long.lua b/lua/arccw/shared/attachments/ud_870_barrel_long.lua new file mode 100644 index 0000000..132bff3 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_870_barrel_long.lua @@ -0,0 +1,33 @@ +att.PrintName = "Express-12 30\" Long Barrel" +att.AbbrevName = "30\" Long Barrel" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Remington 870 30\" Wingmaster Barrel" + att.AbbrevName = "30\" Wingmaster Barrel" +end + +att.Icon = Material("entities/att/acwatt_ud_870_barrel_long.png", "smooth mips") +att.Description = "Extended, unwieldy barrel. Reduces pellet spread and improves range." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_870_barrel" + +att.AutoStats = true + +att.Mult_AccuracyMOA = 0.8 +att.Mult_Recoil = 0.8 +att.Mult_Range = 1.2 + +att.Mult_Sway = 1.5 +att.Mult_SightTime = 1.25 +att.Mult_SpeedMult = 0.95 + +att.Mult_HipDispersion = 1.25 + +att.Add_BarrelLength = 4 + +att.ActivateElements = {"ud_870_barrel_long"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_870_barrel_sawnoff.lua b/lua/arccw/shared/attachments/ud_870_barrel_sawnoff.lua new file mode 100644 index 0000000..c07f178 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_870_barrel_sawnoff.lua @@ -0,0 +1,40 @@ +att.PrintName = "Express-12 10\" ACCWS Breacher Barrel" +att.AbbrevName = "10\" Breacher Barrel" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Remington 870 MCS 10\" Breacher Barrel" +end + +att.Icon = Material("entities/att/acwatt_ud_870_barrel_sawnoff.png", "smooth mips") +att.Description = "Hand-made short barrel with no sights. More agile and has a bigger pellet spread." +att.Desc_Pros = { +} +att.Desc_Cons = { + "uc.nofs", +} +att.Desc_Neutrals = { +} +att.Slot = "ud_870_barrel" + +att.AutoStats = true +att.SortOrder = -1 + +att.Mult_AccuracyMOA = 1.5 +att.Mult_Recoil = 1.25 +att.Mult_Range = 0.8 + +att.Mult_Sway = 0.5 +att.Mult_SightTime = 0.75 +att.Mult_SpeedMult = 1.05 + +att.Mult_HipDispersion = 0.75 + +att.Add_BarrelLength = -4 + +att.A_Hook_Add_SightsDispersion = function(wep, data) + if data and !wep.Attachments[1].Installed then + data.add = data.add + 250 + end +end + +att.ActivateElements = {"ud_870_barrel_sawnoff"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_870_optic_ringsight.lua b/lua/arccw/shared/attachments/ud_870_optic_ringsight.lua new file mode 100644 index 0000000..ee872d8 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_870_optic_ringsight.lua @@ -0,0 +1,9 @@ +att.PrintName = "Ring Sight" +att.Icon = Material("entities/att/acwatt_ud_870_optic_ringsight.png", "mips smooth") +att.Description = "Rear sight module that allows for easier iron sight alignment but a reduced field of vision." +att.Slot = "ud_870_optic" + +att.Desc_Neutrals = {"uc.cosmetic"} + +att.SortOrder = 999 +att.AutoStats = true \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_870_skin_dirty.lua b/lua/arccw/shared/attachments/ud_870_skin_dirty.lua new file mode 100644 index 0000000..ff82949 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_870_skin_dirty.lua @@ -0,0 +1,5 @@ +att.PrintName = "Worn Nickel" +att.Icon = Material("", "smooth mips") +att.Description = "Been through a lot, yet ready for more." +att.Desc_Neutrals = {"uc.cosmetic"} +att.Slot = "ud_870_skin" \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_870_slide_long.lua b/lua/arccw/shared/attachments/ud_870_slide_long.lua new file mode 100644 index 0000000..50e0feb --- /dev/null +++ b/lua/arccw/shared/attachments/ud_870_slide_long.lua @@ -0,0 +1,32 @@ +att.PrintName = "Express-12 Long Forend" +att.AbbrevName = "Long Forend" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Remington 870 Long Forend" +end + +att.Icon = Material("entities/att/acwatt_ud_870_slide_long.png", "smooth mips") +att.Description = "Long wood forend for the R870. Additional heft improves grip but is slower to cycle." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_870_slide" + +att.AutoStats = true + +--att.Mult_SightTime = 1.75 +--att.Mult_Recoil = 0.5 +--att.Mult_Sway = 3 + +att.Mult_SightTime = 1.15 + +att.Mult_Sway = 0.75 +att.Mult_Recoil = 0.9 +att.Mult_RecoilSide = 0.5 + +att.Mult_CycleTime = 1.1 + +att.ActivateElements = {"ud_870_slide_long"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_870_slide_moe.lua b/lua/arccw/shared/attachments/ud_870_slide_moe.lua new file mode 100644 index 0000000..26c430d --- /dev/null +++ b/lua/arccw/shared/attachments/ud_870_slide_moe.lua @@ -0,0 +1,37 @@ +att.PrintName = "Express-12 MOE Forend" +att.AbbrevName = "MOE Forend" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Remington 870 MOE Forend" +end + +att.Icon = Material("entities/att/acwatt_ud_870_slide_moe.png", "smooth mips") +att.Description = "A lightweight polymer forend. Easier to cycle but harder to grip on, increasing both fire rate and recoil." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_870_slide" + +att.AutoStats = true + +-- att.Mult_SightTime = 0.75 +-- att.Mult_Recoil = 1.15 +-- att.Mult_Sway = 1.15 + +att.Mult_SightTime = 0.85 + +att.Mult_Sway = 1.25 +att.Mult_Recoil = 1.1 +att.Mult_RecoilSide = 1.5 + +att.Mult_CycleTime = 0.9 + +att.LHIK = true + +att.ModelOffset = Vector(-0, 0.1, 0.2) +att.Model = "models/weapons/arccw/atts/moe_lhik.mdl" + +att.ActivateElements = {"ud_870_slide_moe"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_870_slide_poly.lua b/lua/arccw/shared/attachments/ud_870_slide_poly.lua new file mode 100644 index 0000000..5f23ffa --- /dev/null +++ b/lua/arccw/shared/attachments/ud_870_slide_poly.lua @@ -0,0 +1,28 @@ +att.PrintName = "Express-12 Polymer Forend" +att.AbbrevName = "Polymer Forend" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Remington 870 Polymer Forend" +end + +att.Icon = Material("entities/att/acwatt_ud_870_slide_poly.png", "smooth mips") +att.Description = "A hardened polymer forend, improving sighted mobility slightly." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_870_slide" + +att.AutoStats = true + +att.Mult_SightTime = 0.95 +att.Mult_SightedSpeedMult = 1.05 +att.Mult_RecoilSide = 1.15 + +att.LHIK = true + +att.Model = "models/weapons/arccw/atts/poly_lhik.mdl" + +att.ActivateElements = {"ud_870_slide_poly"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_870_stock_poly.lua b/lua/arccw/shared/attachments/ud_870_stock_poly.lua new file mode 100644 index 0000000..1ae4c0e --- /dev/null +++ b/lua/arccw/shared/attachments/ud_870_stock_poly.lua @@ -0,0 +1,24 @@ +att.PrintName = "Express-12 Polymer Stock" +att.AbbrevName = "Polymer Stock" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Remington 870 Polymer Stock" +end + +att.Icon = Material("entities/att/acwatt_ud_870_stock.png", "smooth mips") +att.Description = "Lightweight polymer stock." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_870_stock" + +att.AutoStats = true + +att.Mult_SightedSpeedMult = 1.1 +att.Mult_SightTime = 0.9 +att.Mult_Recoil = 1.15 + +att.ActivateElements = {"ud_870_stock_poly"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_870_stock_raptor.lua b/lua/arccw/shared/attachments/ud_870_stock_raptor.lua new file mode 100644 index 0000000..acdc7c1 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_870_stock_raptor.lua @@ -0,0 +1,36 @@ +att.PrintName = "Express-12 Raptor Grip" +att.AbbrevName = "Raptor Grip" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Remington 870 Tac-14 Grip" + att.AbbrevName = "Tac-14 Grip" +end + +att.Icon = Material("entities/att/acwatt_ud_870_stock_raptor.png", "smooth mips") +att.Description = "Stockless polymer grip for when you simply don't care about accuracy or control, and just want the lightest gun possible." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_870_stock" + +att.AutoStats = true + +att.Mult_SpeedMult = 1.05 +att.Mult_SightTime = 0.6 +att.Mult_SightedSpeedMult = 1.2 +att.Mult_ShootSpeedMult = 1.1 + +att.Mult_DrawTime = 0.6 +att.Mult_HolsterTime = 0.6 + +att.Mult_Recoil = 1.75 +att.Mult_RecoilSide = 2 +att.Mult_VisualRecoilMult = 0.5 + +att.Add_BarrelLength = -4 +att.Mult_Sway = 3 + +att.ActivateElements = {"ud_870_stock_raptor"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_870_stock_sawnoff.lua b/lua/arccw/shared/attachments/ud_870_stock_sawnoff.lua new file mode 100644 index 0000000..a44a82e --- /dev/null +++ b/lua/arccw/shared/attachments/ud_870_stock_sawnoff.lua @@ -0,0 +1,35 @@ +att.PrintName = "Express-12 Sawn-off Stock" +att.AbbrevName = "Sawn-off Stock" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Remington 870 Sawn-off Stock" +end + +att.Icon = Material("entities/att/acwatt_ud_870_stock_sawnoff.png", "smooth mips") +att.Description = "Wooden stock with only a grip remaining. In case you want to roleplay as a bank robber." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_870_stock" + +att.AutoStats = true + +att.Mult_SpeedMult = 1.025 +att.Mult_SightTime = 0.75 +att.Mult_SightedSpeedMult = 1.1 +att.Mult_ShootSpeedMult = 1.05 + +att.Mult_DrawTime = 0.75 +att.Mult_HolsterTime = 0.75 + +att.Mult_Recoil = 1.5 +att.Mult_RecoilSide = 2 +att.Mult_VisualRecoilMult = 0.5 + +att.Add_BarrelLength = -4 +att.Mult_Sway = 3 + +att.ActivateElements = {"ud_870_stock_sawnoff"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_870_tube_ext.lua b/lua/arccw/shared/attachments/ud_870_tube_ext.lua new file mode 100644 index 0000000..589f433 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_870_tube_ext.lua @@ -0,0 +1,24 @@ +att.PrintName = "Express-12 8 Shell Tube" +att.AbbrevName = "8 Shell Tube" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Remington 870 8 Shell Tube" +end + + +att.Icon = Material("entities/att/acwatt_ud_870_tube_ext.png", "smooth mips") +att.Description = "An extension of the default shell tube holds more rounds, but increases weapon weight." +att.Desc_Pros = {} +att.Desc_Cons = {} +att.Desc_Neutrals = {} +att.Slot = "ud_870_tube" + +att.AutoStats = true + +att.Override_ClipSize = 8 +att.Mult_Sway = 1.5 +att.Mult_SightedSpeedMult = 0.8 +att.Mult_SightTime = 1.15 +att.Mult_ReloadTime = 1.1 + +att.ActivateElements = {"ud_870_tube_ext"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_870_tube_reduced.lua b/lua/arccw/shared/attachments/ud_870_tube_reduced.lua new file mode 100644 index 0000000..756fb2e --- /dev/null +++ b/lua/arccw/shared/attachments/ud_870_tube_reduced.lua @@ -0,0 +1,23 @@ +att.PrintName = "Express-12 4 Shell Tube" +att.AbbrevName = "4 Shell Tube" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Remington 870 4 Shell Tube" +end + +att.Icon = Material("entities/att/acwatt_ud_870_tube_reduced.png", "smooth mips") +att.Description = "Shortened shell tube that holds fewer rounds, but reduces weapon weight." +att.Desc_Pros = {} +att.Desc_Cons = {} +att.Desc_Neutrals = {} +att.Slot = "ud_870_tube" + +att.AutoStats = true + +att.Override_ClipSize = 4 +att.Mult_Sway = 0.75 +att.Mult_SightedSpeedMult = 1.1 +att.Mult_SightTime = 0.85 +att.Mult_ReloadTime = 0.9 + +att.ActivateElements = {"ud_870_tube_reduced"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_glock_caliber_10auto.lua b/lua/arccw/shared/attachments/ud_glock_caliber_10auto.lua new file mode 100644 index 0000000..8b65b4d --- /dev/null +++ b/lua/arccw/shared/attachments/ud_glock_caliber_10auto.lua @@ -0,0 +1,69 @@ +att.PrintName = "Glock 10mm Auto Conversion" +att.AbbrevName = "10mm Auto" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "GEN3 10mm Auto Conversion" +end + +att.SortOrder = 80 +att.Icon = Material("entities/att/uc_bullets/10.png", "smooth mips") +att.Description = "The FBI's preferred caliber of choice.\nSignificantly more powerful, but weapon handling suffers." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_glock_caliber" + +att.AutoStats = true + +att.Override_Trivia_Calibre = "10mm Auto" + +att.Mult_Damage = ArcCW.UC.CalConv("9mm", "10mm", "max") +att.Mult_DamageMin = ArcCW.UC.CalConv("9mm", "10mm", "min") +att.Mult_Penetration = ArcCW.UC.CalConv("9mm", "10mm", "pen") + +att.Mult_Recoil = 1.25 +att.Mult_RecoilSide = 1.25 +att.Mult_ReloadTime = 1.15 +att.Mult_MalfunctionMean = 0.75 +att.Mult_PhysBulletMuzzleVelocity = 400 / 375 + +att.Mult_ClipSize = 0.9 +att.Override_ShellScale = 1 + +local path = ")weapons/arccw_ud/glock/" +local common = ")/arccw_uc/common/" +local tail = common .. "10x25/" +local fire10 = {path .. "fire-10-01.ogg",path .. "fire-10-02.ogg",path .. "fire-10-03.ogg",path .. "fire-10-04.ogg",path .. "fire-10-05.ogg",path .. "fire-10-06.ogg"} +local fire10sup = {path .. "fire-40-sup-01.ogg",path .. "fire-40-sup-02.ogg",path .. "fire-40-sup-03.ogg",path .. "fire-40-sup-04.ogg",path .. "fire-40-sup-05.ogg",path .. "fire-40-sup-06.ogg"} +local fire10dist = {tail .. "fire-dist-10x25-pistol-ext-01.ogg", tail .. "fire-dist-10x25-pistol-ext-02.ogg", tail .. "fire-dist-10x25-pistol-ext-03.ogg", tail .. "fire-dist-10x25-pistol-ext-04.ogg", tail .. "fire-dist-10x25-pistol-ext-05.ogg", tail .. "fire-dist-10x25-pistol-ext-06.ogg"} +local fire10distint = {common .. "fire-dist-int-pistol-heavy-01.ogg", common .. "fire-dist-int-pistol-heavy-02.ogg", common .. "fire-dist-int-pistol-heavy-03.ogg", common .. "fire-dist-int-pistol-heavy-04.ogg", common .. "fire-dist-int-pistol-heavy-05.ogg", common .. "fire-dist-int-pistol-heavy-06.ogg"} + +att.Hook_GetShootSound = function(wep, sound) + if wep:GetBuff_Override("Silencer") then + return fire10sup + else + return fire10 + end +end + + +att.Hook_GetDistantShootSoundOutdoors = function(wep, distancesound) + if wep:GetBuff_Override("Silencer") then + -- fallback to script + else + return fire10dist + end +end + + + +att.Hook_GetDistantShootSoundIndoors = function(wep, distancesound) + if wep:GetBuff_Override("Silencer") then + -- fallback to script + else + return fire10distint + end +end \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_glock_caliber_22lr.lua b/lua/arccw/shared/attachments/ud_glock_caliber_22lr.lua new file mode 100644 index 0000000..f440bc5 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_glock_caliber_22lr.lua @@ -0,0 +1,73 @@ +att.PrintName = "Glock .22 LR Conversion" +att.AbbrevName = ".22 LR" + +if not GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "GEN3 .22 LR Conversion" +end + +att.SortOrder = 00 +att.Icon = Material("entities/att/uc_bullets/22lr.png", "smooth mips") +att.Description = "A plinking cartridge that is easy to handle but not very lethal.\nIts form factor allows more rounds to be stuffed into magazines." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_glock_caliber" + +att.AutoStats = true + +att.Override_Trivia_Calibre = ".22 Long Rifle" +att.Override_Ammo = "plinking" + +att.Mult_Damage = ArcCW.UC.CalConv("9mm", "22lr", "max") +att.Mult_DamageMin = ArcCW.UC.CalConv("9mm", "22lr", "min") +att.Mult_Penetration = ArcCW.UC.CalConv("9mm", "22lr", "pen") + +att.Mult_Recoil = 0.25 +att.Mult_VisualRecoilMult = 0.25 +att.Mult_RPM = 1.5 +att.Mult_Penetration = 0.1 +att.Mult_ShootSpeedMult = 1.2 + +att.Override_PhysTracerProfile = "uc_plinking" +att.Mult_PhysBulletMuzzleVelocity = 325 / 375 + +att.Mult_ClipSize = 1.2 + +att.Override_ShellModel = "models/weapons/arccw/uc_shells/22lr.mdl" +att.Override_ShellScale = 1 +att.Override_ShellSounds = ArcCW.TinyShellSoundsTable + +local path = "arccw_uc/common/" +local fire22 = {path .. "fire-22-01.ogg",path .. "fire-22-02.ogg",path .. "fire-22-03.ogg",path .. "fire-22-04.ogg",path .. "fire-22-05.ogg",path .. "fire-22-06.ogg"} +local fire22sup = {path .. "fire-22-sup-01.ogg",path .. "fire-22-sup-02.ogg",path .. "fire-22-sup-03.ogg",path .. "fire-22-sup-04.ogg",path .. "fire-22-sup-05.ogg",path .. "fire-22-sup-06.ogg"} +local fire22dist = {path .. "fire-22-dist-01.ogg", path .. "fire-22-dist-02.ogg", path .. "fire-22-dist-03.ogg", path .. "fire-22-dist-04.ogg", path .. "fire-22-dist-05.ogg", path .. "fire-22-dist-06.ogg"} +local fire22distint = {path .. "fire-dist-int-pistol-light-01.ogg", path .. "fire-dist-int-pistol-light-02.ogg", path .. "fire-dist-int-pistol-light-03.ogg", path .. "fire-dist-int-pistol-light-04.ogg", path .. "fire-dist-int-pistol-light-05.ogg", path .. "fire-dist-int-pistol-light-06.ogg"} + +att.Hook_GetShootSound = function(wep, sound) + if wep:GetBuff_Override("Silencer") then + return fire22sup + else + return fire22 + end +end + + +att.Hook_GetDistantShootSoundOutdoors = function(wep, distancesound) + if wep:GetBuff_Override("Silencer") then + -- fallback to script + else + return fire22dist + end +end + + +att.Hook_GetDistantShootSoundIndoors = function(wep, distancesound) + if wep:GetBuff_Override("Silencer") then + -- fallback to script + else + return fire22distint + end +end diff --git a/lua/arccw/shared/attachments/ud_glock_caliber_357sig.lua b/lua/arccw/shared/attachments/ud_glock_caliber_357sig.lua new file mode 100644 index 0000000..9c41608 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_glock_caliber_357sig.lua @@ -0,0 +1,66 @@ +att.PrintName = "Glock .357 SIG Conversion" +att.AbbrevName = ".357 SIG" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "GEN3 .357 SIG Conversion" +end + +att.SortOrder = 90 +att.Icon = Material("entities/att/uc_bullets/357sig.png", "smooth mips") +att.Description = "A law-enforcement caliber well-known for its accuracy." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_glock_caliber" + +att.AutoStats = true + +att.Override_Trivia_Calibre = ".357 SIG" + +att.Mult_Damage = ArcCW.UC.CalConv("9mm", "357sig", "max") +att.Mult_DamageMin = ArcCW.UC.CalConv("9mm", "357sig", "min") +att.Mult_Penetration = ArcCW.UC.CalConv("9mm", "357sig", "pen") + +att.Mult_AccuracyMOA = 0.5 +att.Mult_Recoil = 1.15 + +att.Override_PhysBulletMuzzleVelocity = 410 + +att.Mult_ClipSize = 0.9 +att.Override_ShellModel = "models/weapons/arccw/uc_shells/357sig.mdl" +att.Override_ShellScale = 1 + +local path = ")weapons/arccw_ud/glock/" +local common = ")/arccw_uc/common/" +local tail = common .. "357sig/" +local fire357 = {path .. "fire-357-01.ogg",path .. "fire-357-02.ogg",path .. "fire-357-03.ogg",path .. "fire-357-04.ogg",path .. "fire-357-05.ogg",path .. "fire-357-06.ogg"} +local fire357sup = {path .. "fire-sup-01.ogg",path .. "fire-sup-02.ogg",path .. "fire-sup-03.ogg",path .. "fire-sup-04.ogg",path .. "fire-sup-05.ogg",path .. "fire-sup-06.ogg"} -- Placeholder +local fire357dist = {tail .. "fire-dist-357sig-pistol-ext-01.ogg",tail .. "fire-dist-357sig-pistol-ext-02.ogg",tail .. "fire-dist-357sig-pistol-ext-03.ogg",tail .. "fire-dist-357sig-pistol-ext-04.ogg",tail .. "fire-dist-357sig-pistol-ext-05.ogg",tail .. "fire-dist-357sig-pistol-ext-06.ogg"} + +att.Hook_GetShootSound = function(wep, sound) + if wep:GetBuff_Override("Silencer") then + return fire357sup + else + return fire357 + end +end + + +att.Hook_GetDistantShootSoundOutdoors = function(wep, distancesound) + if wep:GetBuff_Override("Silencer") then + -- fallback to script + else + return fire357dist + end +end + +att.Hook_GetDistantShootSoundIndoors = function(wep, distancesound) + if wep:GetBuff_Override("Silencer") then + -- fallback to script + else + -- fallback to script + end +end \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_glock_caliber_380acp.lua b/lua/arccw/shared/attachments/ud_glock_caliber_380acp.lua new file mode 100644 index 0000000..2c5d1b8 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_glock_caliber_380acp.lua @@ -0,0 +1,68 @@ +att.PrintName = "Glock .380 ACP Conversion" +att.AbbrevName = ".380 ACP" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "GEN3 .380 ACP Conversion" +end + +att.SortOrder = 50 +att.Icon = Material("entities/att/uc_bullets/380acp.png", "smooth mips") +att.Description = "An old and smaller pistol caliber that is somewhat obsolete.\nHas lower recoil and reduced effective range." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_glock_caliber" + +att.AutoStats = true + +att.Override_Trivia_Calibre = ".380 ACP" + + +att.Mult_Damage = ArcCW.UC.CalConv("9mm", "380acp", "max") +att.Mult_DamageMin = ArcCW.UC.CalConv("9mm", "380acp", "min") +att.Mult_Penetration = ArcCW.UC.CalConv("9mm", "380acp", "pen") + +att.Mult_Recoil = 0.65 +att.Override_PhysBulletMuzzleVelocity = 310 + +att.Override_ShellModel = "models/weapons/arccw/uc_shells/357sig.mdl" +att.Override_ShellScale = 1 + +local path = ")weapons/arccw_ud/glock/" +local common = ")/arccw_uc/common/" +local tail = common .. "357sig/" +local fire380 = "weapons/arccw_ud/glock/fire_380.ogg" +local fire380sup = { "weapons/arccw_ud/glock/fire_supp_380.ogg" } +local fire380dist = { "weapons/arccw_ud/glock/fire_dist_380.ogg" } +local fire380distint = {common .. "fire-dist-int-pistol-light-01.ogg",common .. "fire-dist-int-pistol-light-02.ogg",common .. "fire-dist-int-pistol-light-03.ogg",common .. "fire-dist-int-pistol-light-04.ogg",common .. "fire-dist-int-pistol-light-05.ogg",common .. "fire-dist-int-pistol-light-06.ogg"} + +att.Hook_GetShootSound = function(wep, sound) + if wep:GetBuff_Override("Silencer") then + return fire380sup + else + return fire380 + end +end + +att.Hook_GetDistantShootSoundOutdoors = function(wep, distancesound) + if wep:GetBuff_Override("Silencer") then + -- fallback to script + else + return fire380dist + end +end + + +att.Hook_GetDistantShootSoundIndoors = function(wep, distancesound) + if wep:GetBuff_Override("Silencer") then + -- fallback to script + else + return fire380distint + end +end + +att.GivesFlags = {"cal_subsonic"} +att.ExcludeFlags = {"powder_subsonic"} diff --git a/lua/arccw/shared/attachments/ud_glock_caliber_40sw.lua b/lua/arccw/shared/attachments/ud_glock_caliber_40sw.lua new file mode 100644 index 0000000..9237943 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_glock_caliber_40sw.lua @@ -0,0 +1,71 @@ +att.PrintName = "Glock .40 S&W Conversion" +att.AbbrevName = ".40 S&W" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "GEN3 .40 S&W Conversion" +end + +att.SortOrder = 100 +att.Icon = Material("entities/att/uc_bullets/40sw.png", "smooth mips") +att.Description = "Law-enforcement caliber with a slightly larger bullet and shorter case.\nRetains damage over distance better than other calibers." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_glock_caliber" + +att.AutoStats = true + +att.Override_Trivia_Calibre = ".40 S&W" + +att.Mult_Damage = ArcCW.UC.CalConv("9mm", "40sw", "max") +att.Mult_DamageMin = ArcCW.UC.CalConv("9mm", "40sw", "min") +att.Mult_Penetration = ArcCW.UC.CalConv("9mm", "40sw", "pen") + +att.Mult_Recoil = 1.15 + +att.Override_PhysBulletMuzzleVelocity = 300 + +att.Mult_ClipSize = .9 +att.Override_ShellModel = "models/weapons/arccw/uc_shells/40sw.mdl" +att.Override_ShellScale = 1 + +local path = ")weapons/arccw_ud/glock/" +local common = ")/arccw_uc/common/" +local tail = common .. "40sw/" +local fire40 = {path .. "fire-40-01.ogg",path .. "fire-40-02.ogg",path .. "fire-40-03.ogg",path .. "fire-40-04.ogg",path .. "fire-40-05.ogg",path .. "fire-40-06.ogg"} +local fire40sup = {path .. "fire-40-sup-01.ogg",path .. "fire-40-sup-02.ogg",path .. "fire-40-sup-03.ogg",path .. "fire-40-sup-04.ogg",path .. "fire-40-sup-05.ogg",path .. "fire-40-sup-06.ogg"} +local fire40dist = {tail .. "fire-dist-40sw-pistol-ext-01.ogg", tail .. "fire-dist-40sw-pistol-ext-02.ogg", tail .. "fire-dist-40sw-pistol-ext-03.ogg", tail .. "fire-dist-40sw-pistol-ext-04.ogg", tail .. "fire-dist-40sw-pistol-ext-05.ogg", tail .. "fire-dist-40sw-pistol-ext-06.ogg"} +local fire40distint = {common .. "fire-dist-int-pistol-heavy-01.ogg", common .. "fire-dist-int-pistol-heavy-02.ogg", common .. "fire-dist-int-pistol-heavy-03.ogg", common .. "fire-dist-int-pistol-heavy-04.ogg", common .. "fire-dist-int-pistol-heavy-05.ogg", common .. "fire-dist-int-pistol-heavy-06.ogg"} + +att.Hook_GetShootSound = function(wep, sound) + if wep:GetBuff_Override("Silencer") then + return fire40sup + else + return fire40 + end +end + + +att.Hook_GetDistantShootSoundOutdoors = function(wep, distancesound) + if wep:GetBuff_Override("Silencer") then + -- fallback to script + else + return fire40dist + end +end + + + +att.Hook_GetDistantShootSoundIndoors = function(wep, distancesound) + if wep:GetBuff_Override("Silencer") then + -- fallback to script + else + return fire40distint + end +end + +att.GivesFlags = {"cal_subsonic"} +att.ExcludeFlags = {"powder_subsonic"} diff --git a/lua/arccw/shared/attachments/ud_glock_caliber_45acp.lua b/lua/arccw/shared/attachments/ud_glock_caliber_45acp.lua new file mode 100644 index 0000000..9c54ba8 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_glock_caliber_45acp.lua @@ -0,0 +1,73 @@ +att.PrintName = "Glock .45 ACP Conversion" +att.AbbrevName = ".45 ACP" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "GEN3 .45 ACP Conversion" +end + +att.SortOrder = 70 +att.Icon = Material("entities/att/uc_bullets/45acp.png", "smooth mips") +att.Description = "A venerable caliber with excellent close-range stopping power.\nBecause of the large bullet diameter, magazine capacity is significantly reduced." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_glock_caliber" + +att.AutoStats = true + +att.Override_Trivia_Calibre = ".45 ACP" + +att.Mult_Damage = ArcCW.UC.CalConv("9mm", "45acp", "max") +att.Mult_DamageMin = ArcCW.UC.CalConv("9mm", "45acp", "min") +att.Mult_Penetration = ArcCW.UC.CalConv("9mm", "45acp", "pen") + +att.Mult_RangeMin = 0.5 +att.Mult_Recoil = 1.5 +att.Mult_RecoilSide = 1.5 +att.Mult_MalfunctionMean = 0.6 + +att.Override_PhysBulletMuzzleVelocity = 320 + +att.Mult_ClipSize = 0.76 + +att.Mult_RPM = 0.7619 + +local path = ")weapons/arccw_ud/glock/" +local common = ")/arccw_uc/common/" +local tail = common .. "45acp/" +local fire45 = {path .. "fire-45-01.ogg",path .. "fire-45-02.ogg",path .. "fire-45-03.ogg",path .. "fire-45-04.ogg",path .. "fire-45-05.ogg",path .. "fire-45-06.ogg"} +local fire45sup = {path .. "fire-45-sup-01.ogg",path .. "fire-45-sup-02.ogg",path .. "fire-45-sup-03.ogg",path .. "fire-45-sup-04.ogg",path .. "fire-45-sup-05.ogg",path .. "fire-45-sup-06.ogg"} +local fire45dist = {tail .. "fire-dist-45acp-pistol-ext-01.ogg",tail .. "fire-dist-45acp-pistol-ext-02.ogg",tail .. "fire-dist-45acp-pistol-ext-03.ogg",tail .. "fire-dist-45acp-pistol-ext-04.ogg",tail .. "fire-dist-45acp-pistol-ext-05.ogg",tail .. "fire-dist-45acp-pistol-ext-06.ogg"} +local fire45distint = {common .. "fire-dist-int-pistol-heavy-01.ogg", common .. "fire-dist-int-pistol-heavy-02.ogg", common .. "fire-dist-int-pistol-heavy-03.ogg", common .. "fire-dist-int-pistol-heavy-04.ogg", common .. "fire-dist-int-pistol-heavy-05.ogg", common .. "fire-dist-int-pistol-heavy-06.ogg"} + +att.Hook_GetShootSound = function(wep, sound) + if wep:GetBuff_Override("Silencer") then + return fire45sup + else + return fire45 + end +end + + +att.Hook_GetDistantShootSoundOutdoors = function(wep, distancesound) + if wep:GetBuff_Override("Silencer") then + -- fallback to script + else + return fire45dist + end +end + + +att.Hook_GetDistantShootSoundIndoors = function(wep, distancesound) + if wep:GetBuff_Override("Silencer") then + -- fallback to script + else + return fire45distint + end +end + +att.GivesFlags = {"cal_subsonic"} +att.ExcludeFlags = {"powder_subsonic"} diff --git a/lua/arccw/shared/attachments/ud_glock_frame_flared.lua b/lua/arccw/shared/attachments/ud_glock_frame_flared.lua new file mode 100644 index 0000000..32bb522 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_glock_frame_flared.lua @@ -0,0 +1,32 @@ +att.PrintName = "GEN3 Flared Frame" +att.AbbrevName = "Flared Magwell" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Glock 17 Flared Frame" +end + +att.Icon = Material("entities/att/acwatt_ud_glock_frame_flared.png", "smooth mips") +att.Description = "Custom frame with a flared magwell to facilitate faster reloads. The extra weight slows down handling by a bit." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_glock_frame" + +att.AutoStats = true + +att.Mult_ReloadTime = 0.9 +att.Mult_SightTime = 1.1 +att.Mult_SightedSpeedMult = 0.95 +att.Mult_DrawTime = 1.25 +att.Mult_HolsterTime = 1.25 + +att.ActivateElements = {"ud_glock_frame_flared"} + +-- att.Hook_SelectReloadAnimation = function(wep, anim) +-- if anim == "reload_empty" then +-- return "reload_empty_flared" +-- end +-- end \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_glock_frame_subcompact.lua b/lua/arccw/shared/attachments/ud_glock_frame_subcompact.lua new file mode 100644 index 0000000..294d5bc --- /dev/null +++ b/lua/arccw/shared/attachments/ud_glock_frame_subcompact.lua @@ -0,0 +1,29 @@ +att.PrintName = "GEN3K Subcompact Frame" +att.AbbrevName = "Subcompact Frame" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Glock 26 Subcompact Frame" +end + +att.Icon = Material("entities/att/acwatt_ud_glock_frame_subcompact.png", "smooth mips") +att.Description = "A smaller frame that is noticably shorter on the magwell.\nFast to handle, but the smaller grip surface affects recoil control." +att.Desc_Pros = { + "ud.glock.subcompact" +} +att.Desc_Cons = { + "uc.nostocks" +} +att.Desc_Neutrals = { +} +att.Slot = "ud_glock_frame" + +att.AutoStats = true + +att.Mult_DrawTime = 0.75 +att.Mult_HolsterTime = 0.75 +att.Mult_Recoil = 1.15 +att.Mult_SightedSpeedMult = 1.05 +att.Mult_SightTime = 0.8 + +att.ActivateElements = {"ud_glock_frame_subcompact"} +att.GivesFlags = {"ud_glock_frame_subcompact"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_glock_mag_10.lua b/lua/arccw/shared/attachments/ud_glock_mag_10.lua new file mode 100644 index 0000000..44caf1b --- /dev/null +++ b/lua/arccw/shared/attachments/ud_glock_mag_10.lua @@ -0,0 +1,38 @@ +att.PrintName = "Glock 10-Round Compact Mag" +att.AbbrevName = "10-Round Compact Mag" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "GEN3 10-Round Compact Mag" +end + +att.SortOrder = 10 +att.Icon = Material("entities/att/acwatt_ud_glock_mag_10.png", "smooth mips") +att.Description = "Low-capacity magazine for the Glock, available on subcompact variants like the Glock 26. The lighter load makes the weapon even more ergonomic." +att.Desc_Pros = {} +att.Desc_Cons = {} +att.Desc_Neutrals = {} +att.Slot = "ud_glock_mag" + +att.AutoStats = true + +att.Mult_SightTime = 0.9 +att.Mult_ReloadTime = 0.9 +att.Override_ClipSize = 10 + +att.Mult_SpeedMult = 1.05 +att.Mult_Sway = 0.5 + +att.Mult_HipDispersion = 0.75 + +att.ActivateElements = {"ud_glock_10_mag"} +att.RequireFlags = {"ud_glock_frame_subcompact"} + +att.Hook_SelectReloadAnimation = function(wep, anim) + return anim .. "_10" +end + +att.Hook_TranslateAnimation = function(wep, anim) + if (anim == "fix") then + return anim .. "_10" + end +end \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_glock_mag_100.lua b/lua/arccw/shared/attachments/ud_glock_mag_100.lua new file mode 100644 index 0000000..96ef15a --- /dev/null +++ b/lua/arccw/shared/attachments/ud_glock_mag_100.lua @@ -0,0 +1,43 @@ +att.PrintName = "Glock 100-Round C-Mag" +att.AbbrevName = "100-Round C-Mag" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "GEN3 100-Round C-Mag" +end + +att.SortOrder = 100 +att.Icon = Material("entities/att/acwatt_ud_glock_mag_100.png", "smooth mips") +att.Description = "Twin-drum magazine ideal for suppressive fire (a nicer way to say \"mag dump\"). Bulky construction and high ammo capacity substantially increases weight and shifts the weapon's center of balance. Prone to jamming." +att.Desc_Pros = {} +att.Desc_Cons = { + "uc.jam" +} +att.Desc_Neutrals = {} +att.Slot = "ud_glock_mag" + +att.AutoStats = true + +att.Mult_SpeedMult = 0.95 +att.Mult_SightTime = 1.2 +att.Mult_ReloadTime = 1.5 +att.Override_ClipSize = 100 + +att.Mult_HipDispersion = 1.5 +att.Mult_Sway = 3 +att.Mult_ShootSpeedMult = 0.9 + +att.Override_Malfunction = true +att.Mult_MalfunctionMean = 0.6 +att.Mult_MalfunctionVariance = 1.5 + +att.ActivateElements = {"ud_glock_100_mag"} + +att.Hook_SelectReloadAnimation = function(wep, anim) + return anim .. "_100" +end + +att.Hook_TranslateAnimation = function(wep, anim) + if (anim == "fix") then + return anim .. "_100" + end +end \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_glock_mag_33.lua b/lua/arccw/shared/attachments/ud_glock_mag_33.lua new file mode 100644 index 0000000..4925dc1 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_glock_mag_33.lua @@ -0,0 +1,44 @@ +att.PrintName = "Glock 33-Round Extended Mag" +att.AbbrevName = "33-Round Extended Mag" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "GEN3 33-Round Extended Mag" +end + +att.SortOrder = 33 +att.Icon = Material("entities/att/acwatt_ud_glock_mag_33.png", "smooth mips") +att.Description = "Extended stick magazine. Heavier and throws off weapon balance, but does allow you to fire for longer." +att.Desc_Pros = {} +att.Desc_Cons = { + "uc.jam" +} +att.Desc_Neutrals = {} +att.Slot = "ud_glock_mag" + +att.AutoStats = true + +att.Mult_SightTime = 1.1 +att.Mult_ReloadTime = 1.15 +att.Override_ClipSize = 33 + +att.Mult_HipDispersion = 1.25 +att.Mult_Sway = 1.5 +att.Mult_ShootSpeedMult = 0.95 + +att.Mult_HipDispersion = 1.25 + +att.Override_Malfunction = true +att.Mult_MalfunctionMean = 0.85 +att.Mult_MalfunctionVariance = 1.5 + +att.ActivateElements = {"ud_glock_33_mag"} + +att.Hook_SelectReloadAnimation = function(wep, anim) + return anim .. "_33" +end + +att.Hook_TranslateAnimation = function(wep, anim) + if (anim == "fix") then + return anim .. "_33" + end +end \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_glock_muzzle_kkm.lua b/lua/arccw/shared/attachments/ud_glock_muzzle_kkm.lua new file mode 100644 index 0000000..cf908cf --- /dev/null +++ b/lua/arccw/shared/attachments/ud_glock_muzzle_kkm.lua @@ -0,0 +1,32 @@ +att.PrintName = "KKM Precision Compensator" +att.AbbrevName = "KKM Compensator" +att.Icon = Material("entities/att/kkm.png", "mips smooth") +att.Description = "Weapon-exclusive compensator that redirects propellant gasses to reduce weapon recoil.\nHighly effective, but reduces weapon cyclic rate." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.AutoStats = true +att.AutoStats = true +att.Slot = {"ud_glock_muzzle"} +-- att.Slot = {"muzzle"} + +att.SortOrder = 500 + +att.Model = "models/weapons/arccw/atts/uc_kkm_brake.mdl" +att.ModelOffset = Vector(0.59, 0, 0.165) +att.ModelScale = Vector(1.25, 1.25, 1.25) +att.OffsetAng = Angle(0, 0, 0) + +att.IsMuzzleDevice = true + +att.Mult_Recoil = 0.7 +att.Mult_RecoilSide = 0.8 + +att.Add_BarrelLength = 2 +att.Mult_SightTime = 1.1 +att.Mult_Sway = 1.15 +att.Mult_RPM = 0.85 +att.Mult_ShootVol = 1.2 + +att.AttachSound = "arccw_uc/common/gunsmith/suppressor_thread.ogg" diff --git a/lua/arccw/shared/attachments/ud_glock_skin_custom.lua b/lua/arccw/shared/attachments/ud_glock_skin_custom.lua new file mode 100644 index 0000000..dc75346 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_glock_skin_custom.lua @@ -0,0 +1,12 @@ +att.PrintName = "Glock 17 Custom Finish" +att.Description = "Make your Glock truly yours by giving it a horrible color nobody else wants to touch." +att.AbbrevName = "Custom" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "GEN3 Custom Finish" + att.Description = "Make your gun truly yours by giving it a horrible color nobody else wants to touch." +end + +att.Icon = Material("entities/att/acwatt_ud_glock_material.png", "smooth mips") +att.Desc_Neutrals = {"uc.cosmetic", "uc.custcolor"} +att.Slot = "ud_glock_skin" diff --git a/lua/arccw/shared/attachments/ud_glock_skin_olive.lua b/lua/arccw/shared/attachments/ud_glock_skin_olive.lua new file mode 100644 index 0000000..e4b3ada --- /dev/null +++ b/lua/arccw/shared/attachments/ud_glock_skin_olive.lua @@ -0,0 +1,10 @@ +att.PrintName = "Glock 17 Olive Drab Finish" +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "GEN3 Olive Drab Finish" +end +att.AbbrevName = "Olive Drab" + +att.Icon = Material("entities/att/acwatt_ud_glock_material.png", "smooth mips") +att.Description = "Olive drab finish for for your polymer handgun." +att.Desc_Neutrals = {"uc.cosmetic"} +att.Slot = "ud_glock_skin" diff --git a/lua/arccw/shared/attachments/ud_glock_skin_tan.lua b/lua/arccw/shared/attachments/ud_glock_skin_tan.lua new file mode 100644 index 0000000..73ef853 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_glock_skin_tan.lua @@ -0,0 +1,9 @@ +att.PrintName = "Glock 17 FDE Polymer Finish" +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "GEN3 FDE Polymer Finish" +end +att.AbbrevName = "FDE Polymer" +att.Icon = Material("entities/att/acwatt_ud_glock_material.png", "smooth mips") +att.Description = "Flat dark earth finish for your polymer handgun." +att.Desc_Neutrals = {"uc.cosmetic"} +att.Slot = "ud_glock_skin" diff --git a/lua/arccw/shared/attachments/ud_glock_slide_auto.lua b/lua/arccw/shared/attachments/ud_glock_slide_auto.lua new file mode 100644 index 0000000..c06661e --- /dev/null +++ b/lua/arccw/shared/attachments/ud_glock_slide_auto.lua @@ -0,0 +1,56 @@ +att.PrintName = "GEN3 Auto Slide" +att.AbbrevName = "Auto Slide" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Glock 18C Auto Slide" +end + +att.Icon = Material("entities/att/acwatt_ud_glock_slide_auto.png", "smooth mips") +att.Description = "An automatic slide capable of a very high rate of fire. Compensator cuts at the top improve recoil control, although that does not change the fact that this is a hell of a bullet nozzle." +att.Desc_Pros = { + "uc.auto", +} +att.Desc_Cons = { + "uc.jam" +} +att.Desc_Neutrals = { +} +att.Slot = "ud_glock_slide" + +att.AutoStats = true + +att.Override_Trivia_Class = "Machine Pistol" + +--att.Mult_SightTime = 1 +--att.Mult_Recoil = 1 +--att.Mult_SpeedMult = 1 +att.Mult_MoveDispersion = 1.5 +att.Mult_HipDispersion = 1.25 +att.Mult_Recoil = 0.95 +att.Mult_RPM = 2.38 +att.Mult_ShootSpeedMult = 0.85 + +att.Override_Malfunction = true + +att.Override_Firemodes = { + { + Mode = 2, + }, + { + Mode = 1, + }, + { + PrintName = "fcg.safe2", + Mode = 0, + } +} + +-- att.Hook_TranslateAnimation = function(wep, anim) +-- if (anim == "fire" || anim == "fire_empty") then +-- return anim .. "_18" +-- end +-- end + +att.ActivateElements = {"ud_glock_slide_auto"} +att.GivesFlags = {"ud_glock_auto"} +att.ExcludeFlags = {"ud_glock_not_9mil"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_glock_slide_carbine.lua b/lua/arccw/shared/attachments/ud_glock_slide_carbine.lua new file mode 100644 index 0000000..895628f --- /dev/null +++ b/lua/arccw/shared/attachments/ud_glock_slide_carbine.lua @@ -0,0 +1,31 @@ +att.PrintName = "GEN3 Carbine Slide" +att.AbbrevName = "Carbine Slide" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Glock 17 Euro Carbine Slide" +end + +att.Icon = Material("entities/att/acwatt_ud_glock_slide_carbine.png", "smooth mips") +att.Description = "Extraordinarily long extended barrel. Designed for use in countries where handguns are banned, in order to fulfil minimum length requirements." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_glock_slide" + +att.AutoStats = true + +att.Mult_SightTime = 1.75 +att.Mult_Recoil = 0.5 +att.Mult_AccuracyMOA = 0.25 +att.Mult_Sway = 2 +att.Mult_Range = 3 + +att.Mult_DrawTime = 1.5 +att.Mult_HolsterTime = 1.5 + +att.Add_BarrelLength = 32 + +att.ActivateElements = {"ud_glock_slide_carbine"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_glock_slide_comp.lua b/lua/arccw/shared/attachments/ud_glock_slide_comp.lua new file mode 100644 index 0000000..6bc348b --- /dev/null +++ b/lua/arccw/shared/attachments/ud_glock_slide_comp.lua @@ -0,0 +1,30 @@ +att.PrintName = "GEN3 Competition Slide" +att.AbbrevName = "Competition Slide" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Glock 17 Competition Slide" +end + +att.Icon = Material("entities/att/acwatt_ud_glock_slide_comp.png", "smooth mips") +att.Description = "Custom slide with side vents and tall iron sights. Improves sighting time and straightens recoil." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_glock_slide" + +att.AutoStats = true + +att.Mult_SightTime = 0.8 +att.Mult_RecoilSide = 0.75 +att.Mult_Recoil = 1.1 + +att.Override_IronSightStruct = { + Pos = Vector(-1.74, 0, 2.3), + Ang = Angle(-.05, 0, 0), + Magnification = 1 +} + +att.ActivateElements = {"ud_glock_slide_comp"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_glock_slide_cs.lua b/lua/arccw/shared/attachments/ud_glock_slide_cs.lua new file mode 100644 index 0000000..b77aa35 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_glock_slide_cs.lua @@ -0,0 +1,77 @@ +att.PrintName = "GEN3 Op. CS Slide" +att.AbbrevName = "Op. CS Slide" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "G18C Op. CS Slide" +end + +att.Icon = Material("entities/att/acwatt_ud_glock_slide_cs.png", "smooth mips") +att.Description = "Custom-made 3 round burst slide, used by various counter-terrorism units and 'agents' around the world. The standard-length magazines are also tweaked for increased capacity. These modifications make the weapon somewhat prone to jamming." +att.Desc_Pros = { + "uc.3burst", + "ud.glock.cs", +} +att.Desc_Cons = { + "uc.jam" +} +att.Desc_Neutrals = { +} +att.Slot = "ud_glock_slide" + +att.AutoStats = true + +att.LHIK = true +att.Model = "models/weapons/arccw/atts/classic_lhik.mdl" + +att.Mult_HipDispersion = 1.15 +att.Mult_ShootSpeedMult = 0.9 + +att.Override_Malfunction = true + +att.Override_Firemodes = { + { + Mode = -3, + Mult_RPM = 3, + PostBurstDelay = 0.25, + RunawayBurst = true, + Override_ShotRecoilTable = { + [1] = 0.8, + [2] = 0.5, + [3] = 0.3, + }, + }, + { + Mode = 1, + }, + { + PrintName = "fcg.safe2", + Mode = 0, + } +} + +-- att.Hook_TranslateAnimation = function(wep, anim) +-- if (anim == "fire" || anim == "fire_empty") then +-- return anim .. "_18" +-- end +-- end + +--[[] +function att.Hook_GetCapacity(wep,cap) + if not wep.Attachments[6].Installed then + return cap + 3 + end +end +]] +att.A_Hook_Add_ClipSize = function(wep, data) + if not wep.Attachments[8].Installed then + data.add = (data.add or 0) + 3 + end +end + +att.Hook_GetDefaultAttName = function(wep, slot) + if slot == 8 then + return "20-Round Mag" + end +end + +att.ActivateElements = {"ud_glock_slide_cs"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_glock_slide_lb.lua b/lua/arccw/shared/attachments/ud_glock_slide_lb.lua new file mode 100644 index 0000000..d4465f3 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_glock_slide_lb.lua @@ -0,0 +1,34 @@ +att.PrintName = "GEN3L Long Slide" +att.AbbrevName = "Long Slide" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Glock 17L Long Slide" +end + +att.Icon = Material("entities/att/acwatt_ud_glock_slide_lb.png", "smooth mips") +att.Description = "A somewhat uncommon long polymer slide.\nThe longer barrel improves precision but is awkward to handle." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_glock_slide" + +att.AutoStats = true + +att.Mult_DrawTime = 1.15 +att.Mult_HolsterTime = 1.15 +att.Add_BarrelLength = 4 + +att.Mult_Sway = 1.25 +att.Mult_HipDispersion = 1.15 +att.Mult_SightTime = 1.1 + +att.Mult_PhysBulletMuzzleVelocity = 1.1 + +att.Mult_AccuracyMOA = 0.85 +att.Mult_Recoil = 0.85 +att.Mult_Range = 1.25 + +att.ActivateElements = {"ud_glock_slide_lb"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_glock_slide_nytesyte.lua b/lua/arccw/shared/attachments/ud_glock_slide_nytesyte.lua new file mode 100644 index 0000000..10cc21f --- /dev/null +++ b/lua/arccw/shared/attachments/ud_glock_slide_nytesyte.lua @@ -0,0 +1,34 @@ +att.PrintName = "GEN3 Homeboy Slide" +att.AbbrevName = "Homeboy Slide" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "G17 NyteSite Slide" +end + +att.Icon = Material("entities/att/acwatt_ud_glock_slide_nytesyte.png", "smooth mips") +att.Description = "Be the first in the hood to have the HoMeBoY brand Night Sights installed on your New-Model Glock!" +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { + "ud.glock.nytesyte.1", + "ud.glock.nytesyte.2", +} +att.Slot = "ud_glock_slide" + +att.AutoStats = true + +att.ActivateElements = {"ud_glock_slide_nytesyte"} + +att.O_Hook_Override_RecoilDirection = function(wep, data) + if wep:GetState() == ArcCW.STATE_SIGHTS then + return {current = Angle(0, -1, 0)} + end +end + +att.O_Hook_Override_RecoilDirectionSide = function(wep, data) + if wep:GetState() == ArcCW.STATE_SIGHTS then + return {current = Angle(1, 0, 0)} + end +end \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_glock_slide_sd.lua b/lua/arccw/shared/attachments/ud_glock_slide_sd.lua new file mode 100644 index 0000000..aa34945 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_glock_slide_sd.lua @@ -0,0 +1,86 @@ +att.PrintName = "GEN3 Silent Mistress Slide" +att.AbbrevName = "SD Slide" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "G17SD Hush Puppy Slide" +end + +att.Icon = Material("entities/att/acwatt_ud_glock_slide_sd.png", "smooth mips") +att.Description = "A slide with an integrated silencer installed. A slide lock system can prevent the weapon from cycling when fired, reducing its audible report even further." +att.Desc_Pros = { + "uc.invistracer" +} +att.Desc_Cons = { + --"uc.manual", + "uc.nomuzzle" +} +att.Desc_Neutrals = { + "ud.hushpuppy", + "uc.supptail" +} +att.Slot = "ud_glock_slide" + +att.AutoStats = true + +att.Mult_SightTime = 1.15 +att.Mult_Recoil = 0.85 +att.Mult_AccuracyMOA = 0.75 +att.Mult_Sway = 1.5 +att.Mult_Range = 1.25 + +att.Mult_ShootVol = 0.65 +att.Mult_ShootPitch = 1.25 + +att.Mult_PhysBulletMuzzleVelocity = 0.85 + +att.Mult_RPM = 0.55 + +--att.Override_ManualAction = true + +att.Silencer = true +att.Override_MuzzleEffect = "muzzleflash_suppressed" + +att.Add_BarrelLength = 8 + +att.ActivateElements = {"ud_glock_slide_sd"} + +att.GivesFlags = {"sd"} + +att.Override_Firemodes_Priority = 10 +att.Override_Firemodes = { + { + Mode = 1, + }, + { + Mode = 1, + PrintName = "fcg.slidelock", + Override_ManualAction = true, + Mult_ShootVol = 0.8, + Mult_AccuracyMOA = 0.75, + Mult_HipDispersion = 0.75, + }, + { + PrintName = "fcg.safe2", + Mode = 0, + } +} + +att.Override_TracerNum = 0 +att.Override_PhysTracerProfile = 7 + +att.Hook_TranslateAnimation = function(wep, anim) + if not wep:GetBuff_Override("Override_ManualAction") then return end + if (anim == "fire" || anim == "fire_empty" || anim == "fire_iron" || anim == "fire_iron_empty") then + return "fire_cycle" + elseif (anim == "idle" || anim == "idle_empty") then + if wep:GetNeedCycle() then + return "idle" + end + end +end + +att.Hook_GetDistantShootSound = function(wep, distancesound) + if wep:GetBuff("PhysBulletMuzzleVelocity") < ArcCW.UC.SubsonicThreshold then + return false + end +end \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_glock_slide_subcompact.lua b/lua/arccw/shared/attachments/ud_glock_slide_subcompact.lua new file mode 100644 index 0000000..c02269a --- /dev/null +++ b/lua/arccw/shared/attachments/ud_glock_slide_subcompact.lua @@ -0,0 +1,37 @@ +att.PrintName = "GEN3K Subcompact Slide" +att.AbbrevName = "Subcompact Slide" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Glock 26 Subcompact Slide" +end + +att.Icon = Material("entities/att/acwatt_ud_glock_slide_subcompact.png", "smooth mips") +att.Description = "Shortest available slide, popular for concealed carry.\nReduced length means less holster to clear and improved handling, but more muzzle rise and terrible effective range." +att.Desc_Pros = { +} +att.Desc_Cons = { + "uc.noubs" +} +att.Desc_Neutrals = { +} +att.Slot = "ud_glock_slide" + +att.AutoStats = true + +att.Mult_DrawTime = 0.85 +att.Mult_HolsterTime = 0.85 +att.Add_BarrelLength = -4 + +att.Mult_Sway = 0.75 +att.Mult_HipDispersion = 0.85 +att.Mult_SightTime = 0.85 + +att.Mult_PhysBulletMuzzleVelocity = 0.9 + +att.Mult_AccuracyMOA = 1.5 +att.Mult_Range = 0.75 +att.Mult_Recoil = 1.25 + +att.ActivateElements = {"ud_glock_slide_subompact"} +att.GivesFlags = {"ud_glock_slide_subcompact"} +att.RequireFlags = {"ud_glock_frame_subcompact"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m1014_barrel_sawn.lua b/lua/arccw/shared/attachments/ud_m1014_barrel_sawn.lua new file mode 100644 index 0000000..901d532 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m1014_barrel_sawn.lua @@ -0,0 +1,40 @@ +att.PrintName = "12\" M4 Super 90 Sawn-Off Barrel" +att.AbbrevName = "12\" Sawn-Off Barrel" +att.Icon = Material("entities/att/acwatt_ud_m1014_barrel_short.png", "smooth mips") +att.Description = "Homemade short barrel with a very large spread and cannot use muzzle attachments. Marginally increases rate of fire." +att.Desc_Pros = { +} +att.Desc_Cons = { + "uc.nofs", + "uc.nomuzzle" +} +att.Desc_Neutrals = { +} +att.Slot = "ud_1014_barrel" + +att.AutoStats = true + +att.Mult_AccuracyMOA = 2 +att.Mult_Recoil = 1.25 +att.Mult_Range = 0.5 + +att.Mult_Sway = 0.5 +att.Mult_SightTime = 0.6 +att.Mult_SpeedMult = 1.05 +att.Mult_ShootSpeedMult = 1.2 +att.Mult_RPM = 240 / 220 + +att.Mult_HipDispersion = 0.75 + +att.Add_BarrelLength = -6 + +att.ActivateElements = {"ud_autoshotgun_barrel_sawnoff"} +att.GivesFlags = {"nomuzzle"} + +att.A_Hook_Add_SightsDispersion = function(wep, data) + if data and !wep.Attachments[1].Installed then + data.add = data.add + 50 + end +end + +att.Ignore = true \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m1014_barrel_short.lua b/lua/arccw/shared/attachments/ud_m1014_barrel_short.lua new file mode 100644 index 0000000..ca26f46 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m1014_barrel_short.lua @@ -0,0 +1,33 @@ +att.PrintName = "14\" M4 Super 90 Entry Barrel" +att.AbbrevName = "14\" Entry Barrel" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "14\" FC1040 Entry Barrel" +end + +att.Icon = Material("entities/att/acwatt_ud_m1014_barrel_short.png", "smooth mips") +att.Description = "Short barrel intended for breaching and close quarters use. Noticeably increases pellet spread, but is easier to manuver." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_1014_barrel" + +att.AutoStats = true + +att.Mult_AccuracyMOA = 1.5 +att.Mult_Recoil = 1.1 +att.Mult_Range = 0.8 + +att.Mult_Sway = 0.75 +att.Mult_SightTime = 0.75 +att.Mult_SpeedMult = 1.025 +att.Mult_ShootSpeedMult = 1.1 + +att.Mult_HipDispersion = 0.75 + +att.Add_BarrelLength = -4 + +att.ActivateElements = {"ud_autoshotgun_barrel_short"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m1014_barrel_sport.lua b/lua/arccw/shared/attachments/ud_m1014_barrel_sport.lua new file mode 100644 index 0000000..14dea59 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m1014_barrel_sport.lua @@ -0,0 +1,33 @@ +att.PrintName = "19\" M4 Super 90 Competition Barrel" +att.AbbrevName = "19\" Competition Barrel" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "19\" FC1040 Competition Barrel" +end + +att.Icon = Material("entities/att/acwatt_ud_m1014_barrel_sport.png", "smooth mips") +att.Description = "Hardened barrel with slightly increased length, designed for target shooting. Abiding by competition restrictions, it has a reduced rate of fire." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_1014_barrel" + +att.AutoStats = true +att.Add_BarrelLength = 1 + +att.Mult_RecoilSide = 0.8 +att.Mult_Recoil = 0.9 +att.Mult_SightTime = 1.15 +att.Mult_Sway = 1.2 + +att.Mult_AccuracyMOA = 0.9 +att.Mult_RangeMin = 2 +att.Mult_RPM = 180 / 220 + +att.Mult_HipDispersion = 1.15 + +att.ActivateElements = {"ud_autoshotgun_barrel_sport"} +--att.GivesFlags = {"nomuzzle"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m1014_handguard_sport.lua b/lua/arccw/shared/attachments/ud_m1014_handguard_sport.lua new file mode 100644 index 0000000..241a91f --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m1014_handguard_sport.lua @@ -0,0 +1,19 @@ +att.PrintName = "Sporting Handguard" +att.Icon = Material("", "smooth mips") +att.Description = "Aftermarket handguard with a rough grip surface. It's much lighter, but not as comfortable to grip." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_1014_handguard" + +att.AutoStats = true +att.SortOrder = 999 + +att.Mult_SightTime = 0.85 +att.Mult_ShootSpeedMult = 0.9 +att.Mult_SightedSpeedMult = 0.9 + +att.ActivateElements = {"ud_m1014_handguard_sport"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m1014_stock_buffer.lua b/lua/arccw/shared/attachments/ud_m1014_stock_buffer.lua new file mode 100644 index 0000000..e07e938 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m1014_stock_buffer.lua @@ -0,0 +1,34 @@ +att.PrintName = "Buffer Tube" +att.Icon = Material("entities/att/acwatt_ud_m1014_stock_buffer.png", "smooth mips") +att.Description = "Stocks are overrated." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_1014_stock" + +att.AutoStats = true +att.Free = true +att.SortOrder = -1 + +att.Mult_SpeedMult = 1.05 + +att.Mult_SightTime = 0.5 +att.Mult_DrawTime = 0.75 +att.Mult_HolsterTime = 0.75 + +att.Mult_Recoil = 1.35 +att.Mult_RecoilSide = 2 + +att.Mult_SightedSpeedMult = 1.2 +att.Mult_ShootSpeedMult = 1.15 + +att.Add_BarrelLength = -12 +att.Mult_Sway = 3 + +att.ActivateElements = {"ud_autoshotgun_stock_buffer"} + +att.Override_HoldtypeActive = "shotgun" +att.Override_HoldtypeSights = "ar2" \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m1014_stock_gripstock.lua b/lua/arccw/shared/attachments/ud_m1014_stock_gripstock.lua new file mode 100644 index 0000000..ddd3068 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m1014_stock_gripstock.lua @@ -0,0 +1,25 @@ +att.PrintName = "FC1040 Gripstock" +att.AbbrevName = "Gripstock" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "M4 Super 90 Gripstock" +end + + +att.Icon = Material("entities/att/acwatt_ud_m1014_stock_buffer.png", "smooth mips") +att.Description = "Solid stock with a pistol grip. Reduces recoil with minimal side effects." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_1014_stock" + +att.AutoStats = true + +att.Mult_Recoil = .85 +att.Mult_SightedSpeedMult = .9 +att.Mult_SightTime = 1.1 + +att.ActivateElements = {"ud_autoshotgun_stock_gripstock"} diff --git a/lua/arccw/shared/attachments/ud_m1014_stock_in.lua b/lua/arccw/shared/attachments/ud_m1014_stock_in.lua new file mode 100644 index 0000000..c15f99c --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m1014_stock_in.lua @@ -0,0 +1,27 @@ +att.PrintName = "Collapsed Stock" +att.Icon = Material("entities/att/acwatt_ud_m1014_stock_in.png", "smooth mips") +att.Description = "Pushing in the collapsable stock makes the weapon significantly shorter, allowing for easier use around corners and making it easier on the move at the cost of less stability." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_1014_stock" +att.AttachSound = "arccw_uc/common/stockslide.ogg" + +att.AutoStats = true +att.Free = true +att.IgnorePickX = true +att.SortOrder = 999 + +att.Mult_Recoil = 1.1 +att.Mult_RecoilSide = 1.25 + +att.Mult_SightedSpeedMult = 1.1 +att.Mult_ShootSpeedMult = 1.1 + +att.Mult_Sway = 1.5 +att.Add_BarrelLength = -8 + +att.ActivateElements = {"ud_autoshotgun_stock_in"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m1014_stock_sport.lua b/lua/arccw/shared/attachments/ud_m1014_stock_sport.lua new file mode 100644 index 0000000..553f7fa --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m1014_stock_sport.lua @@ -0,0 +1,25 @@ +att.PrintName = "Sporting Stock" +att.Icon = Material("entities/att/acwatt_ud_m1014_stock_sport.png", "smooth mips") +att.Description = "Solid, non-adjustable polymer stock. Provides a better brace at the cost of combat mobility." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_1014_stock" + +att.AutoStats = true + +att.Mult_Recoil = .8 +att.Mult_Sway = .8 + +att.Mult_SightedSpeedMult = .85 +att.Mult_DrawTime = 1.25 +att.Mult_HolsterTime = 1.25 + +att.ActivateElements = {"ud_autoshotgun_stock_sport"} + +att.Hook_TranslateAnimation = function(wep, anim) + return anim .. "_stock" +end \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m1014_tube_ext.lua b/lua/arccw/shared/attachments/ud_m1014_tube_ext.lua new file mode 100644 index 0000000..cbb1bc1 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m1014_tube_ext.lua @@ -0,0 +1,26 @@ +att.PrintName = "FC1040 7 Shell Tube" +att.AbbrevName = "7 Shell Tube" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "M4 Super 90 7 Shell Tube" +end + +att.Icon = Material("entities/att/acwatt_ud_m1014_tube_ext.png", "smooth mips") +att.Description = "Military-grade extended shell tube that adds weight to the weapon." +att.Desc_Pros = {} +att.Desc_Cons = {} +att.Desc_Neutrals = {} +att.Slot = "ud_1014_tube" + +att.Override_ClipSize = 7 + +att.AutoStats = true + +att.Override_ClipSize = 7 +att.Mult_Sway = 1.5 +att.Mult_SightTime = 1.15 +att.Mult_ReloadTime = 1.15 +att.Mult_SightedSpeedMult = 0.75 + + +att.ActivateElements = {"ud_autoshotgun_tube_long"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m14_barrel_short.lua b/lua/arccw/shared/attachments/ud_m14_barrel_short.lua new file mode 100644 index 0000000..8761b24 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m14_barrel_short.lua @@ -0,0 +1,29 @@ +att.PrintName = "M14 16\" Short Barrel" +att.AbbrevName = "16\" Short Barrel" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Patriot 14 16\" Short Barrel" +end + +att.Icon = Material("entities/att/acwatt_ud_m14_barrel_short.png", "smooth mips") +att.SortOrder = 18 +att.Description = "Compact barrel for popping close-up varmints. More agile but less accurate." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_m14_barrel" + +att.Mult_SightTime = 0.8 +att.Mult_Recoil = 1.1 +att.Mult_AccuracyMOA = 1.5 +att.Mult_Range = 0.5 +att.Mult_Sway = 0.75 + +att.Mult_SightedSpeedMult = 1.1 + +att.Add_BarrelLength = -4 + +att.AutoStats = true diff --git a/lua/arccw/shared/attachments/ud_m16_barrel_10in.lua b/lua/arccw/shared/attachments/ud_m16_barrel_10in.lua new file mode 100644 index 0000000..5746bf9 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_barrel_10in.lua @@ -0,0 +1,33 @@ +att.PrintName = "10.5\" RAYCAR-2 Commando Barrel" +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "10.5\" Colt Commando Barrel" +end + +att.Icon = Material("entities/att/acwatt_ud_m16_barrel_10_5.png", "smooth mips") +att.AbbrevName = "10.5\" Commando Barrel" +att.Description = "Short barrel, technically classified as a submachine gun barrel. Offers high fire rates at the cost of range." +att.Slot = "ud_m16_blen" + +att.AutoStats = true + +att.Mult_SightTime = 0.85 +att.Mult_SpeedMult = 1.025 +att.Mult_SightedSpeedMult = 1.1 +att.Mult_HipDispersion = 0.7 + +att.Mult_RPM = 1.15 +att.Mult_Recoil = 1.5 +att.Mult_AccuracyMOA = 2 +att.Mult_Range = 0.5 +att.Mult_Sway = 0.75 + +att.Add_BarrelLength = -10 +att.Mult_PhysBulletMuzzleVelocity = 0.729167 + +--att.LHIK = true +--att.Model = "models/weapons/arccw/atts/tactical_lhik.mdl" +att.DroppedModel = "models/items/boxsrounds.mdl" + +att.ActivateElements = {"barrel_11","mount_11"} +att.GivesFlags = {"blen_11","barrel_short", "patr1"} +att.ExcludeFlags = {"hg_no11"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_barrel_14in.lua b/lua/arccw/shared/attachments/ud_m16_barrel_14in.lua new file mode 100644 index 0000000..ac167e4 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_barrel_14in.lua @@ -0,0 +1,31 @@ +att.PrintName = "14.5\" RAYCAR-1 Carbine Barrel" +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "14.5\" M4 Carbine Barrel" +end + +att.Icon = Material("entities/att/acwatt_ud_m16_barrel_14_5.png", "smooth mips") +att.AbbrevName = "14.5\" Carbine Barrel" +att.Description = "Carbine length barrel. Provides a small increase in firerate while maintaining respectable accuracy and range." +att.Slot = "ud_m16_blen" + +att.AutoStats = true + +att.Mult_SightTime = 0.85 +att.Mult_SightedSpeedMult = 1.1 +att.Mult_HipDispersion = 0.85 + +att.Mult_Recoil = 1.25 +att.Mult_AccuracyMOA = 1.5 +att.Mult_Range = 0.75 +att.Mult_RPM = 1.111 --0.945 +att.Mult_Sway = 0.85 + +att.Add_BarrelLength = -6 +att.Mult_PhysBulletMuzzleVelocity = 0.833333 + +--att.LHIK = true +--att.Model = "models/weapons/arccw/atts/tactical_lhik.mdl" +att.DroppedModel = "models/items/boxsrounds.mdl" + +att.ActivateElements = {"barrel_14","mount_14"} +att.GivesFlags = {"blen_14","barrel_short"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_barrel_sd.lua b/lua/arccw/shared/attachments/ud_m16_barrel_sd.lua new file mode 100644 index 0000000..672585b --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_barrel_sd.lua @@ -0,0 +1,84 @@ +att.PrintName = "10\" Suppressed Barrel" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "10\" M16 SD Barrel" +end + +att.Icon = Material("entities/att/acwatt_ud_m16_barrel_sd.png", "smooth mips") +att.Description = "Integrally suppressed short barrel made by hobbyists. Dampens sound effectively, but the suppressor adds to weapon weight.\nPerformance may degrade with sustained fire." +att.Desc_Pros = { + --"uc.auto" +} +att.Desc_Cons = { + "uc.overheat" +} +att.Desc_Neutrals = { + "uc.supptail", + "ud.m16.allowfs", +} +att.Slot = "ud_m16_blen" + +att.AutoStats = true + +att.Mult_SightTime = 1.05 + +att.Mult_Range = 0.65 +att.Mult_Recoil = 1.15 +att.Mult_AccuracyMOA = 1.5 +att.Mult_RPM = 1.111 +att.Mult_HipDispersion = 0.75 + + +att.Add_BarrelLength = -10 +att.Mult_PhysBulletMuzzleVelocity = 0.78 + +att.LHIK = true + +att.Model = "models/weapons/arccw/atts/m4_lhik.mdl" + +att.Mult_ShootVol = 0.65 +att.Silencer = true +att.Override_MuzzleEffect = "muzzleflash_suppressed" +att.GivesFlags = {"sd", "ud_m16_rscompatible", "ud_m16_sd"} +att.SDBarrel = true + +att.ActivateElements = {"hg_sd"} + +att.Override_Jamming = true +att.Override_HeatLockout = false +att.Override_HeatFix = false +att.Override_HeatCapacity = 90 +att.Override_HeatDelayTime = 2 +att.Override_HeatDissipation = 7.5 + +att.Hook_ModifyRPM = function(wep, delay) + local heat = math.Clamp(wep:GetHeat() / wep:GetMaxHeat(), 0, 1) + if heat > 0.5 then + return delay * (1 + ((heat - 0.5) / 0.5) * 0.5) + end +end + +att.M_Hook_Mult_ShootVol = function(wep, data) + local heat = math.Clamp(wep:GetHeat() / wep:GetMaxHeat(), 0, 1) + data.mult = data.mult * (1 + heat * 0.25) +end + +att.M_Hook_Mult_ShootPitch = function(wep, data) + local heat = math.Clamp(wep:GetHeat() / wep:GetMaxHeat(), 0, 1) + if heat > 0.5 then + data.mult = data.mult * (1 - (heat - 0.5) / 0.5 * 0.15) + end +end + +att.M_Hook_Mult_AccuracyMOA = function(wep, data) + local heat = math.Clamp(wep:GetHeat() / wep:GetMaxHeat(), 0, 1) + if heat > 0.5 then + data.mult = data.mult * (1 + ((heat - 0.5) / 0.5)) + end +end + +att.Hook_GetDistantShootSound = function(wep, distancesound) + if wep:GetBuff("PhysBulletMuzzleVelocity") < ArcCW.UC.SubsonicThreshold then + return false + end +end \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_charm_ch.lua b/lua/arccw/shared/attachments/ud_m16_charm_ch.lua new file mode 100644 index 0000000..35c60df --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_charm_ch.lua @@ -0,0 +1,18 @@ +att.PrintName = "Modern Rail Mount" +att.Icon = Material("entities/att/acwatt_ud_m16_charm_ch.png", "smooth mips") +att.Description = "Keep it retro.\nReject flat top. Return to carry handle." +att.Desc_Pros = {} +att.Desc_Cons = {} +att.Desc_Neutrals = { + "ud.m16_ch.1", + "ud.m16_ch.2", + "ud.m16_nors" +} +att.Slot = "ud_m16_charm" + +att.ActivateElements = {"ud_m16_upper_charm"} +att.GivesFlags = {"ud_m16_retro"} +att.ExcludeFlags = {"ud_m16_not_retro", "ud_m16_a1"} +att.TopMount = 1 + +att.SortOrder = 1001 \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_charm_ch2.lua b/lua/arccw/shared/attachments/ud_m16_charm_ch2.lua new file mode 100644 index 0000000..5f154d9 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_charm_ch2.lua @@ -0,0 +1,18 @@ +att.PrintName = "Classic Rail Mount" +att.Icon = Material("entities/att/acwatt_ud_m16_charm_ch2.png", "smooth mips") +att.Description = "Keep it extra retro with this old-school rail mount." +att.Desc_Pros = {} +att.Desc_Cons = {} +att.Desc_Neutrals = { + "ud.m16_ch.1", + "ud.m16_ch.2", + "ud.m16_nors" +} +att.Slot = "ud_m16_charm" + +att.ActivateElements = {"ud_m16_upper_charm2"} +att.GivesFlags = {"ud_m16_retro"} +att.ExcludeFlags = {"ud_m16_not_retro", "ud_m16_a1"} +att.TopMount = 3 + +att.SortOrder = 1000 \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_charm_fs.lua b/lua/arccw/shared/attachments/ud_m16_charm_fs.lua new file mode 100644 index 0000000..cda497d --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_charm_fs.lua @@ -0,0 +1,15 @@ +att.PrintName = "Preserved Front Sight" +att.Icon = Material("entities/att/acwatt_ud_m16_charm_fs.png", "smooth mips") +att.Description = "Those irons aren't out of style yet." +att.Desc_Pros = {} +att.Desc_Cons = {} +att.Desc_Neutrals = { + "ud.m16_fs.1", + "ud.m16_fs.2", +} +att.Slot = "ud_m16_charm" +att.Free = true +att.IgnorePickX = true + +att.SortOrder = 999 +att.ExcludeFlags = {"ud_m16_a1", "sight_magpul", "ud_m16_sd"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_charm_tl.lua b/lua/arccw/shared/attachments/ud_m16_charm_tl.lua new file mode 100644 index 0000000..3308110 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_charm_tl.lua @@ -0,0 +1,30 @@ +att.PrintName = "Tactical Laser Position" +att.Icon = Material("entities/att/arccw_ud_pointshoot.png", "smooth mips") +att.Description = "Give your AN/PEQ a reason to be thin." +att.Desc_Pros = {} +att.Desc_Cons = {} +att.Desc_Neutrals = { + "ud.m16_tl.1", + "ud.m16_tl.2", + "ud.m16_nors" +} +att.Slot = "ud_m16_charm" + +att.ActivateElements = {"bravo_dicks_going_fart"} +att.AdditionalSights = { + { + Pos = Vector(0, 20, -3), + Ang = Angle(0, 0, -25), + GlobalPos = false, + GlobalAng = true, + Magnification = 1 + } +} + +att.SortOrder = 998 +att.TacLaserPos = true +att.RequireFlags = {"tac"} + +att.FrontSight = 1 + +--att.Ignore = true \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_fs_3d.lua b/lua/arccw/shared/attachments/ud_m16_fs_3d.lua new file mode 100644 index 0000000..fa80eb7 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_fs_3d.lua @@ -0,0 +1,16 @@ +att.PrintName = "3D Low Profile Front Sight" +att.AbbrevName = "3D Front Sight" +att.Icon = Material("entities/att/acwatt_ud_m16_fs_3d.png", "mips smooth") +att.Description = [[A 3d-printed front sight for picatinny rails. You probably want the matching rear sight as well.]] +att.Desc_Neutrals = {"uc.cosmetic"} +att.SortOrder = 1 +att.IgnorePickX = true + +att.Model = "models/weapons/arccw/atts/3d_fs.mdl" +att.ModelScale = Vector(0.7, 0.7, 0.7) +att.Slot = {"ud_m16_fs"} +att.RequireFlags = {"ud_m16_rscompatible"} +att.GivesFlags = {"ud_m16_rs"} +att.Ignore = false + +att.FrontSight = 1 \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_fs_kac.lua b/lua/arccw/shared/attachments/ud_m16_fs_kac.lua new file mode 100644 index 0000000..39fc914 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_fs_kac.lua @@ -0,0 +1,15 @@ +att.PrintName = "KAC Flip-Up Front Sight" +att.AbbrevName = "KAC Front Sight" +att.Icon = Material("entities/att/acwatt_ud_m16_fs_kac.png", "mips smooth") +att.Description = [[Removable front sight made by Knight's Armament Company. Designed to be mounted on forend rails.]] +att.Desc_Neutrals = {"uc.cosmetic"} +att.SortOrder = 1 +att.IgnorePickX = true + +att.Model = "models/weapons/arccw/atts/kac_fs.mdl" +att.ModelScale = Vector(0.7, 0.7, 0.7) +att.Slot = {"ud_m16_fs"} +att.RequireFlags = {"ud_m16_rscompatible"} +att.GivesFlags = {"ud_m16_rs"} + +att.FrontSight = 1 \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_fs_magpul.lua b/lua/arccw/shared/attachments/ud_m16_fs_magpul.lua new file mode 100644 index 0000000..8a0b89e --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_fs_magpul.lua @@ -0,0 +1,15 @@ +att.PrintName = "Magpul Flip-Up Front Sight" +att.AbbrevName = "Magpul Front Sight" +att.Icon = Material("entities/att/acwatt_ud_m16_fs_magpul.png", "mips smooth") +att.Description = [[Removable front sight made by Magpul. Designed to be mounted on forend rails.]] +att.Desc_Neutrals = {"uc.cosmetic"} +att.SortOrder = 1 +att.IgnorePickX = true + +att.Model = "models/weapons/arccw/atts/magpul_fs.mdl" +att.ModelScale = Vector(0.73, 0.73, 0.73) +att.Slot = {"ud_m16_fs"} +att.RequireFlags = {"ud_m16_rscompatible"} +att.GivesFlags = {"ud_m16_rs"} + +att.FrontSight = 1 \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_fs_sclr.lua b/lua/arccw/shared/attachments/ud_m16_fs_sclr.lua new file mode 100644 index 0000000..39442e7 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_fs_sclr.lua @@ -0,0 +1,16 @@ +att.PrintName = "Scalarworks Front Sight" +att.AbbrevName = "Scalarworks Front Sight" +att.Icon = Material("entities/att/acwatt_ud_m16_fs_sclr.png", "mips smooth") +att.Description = [[Removable front sight made by Knight's Armament Company. Designed to be mounted on forend rails.]] +att.Desc_Neutrals = {"uc.cosmetic"} +att.SortOrder = 1 +att.IgnorePickX = true + +att.Model = "models/weapons/arccw/atts/scalerworks_fs.mdl" +att.ModelOffset = Vector(0, 0.01, -0.1) +att.ModelScale = Vector(0.95, 0.95, 0.95) +att.Slot = {"ud_m16_fs"} +att.RequireFlags = {"ud_m16_rscompatible"} +att.GivesFlags = {"ud_m16_rs"} + +att.FrontSight = 1 \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_fs_sig.lua b/lua/arccw/shared/attachments/ud_m16_fs_sig.lua new file mode 100644 index 0000000..ec85074 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_fs_sig.lua @@ -0,0 +1,15 @@ +att.PrintName = "SIG Flip-Up Front Sight" +att.AbbrevName = "SIG Front Sight" +att.Icon = Material("entities/att/acwatt_ud_m16_fs_sig.png", "mips smooth") +att.Description = [[Removable front sight made by SIG Sauer. Designed to be mounted on forend rails.]] +att.Desc_Neutrals = {"uc.cosmetic"} +att.SortOrder = 1 +att.IgnorePickX = true + +att.Model = "models/weapons/arccw/atts/sig_fs.mdl" +att.ModelScale = Vector(0.7, 0.7, 0.7) +att.Slot = {"ud_m16_fs"} +att.RequireFlags = {"ud_m16_rscompatible"} +att.GivesFlags = {"ud_m16_rs"} + +att.FrontSight = 1 \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_fs_utg.lua b/lua/arccw/shared/attachments/ud_m16_fs_utg.lua new file mode 100644 index 0000000..d017ebd --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_fs_utg.lua @@ -0,0 +1,16 @@ +att.PrintName = "UTG Low Profile Front Sight" +att.AbbrevName = "UTG Front Sight" +att.Icon = Material("entities/att/acwatt_ud_m16_fs_colt.png", "mips smooth") +att.Description = [[A2 style rail-mounted front sight for picatinny rails.]] +att.Desc_Neutrals = {"uc.cosmetic"} +att.SortOrder = 1 +att.IgnorePickX = true + +att.Model = "models/weapons/arccw/atts/colt_fs.mdl" +att.ModelScale = Vector(0.7, 0.7, 0.7) +att.Slot = {"ud_m16_fs"} +att.RequireFlags = {"ud_m16_rscompatible"} +att.GivesFlags = {"ud_m16_rs"} +att.Ignore = false + +att.FrontSight = 1 \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_grip_ergo.lua b/lua/arccw/shared/attachments/ud_m16_grip_ergo.lua new file mode 100644 index 0000000..6f6766e --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_grip_ergo.lua @@ -0,0 +1,19 @@ +att.PrintName = "Ergonomic Grip" +att.Icon = Material("entities/att/acwatt_ud_m16_grip_ergo.png", "smooth mips") +att.Description = "Polymer grip with a comfortable shape, enabling faster handling." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_m16_grip" + +att.AutoStats = true + +att.Mult_SightTime = 0.9 +att.Mult_SightedSpeedMult = 0.95 +--att.Mult_Recoil = 1 +--att.Mult_SpeedMult = 1 + +att.ActivateElements = {"grip_ergo"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_grip_skel.lua b/lua/arccw/shared/attachments/ud_m16_grip_skel.lua new file mode 100644 index 0000000..02f42c3 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_grip_skel.lua @@ -0,0 +1,20 @@ +att.PrintName = "Skeletonized Grip" +att.Icon = Material("entities/att/acwatt_ud_m16_grip_skel.png", "smooth mips") +att.Description = "Lightweight grip, marginally reducing weapon weight." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_m16_grip" + +att.AutoStats = true + +att.Mult_RecoilSide = 1.15 +att.Mult_SightedSpeedMult = 1.05 +--att.Mult_SightTime = 1 +--att.Mult_Recoil = 1 +--att.Mult_SpeedMult = 1 + +att.ActivateElements = {"grip_skel"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_grip_wood.lua b/lua/arccw/shared/attachments/ud_m16_grip_wood.lua new file mode 100644 index 0000000..7bb30c0 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_grip_wood.lua @@ -0,0 +1,19 @@ +att.PrintName = "Wooden Grip" +att.Icon = Material("entities/att/acwatt_ud_m16_grip_default.png", "smooth mips") +att.Description = "For a classy look." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_m16_grip" + +att.AutoStats = true + +att.Mult_RecoilSide = 0.85 +att.Mult_SightedSpeedMult = 0.95 +--att.Mult_Recoil = 1 +--att.Mult_SpeedMult = 1 + +att.ActivateElements = {"grip_wood"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_hg_a1.lua b/lua/arccw/shared/attachments/ud_m16_hg_a1.lua new file mode 100644 index 0000000..075de3d --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_hg_a1.lua @@ -0,0 +1,23 @@ +att.PrintName = "Prototype Triangular Handguard" +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "M16A1 Triangular Handguard" +end +att.AbbrevName = "Triangular Handguard" +att.Icon = Material("entities/att/acwatt_ud_m16_hg_triangle.png", "smooth mips") +att.Description = "Classic handguard issued with the rifle's original models.\nIn comparison to the modern \"ribbed\" handguard, it is more comfortable to hold but prone to slipping." +att.Slot = "ud_m16_hg" +att.AutoStats = true + +att.Mult_RecoilSide = 1.35 + +att.Mult_SightTime = 0.9 +att.Mult_HipDispersion = 0.9 + +att.LHIK = true +att.Model = "models/weapons/arccw/atts/classic_lhik.mdl" +att.DroppedModel = "models/items/boxsrounds.mdl" +att.ModelOffset = (Vector(0.41, 0, -1.63) - Vector(11.5, 2.8, -4.2)) + +att.ActivateElements = {"hg_m16a1"} +att.GivesFlags = {"hg_no11"} +att.ExcludeFlags = {"blen_11"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_hg_adar.lua b/lua/arccw/shared/attachments/ud_m16_hg_adar.lua new file mode 100644 index 0000000..ede9a70 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_hg_adar.lua @@ -0,0 +1,24 @@ +att.PrintName = "RUCAR 225 Short Wooden Handguard" + +att.Icon = Material("entities/att/acwatt_ud_m16_hg_adar.png", "smooth mips") +att.Description = "Wooden handguard used on Russian sporting variants. The heavier material allows for lower recoil than handguards of similar length." + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "ADAR 2-15 Short Wooden Handguard" +end + +att.AbbrevName = "Short Wooden Handguard" +att.Slot = "ud_m16_hg" +att.AutoStats = true + +att.Mult_Sway = 0.9 +att.Mult_RecoilSide = 0.85 +att.Mult_Recoil = 0.95 + +att.Mult_SightedSpeedMult = 0.95 +att.Mult_ShootSpeedMult = 0.95 + +att.LHIK = true +att.Model = "models/weapons/arccw/atts/adar_lhik.mdl" +att.DroppedModel = "models/items/boxsrounds.mdl" +att.ModelOffset = (Vector(0.41, 0, -1.63) - Vector(11.5, 2.8, -4.2)) diff --git a/lua/arccw/shared/attachments/ud_m16_hg_fpw.lua b/lua/arccw/shared/attachments/ud_m16_hg_fpw.lua new file mode 100644 index 0000000..773755c --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_hg_fpw.lua @@ -0,0 +1,19 @@ +att.PrintName = "FPW Handguard" + +att.Icon = Material("entities/att/acwatt_ud_m16_hg_fpw.png", "smooth mips") +att.Description = "Specialist handguard that interlocks into an IFV firing port. It withstands sustained fire better, but the lack of grip surface harms stability." +att.Desc_Neutrals = { + +} +att.Slot = "ud_m16_hg" +att.AutoStats = true + +att.Mult_HeatCapacity = 160 / 120 +att.Mult_Recoil = 1.1 + +att.LHIK = true +att.Model = "models/weapons/arccw/atts/m4_lhik.mdl" +att.DroppedModel = "models/items/boxsrounds.mdl" +att.ModelOffset = (Vector(0.41, 0, -1.63) - Vector(11.5, 2.8, -4.2)) + +att.GivesFlags = {"patr2"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_hg_heat.lua b/lua/arccw/shared/attachments/ud_m16_hg_heat.lua new file mode 100644 index 0000000..d96ad03 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_hg_heat.lua @@ -0,0 +1,25 @@ +att.AbbrevName = "Heatshield Handguard" + +att.PrintName = "Heatshield Handguard" +att.Description = "Heatshield handguard used on grenadier variants of the M16.\nIts light weight offsets the downsides of an attached grenade launcher somewhat." +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "M16A1 Heatshield Handguard" + att.Description = "Heatshield handguard used on grenadier variants of the RAYCAR.\nIts light weight offsets the downsides of an attached grenade launcher somewhat." +end +att.Slot = "ud_m16_hg" +att.AutoStats = true + +att.Mult_RecoilSide = 1.35 + +att.Mult_SightTime = 0.9 +att.Mult_HeatDissipation = 2 +att.Mult_SightedSpeedMult = 1.1 +-- att.Mult_HipDispersion = 0.9 + +att.LHIK = false +att.Model = "models/weapons/arccw/atts/classic_lhik.mdl" +att.DroppedModel = "models/items/boxsrounds.mdl" + +att.ActivateElements = {"hg_m16a1"} +att.GivesFlags = {"hg_no11"} +att.ExcludeFlags = {"blen_11"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_hg_lmg.lua b/lua/arccw/shared/attachments/ud_m16_hg_lmg.lua new file mode 100644 index 0000000..532337c --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_hg_lmg.lua @@ -0,0 +1,41 @@ +att.PrintName = "AMSAW LMG Handguard" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Colt LMG Handguard" +end + +att.AbbrevName = "LMG Handguard" +att.Icon = Material("entities/att/acwatt_ud_m16_hg_lmg.png", "smooth mips") +att.Description = "Heavy duty handguard with built-in bipod and foregrip, sporting improved durability and recoil control for sustained automatic fire." +att.Desc_Pros = {} +att.Desc_Cons = { + "uc.noubs" +} +att.Desc_Neutrals = {} +att.Slot = "ud_m16_hg" + +att.AutoStats = true + +att.Mult_SpeedMult = 0.95 +att.Mult_SightedSpeedMult = 0.8 +att.Mult_Sway = 1.5 +att.Mult_SightTime = 1.25 + +att.Mult_RPM = 0.915 +att.Mult_Recoil = 0.7 +att.Mult_RecoilSide = 0.5 + +att.Mult_MalfunctionMean = 2 + +att.Bipod = true +att.Mult_BipodDispersion = 0.2 +att.Mult_BipodRecoil = 0.15 + +att.ActivateElements = {"hg_lmg"} +att.GivesFlags = {"m16_lmg","hg_no11"} +att.ExcludeFlags = {"blen_11"} + +att.LHIK = true + +att.Model = "models/weapons/arccw/atts/lmg_lhik.mdl" +att.ModelOffset = (Vector(0.41, 0, -1.63) - Vector(11.5, 2.8, -4.2)) + Vector(-0.1, 0, 0) diff --git a/lua/arccw/shared/attachments/ud_m16_hg_ru556.lua b/lua/arccw/shared/attachments/ud_m16_hg_ru556.lua new file mode 100644 index 0000000..72fdc04 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_hg_ru556.lua @@ -0,0 +1,31 @@ +att.PrintName = "RU556 Handguard" + +att.Icon = Material("entities/att/acwatt_ud_m16_hg_ru556.png", "smooth mips") +att.Description = "Short handguard from the RU556 line of RAYCAR accessories, featuring a unique barrel shroud. The thin aluminum frame has extremely low weight." + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "M-LOK Handguard" + att.Description = "Short handguard from the M-LOK line of AR-15 accessories, featuring a unique barrel shroud. The thin aluminum frame has extremely low weight." +end + +att.Desc_Neutrals = { + "ud.m16.allowfs", +} + +att.Slot = "ud_m16_hg" +att.AutoStats = true + +att.Mult_Sway = .8 +att.Mult_SpeedMult = 1.05 +att.Mult_SightedSpeedMult = 1.2 +att.Mult_HipDispersion = 1.1 +att.Mult_Recoil = 1.175 + +att.LHIK = true +att.Model = "models/weapons/arccw/atts/ru556_lhik.mdl" +att.DroppedModel = "models/items/boxsrounds.mdl" +att.ModelOffset = (Vector(0.41, 0, -2.8) - Vector(11.5, 2.8, -4.2)) +att.OffsetAng = Angle( 0, 5, 0 ) + +att.GivesFlags = {"ud_m16_rscompatible"} +att.ActivateElements = {"hg_ru556"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_hg_tactical.lua b/lua/arccw/shared/attachments/ud_m16_hg_tactical.lua new file mode 100644 index 0000000..8e4d2e2 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_hg_tactical.lua @@ -0,0 +1,24 @@ +att.PrintName = "RAYCAR TACTICS Forend Assembly" -- "Armorers United" ?? WHO +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "KAC RAS Forend Assembly" +end +att.AbbrevName = "Tactical Handguard" +att.Icon = Material("entities/att/acwatt_ud_m16_hg_ris.png", "smooth mips") +att.Description = "Barrel shroud equipped with a quad-rail RIS interface, allowing the rifle to accept the attachment of tactical devices or foregrips without any additional modification.\n\nFunctionally identical to the stock handguard." +att.Desc_Neutrals = { + "ud.m16.allowfs", +} +att.Slot = "ud_m16_hg" +att.SortOrder = 99 + +att.Free = true +att.IgnorePickX = true + +att.LHIK = true +att.Model = "models/weapons/arccw/atts/tactical_lhik.mdl" +att.DroppedModel = "models/items/boxsrounds.mdl" +att.ModelOffset = (Vector(0.41, 0, -1.63) - Vector(11.5, 2.8, -4.2)) + +att.ActivateElements = {"mount_tactical"} +att.GivesFlags = {"ud_m16_rscompatible"} + diff --git a/lua/arccw/shared/attachments/ud_m16_hg_wood.lua b/lua/arccw/shared/attachments/ud_m16_hg_wood.lua new file mode 100644 index 0000000..3b113a4 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_hg_wood.lua @@ -0,0 +1,23 @@ +att.PrintName = "\"Service Rifle\" Wooden Handguard" +att.AbbrevName = "Wooden Handguard" + +att.Icon = Material("entities/att/acwatt_ud_m16_hg_triangle.png", "smooth mips") +att.Description = "Custom wooden handguard created by independent gunsmiths from the state of California. Its heft gives it some extra stability." +att.Slot = "ud_m16_hg" +att.AutoStats = true + +att.Mult_Sway = 0.8 +att.Mult_RecoilSide = 0.85 +att.Mult_Recoil = 0.9 + +att.Mult_SightedSpeedMult = 0.8 +att.Mult_ShootSpeedMult = 0.9 + +att.LHIK = true +att.Model = "models/weapons/arccw/atts/classic_lhik.mdl" +att.DroppedModel = "models/items/boxsrounds.mdl" +att.ModelOffset = (Vector(0.41, 0, -1.63) - Vector(11.5, 2.8, -4.2)) + +att.ActivateElements = {"hg_m16a1_wood"} +att.GivesFlags = {"hg_no11"} +att.ExcludeFlags = {"blen_11"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_mag_100.lua b/lua/arccw/shared/attachments/ud_m16_mag_100.lua new file mode 100644 index 0000000..f02f7f9 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_mag_100.lua @@ -0,0 +1,48 @@ +att.PrintName = "STANAG 100-Round C-Mag" +att.AbbrevName = "100-Round C-Mag" +att.SortOrder = 100 +att.Icon = Material("entities/att/acwatt_ud_m16_mag_100.png", "smooth mips") +att.Description = "Twin-drum magazine compliant with STANAG 4179 dimensions, ideal for suppressive fire. Bulky construction and high ammo capacity substantially increases weight, making the weapon difficult to handle. Prone to feeding failures." +att.Desc_Pros = {} +att.Desc_Cons = { + "uc.jam" +} +att.Desc_Neutrals = {} +att.Slot = "ud_m16_mag" + +att.AutoStats = true +att.HideIfBlocked = true + +att.Override_ClipSize = 100 + +att.Mult_SightTime = 1.5 +att.Mult_ReloadTime = 1.5 +att.Mult_Sway = 3 + +att.Mult_SpeedMult = 0.9 +att.Mult_ShootSpeedMult = 0.8 + +att.Mult_DrawTime = 1.25 +att.Mult_HolsterTime = 1.25 + +att.Mult_HipDispersion = 1.5 + +att.ActivateElements = {"ud_m16_mag_100"} + +--[[] +att.Override_Jamming = true +att.Override_HeatCapacity = 200 +att.Override_HeatDissipation = 4 +att.Override_HeatDelayTime = 3 +]] + +att.Override_Malfunction = true +att.Mult_MalfunctionMean = 0.75 +att.Mult_MalfunctionVariance = 1.5 + +att.Hook_SelectReloadAnimation = function(wep, anim) + return anim .. "_100" +end + +att.GivesFlags = {"patr5"} +att.ExcludeFlags = {"m16_usas", "m16_9mm", "m16_50beo"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_mag_20.lua b/lua/arccw/shared/attachments/ud_m16_mag_20.lua new file mode 100644 index 0000000..4073b05 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_mag_20.lua @@ -0,0 +1,34 @@ +att.PrintName = "STANAG 20-Round Compact Mag" +att.AbbrevName = "20-Round Compact Mag" +att.SortOrder = 20 +att.Icon = Material("entities/att/acwatt_ud_m16_mag_20.png", "smooth mips") +att.Description = "Original, low-capacity magazine for the M16. The lighter load reduces the weapon's weight and brings back memories of the rice fields." +att.Desc_Pros = {} +att.Desc_Cons = {} +att.Desc_Neutrals = {} +att.Slot = "ud_m16_mag" + +att.AutoStats = true +att.HideIfBlocked = true + +att.Override_ClipSize = 20 + +att.Mult_SightTime = 0.85 +att.Mult_ReloadTime = 0.9 +att.Mult_Sway = 0.75 + +att.Mult_SpeedMult = 1.025 +att.Mult_SightedSpeedMult = 1.05 +att.Mult_ShootSpeedMult = 1.05 + +att.Mult_MalfunctionMean = 1.5 + +att.Mult_HipDispersion = 0.75 + +att.ActivateElements = {"ud_m16_mag_20"} + +att.Hook_SelectReloadAnimation = function(wep, anim) + return anim .. "_20" +end + +att.ExcludeFlags = {"m16_usas", "m16_9mm", "m16_50beo"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_mag_40.lua b/lua/arccw/shared/attachments/ud_m16_mag_40.lua new file mode 100644 index 0000000..5ceb1b7 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_mag_40.lua @@ -0,0 +1,31 @@ +att.PrintName = "STANAG 40-Round Extended Mag" +att.AbbrevName = "40-Round Extended Mag" +att.SortOrder = 40 +att.Icon = Material("entities/att/acwatt_ud_m16_mag_40.png", "smooth mips") +att.Description = "Extended magazine for the M16. Enables slightly longer mag dumps, which may save your life, but the longer mag is more awkward to load." +att.Desc_Pros = {} +att.Desc_Cons = {} +att.Desc_Neutrals = {} +att.Slot = "ud_m16_mag" + +att.AutoStats = true +att.HideIfBlocked = true + +att.Override_ClipSize = 40 + +att.Mult_SightTime = 1.1 +att.Mult_ReloadTime = 1.15 +att.Mult_Sway = 1.5 + +att.Mult_SpeedMult = 0.975 +att.Mult_ShootSpeedMult = 0.95 + +att.Mult_HipDispersion = 1.15 + +att.ActivateElements = {"ud_m16_mag_40"} + +att.Hook_SelectReloadAnimation = function(wep, anim) + return anim .. "_40" +end + +att.ExcludeFlags = {"m16_usas", "m16_9mm", "m16_50beo"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_mag_50beo_12.lua b/lua/arccw/shared/attachments/ud_m16_mag_50beo_12.lua new file mode 100644 index 0000000..c7fb3c7 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_mag_50beo_12.lua @@ -0,0 +1,29 @@ +att.PrintName = ".50 Beowulf 12-Round Standard Mag" +att.AbbrevName = "12-Round Standard Mag" +att.Icon = Material("entities/att/acwatt_ud_m16_mag_30.png", "smooth mips") +att.Description = "Standard 5.56mm magazines converted to load .50 Beowulf rounds in a single stack. Requires a bit of elbow grease to squeeze them in." +att.Desc_Pros = {} +att.Desc_Cons = {} +att.Desc_Neutrals = {} +att.Slot = "ud_m16_mag" + +att.AutoStats = true +att.HideIfBlocked = true +att.Free = true -- since this is just the standard mag + +att.SortOrder = 2 +att.Override_ClipSize = 12 + +att.Mult_SightTime = 1.1 +att.Mult_ReloadTime = 1.15 +att.Mult_Sway = 1.5 + +att.Mult_SpeedMult = 0.975 + +att.Mult_HipDispersion = 1.15 + +att.Hook_SelectReloadAnimation = function(wep, anim) + return anim .. "_40" +end + +att.RequireFlags = {"m16_50beo"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_mag_50beo_15.lua b/lua/arccw/shared/attachments/ud_m16_mag_50beo_15.lua new file mode 100644 index 0000000..44c5fcb --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_mag_50beo_15.lua @@ -0,0 +1,32 @@ +att.PrintName = ".50 Beowulf 15-Round Extended Mag" +att.AbbrevName = "15-Round Extended Mag" + +att.Icon = Material("entities/att/acwatt_ud_m16_mag_40.png", "smooth mips") +att.Description = "Extended 5.56mm magazines converted to load .50 Beowulf rounds in a single stack. Really as far as you can go with these thick cartridges." +att.Desc_Pros = {} +att.Desc_Cons = {} +att.Desc_Neutrals = {} +att.Slot = "ud_m16_mag" + +att.AutoStats = true +att.HideIfBlocked = true +att.InvAtt = "ud_m16_mag_40" + +att.SortOrder = 1 +att.Override_ClipSize = 15 + +att.Mult_SightTime = 1.2 +att.Mult_ReloadTime = 1.3 +att.Mult_Sway = 2.25 + +att.Mult_SpeedMult = 0.95 + +att.Mult_HipDispersion = 1.25 + +att.ActivateElements = {"ud_m16_mag_40"} + +att.Hook_SelectReloadAnimation = function(wep, anim) + return anim .. "_40" +end + +att.RequireFlags = {"m16_50beo"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_mag_60.lua b/lua/arccw/shared/attachments/ud_m16_mag_60.lua new file mode 100644 index 0000000..eeadc92 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_mag_60.lua @@ -0,0 +1,45 @@ +att.PrintName = "STANAG 60-Round Casket Mag" +att.AbbrevName = "60-Round Casket Mag" +att.SortOrder = 60 +att.Icon = Material("entities/att/acwatt_ud_m16_mag_60.png", "smooth mips") +att.Description = "Quad-stacked magazine for the M16. Quite bulky, but provides double the ammo capacity of a typical STANAG magazine. Has a tendency to jam." +att.Desc_Pros = {} +att.Desc_Cons = { + "uc.jam" +} +att.Desc_Neutrals = {} +att.Slot = "ud_m16_mag" + +att.AutoStats = true +att.HideIfBlocked = true + +att.Override_ClipSize = 60 + +att.Mult_SightTime = 1.2 +att.Mult_ReloadTime = 1.3 +att.Mult_Sway = 2 + +att.Mult_SpeedMult = 0.95 +att.Mult_ShootSpeedMult = 0.9 + +att.Mult_DrawTime = 1.15 +att.Mult_HolsterTime = 1.15 + +att.Mult_HipDispersion = 1.25 + +att.ActivateElements = {"ud_m16_mag_60"} + +--[[] +att.Override_Jamming = true +att.Override_HeatCapacity = 300 +att.Override_HeatDissipation = 5 +att.Override_HeatDelayTime = 3 +]] +att.Override_Malfunction = true +att.Mult_MalfunctionVariance = 1.25 + +att.Hook_SelectReloadAnimation = function(wep, anim) + return anim .. "_60" +end + +att.ExcludeFlags = {"m16_usas", "m16_9mm", "m16_50beo"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_mag_9mm_32.lua b/lua/arccw/shared/attachments/ud_m16_mag_9mm_32.lua new file mode 100644 index 0000000..11ba8bb --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_mag_9mm_32.lua @@ -0,0 +1,29 @@ +att.PrintName = "32-Round AMSMG Mag" +att.AbbrevName = "32-Round Mag" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "32-Round 9mm AR-15 Mag" +end + +att.Icon = Material("entities/att/acwatt_ud_m16_9mm_32.png", "smooth mips") +att.Description = "A long stick magazine for the 9mm caliber conversion." +att.Desc_Pros = {} +att.Desc_Cons = {} +att.Desc_Neutrals = {} +att.Slot = "ud_m16_mag" + +att.AutoStats = true +att.HideIfBlocked = true + +att.Override_ClipSize = 32 +att.Mult_SightTime = 1.1 +att.Mult_ReloadTime = 1.15 +att.Mult_Sway = 1.25 +att.Mult_ShootSpeedMult = 0.95 + +att.ActivateElements = {"ud_m16_9mm_mag_32"} +att.RequireFlags = {"m16_9mm"} + +att.Hook_SelectReloadAnimation = function(wep, anim) + return anim .. "_9mm" +end \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_mag_pmag.lua b/lua/arccw/shared/attachments/ud_m16_mag_pmag.lua new file mode 100644 index 0000000..b713e74 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_mag_pmag.lua @@ -0,0 +1,23 @@ +att.PrintName = "PMAG 30 AR/M4 GEN M2 MOE" +att.AbbrevName = "30-Round PMAG" +att.SortOrder = 40 +att.Icon = Material("entities/att/acwatt_ud_m16_mag_pmag.png", "smooth mips") +att.Description = "American aftermarket magazine. The grooves give it a slightly better grip surface, but the difference in practice is negligible." +att.Desc_Pros = {} +att.Desc_Cons = {} +att.Desc_Neutrals = {"uc.cosmetic"} +att.Slot = "ud_m16_mag" + +att.AutoStats = true +att.HideIfBlocked = true + +-- att.Mult_SightTime = 1.1 +-- att.Mult_ReloadTime = 1.15 +-- att.Mult_Sway = 1.5 + +-- att.Mult_SpeedMult = 0.975 +-- att.Mult_ShootSpeedMult = 0.95 + +att.ActivateElements = {"ud_m16_pmag"} + +att.ExcludeFlags = {"m16_usas", "m16_9mm", "m16_50beo"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_mag_usas_20.lua b/lua/arccw/shared/attachments/ud_m16_mag_usas_20.lua new file mode 100644 index 0000000..d368210 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_mag_usas_20.lua @@ -0,0 +1,45 @@ +att.PrintName = "20-Round AMSAS Drum Mag" +att.AbbrevName = "20-Round Drum Mag" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "20-Round USAR Drum Mag" +end + +att.SortOrder = -1 +att.Icon = Material("entities/att/obsolete.png", "mips smooth") +att.Description = "Extended drum magazine that offers extra magazine capacity. Almost no legitimate military uses, but makes a fun range toy." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_m16_mag" + +att.AutoStats = true +att.HideIfBlocked = true + +att.Override_ClipSize = 20 +att.Override_ClipSize_SkipAS = true + +att.Mult_SightTime = 1.25 +--att.Mult_Recoil = 0.9 +att.Mult_ReloadTime = 1.25 +att.Mult_SpeedMult = 0.95 +att.Mult_Sway = 3 + +att.ActivateElements = {"ud_m16_usas_mag_20"} + +att.Hook_SelectReloadAnimation = function(wep, anim) + return anim .. "_usas_20" +end + + +att.Hook_SelectFireAnimation = function(wep, anim) + return anim .. "_usas" +end + +att.RequireFlags = {"m16_usas"} + +att.Description = "OBSOLETE" +att.Ignore = true \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_muzzle_605.lua b/lua/arccw/shared/attachments/ud_m16_muzzle_605.lua new file mode 100644 index 0000000..df08af8 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_muzzle_605.lua @@ -0,0 +1,27 @@ +att.PrintName = "Model 605 Three-prong" +att.AbbrevName = "M605 Three-prong" +att.Icon = Material("entities/att/acwatt_ud_m16_muzzle_605.png", "mips smooth") +att.Description = "" +att.Desc_Pros = { + "uc.flashhider" +} +att.Desc_Cons = { +} +att.AutoStats = true +att.Slot = "ud_m16_muzzle" + +att.SortOrder = -101 + +att.Model = "models/weapons/arccw/atts/fesiug_threeprong_605.mdl" +att.ModelOffset = Vector(0.4, 0, 0) +att.ModelScale = Vector(1, 1, 1) +att.OffsetAng = Angle(0, 0, 0) + +att.Add_BarrelLength = 4 +att.Mult_Sway = 1.1 +att.Mult_HipDispersion = 0.9 + +att.Mult_ShootPitch = 1.1 +att.Mult_ShootVol = 0.75 + +att.AttachSound = "arccw_uc/common/gunsmith/suppressor_thread.ogg" \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_muzzle_607.lua b/lua/arccw/shared/attachments/ud_m16_muzzle_607.lua new file mode 100644 index 0000000..e5a0f2a --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_muzzle_607.lua @@ -0,0 +1,27 @@ +att.PrintName = "Model 607 Moderator" +att.AbbrevName = "M607 Moderator" +att.Icon = Material("entities/att/acwatt_ud_m16_muzzle_607.png", "mips smooth") +att.Description = "" +att.Desc_Pros = { + "uc.flashhider" +} +att.Desc_Cons = { +} +att.AutoStats = true +att.Slot = "ud_m16_muzzle" + +att.SortOrder = -102 + +att.Model = "models/weapons/arccw/atts/fesiug_moderator_607.mdl" +att.ModelOffset = Vector(0.2, 0, 0) +att.ModelScale = Vector(1, 1, 1) +att.OffsetAng = Angle(0, 0, 0) + +att.Add_BarrelLength = 4 +att.Mult_Sway = 1.1 +att.Mult_HipDispersion = 0.9 + +att.Mult_ShootPitch = 1.1 +att.Mult_ShootVol = 0.75 + +att.AttachSound = "arccw_uc/common/gunsmith/suppressor_thread.ogg" \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_muzzle_xm177.lua b/lua/arccw/shared/attachments/ud_m16_muzzle_xm177.lua new file mode 100644 index 0000000..a39f450 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_muzzle_xm177.lua @@ -0,0 +1,27 @@ +att.PrintName = "CAR-15 XM177 Moderator" +att.AbbrevName = "XM177 Moderator" +att.Icon = Material("entities/att/acwatt_ud_m16_muzzle_xm177.png", "mips smooth") +att.Description = "" +att.Desc_Pros = { + "uc.flashhider" +} +att.Desc_Cons = { +} +att.AutoStats = true +att.Slot = "ud_m16_muzzle" + +att.SortOrder = -100 + +att.Model = "models/weapons/arccw/atts/fesiug_moderator_xm177.mdl" +att.ModelOffset = Vector(0.3, 0, 0) +att.ModelScale = Vector(1, 1, 1) +att.OffsetAng = Angle(0, 0, 0) + +att.Add_BarrelLength = 4 +att.Mult_Sway = 1.1 +att.Mult_HipDispersion = 0.9 + +att.Mult_ShootPitch = 1.1 +att.Mult_ShootVol = 0.75 + +att.AttachSound = "arccw_uc/common/gunsmith/suppressor_thread.ogg" \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_receiver_22lr.lua b/lua/arccw/shared/attachments/ud_m16_receiver_22lr.lua new file mode 100644 index 0000000..c06edfc --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_receiver_22lr.lua @@ -0,0 +1,79 @@ +att.PrintName = "AMCAR-NG .22 LR Upper Receiver" +att.AbbrevName = ".22 LR Upper" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "AR-15 .22 LR Upper Receiver" +end + +att.Icon = Material("entities/att/uc_bullets/22lr.png", "smooth mips") +att.Description = "Civilian model firing a low power cartridge.\nVery controllable recoil, but not much lethality." +att.Desc_Pros = { + --"uc.auto", +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_m16_receiver" +att.SortOrder = -12 + +att.AutoStats = true +att.SortOrder = 3 + +att.Mult_RPM = 1 / .85 + +att.Mult_Damage = ArcCW.UC.CalConv("556", "22lr", "max") +att.Mult_DamageMin = ArcCW.UC.CalConv("556", "22lr", "min") +att.Mult_Penetration = ArcCW.UC.CalConv("556", "22lr", "pen") + +att.Mult_Range = 0.5 +att.Mult_ShootSpeedMult = 1.2 +att.Mult_Recoil = 0.2 +att.Mult_VisualRecoilMult = 0.2 +att.Mult_ClipSize = 1.2 + +att.Mult_HeatCapacity = 2 + +att.Override_PhysTracerProfile = "uc_plinking" +att.Override_PhysBulletMuzzleVelocity = 375 / 0.8333 + +att.Override_Ammo = "plinking" +att.Override_Trivia_Calibre = ".22 Long Rifle" + +att.Override_ShellModel = "models/weapons/arccw/uc_shells/22lr.mdl" +att.Override_ShellScale = 1 +att.Override_ShellSounds = ArcCW.TinyShellSoundsTable + +local path = "arccw_uc/common/" + +local fire22 = {path .. "fire-22-01.ogg",path .. "fire-22-02.ogg",path .. "fire-22-03.ogg",path .. "fire-22-04.ogg",path .. "fire-22-05.ogg",path .. "fire-22-06.ogg"} +local fire22sup = {path .. "fire-22-sup-01.ogg",path .. "fire-22-sup-02.ogg",path .. "fire-22-sup-03.ogg",path .. "fire-22-sup-04.ogg",path .. "fire-22-sup-05.ogg",path .. "fire-22-sup-06.ogg"} + +att.Hook_GetShootSound = function(wep, sound) + if wep:GetBuff_Override("Silencer") then + return fire22sup + else + return fire22 + end +end + +local fire22dist = {path .. "fire-22-dist-01.ogg", path .. "fire-22-dist-02.ogg", path .. "fire-22-dist-03.ogg", path .. "fire-22-dist-04.ogg", path .. "fire-22-dist-05.ogg", path .. "fire-22-dist-06.ogg"} + +att.Hook_GetDistantShootSoundOutdoors = function(wep, distancesound) + if wep:GetBuff_Override("Silencer") then + -- fallback to script + else + return fire22dist + end +end + + +local fire22distint = {path .. "fire-dist-int-pistol-light-01.ogg", path .. "fire-dist-int-pistol-light-02.ogg", path .. "fire-dist-int-pistol-light-03.ogg", path .. "fire-dist-int-pistol-light-04.ogg", path .. "fire-dist-int-pistol-light-05.ogg", path .. "fire-dist-int-pistol-light-06.ogg"} + +att.Hook_GetDistantShootSoundIndoors = function(wep, distancesound) + if wep:GetBuff_Override("Silencer") then + -- fallback to script + else + return fire22distint + end +end \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_receiver_300blk.lua b/lua/arccw/shared/attachments/ud_m16_receiver_300blk.lua new file mode 100644 index 0000000..7871f7b --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_receiver_300blk.lua @@ -0,0 +1,72 @@ +att.PrintName = "AMCAR .300 Blackout Upper Receiver" +att.AbbrevName = ".300 BLK Upper" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "AR-15 .300 Blackout Upper Receiver" +end + +att.Description = "Aftermarket receiver that fires .300 Blackout cartridges, identical to 5.56x45mm in diameter but with a much larger projectile.\nIts low muzzle velocity makes it well suited for subsonic loads." + +att.Icon = Material("entities/att/uc_bullets/300blackout.png", "smooth mips") +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_m16_receiver" + +att.AutoStats = true +att.SortOrder = 4 + +att.Mult_Damage = ArcCW.UC.CalConv("556", "300blk", "max") +att.Mult_DamageMin = ArcCW.UC.CalConv("556", "300blk", "min") +att.Mult_Penetration = ArcCW.UC.CalConv("556", "300blk", "pen") + +att.Mult_ShootVol = 105 / 120 + +att.Mult_Range = 0.9 + +att.Mult_HeatDissipation = 1.5 + +att.Override_PhysBulletMuzzleVelocity = 310 + +att.Override_ShellModel = "models/weapons/arccw/uc_shells/300blk.mdl" +att.Override_ShellScale = 1 + +att.Override_Trivia_Calibre = ".300 AAC Blackout" +att.AddSuffix = " .300" + +local path = "weapons/arccw_ud/m16/" + +att.Hook_GetShootSound = function(wep, sound) -- Temporary + if wep:GetBuff_Override("Silencer") then + -- fallback to script + else + return { + path .. "fire-300-01.ogg", + path .. "fire-300-02.ogg", + path .. "fire-300-03.ogg", + path .. "fire-300-04.ogg", + path .. "fire-300-05.ogg", + path .. "fire-300-06.ogg" + } + end +end + +att.Hook_GetDistantShootSoundOutdoors = function(wep, distancesound) + if wep:GetBuff_Override("Silencer") then + -- fallback to script + else + return { + path .. "fire-dist-300-01.ogg", + path .. "fire-dist-300-02.ogg", + path .. "fire-dist-300-03.ogg", + path .. "fire-dist-300-04.ogg", + path .. "fire-dist-300-05.ogg", + path .. "fire-dist-300-06.ogg" + } + end +end + +att.GivesFlags = {"cal_subsonic"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_receiver_50beo.lua b/lua/arccw/shared/attachments/ud_m16_receiver_50beo.lua new file mode 100644 index 0000000..51390b1 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_receiver_50beo.lua @@ -0,0 +1,130 @@ +att.PrintName = "AMCAR-NG .50 Beowulf Upper Receiver" +att.AbbrevName = ".50 Beowulf Upper" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "AR-15 .50 Beowulf Upper Receiver" +end + +att.SortOrder = -1 +att.Icon = Material("entities/att/uc_bullets/50beowulf.png", "smooth mips") +att.Description = "Semi-automatic receiver chambered in .50 Beowulf, a gigantic short-range cartridge with terrible ballistic performance. It can load single-stack into standard AR-15 magazines at a lower capacity.\nThe rifle is unable to handle the massive pressure at anything more than semi-automatic fire." +att.Desc_Pros = {} +att.Desc_Cons = { + "ud.m16.50beo", + "uc.semionly", +} +att.Desc_Neutrals = {} +att.Slot = "ud_m16_receiver" + +att.AutoStats = true +att.HideIfBlocked = true + +att.SortOrder = 1 + +att.Override_ClipSize = 7 +att.Override_ClipSize_Priority = 0.5 +att.BaseClipSize = 7 + +att.Mult_Damage = ArcCW.UC.CalConv("556", "50beo", "max") +att.Mult_DamageMin = ArcCW.UC.CalConv("556", "50beo", "min") +att.Mult_Penetration = ArcCW.UC.CalConv("556", "50beo", "pen") + +att.Mult_Recoil = 3 +att.Mult_RecoilSide = 2 +att.Mult_VisualRecoilMult = 2 +att.Mult_RPM = 0.5 +att.Mult_Range = 0.25 +att.Mult_ShootVol = 1.2 + +att.Mult_SightTime = 0.91 +att.Mult_ReloadTime = 0.87 +att.Mult_Sway = 0.667 + +att.Mult_SpeedMult = 1.025 + +att.Override_PhysBulletMuzzleVelocity = 550 + +-- att.Mult_HeatCapacity = 0.25 +-- att.Mult_HeatDissipation = 0.25 + +-- yes, .50 beowulf is more of an huge magnum bullet than it is a rifle bullet +att.Override_Ammo = "357" +att.Override_Trivia_Calibre = ".50 Beowulf" +att.AddSuffix = " .50" +att.Override_ShellModel = "models/weapons/arccw/uc_shells/50beo.mdl" +att.Override_ShellScale = 1 +att.Override_ShellSounds = ArcCW.PistolShellSoundsTable + +att.Override_Firemodes_Priority = 0.5 +att.Override_Firemodes = { + { + Mode = 1, + }, + { + Mode = 0 + } +} + +local path = "weapons/arccw_ud/m16/" +local common = ")/arccw_uc/common/" +local tail = common .. "50beo/" +local tail1 = common .. "308/" + +local fire50 = {path .. "fire-50-01.ogg",path .. "fire-50-02.ogg",path .. "fire-50-03.ogg",path .. "fire-50-04.ogg",path .. "fire-50-05.ogg",path .. "fire-50-06.ogg"} +local fire50dist = {tail .. "fire-dist-50beo-rif-ext-01.ogg", tail .. "fire-dist-50beo-rif-ext-02.ogg", tail .. "fire-dist-50beo-rif-ext-03.ogg", tail .. "fire-dist-50beo-rif-ext-04.ogg", tail .. "fire-dist-50beo-rif-ext-05.ogg", tail .. "fire-dist-50beo-rif-ext-06.ogg"} +local fire50distint = {tail1 .. "fire-dist-308-rif-int-01.ogg", tail1 .. "fire-dist-308-rif-int-02.ogg", tail1 .. "fire-dist-308-rif-int-03.ogg", tail1 .. "fire-dist-308-rif-int-04.ogg", tail1 .. "fire-dist-308-rif-int-05.ogg",tail .. "fire-dist-308-rif-int-06.ogg"} + +att.Hook_GetShootSound = function(wep, sound) + if wep:GetBuff_Override("Silencer") then + return fire50sup + else + return fire50 + end +end + + +att.Hook_GetDistantShootSoundOutdoors = function(wep, distancesound) + if wep:GetBuff_Override("Silencer") then + -- fallback to script + else + return fire50dist + end +end + + +att.Hook_GetDistantShootSoundIndoors = function(wep, distancesound) + if wep:GetBuff_Override("Silencer") then + -- fallback to script + else + return fire50distint + end +end + +-- can't be handled here +--att.ActivateElements = {"ud_m16_mag_50beo"} + +att.Hook_SelectReloadAnimation = function(wep, anim) + if wep.Attachments[9].Installed == nil then + return anim .. "_20" + end +end + +local slotinfo = { + [6] = {".50 Beowulf Lower", ".50 Beowulf Lower", Material("entities/att/acwatt_ud_m16_receiver_semi.png", "smooth mips")}, + [11] = {"7-Round Mag", "7-Round Mag", Material("entities/att/acwatt_ud_m16_mag_15.png", "smooth mips")}, +} +att.Hook_GetDefaultAttName = function(wep, slot) + if slotinfo[slot] then + return GetConVar("arccw_truenames"):GetBool() and slotinfo[slot][2] or slotinfo[slot][1] + end +end +att.Hook_GetDefaultAttIcon = function(wep, slot) + if slotinfo[slot] then + return slotinfo[slot][3] + end +end + +att.Override_Trivia_Class = "Semi-Automatic Rifle" + + +att.GivesFlags = {"m16_50beo", "m16_nolower"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_receiver_9mm.lua b/lua/arccw/shared/attachments/ud_m16_receiver_9mm.lua new file mode 100644 index 0000000..b9e55f7 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_receiver_9mm.lua @@ -0,0 +1,96 @@ +att.PrintName = "AMPAW-9 9x19mm Upper Receiver" +att.AbbrevName = "9x19mm Upper" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "R0635 9x19mm Upper Receiver" +end + +att.Icon = Material("entities/att/uc_bullets/9x19.png", "smooth mips") +att.Description = "A converted receiver that fires 9x19mm Parabellum rounds. The smaller caliber drastically reduces recoil, but has much less range and is less accurate." +att.Desc_Pros = { + --"uc.auto", +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_m16_receiver" +att.SortOrder = -10 + +att.AutoStats = true +att.SortOrder = 3 + +att.Mult_Penetration = 6 / 14 +att.Mult_RPM = 1 / .85 + +att.Mult_Damage = ArcCW.UC.CalConv("556", "9mm", "max") +att.Mult_DamageMin = ArcCW.UC.CalConv("556", "9mm", "min") +att.Mult_Penetration = ArcCW.UC.CalConv("556", "9mm", "pen") + +att.Mult_Range = 0.4 +att.Mult_ShootSpeedMult = 1.1 +att.Mult_Recoil = 0.5 +att.Mult_HipDispersion = 0.85 + +--att.Mult_ReloadTime = 0.85 +att.Mult_SightTime = 0.9 + +att.Override_ClipSize_Priority = -1 +att.Override_ClipSize = 20 + +att.Mult_HeatCapacity = 1.5 + +att.GivesFlags = {"m16_auto", "m16_9mm"} +att.ExcludeFlags = {"m16_noauto"} +att.ActivateElements = {"ud_m16_9mm_mag"} + +att.Override_PhysBulletMuzzleVelocity = 396 / 0.833333 + +att.Override_Ammo = "pistol" +att.Override_Trivia_Calibre = "9x19mm Parabellum" +att.Override_Trivia_Class = "Submachine Gun" +att.Override_ShellModel = "models/weapons/arccw/uc_shells/9x19.mdl" +att.Override_ShellScale = 1 +att.Override_ShellSounds = ArcCW.PistolShellSoundsTable + +local path = ")^weapons/arccw_ud/glock/" + +att.Hook_GetShootSound = function(wep, fsound) + if fsound == wep.ShootSound or fsound == wep.FirstShootSound then return "weapons/arccw_ud/m16/fire_9.ogg" end + if fsound == wep.ShootSoundSilenced then return {path .. "fire-sup-01.ogg", path .. "fire-sup-02.ogg", path .. "fire-sup-03.ogg", path .. "fire-sup-04.ogg", path .. "fire-sup-05.ogg", path .. "fire-sup-06.ogg"} end +end + +local tail = ")^/arccw_uc/common/9x19/" + +att.Hook_GetDistantShootSoundOutdoors = function(wep, distancesound) + if wep:GetBuff_Override("Silencer") then + -- fallback to script + else + return { + tail .. "fire-dist-9x19-pistol-ext-01.ogg", + tail .. "fire-dist-9x19-pistol-ext-02.ogg", + tail .. "fire-dist-9x19-pistol-ext-03.ogg", + tail .. "fire-dist-9x19-pistol-ext-04.ogg", + tail .. "fire-dist-9x19-pistol-ext-05.ogg", + tail .. "fire-dist-9x19-pistol-ext-06.ogg" + } + end +end + +local slotinfo = { + [11] = {"20-Round Mag", "20-Round Mag", Material("entities/att/acwatt_ud_m16_9mm_20.png", "smooth mips")}, +} +att.Hook_GetDefaultAttName = function(wep, slot) + if slotinfo[slot] then + return GetConVar("arccw_truenames"):GetBool() and slotinfo[slot][2] or slotinfo[slot][1] + end +end +att.Hook_GetDefaultAttIcon = function(wep, slot) + if slotinfo[slot] then + return slotinfo[slot][3] + end +end + +att.Hook_SelectReloadAnimation = function(wep, anim) + return anim .. "_9mm" +end \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_receiver_a1.lua b/lua/arccw/shared/attachments/ud_m16_receiver_a1.lua new file mode 100644 index 0000000..df2b355 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_receiver_a1.lua @@ -0,0 +1,47 @@ +att.PrintName = "AMRA1 Classic Upper Receiver" +att.AbbrevName = "Classic Upper" +att.Description = "Authentic upper receiver of the AMRA1 rifle, notable for its use throughout the latter half of the Vietnam War and seldom wielded by fortunate sons. Notorious for its difficult-to-control high RPM and still non-insignificant feeding failures." + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "M16A1 Classic Upper Receiver" + att.Description = "Authentic upper receiver of the M16A1 rifle, notable for its use throughout the latter half of the Vietnam War and seldom wielded by fortunate sons. Notorious for its difficult-to-control high RPM and still non-insignificant feeding failures." +end + +att.Icon = Material("entities/att/acwatt_ud_m16_receiver_a1.png", "smooth mips") +att.Desc_Pros = { + --"uc.auto" +} +att.Desc_Cons = { + "uc.jam" +} +att.Desc_Neutrals = { + "ud.m16_a1" +} +att.Slot = "ud_m16_receiver" +--att.InvAtt = "ud_m16_receiver_auto" + +att.AutoStats = true +att.SortOrder = -6 + +att.Override_Malfunction = true + +att.Mult_AccuracyMOA = 1.25 +att.Mult_HipDispersion = 1.125 + +-- att.Override_Firemodes = { +-- { +-- Mode = 2, +-- }, +-- { +-- Mode = 1, +-- }, +-- { +-- Mode = 0 +-- } +-- } +att.Mult_RPM = 900 / 765 + +att.GivesFlags = {"m16_auto", "ud_m16_retro", "ud_m16_a1"} +att.ExcludeFlags = {"m16_noauto","ud_m16_not_retro"} +att.ActivateElements = {"upper_classic","ud_m16_upper_charm2"} +att.TopMount = 3 \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_receiver_altburst.lua b/lua/arccw/shared/attachments/ud_m16_receiver_altburst.lua new file mode 100644 index 0000000..a3bbe63 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_receiver_altburst.lua @@ -0,0 +1,40 @@ +att.PrintName = "AMCAR Cam-lock Burst Receiver" +att.AbbrevName = "Alt. Burst Lower" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "M16A2 Cam-lock Burst Receiver" +end + +att.Description = "An alternative burst fire receiver that fires the entire burst with one trigger pull. This has a slight benefit for recoil control, but is mostly down to preference." + +att.Icon = Material("entities/att/acwatt_ud_m16_receiver_default.png", "smooth mips") +att.Desc_Pros = { + "ud.m16_altburst.1" +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { + "ud.m16_altburst.2" +} +att.Slot = "ud_m16_fcg" + +att.AutoStats = true +att.Free = true +att.SortOrder = 10 + + +att.Override_Firemodes_Priority = 0.5 +att.Override_Firemodes = { + { + Mode = -3, + PostBurstDelay = 0.08, + Mult_Recoil = 0.9, + RunawayBurst = true, -- https://en.wikipedia.org/wiki/Burst_mode_(weapons) + }, + { + Mode = 1, + }, + { + Mode = 0 + } +} diff --git a/lua/arccw/shared/attachments/ud_m16_receiver_auto.lua b/lua/arccw/shared/attachments/ud_m16_receiver_auto.lua new file mode 100644 index 0000000..70c382c --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_receiver_auto.lua @@ -0,0 +1,44 @@ +att.PrintName = "AMCAR-NG Automatic Receiver" +att.AbbrevName = "Automatic Lower" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "M16A3 Automatic Receiver" +end + +att.Description = "A fire control group that supports fully automatic fire. Comes in semi-auto-safe configuration." + +att.Icon = Material("entities/att/acwatt_ud_m16_receiver_auto.png", "smooth mips") +att.Desc_Pros = { + "uc.auto", + --"ud.flattop" +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_m16_fcg" +--att.InvAtt = "ud_m16_receiver_auto" + +att.AutoStats = true +att.SortOrder = 5 + +att.Mult_AccuracyMOA = 1.25 +att.Mult_RPM = 0.85 +att.Mult_HipDispersion = 1.125 +att.Mult_ShootSpeedMult = 0.85 + +att.Override_Firemodes = { + { + Mode = 2, + }, + { + Mode = 1, + }, + { + Mode = 0 + } +} + +att.GivesFlags = {"m16_auto"} +att.ExcludeFlags = {"m16_noauto"} +-- att.ActivateElements = {"ud_m16_upper_flat"} diff --git a/lua/arccw/shared/attachments/ud_m16_receiver_autoburstsemi.lua b/lua/arccw/shared/attachments/ud_m16_receiver_autoburstsemi.lua new file mode 100644 index 0000000..3a0af6d --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_receiver_autoburstsemi.lua @@ -0,0 +1,50 @@ +att.PrintName = "AMCAR-1 4-Position Receiver" +att.AbbrevName = "4-Position Lower" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "CAR-15 4-Position Receiver" +end + +att.Description = "A fire control group that supports fully automatic fire. Comes in semi-auto-safe configuration." + +att.Icon = Material("entities/att/acwatt_ud_m16_receiver_auto.png", "smooth mips") +att.Desc_Pros = { + "uc.auto", + "2x RPM in burst" + --"ud.flattop" +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_m16_fcg" +--att.InvAtt = "ud_m16_receiver_auto" + +att.AutoStats = true +att.SortOrder = 5 + +att.Mult_AccuracyMOA = 1.25 +att.Mult_RPM = 0.85 +att.Mult_HipDispersion = 1.125 +att.Mult_ShootSpeedMult = 0.85 + +att.Override_Firemodes = { + { + Mode = 2, + }, + { + Mode = -2, + PostBurstDelay = 0.08, + Mult_RPM = 2, + }, + { + Mode = 1, + }, + { + Mode = 0 + } +} + +att.GivesFlags = {"m16_auto"} +att.ExcludeFlags = {"m16_noauto"} +-- att.ActivateElements = {"ud_m16_upper_flat"} diff --git a/lua/arccw/shared/attachments/ud_m16_receiver_cali.lua b/lua/arccw/shared/attachments/ud_m16_receiver_cali.lua new file mode 100644 index 0000000..1d99cb1 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_receiver_cali.lua @@ -0,0 +1,46 @@ +att.PrintName = "UKCAR .223 Lower Receiver" +att.AbbrevName = "Manual Lower" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "AR-15GB .223 Lower Receiver" +end + +att.Icon = Material("entities/att/acwatt_ud_m16_receiver_cali.png", "smooth mips") +att.Description = "Straight-pull bolt action receiver for the M16, designed to comply with British centrefire rifle laws." +att.Desc_Pros = { +} +att.Desc_Cons = { + "uc.manual" +} +att.Desc_Neutrals = { +} +att.Slot = "ud_m16_fcg" +att.AutoStats = true + +att.SortOrder = -5 + +att.Override_CaseEffectAttachment = 6 + +att.Mult_PhysBulletMuzzleVelocity = 1.3 + +att.Override_Firemodes = { + { + Mode = 1, + PrintName = "fcg.bolt", + }, + { + Mode = 0 + } +} + +att.Hook_TranslateAnimation = function(wep, anim) + if (anim == "fire" || anim == "fire_empty") then + return "fire_cycle" + end +end + +att.Override_ManualAction = true +att.Mult_AccuracyMOA = 0.5 +att.Mult_Range = 1.25 +att.Mult_RangeMin = 1.25 +att.Mult_MalfunctionMean = 1.5 \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_receiver_fpw.lua b/lua/arccw/shared/attachments/ud_m16_receiver_fpw.lua new file mode 100644 index 0000000..7819135 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_receiver_fpw.lua @@ -0,0 +1,66 @@ +att.PrintName = "AMFPW Receiver Package" +att.AbbrevName = "FPW Package" +att.Description = "Unique receiver group of the M231 Firing Port Weapon.\nOriginally intended to be fired from inside a fighting vehicle, the FPW has an insanely high cyclic rate, lacks a front sight and semi-automatic mode, fires from an open bolt, and makes no considerations for recoil, accuracy or heat. The trigger pull is also known to be very heavy." + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "M231 FPW Receiver Package" +end + +att.Icon = Material("entities/att/acwatt_ud_m16_receiver_a1.png", "smooth mips") +att.Desc_Pros = { + "uc.auto" +} +att.Desc_Cons = { + "uc.jam", + "uc.nofs", + "uc.overheat", + "ud.m16.fpw1", + "ud.m16.fpw2" +} +att.Desc_Neutrals = { + "ud.m16_a1" +} +att.Slot = "ud_m16_fcg" +--att.InvAtt = "ud_m16_receiver_auto" + +att.AutoStats = true +att.SortOrder = -6.5 + +att.Mult_RPM = 1103 / 900 +att.Mult_Recoil = 1.25 / 1.1 +att.Mult_RecoilSide = 1.5 +att.Mult_Range = 0.9 +--att.Mult_Sway = 1.25 +att.Mult_AccuracyMOA = 4 / 3 +att.Mult_HipDispersion = 0.85 +att.Override_ChamberSize = 0 + +att.Override_TriggerDelay = true +att.Override_Malfunction = true + +att.Override_Jamming = true +att.Override_HeatLockout = false +att.Override_HeatCapacity = 120 +att.Override_HeatDissipation = 20 + +att.A_Hook_Add_SightsDispersion = function(wep, data) + if data and (!wep.Attachments[1].Installed or wep.Attachments[1].Installed == "ud_m16_rs") then + data.add = data.add + 50 + end +end + +att.Override_Firemodes = { + { + Mode = 2, + }, + { + Mode = 0 + } +} + +att.Override_ChamberSize = 0 + +att.GivesFlags = {"m16_auto", "ud_m16_retro", "ud_m16_fpw", "sight_magpul", "patr3"} +att.ExcludeFlags = {"m16_noauto","ud_m16_not_retro"} +att.ActivateElements = {"upper_classic","ud_m16_upper_charm2"} +att.TopMount = 3 \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_receiver_semi.lua b/lua/arccw/shared/attachments/ud_m16_receiver_semi.lua new file mode 100644 index 0000000..2ec4fbd --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_receiver_semi.lua @@ -0,0 +1,41 @@ +att.PrintName = "AMCAR-NG Sporter Receiver" +att.AbbrevName = "Sporter Lower" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "AR-15 Sporter Receiver" +end + +att.Description = "A semi-automatic receiver sold in civilian markets. Designed for sport shooting, this receiver is more accurate and lightweight." + +att.Icon = Material("entities/att/acwatt_ud_m16_receiver_semi.png", "smooth mips") +att.Desc_Pros = { +} +att.Desc_Cons = { + "uc.semionly" +} +att.Desc_Neutrals = { +} +att.Slot = "ud_m16_fcg" + +att.AutoStats = true +att.SortOrder = -1 + +att.Mult_RPM = 600 / 900 +att.Mult_Recoil = 0.8 +att.Mult_AccuracyMOA = 0.75 +att.Mult_Range = 1.15 +att.Mult_MoveDispersion = 0.5 + +att.Mult_PhysBulletMuzzleVelocity = 1.15 + +att.Override_Firemodes_Priority = 0.5 +att.Override_Firemodes = { + { + Mode = 1, + }, + { + Mode = 0 + } +} + +att.Override_Trivia_Class = "Semi-Automatic Rifle" \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_rs.lua b/lua/arccw/shared/attachments/ud_m16_rs.lua new file mode 100644 index 0000000..6b4b5ca --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_rs.lua @@ -0,0 +1,31 @@ +att.PrintName = "Flip-up Rear Sight" +att.Icon = Material("entities/att/acwatt_ud_m16_rs.png", "smooth mips") +att.Description = "A rail-mounted rear sight for flat top receivers.\nLooks more modern, but that's it." +att.Desc_Pros = {} +att.Desc_Cons = {} +att.Desc_Neutrals = { + "uc.cosmetic" +} +att.Slot = "ud_m16_rs" + +att.ActivateElements = {"ud_m16_upper_flat"} +att.GivesFlags = {"ud_m16_not_retro"} +att.ExcludeFlags = {"ud_m16_retro"} +--att.HideIfBlocked = true + +att.SortOrder = 1000 +att.Free = true +att.IgnorePickX = true + +att.MountPositionOverride = 0.5 +att.IronSight = true +att.Override_IronSightStruct = { + Pos = Vector(-2.80, 0, 0.85), + Ang = Angle(1.05, 0, 0), + Magnification = 1.1 +} +att.Model = "models/weapons/arccw/atts/sig_rs.mdl" +att.ModelOffset = Vector(-2, -0.002, 0) +att.ModelScale = Vector(.86, .86, .86) + +att.HideIfBlocked = true \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_rs_3d.lua b/lua/arccw/shared/attachments/ud_m16_rs_3d.lua new file mode 100644 index 0000000..3c47e80 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_rs_3d.lua @@ -0,0 +1,31 @@ +att.PrintName = "3D Rear Sight" +att.Icon = Material("entities/att/acwatt_ud_m16_rs_3d.png", "smooth mips") +att.Description = "A 3D-printed rear sight for flat top receivers. You probably want a top rail to mount the matching front sight as well." +att.Desc_Pros = {} +att.Desc_Cons = {} +att.Desc_Neutrals = { + "uc.cosmetic" +} +att.Slot = "ud_m16_rs" + +att.ActivateElements = {"ud_m16_upper_flat"} +att.GivesFlags = {"ud_m16_not_retro"} +att.ExcludeFlags = {"ud_m16_retro"} +--att.HideIfBlocked = true + +att.SortOrder = 1000 +att.Free = true +att.IgnorePickX = true + +att.MountPositionOverride = 0.5 +att.IronSight = true +att.Override_IronSightStruct = { + Pos = Vector(-2.80, 0, 2.2), + Ang = Angle(1.05, 0, 0), + Magnification = 1.1 +} +att.Model = "models/weapons/arccw/atts/3d_rs.mdl" +att.ModelOffset = Vector(-2, -0.002, 0) +att.ModelScale = Vector(.86, .86, .86) + +att.HideIfBlocked = true \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_rs_ch.lua b/lua/arccw/shared/attachments/ud_m16_rs_ch.lua new file mode 100644 index 0000000..6e321c9 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_rs_ch.lua @@ -0,0 +1,31 @@ +att.PrintName = "Carry Handle" +att.Icon = Material("entities/att/acwatt_ud_m16_rs_ch.png", "mips smooth") +att.Description = "Mountable carry handle that is independent from the receiver." +att.Desc_Pros = {} +att.Desc_Cons = {} +att.Desc_Neutrals = { + "uc.cosmetic" +} +att.Slot = "ud_m16_rs" + +att.ActivateElements = {"ud_m16_upper_flat"} +att.GivesFlags = {"ud_m16_not_retro"} +att.ExcludeFlags = {"ud_m16_retro"} +--att.HideIfBlocked = true + +att.SortOrder = 1000 +att.Free = true +att.IgnorePickX = true + +att.MountPositionOverride = 0.64 +att.IronSight = true +att.Override_IronSightStruct = { + Pos = Vector(-2.80, 0, 1.11), + Ang = Angle(0.4, 0, 0), + Magnification = 1.1 +} +att.Model = "models/weapons/arccw/atts/colt_ch.mdl" +att.ModelOffset = Vector(-2.2, -0.004, 0) +att.ModelScale = Vector(.78, .78, .78) + +att.HideIfBlocked = true \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_rs_kac.lua b/lua/arccw/shared/attachments/ud_m16_rs_kac.lua new file mode 100644 index 0000000..8fb625a --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_rs_kac.lua @@ -0,0 +1,31 @@ +att.PrintName = "KAC Rear Sight" +att.Icon = Material("entities/att/acwatt_ud_m16_rs_kac.png", "mips smooth") +att.Description = "Aftermarket rear sight for flat top receivers. Functionally identical to other iron sights, but may look more tactical (or mall-ninja, depending on your taste)." +att.Desc_Pros = {} +att.Desc_Cons = {} +att.Desc_Neutrals = { + "uc.cosmetic" +} +att.Slot = "ud_m16_rs" + +att.ActivateElements = {"ud_m16_upper_flat"} +att.GivesFlags = {"ud_m16_not_retro"} +att.ExcludeFlags = {"ud_m16_retro"} +--att.HideIfBlocked = true + +att.SortOrder = 1000 +att.Free = true +att.IgnorePickX = true + +att.MountPositionOverride = 0.5 +att.IronSight = true +att.Override_IronSightStruct = { + Pos = Vector(-2.8, 0, 0.9), + Ang = Angle(0.9, 0, 0), + Magnification = 1.1 +} +att.Model = "models/weapons/arccw/atts/kac_rs.mdl" +att.ModelOffset = Vector(-1.5, -0.01, -0.09) +att.ModelScale = Vector(0.9, 0.9, 0.9) + +att.HideIfBlocked = true \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_rs_magpul.lua b/lua/arccw/shared/attachments/ud_m16_rs_magpul.lua new file mode 100644 index 0000000..3e5739a --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_rs_magpul.lua @@ -0,0 +1,31 @@ +att.PrintName = "Magpul Rear Sight" +att.Icon = Material("entities/att/acwatt_ud_m16_rs_magpul.png", "smooth mips") +att.Description = "Aftermarket rear sight for flat top receivers. Functionally identical to other iron sights, but may look more tactical (or mall-ninja, depending on your taste)." +att.Desc_Pros = {} +att.Desc_Cons = {} +att.Desc_Neutrals = { + "uc.cosmetic" +} +att.Slot = "ud_m16_rs" + +att.ActivateElements = {"ud_m16_upper_flat"} +att.GivesFlags = {"ud_m16_not_retro"} +att.ExcludeFlags = {"ud_m16_retro"} +--att.HideIfBlocked = true + +att.SortOrder = 1000 +att.Free = true +att.IgnorePickX = true + +att.MountPositionOverride = 0.5 +att.IronSight = true +att.Override_IronSightStruct = { + Pos = Vector(-2.80, 0, 0.85), + Ang = Angle(1.05, 0, 0), + Magnification = 1.1 +} +att.Model = "models/weapons/arccw/atts/magpul_rs.mdl" +att.ModelOffset = Vector(-1.5, -0.005, 0) +att.ModelScale = Vector(0.87, 0.87, 0.87) + +att.HideIfBlocked = true \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_rs_sclr.lua b/lua/arccw/shared/attachments/ud_m16_rs_sclr.lua new file mode 100644 index 0000000..b08db2b --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_rs_sclr.lua @@ -0,0 +1,31 @@ +att.PrintName = "Scalarworks Rear Sight" +att.Icon = Material("entities/att/acwatt_ud_m16_rs_sclr.png", "mips smooth") +att.Description = "Aftermarket rear sight for flat top receivers. Functionally identical to other iron sights, but may look more tactical (or mall-ninja, depending on your taste)." +att.Desc_Pros = {} +att.Desc_Cons = {} +att.Desc_Neutrals = { + "uc.cosmetic" +} +att.Slot = "ud_m16_rs" + +att.ActivateElements = {"ud_m16_upper_flat"} +att.GivesFlags = {"ud_m16_not_retro"} +att.ExcludeFlags = {"ud_m16_retro"} +--att.HideIfBlocked = true + +att.SortOrder = 1000 +att.Free = true +att.IgnorePickX = true + +att.MountPositionOverride = 0.5 +att.IronSight = true +att.Override_IronSightStruct = { + Pos = Vector(-2.80, 0, 0.85), + Ang = Angle(1.05, 0, 0), + Magnification = 1.1 +} +att.Model = "models/weapons/arccw/atts/scalerworks_rs.mdl" +att.ModelOffset = Vector(-3, 0, -0.1) +att.ModelScale = Vector(1.17, 1.17, 1.17) + +att.HideIfBlocked = true \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_stock_231.lua b/lua/arccw/shared/attachments/ud_m16_stock_231.lua new file mode 100644 index 0000000..d1201af --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_stock_231.lua @@ -0,0 +1,46 @@ +att.PrintName = "AMCAR 231 Wire Stock" +att.AbbrevName = "M231 Wire Stock" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "M16 M231 Wire Stock" +end + +att.Icon = Material("entities/att/acwatt_ud_m16_stock_231.png", "smooth mips") +att.Description = "Wire stock used on the M231 FPW that provides some semblance of recoil control. Can be made even more agile by collapsing, improving point-shooting capabilities at the cost of recoil control.\n\nToggling this stock modifies performance accordingly." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_m16_stock" + +att.AutoStats = true +att.SortOrder = 3 + +att.Mult_SightTime = 0.75 +att.Mult_Recoil = 1.25 + +att.Add_BarrelLength = -4 + +att.Mult_DrawTime = 0.75 +att.Mult_HolsterTime = 0.75 + +att.ToggleSound = "arccw_uc/common/stockslide.ogg" + +att.ToggleLockDefault = true +att.ToggleStats = { + { + PrintName = "Extended", + AutoStats = true, + ActivateElements = {"stock_231_ex"}, + }, + { + PrintName = "Collapsed", + AutoStats = true, + Mult_HipDispersion = 0.6, + Mult_MoveDispersion = 0.6, + Mult_RecoilSide = 2, + ActivateElements = {"stock_231_in"}, + }, +} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_stock_607.lua b/lua/arccw/shared/attachments/ud_m16_stock_607.lua new file mode 100644 index 0000000..5288403 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_stock_607.lua @@ -0,0 +1,41 @@ +att.PrintName = "AMCAR 607 Stock" +att.AbbrevName = "M607 Slide Stock" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "M16 Model 607 Stock" +end + +att.Icon = Material("entities/att/acwatt_ud_m16_stock_607.png", "smooth mips") +att.Description = "Collapsable combat stock used on the Model 607 SMG. While not as steady as a full stock, it allows for quick target acquisition when collapsed.\n\nToggling this stock modifies performance accordingly." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_m16_stock" + +att.AutoStats = true +att.SortOrder = 5 + +att.Mult_Sway = 1.25 +att.Mult_MoveDispersion = 0.9 + +att.ToggleSound = "arccw_uc/common/stockslide.ogg" + +att.ToggleLockDefault = true +att.ToggleStats = { + { + PrintName = "Extended", + AutoStats = true, + ActivateElements = {"stock_607_ex"}, + }, + { + PrintName = "Collapsed", + AutoStats = true, + ActivateElements = {"stock_607_in"}, + Mult_SightTime = 0.8, + Mult_Recoil = 1.15, + Add_BarrelLength = -4, + }, +} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_stock_608.lua b/lua/arccw/shared/attachments/ud_m16_stock_608.lua new file mode 100644 index 0000000..b7c0c45 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_stock_608.lua @@ -0,0 +1,29 @@ +att.PrintName = "AMCAR 608 Stock" +att.AbbrevName = "M608 Cap Stock" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "M16 Model 608 Stock" +end + +att.Icon = Material("entities/att/acwatt_ud_m16_stock_608.png", "smooth mips") +att.Description = "Stock used on the Model 608 survival rifle. Essentially an elongated buffer tube with a cap. Improves point shooting abilities." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_m16_stock" + +att.AutoStats = true +att.SortOrder = 4 + +att.Mult_HipDispersion = 0.75 +att.Mult_MoveDispersion = 0.85 +att.Mult_SightTime = 1.15 +att.Mult_Recoil = 1.25 +att.Mult_Sway = 1.5 + +att.Add_BarrelLength = 0 + +att.ActivateElements = {"stock_608"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_stock_adar.lua b/lua/arccw/shared/attachments/ud_m16_stock_adar.lua new file mode 100644 index 0000000..b056049 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_stock_adar.lua @@ -0,0 +1,52 @@ +att.PrintName = "RUCAR 225 Stock" + +att.Icon = Material("entities/att/acwatt_ud_m16_stock_adar.png", "smooth mips") +att.Description = "Wooden fixed stock with integral grip used on the Russian RUCAR 225 rifle. Very steady while aiming and reduces recoil effectively, but quite difficult to manuver with." + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "ADAR 2-15 Stock" + --att.Description = "Wooden fixed stock with integral grip used on the Russian ADAR 2-15 rifle. The sturdiest stock currently available for the AR platform." +end + +att.Desc_Pros = { + --"uc.auto" +} +att.Desc_Cons = { + "uc.nogrip" +} +att.Desc_Neutrals = { +} +att.Slot = "ud_m16_stock" +att.SortOrder = 10 + +att.AutoStats = true + +att.Mult_Sway = 0.5 +att.Mult_Recoil = 0.8 +att.Mult_RecoilSide = 0.75 +att.Mult_SpeedMult = 0.95 +att.Mult_SightedSpeedMult = .8 +att.Mult_SightTime = 1.25 + +att.ActivateElements = {"stock_adar"} +att.GivesFlags = {"m16_adar"} + +local slotinfo = { + [9] = {"Intergral Grip", "Integral Grip", att.Icon}, +} +att.Hook_GetDefaultAttName = function(wep, slot) + if wep:GetClass() == "arccw_uc_ar57" then + slotinfo = { + [6] = {"Intergral Grip", "Integral Grip", att.Icon}, + } + end + + if slotinfo[slot] then + return GetConVar("arccw_truenames"):GetBool() and slotinfo[slot][2] or slotinfo[slot][1] + end +end +att.Hook_GetDefaultAttIcon = function(wep, slot) + if slotinfo[slot] then + return slotinfo[slot][3] + end +end \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_stock_buffer.lua b/lua/arccw/shared/attachments/ud_m16_stock_buffer.lua new file mode 100644 index 0000000..2736145 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_stock_buffer.lua @@ -0,0 +1,33 @@ +att.PrintName = "Buffer Tube" + +att.Icon = Material("entities/att/acwatt_ud_m16_stock_buffer.png", "smooth mips") +att.Description = "The concept of \"stocks\" and \"recoil reduction\" are liberal gibberish made up to stop FREEDOM-LOVING AMERICANS from exercising their GOD-GIVEN RIGHTS." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_m16_stock" + +att.AutoStats = true +att.SortOrder = -100 +att.Free = true + +att.Mult_SpeedMult = 1.05 + +att.Mult_SightTime = 0.75 +att.Mult_DrawTime = 0.6 +att.Mult_HolsterTime = 0.6 + +att.Mult_Recoil = 1.5 +att.Mult_RecoilSide = 2 + +att.Mult_SightedSpeedMult = 1.2 +att.Mult_ShootSpeedMult = 1.15 + +att.Add_BarrelLength = -8 +att.Mult_Sway = 3 + +att.ActivateElements = {"stock_231_tube"} +att.GivesFlags = {"patr4"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_stock_carbine.lua b/lua/arccw/shared/attachments/ud_m16_stock_carbine.lua new file mode 100644 index 0000000..d73e928 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_stock_carbine.lua @@ -0,0 +1,42 @@ +att.PrintName = "AMCAR Carbine Stock" +att.AbbrevName = "Carbine Stock" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "M16 Carbine Stock" +end + +att.Icon = Material("entities/att/acwatt_ud_m16_stock_carbine.png", "smooth mips") +att.Description = "Adjustable combat stock used on the XM177 carbine. When collapsed, it allows the user to move swiftly in close quarters; when extended, it functions similarly to a full stock.\n\nToggling this stock modifies performance accordingly." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_m16_stock" + +att.AutoStats = true +att.SortOrder = 6.5 + +att.Mult_Sway = 1.25 +att.Mult_SightedSpeedMult = 1.15 + +att.ToggleSound = "arccw_uc/common/stockslide.ogg" + +att.ToggleLockDefault = true +att.ToggleStats = { + { + PrintName = "Extended", + AutoStats = true, + ActivateElements = {"stock_carbine_ex"}, + }, + { + PrintName = "Collapsed", + AutoStats = true, + ActivateElements = {"stock_carbine_in"}, + Mult_RecoilSide = 1.5, + Add_BarrelLength = -4, + Mult_ShootSpeedMult = 1.1, + Mult_SightTime = 0.9, + }, +} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_stock_moe.lua b/lua/arccw/shared/attachments/ud_m16_stock_moe.lua new file mode 100644 index 0000000..b32f7e1 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_stock_moe.lua @@ -0,0 +1,46 @@ +att.PrintName = "MOE Carbine Stock" +att.AbbrevName = "MOE Stock" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "MOE Carbine Stock" +end + +att.Icon = Material("entities/att/acwatt_ud_m16_stock_moe.png", "smooth mips") +att.Description = "Aftermarket adjustable carbine stock with anti-slip buttpads. Reduces sway compared to a standard carbine stock, but is slightly less agile.\n\nToggling this stock modifies performance accordingly." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = {"go_stock", "ud_m16_stock"} + +att.Model = "models/weapons/arccw/atts/stock_moe_b.mdl" +att.ModelOffset = Vector(-0.57, 0, 0.342) +att.ModelScale = Vector(0.74, 0.74, 0.74) +att.OffsetAng = Angle(0, 0, 0) + +att.AutoStats = true +att.SortOrder = 6 + +att.Mult_Sway = 1.1 +att.Mult_SightedSpeedMult = 1.075 + +att.ActivateElements = {"stock_231_tube"} + +att.ToggleStats = { + { + PrintName = "Extended", + AutoStats = true, + ModelOffset = Vector(-1.5, 0, 0.342) + }, + { + PrintName = "Collapsed", + ModelOffset = Vector(0, 0, 0.342), + AutoStats = true, + Mult_RecoilSide = 1.5, + Add_BarrelLength = -4, + Mult_SightTime = 0.9, + Mult_ShootSpeedMult = 1.05, + }, +} diff --git a/lua/arccw/shared/attachments/ud_m16_stock_ru556.lua b/lua/arccw/shared/attachments/ud_m16_stock_ru556.lua new file mode 100644 index 0000000..2a8a728 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_stock_ru556.lua @@ -0,0 +1,28 @@ +att.PrintName = "RU556 Fixed-Adjustable Stock" +att.AbbrevName = "Fixed-Adjustable Stock" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Magpul UBR GEN2 Stock" +end +att.Icon = Material("entities/att/acwatt_ud_m16_stock_ru556.png", "smooth mips") +att.Description = "Polymer sliding stock attached from underneath the buffer tube. Allows for better weapon control when moving." +att.Desc_Pros = { + --"uc.auto" +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_m16_stock" + +att.AutoStats = true +att.SortOrder = 5 + +att.Mult_MoveDispersion = 0.6 +att.Mult_SightedSpeedMult = 1.15 + +att.Mult_RecoilSide = 1.1 +att.Mult_Recoil = 1.15 +att.Mult_Sway = 1.25 + +att.ActivateElements = {"stock_ru556"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_stock_sopmod.lua b/lua/arccw/shared/attachments/ud_m16_stock_sopmod.lua new file mode 100644 index 0000000..43d57ce --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_stock_sopmod.lua @@ -0,0 +1,49 @@ +att.PrintName = "AMCAR SOPMOD Stock" +att.AbbrevName = "SOPMOD Stock" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "M16 SOPMOD Stock" +end + +att.Icon = Material("entities/att/acwatt_ud_m16_stock_sopmod.png", "smooth mips") +att.Description = "Military-grade carbine stock with sophisticated ergonomics. Handles faster compared to a standard carbine stock, but is less stable.\n\nToggling this stock modifies performance accordingly." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = {"go_stock", "ud_m16_stock"} + +att.Model = "models/weapons/arccw/atts/stock_sopmod.mdl" +att.ModelOffset = Vector(-0.57, 0, 0.40) +att.ModelScale = Vector(0.74, 0.74, 0.74) +att.OffsetAng = Angle(0, 0, 0) + +att.AutoStats = true +att.SortOrder = 6 + +att.Mult_Sway = 1.25 +att.Mult_SightedSpeedMult = 1.15 + +att.ToggleSound = "arccw_uc/common/stockslide.ogg" + +att.ActivateElements = {"stock_231_tube"} + +att.ToggleStats = { + { + PrintName = "Extended", + AutoStats = true, + ModelOffset = Vector(-1.5, 0, 0.40), + }, + { + PrintName = "Collapsed", + AutoStats = true, + ModelOffset = Vector(0, 0, 0.40), + Mult_RecoilSide = 1.5, + Add_BarrelLength = -4, + Mult_ShootSpeedMult = 1.1, + Mult_SightTime = 0.85, + Mult_MoveDispersion = 1.15, + }, +} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m16_stock_waffle.lua b/lua/arccw/shared/attachments/ud_m16_stock_waffle.lua new file mode 100644 index 0000000..12f04f4 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_stock_waffle.lua @@ -0,0 +1,47 @@ +att.PrintName = "AMCAR Waffle Stock" +att.AbbrevName = "Waffle Stock" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "M16 Waffle Stock" +end + +att.Icon = Material("entities/att/acwatt_ud_m16_stock_waffle.png", "smooth mips") +att.Description = "Multi-position adjustable combat stock used on the M4 carbine. Has lower recoil than a standard carbine stock, but isn't as agile.\n\nToggling this stock modifies performance accordingly." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = {"go_stock", "ud_m16_stock"} + +att.Model = "models/weapons/arccw/atts/fesiug_stock_waffle.mdl" +att.ModelOffset = Vector(4.25, 0, 1.7) +att.ModelScale = Vector(1.14, 1.14, 1.14) + +att.AutoStats = true +att.SortOrder = 6 + +att.Mult_Sway = 1.25 +att.Mult_SightedSpeedMult = 1.1 + +att.ToggleSound = "arccw_uc/common/stockslide.ogg" + +att.ActivateElements = {"stock_231_tube"} + +att.ToggleStats = { + { + PrintName = "Extended", + AutoStats = true, + ModelOffset = Vector(3.0, 0, 1.7), + }, + { + PrintName = "Collapsed", + AutoStats = true, + ModelOffset = Vector(4.8, 0, 1.7), + Mult_RecoilSide = 1.25, + Add_BarrelLength = -4, + Mult_SightTime = 0.9, + }, +} + diff --git a/lua/arccw/shared/attachments/ud_m16_stock_wood.lua b/lua/arccw/shared/attachments/ud_m16_stock_wood.lua new file mode 100644 index 0000000..177d9e0 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m16_stock_wood.lua @@ -0,0 +1,26 @@ +att.PrintName = "AMCAR Wooden Stock" +att.AbbrevName = "Wooden Stock" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "M16 Wooden Stock" +end + +att.Icon = Material("entities/att/acwatt_ud_m16_stock_default.png", "smooth mips") +att.Description = "A sturdy stock made from wood. Heavier than polymer, and almost makes you wish for a nuclear winter." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_m16_stock" + +att.AutoStats = true +att.SortOrder = 9 + +att.Mult_Recoil = 0.85 +att.Mult_SightedSpeedMult = 0.9 +att.Mult_SpeedMult = 0.975 +att.Mult_Sway = 0.75 + +att.ActivateElements = {"stock_wood"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m79_barrel_short.lua b/lua/arccw/shared/attachments/ud_m79_barrel_short.lua new file mode 100644 index 0000000..64f6a1d --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m79_barrel_short.lua @@ -0,0 +1,46 @@ +att.PrintName = "AMSGL Short Tube" +att.AbbrevName = "Short Tube" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "M79 Short Tube" +end + +att.Icon = Material("entities/att/acwatt_ud_m79_barrel_short.png", "smooth mips") +att.Description = "Nicknamed the 'Pirate Gun' due to its likeliness to a hand cannon, this short barrel improves agility at the cost of precision and projectile range." +att.Desc_Pros = { +} +att.Desc_Cons = { + "uc.altnofs" +} +att.Desc_Neutrals = { +} +att.Slot = "ud_m79_barrel" + +att.LHIK = true + +att.Model = "models/weapons/arccw/atts/lhik_short.mdl" + +att.AutoStats = true + +att.Mult_MuzzleVelocity = 0.5 +att.Mult_Recoil = 1.25 +att.Mult_AccuracyMOA = 2 + +att.Mult_MoveDispersion = 0.75 +att.Mult_SightTime = 0.75 +att.Mult_ReloadTime = 0.85 + +att.Mult_SpeedMult = 1.01 +att.Mult_SightedSpeedMult = 1.05 + +att.Mult_Sway = 0.75 + +att.A_Hook_Add_SightsDispersion = function(wep, data) + if data and !wep.Attachments[1].Installed then + data.add = data.add + 50 + end +end + +att.ActivateElements = {"m79_pirategun"} + +att.GivesFlags = {"m79_pirategun"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_m79_stock_sawn.lua b/lua/arccw/shared/attachments/ud_m79_stock_sawn.lua new file mode 100644 index 0000000..83569fc --- /dev/null +++ b/lua/arccw/shared/attachments/ud_m79_stock_sawn.lua @@ -0,0 +1,32 @@ +att.PrintName = "Sawn-off Stock" +att.Icon = Material("entities/att/acwatt_ud_m79_stock_sawn.png", "smooth mips") +att.Description = "Removing the wooden stock and leaving only a grip massively increases the agility of the weapon, but also makes it difficult to fire accurately or controllably." +att.Desc_Pros = { +} +att.Desc_Cons = { + "uc.sightdisp.50" +} +att.Desc_Neutrals = { +} +att.Slot = "ud_m79_stock" + +att.AutoStats = true +att.Free = true + +att.Add_SightsDispersion = 50 + +att.Mult_Recoil = 1.5 +att.Mult_RecoilSide = 1.5 +att.Mult_Sway = 3 + +att.Mult_SightTime = 0.75 +att.Mult_HipDispersion = 0.75 + +att.Mult_SpeedMult = 1.05 +att.Mult_SightedSpeedMult = 1.1 +att.Mult_ShootSpeedMult = 1.1 + +att.Mult_DrawTime = 0.5 +att.Mult_HolsterTime = 0.5 + +att.ActivateElements = {"m79_nostock"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_mini14_barrel_long.lua b/lua/arccw/shared/attachments/ud_mini14_barrel_long.lua new file mode 100644 index 0000000..5fef779 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_mini14_barrel_long.lua @@ -0,0 +1,27 @@ +att.PrintName = "Mini-14 24\" Long Barrel" +att.AbbrevName = "24\" Long Barrel" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Patriot 809 24\" Long Barrel" +end + +att.Icon = Material("entities/att/acwatt_ud_mini14_barrel_long.png", "smooth mips") +att.SortOrder = 24 +att.Description = "Lengthened barrel for shooting far-away varmints. More accurate, but slightly heavier." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_mini14_barrel" + +att.Mult_SightTime = 1.25 +att.Mult_Recoil = 0.9 +att.Mult_AccuracyMOA = 0.5 +att.Mult_Range = 1.2 +att.Mult_Sway = 1.5 + +att.Add_BarrelLength = 4 + +att.AutoStats = true \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_mini14_barrel_short.lua b/lua/arccw/shared/attachments/ud_mini14_barrel_short.lua new file mode 100644 index 0000000..973a535 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_mini14_barrel_short.lua @@ -0,0 +1,29 @@ +att.PrintName = "Mini-14 18\" Short Barrel" +att.AbbrevName = "18\" Short Barrel" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Patriot 809 18\" Short Barrel" +end + +att.Icon = Material("entities/att/acwatt_ud_mini14_barrel_short.png", "smooth mips") +att.SortOrder = 18 +att.Description = "Compact barrel for popping close-up varmints. More agile but less accurate." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_mini14_barrel" + +att.Mult_SightTime = 0.8 +att.Mult_Recoil = 1.1 +att.Mult_AccuracyMOA = 1.5 +att.Mult_Range = 0.5 +att.Mult_Sway = 0.75 + +att.Mult_SightedSpeedMult = 1.1 + +att.Add_BarrelLength = -4 + +att.AutoStats = true \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_mini14_barrel_stub.lua b/lua/arccw/shared/attachments/ud_mini14_barrel_stub.lua new file mode 100644 index 0000000..3485d91 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_mini14_barrel_stub.lua @@ -0,0 +1,38 @@ +att.PrintName = "Mini-14 15\" Stub Barrel" +att.AbbrevName = "15\" Stub Barrel" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Patriot 809 15\" Stub Barrel" +end + +att.Icon = Material("entities/att/acwatt_ud_mini14_barrel_stub.png", "smooth mips") +att.SortOrder = 15 +att.Description = "No, using your hacksaw on the barrel is not gunsmithing." +att.Desc_Pros = { +} +att.Desc_Cons = { + "uc.nofs", + "uc.nomuzzle", +} +att.Desc_Neutrals = { +} +att.Slot = "ud_mini14_barrel" + +att.Mult_SightTime = 0.65 +att.Mult_Recoil = 1.25 +att.Mult_AccuracyMOA = 3 +att.Mult_Range = 0.25 +att.Mult_Sway = 0.5 +att.Mult_SightedSpeedMult = 1.25 + +att.Add_BarrelLength = -8 + +att.AutoStats = true + +att.GivesFlags = {"nomuzzle"} + +att.A_Hook_Add_SightsDispersion = function(wep, data) + if data and !wep.Attachments[1].Installed then + data.add = data.add + 50 + end +end \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_mini14_mag_10.lua b/lua/arccw/shared/attachments/ud_mini14_mag_10.lua new file mode 100644 index 0000000..b165f16 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_mini14_mag_10.lua @@ -0,0 +1,35 @@ +att.PrintName = "Mini-14 10-Round Flush Mag" +att.AbbrevName = "10-Round Flush Mag" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Patriot 809 10-Round Flush Mag" +end + +att.SortOrder = 10 +att.Icon = Material("entities/att/acwatt_ud_mini14_mag_10.png", "smooth mips") +att.Description = "Low-capacity 5.56mm flush magazine. The lighter load makes the weapon even more ergonomic." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_mini14_mag" + +att.AutoStats = true + +att.Mult_SightTime = 0.85 +att.Mult_ReloadTime = 0.9 +att.Override_ClipSize = 10 +att.Mult_Sway = 0.75 + +att.Mult_HipDispersion = 0.7 + +att.ActivateElements = {"ud_mini14_mag_10"} + +att.Hook_SelectReloadAnimation = function(wep, anim) + return anim .. "_10" +end + +att.ExcludeFlags = {"mini14_762", "mini14_22lr"} +att.HideIfBlocked = true \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_mini14_mag_10_762.lua b/lua/arccw/shared/attachments/ud_mini14_mag_10_762.lua new file mode 100644 index 0000000..e505f3c --- /dev/null +++ b/lua/arccw/shared/attachments/ud_mini14_mag_10_762.lua @@ -0,0 +1,34 @@ +att.PrintName = "Mini Thirty 7.62x39mm 10-Round Flush Mag" +att.AbbrevName = "10-Round Flush Mag" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Patriot 816 7.62x39mm 10-Round Flush Mag" +end + +att.SortOrder = 10 +att.Icon = Material("entities/att/acwatt_ud_mini14_mag_10.png", "smooth mips") +att.Description = "Low-capacity 7.62mm flush magazine. It is much less likely to jam thanks to the low capaacity." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_mini14_mag" + +att.AutoStats = true + +att.Mult_SightTime = 0.85 +att.Mult_ReloadTime = 0.9 +att.Override_ClipSize = 10 +att.Mult_Sway = 0.75 + +att.Mult_MalfunctionMean = 1.5 + +att.ActivateElements = {"ud_mini14_mag_10"} +att.RequireFlags = {"mini14_762"} +att.HideIfBlocked = true + +att.Hook_SelectReloadAnimation = function(wep, anim) + return anim .. "_10" +end \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_mini14_mag_30.lua b/lua/arccw/shared/attachments/ud_mini14_mag_30.lua new file mode 100644 index 0000000..7e32a81 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_mini14_mag_30.lua @@ -0,0 +1,34 @@ +att.PrintName = "Mini-14 30-Round Extended Mag" +att.AbbrevName = "30-Round Extended Mag" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Patriot 809 30-Round Extended Mag" +end + +att.SortOrder = 30 +att.Icon = Material("entities/att/acwatt_ud_mini14_mag_30.png", "smooth mips") +att.Description = "An official but rare extended magazine. Despite its similar appearance, this is not STANAG compatible." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_mini14_mag" + +att.AutoStats = true + +att.Mult_SightTime = 1.1 +att.Mult_ReloadTime = 1.15 +att.Override_ClipSize = 30 +att.Mult_Sway = 1.5 +att.Mult_ShootSpeedMult = 0.95 + +att.ActivateElements = {"ud_mini14_mag_30"} + +att.Hook_SelectReloadAnimation = function(wep, anim) + return anim .. "_30" +end + +att.ExcludeFlags = {"mini14_762", "mini14_22lr"} +att.HideIfBlocked = true \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_mini14_mag_30_762.lua b/lua/arccw/shared/attachments/ud_mini14_mag_30_762.lua new file mode 100644 index 0000000..857b36b --- /dev/null +++ b/lua/arccw/shared/attachments/ud_mini14_mag_30_762.lua @@ -0,0 +1,35 @@ +att.PrintName = "Mini Thirty 7.62x39mm 30-Round Extended Mag" +att.AbbrevName = "30-Round Extended Mag" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Patriot 816 7.62x39mm 30-Round Extended Mag" +end + +att.SortOrder = 30 +att.Icon = Material("entities/att/acwatt_ud_mini14_mag_30_762.png", "smooth mips") +att.Description = "Effectively an AK magazine with a modified feeding lip, this magazine is proof of gun hobbyists' dedication (and lunacy) in search of more dakka." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_mini14_mag" + +att.AutoStats = true + +att.Mult_SightTime = 1.15 +att.Mult_ReloadTime = 1.2 +att.Override_ClipSize = 30 +att.Mult_Sway = 1.5 +att.Mult_ShootSpeedMult = 0.95 + +att.Mult_MalfunctionMean = 0.75 + +att.ActivateElements = {"ud_mini14_mag_30_762"} +att.RequireFlags = {"mini14_762"} +att.HideIfBlocked = true + +att.Hook_SelectReloadAnimation = function(wep, anim) + return anim .. "_762" +end \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_mini14_mag_30_pmag.lua b/lua/arccw/shared/attachments/ud_mini14_mag_30_pmag.lua new file mode 100644 index 0000000..3525560 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_mini14_mag_30_pmag.lua @@ -0,0 +1,34 @@ +att.PrintName = "Mini-14 30-Round ProMag" +att.AbbrevName = "30-Round Polymer Mag" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Patriot 809 30-Round Polymer Mag" +end + +att.SortOrder = 29 +att.Icon = Material("entities/att/acwatt_ud_mini14_mag_30_polymer.png", "smooth mips") +att.Description = "Polymer aftermarket magazine. The grooves give a better grip surface, but the mag is heavier overall than the steel equivalent." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_mini14_mag" + +att.AutoStats = true + +att.Mult_SightTime = 1.1 +att.Mult_ReloadTime = 1.1 +att.Override_ClipSize = 30 +att.Mult_Sway = 1.58 +att.Mult_ShootSpeedMult = 0.95 + +att.ActivateElements = {"ud_mini14_mag_42"} + +att.Hook_SelectReloadAnimation = function(wep, anim) + return anim .. "_30_tac" +end + +att.ExcludeFlags = {"mini14_762", "mini14_22lr"} +att.HideIfBlocked = true \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_mini14_mag_42.lua b/lua/arccw/shared/attachments/ud_mini14_mag_42.lua new file mode 100644 index 0000000..4ebaa8c --- /dev/null +++ b/lua/arccw/shared/attachments/ud_mini14_mag_42.lua @@ -0,0 +1,44 @@ +att.PrintName = "Mini-14 42-Round ProMag" +att.AbbrevName = "42-Round Polymer Mag" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Patriot 809 42-Round Polymer Mag" +end + +att.SortOrder = 30 +att.Icon = Material("entities/att/acwatt_ud_mini14_mag_30_polymer.png", "smooth mips") +att.Description = "Polymer aftermarket extended magazine with a generous capacity." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_mini14_mag" + +att.AutoStats = true + +att.Override_ClipSize = 42 + +att.Mult_SightTime = 1.2 +att.Mult_ReloadTime = 1.25 +att.Mult_Sway = 1.75 + +att.Mult_SpeedMult = 0.975 +att.Mult_ShootSpeedMult = 0.925 + +att.Mult_DrawTime = 1.15 +att.Mult_HolsterTime = 1.15 + +att.Mult_HipDispersion = 1.25 + +att.ActivateElements = {"ud_mini14_mag_42"} + +att.Hook_SelectReloadAnimation = function(wep, anim) + return anim .. "_30_tac" +end + +att.ExcludeFlags = {"mini14_762", "mini14_22lr"} +att.HideIfBlocked = true + +att.Ignore = true \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_mini14_mag_60.lua b/lua/arccw/shared/attachments/ud_mini14_mag_60.lua new file mode 100644 index 0000000..0df171f --- /dev/null +++ b/lua/arccw/shared/attachments/ud_mini14_mag_60.lua @@ -0,0 +1,45 @@ +att.PrintName = "Mini-14 60-Round Casket Magazine" +att.AbbrevName = "60-Round Casket Mag" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Patriot 809 60-Round Casket Magazine" +end + +att.SortOrder = 30 +att.Icon = Material("entities/att/acwatt_ud_mini14_mag_60.png", "smooth mips") +att.Description = "Quad-stack magazine for sustained vermin hunting. Has a tendency to jam." +att.Desc_Pros = { +} +att.Desc_Cons = { + "uc.jam" +} +att.Desc_Neutrals = { +} +att.Slot = "ud_mini14_mag" + +att.AutoStats = true + +att.Override_ClipSize = 60 + +att.Mult_SightTime = 1.2 +att.Mult_ReloadTime = 1.5 +att.Mult_Sway = 2 + +att.Mult_SpeedMult = 0.95 +att.Mult_ShootSpeedMult = 0.9 + +att.Mult_DrawTime = 1.25 +att.Mult_HolsterTime = 1.25 + +att.Mult_HipDispersion = 1.5 + +att.Override_Malfunction = true + +att.ActivateElements = {"ud_mini14_mag_60"} + +att.Hook_SelectReloadAnimation = function(wep, anim) + return anim .. "_60" +end + +att.ExcludeFlags = {"mini14_762", "mini14_22lr"} +att.HideIfBlocked = true \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_mini14_receiver_22lr.lua b/lua/arccw/shared/attachments/ud_mini14_receiver_22lr.lua new file mode 100644 index 0000000..6d4cee4 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_mini14_receiver_22lr.lua @@ -0,0 +1,104 @@ +att.PrintName = "Mini-14 .22 LR Receiver" +att.AbbrevName = ".22 LR Receiver" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Patriot 809 .22 LR Receiver" +end + +att.Icon = Material("entities/att/uc_bullets/22lr.png", "smooth mips") +att.Description = "Aftermarket .22 Long Rifle conversion for the Mini-14. While the light, weak cartridge has poor stopping power, its recoil is extremely manageable, making it a cinch to follow up shots." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_mini14_receiver" + +att.AutoStats = true + +att.Mult_SightTime = 0.8 +att.Mult_ReloadTime = 0.85 +att.Mult_Sway = 0.75 + +att.Mult_Damage = ArcCW.UC.CalConv("556", "22lr", "max") +att.Mult_DamageMin = ArcCW.UC.CalConv("556", "22lr", "min") +att.Mult_Penetration = ArcCW.UC.CalConv("556", "22lr", "pen") + +att.Mult_Range = 0.5 +att.Mult_Recoil = 0.25 +att.Mult_VisualRecoilMult = 0.25 +att.Mult_RPM = 1000 / 540 +att.Mult_ShootSpeedMult = 1.2 + +att.Mult_HipDispersion = 0.6 + +att.Override_ClipSize = 15 + +att.ActivateElements = {"ud_mini14_mag_15_22lr", "ud_mini14_receiver_22lr"} +att.GivesFlags = {"mini14_22lr"} + +-- att.GivesFlags = {"mini14_22lr","cal_subsonic"} +-- att.ExcludeFlags = {"powder_subsonic"} + +att.Override_Ammo = "plinking" +att.Override_Trivia_Calibre = ".22 Long Rifle" +att.Override_ShellModel = "models/weapons/arccw/uc_shells/22lr.mdl" +att.Override_ShellScale = 1 +att.Override_ShellSounds = ArcCW.TinyShellSoundsTable + +att.Override_PhysTracerProfile = "uc_plinking" +att.Override_PhysBulletMuzzleVelocity = 370 + +att.Hook_SelectReloadAnimation = function(wep, anim) + return anim .. "_15_22lr" +end + +local path = "arccw_uc/common/" + +local fire22 = {path .. "fire-22-01.ogg",path .. "fire-22-02.ogg",path .. "fire-22-03.ogg",path .. "fire-22-04.ogg",path .. "fire-22-05.ogg",path .. "fire-22-06.ogg"} +local fire22sup = {path .. "fire-22-sup-01.ogg",path .. "fire-22-sup-02.ogg",path .. "fire-22-sup-03.ogg",path .. "fire-22-sup-04.ogg",path .. "fire-22-sup-05.ogg",path .. "fire-22-sup-06.ogg"} + +att.Hook_GetShootSound = function(wep, sound) + if wep:GetBuff_Override("Silencer") then + return fire22sup + else + return fire22 + end +end + +local fire22dist = {path .. "fire-22-dist-01.ogg", path .. "fire-22-dist-02.ogg", path .. "fire-22-dist-03.ogg", path .. "fire-22-dist-04.ogg", path .. "fire-22-dist-05.ogg", path .. "fire-22-dist-06.ogg"} + +att.Hook_GetDistantShootSoundOutdoors = function(wep, distancesound) + if wep:GetBuff_Override("Silencer") then + -- fallback to script + else + return fire22dist + end +end + + +local fire22distint = {path .. "fire-dist-int-pistol-light-01.ogg", path .. "fire-dist-int-pistol-light-02.ogg", path .. "fire-dist-int-pistol-light-03.ogg", path .. "fire-dist-int-pistol-light-04.ogg", path .. "fire-dist-int-pistol-light-05.ogg", path .. "fire-dist-int-pistol-light-06.ogg"} + +att.Hook_GetDistantShootSoundIndoors = function(wep, distancesound) + if wep:GetBuff_Override("Silencer") then + -- fallback to script + else + return fire22distint + end +end + + +local slotinfo = { + [7] = {"15-Round Mag", "15-Round Mag", Material("entities/att/acwatt_ud_mini14_mag_15_22lr.png", "smooth mips")}, +} +att.Hook_GetDefaultAttName = function(wep, slot) + if slotinfo[slot] then + return GetConVar("arccw_truenames"):GetBool() and slotinfo[slot][2] or slotinfo[slot][1] + end +end +att.Hook_GetDefaultAttIcon = function(wep, slot) + if slotinfo[slot] then + return slotinfo[slot][3] + end +end \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_mini14_receiver_762.lua b/lua/arccw/shared/attachments/ud_mini14_receiver_762.lua new file mode 100644 index 0000000..fa22a7e --- /dev/null +++ b/lua/arccw/shared/attachments/ud_mini14_receiver_762.lua @@ -0,0 +1,69 @@ +att.PrintName = "Mini Thirty 7.62x39mm Receiver" +att.AbbrevName = "7.62x39mm Receiver" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Patriot 816 7.62x39mm Receiver" +end + +att.SortOrder = 30 +att.Icon = Material("entities/att/uc_bullets/762x39.png", "smooth mips") +att.Description = "A curious yet offically produced receiver variant made to circumvent caliber restrictions in deer hunting. The high pressure of this round makes this model liable to feeding failures." +att.Desc_Pros = { +} +att.Desc_Cons = { + "uc.jam" +} +att.Desc_Neutrals = { +} +att.Slot = "ud_mini14_receiver" + +att.AutoStats = true + +att.Mult_ReloadTime = 1.15 +att.Mult_ShootSpeedMult = 0.8 +att.Mult_RPM = 360 / 540 + +att.Mult_Recoil = 1.25 +att.Mult_RecoilSide = 1.5 +att.Mult_HipDispersion = 1.5 + +att.Mult_Damage = ArcCW.UC.CalConv("556", "762_39", "max") +att.Mult_DamageMin = ArcCW.UC.CalConv("556", "762_39", "min") +att.Mult_Penetration = ArcCW.UC.CalConv("556", "762_39", "pen") +att.Mult_Range = 2 + +att.Override_Malfunction = true +att.Mult_MalfunctionVariance = 1.5 + +att.Override_Ammo = "ar2" +att.Override_Trivia_Calibre = "7.62x39mm Soviet" +att.Override_ShellModel = "models/weapons/arccw/uc_shells/762x39.mdl" +att.Override_ShellScale = 0.666 + +att.ActivateElements = {"ud_mini14_receiver_762"} +att.GivesFlags = {"mini14_762"} + +att.Hook_GetShootSound = function(wep, sound) + if wep:GetBuff_Override("Silencer") then + return "weapons/arccw_ud/mini14/fire_762_supp.ogg" -- Not Placeholder + else + return "weapons/arccw_ud/mini14/fire_762.ogg" -- Not Placeholder + end +end + +local tail = ")/arccw_uc/common/762x39/" + +att.Hook_GetDistantShootSoundOutdoors = function(wep, distancesound) + if wep:GetBuff_Override("Silencer") then + -- fallback to script + else + return { + tail .. "fire-dist-762x39-rif-ext-01.ogg", + tail .. "fire-dist-762x39-rif-ext-02.ogg", + tail .. "fire-dist-762x39-rif-ext-03.ogg", + tail .. "fire-dist-762x39-rif-ext-04.ogg", + tail .. "fire-dist-762x39-rif-ext-05.ogg", + tail .. "fire-dist-762x39-rif-ext-06.ogg" + } + end +end \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_mini14_receiver_auto.lua b/lua/arccw/shared/attachments/ud_mini14_receiver_auto.lua new file mode 100644 index 0000000..1ac5a46 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_mini14_receiver_auto.lua @@ -0,0 +1,52 @@ +att.PrintName = "AC-556 Automatic Receiver" +att.AbbrevName = "Automatic Receiver" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Patriot ACC Automatic Receiver" +end + +att.Icon = Material("entities/att/acwatt_ud_mini14_receiver_auto.png", "smooth mips") +att.Description = "Receiver adapted with a military auto sear and fire selector." +att.Desc_Pros = { + "uc.auto" +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_mini14_receiver" + +att.AutoStats = true + +att.Override_Firemodes = { + { + Mode = 2, + }, + { + Mode = -3, + Override_ShotRecoilTable = { + [1] = 0.9, + [2] = 0.8, + [3] = 0.7, + }, + }, + { + Mode = 1, + }, + { + Mode = 0 + } +} + +att.Override_Trivia_Class = "Assault Rifle" + +att.ActivateElements = {"ud_mini14_receiver_auto"} + +att.Mult_RPM = 750 / 540 + +att.Mult_RecoilSide = 1.5 +att.Mult_HipDispersion = 1.25 +att.Mult_AccuracyMOA = 2 +att.Mult_ShootSpeedMult = 0.85 +att.Mult_MalfunctionMean = 0.75 +att.Mult_MalfunctionVariance = 1.25 \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_mini14_stock_polymer.lua b/lua/arccw/shared/attachments/ud_mini14_stock_polymer.lua new file mode 100644 index 0000000..feab63e --- /dev/null +++ b/lua/arccw/shared/attachments/ud_mini14_stock_polymer.lua @@ -0,0 +1,29 @@ +att.PrintName = "Mini-14 Polymer Stock" +att.AbbrevName = "Polymer Stock" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Patriot 809 Polymer Stock" +end + +att.Icon = Material("entities/att/acwatt_ud_mini14_stock.png", "smooth mips") +att.Description = "A fairly lightweight body replacement that improves weapon agility." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_mini14_stock" + +att.AutoStats = true + +att.Mult_SightTime = 0.9 +att.Mult_SpeedMult = 1.05 +att.Mult_SightedSpeedMult = 1.1 + +att.Mult_Recoil = 1.15 +--att.Mult_Sway = 3 + +-- att.Add_BarrelLength = 32 + +att.ActivateElements = {"ud_mini14_stock_polymer"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_mini14_stock_sawnoff.lua b/lua/arccw/shared/attachments/ud_mini14_stock_sawnoff.lua new file mode 100644 index 0000000..71f995d --- /dev/null +++ b/lua/arccw/shared/attachments/ud_mini14_stock_sawnoff.lua @@ -0,0 +1,34 @@ +att.PrintName = "Mini-14 Sawn-off Stock" +att.AbbrevName = "Sawn-off Stock" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Patriot 809 Sawn-off Stock" +end + +att.Icon = Material("entities/att/acwatt_ud_mini14_stock_sawnoff.png", "smooth mips") +att.Description = "Using your hacksaw on the stock is not gunsmithing either." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_mini14_stock" + +att.AutoStats = true + +att.Mult_SightTime = 0.75 +att.Mult_DrawTime = 0.75 +att.Mult_HolsterTime = 0.75 + +att.Mult_Recoil = 1.25 +att.Mult_RecoilSide = 2.25 + +att.Mult_Sway = 1.85 + +att.Mult_SightedSpeedMult = 1.33 +att.Mult_ShootSpeedMult = 1.2 + +att.Add_BarrelLength = -4 + +att.ActivateElements = {"ud_mini14_stock_sawnoff"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_mini14_stock_tactical.lua b/lua/arccw/shared/attachments/ud_mini14_stock_tactical.lua new file mode 100644 index 0000000..5a2dabb --- /dev/null +++ b/lua/arccw/shared/attachments/ud_mini14_stock_tactical.lua @@ -0,0 +1,33 @@ +att.PrintName = "Mini-14 GB Folding Stock" +att.AbbrevName = "Folding Stock" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Patriot 812 Folding Stock" +end + +att.Icon = Material("entities/att/acwatt_ud_mini14_stock_tactical_wood.png", "smooth mips") +att.Description = "Chassis replacement installed with both a pistol grip and exotic folding stock to improve deployment and movement speed; the stock, however, is rather unwieldy due to its shape." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_mini14_stock" + +att.AutoStats = true + +att.Mult_SightTime = 0.9 +att.Mult_SpeedMult = 1.15 +att.Mult_SightedSpeedMult = 1.1 +att.Mult_DrawTime = 0.7 +att.Mult_HolsterTime = 0.7 + +att.Mult_Recoil = 1.2 +att.Mult_Sway = 1.5 + +-- att.Add_BarrelLength = 32 + +att.ActivateElements = {"ud_mini14_stock_tactical"} + +att.Ignore = false \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_mini14_stock_tactical_polymer.lua b/lua/arccw/shared/attachments/ud_mini14_stock_tactical_polymer.lua new file mode 100644 index 0000000..9af22cb --- /dev/null +++ b/lua/arccw/shared/attachments/ud_mini14_stock_tactical_polymer.lua @@ -0,0 +1,32 @@ +att.PrintName = "Mini-14 GB Tactical Stock" +att.AbbrevName = "Tactical Stock" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Patriot 812 Tactical Stock" +end + +att.Icon = Material("entities/att/acwatt_ud_mini14_stock_tactical.png", "smooth mips") +att.Description = "A lightweight body replacement that improves weapon handling by combining a polymer chassis and a side-folding stock. Prioritizes speed when aiming the sights at the cost of increased recoil." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_mini14_stock" + +att.AutoStats = true + +att.Mult_SightTime = 0.75 +att.Mult_SpeedMult = 1.05 +att.Mult_SightedSpeedMult = 1.2 +att.Mult_ShootSpeedMult = 1.1 + +att.Mult_Recoil = 1.33 +att.Mult_Sway = 1.2 + +-- att.Add_BarrelLength = 32 + +att.ActivateElements = {"ud_mini14_stock_tactical_polymer"} + +att.Ignore = false \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_uzi_body_carbine.lua b/lua/arccw/shared/attachments/ud_uzi_body_carbine.lua new file mode 100644 index 0000000..bfba5ef --- /dev/null +++ b/lua/arccw/shared/attachments/ud_uzi_body_carbine.lua @@ -0,0 +1,33 @@ +att.PrintName = "Uzi 13\" Carbine Barrel" +att.AbbrevName = "13\" Carbine Barrel" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "STAP 13\" Carbine Barrel" +end + +att.Icon = Material("entities/att/acwatt_ud_uzi_body_carbine.png", "smooth mips") +att.Description = "Long barrel for the Uzi, built for long range patrols. Improves range and recoil." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_uzi_frame" + +att.AutoStats = true +att.SortOrder = 13 + +att.Mult_AccuracyMOA = 0.75 +att.Mult_SightTime = 1.15 +att.Mult_Recoil = 0.9 +att.Mult_RecoilSide = 0.75 +att.Mult_RPM = 0.9 +att.Mult_Range = 1.25 +att.Mult_Sway = 1.5 + +att.Mult_TriggerDelayTime = 1.15 + +att.Add_BarrelLength = 5 + +att.ActivateElements = {"ud_uzi_body_carbine"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_uzi_body_civvy.lua b/lua/arccw/shared/attachments/ud_uzi_body_civvy.lua new file mode 100644 index 0000000..199f859 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_uzi_body_civvy.lua @@ -0,0 +1,44 @@ +att.PrintName = "Uzi 16\" Civilian Barrel" +att.AbbrevName = "16\" Civilian Barrel" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "STAP 16\" Civilian Barrel" +end + +att.Icon = Material("entities/att/acwatt_ud_uzi_body_civvy.png", "smooth mips") +att.Description = "Civilian barrel for the Uzi, elongated to fit minimum length requirements. Substantially improves range and recoil, at the cost of prohibiting fully-automatic fire. Changes weapon to closed bolt operation." +att.Desc_Pros = { +} +att.Desc_Cons = { + "uc.semionly" +} +att.Desc_Neutrals = { +} +att.Slot = "ud_uzi_frame" + +att.AutoStats = true +att.SortOrder = 16 + +att.Mult_AccuracyMOA = 0.5 +att.Mult_SightTime = 1.25 +att.Mult_Recoil = 0.75 +att.Mult_RecoilSide = 0.5 +att.Mult_RPM = 0.9 +att.Mult_Range = 1.5 +att.Mult_Sway = 2 + +att.Mult_TriggerDelayTime = 0 +att.Override_ChamberSize = 1 + +att.Override_Firemodes = { + { + Mode = 1, + }, + { + Mode = 0 + } +} + +att.Add_BarrelLength = 8 + +att.ActivateElements = {"ud_uzi_body_civvy"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_uzi_body_micro.lua b/lua/arccw/shared/attachments/ud_uzi_body_micro.lua new file mode 100644 index 0000000..eadefa5 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_uzi_body_micro.lua @@ -0,0 +1,53 @@ +att.PrintName = "Uzi 4.6\" Micro Barrel" +att.AbbrevName = "4.6\" Micro Barrel" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "STAP 4.6\" Micro Barrel" +end + +att.Icon = Material("entities/att/acwatt_ud_uzi_body_micro.png", "smooth mips") +att.Description = "Extremely compact frame that turns this sub-machine gun into a machine pistol. Without an attach point for stocks, recoil is dramatically increased. Converts weapon to closed bolt operation." +att.Desc_Pros = { +} +att.Desc_Cons = { + "uc.nostocks", + "uc.noubs" +} +att.Desc_Neutrals = { +} +att.Slot = "ud_uzi_frame" + +att.AutoStats = true +att.SortOrder = 4.6 + +att.Mult_AccuracyMOA = 1.75 +att.Mult_SightTime = 0.6 +att.Mult_Recoil = 3 +att.Mult_RecoilSide = 1.25 +att.Mult_RPM = 1+(3/5) +att.Mult_Range = 0.5 +att.Mult_HipDispersion = 1.5 + +att.Mult_DrawTime = 0.6 +att.Mult_HolsterTime = 0.6 + +att.Add_BarrelLength = -8 + +att.Override_ChamberSize = 1 +att.Mult_TriggerDelayTime = 0 + +att.LHIK = true + +att.Override_HoldtypeActive = "pistol" +att.Override_HoldtypeSights = "revolver" +att.Override_Trivia_Class = "Machine Pistol" +att.Override_Trivia_Mechanism = "Blowback" + +att.Model = "models/weapons/arccw/atts/mini_lhik.mdl" + +att.ActivateElements = {"ud_uzi_body_micro"} +att.GivesFlags = {"micro"} + +att.Hook_TranslateAnimation = function(wep, anim) + return anim .. "_micro" +end \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_uzi_body_mini.lua b/lua/arccw/shared/attachments/ud_uzi_body_mini.lua new file mode 100644 index 0000000..192bfe1 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_uzi_body_mini.lua @@ -0,0 +1,42 @@ +att.PrintName = "Uzi 8\" Mini Barrel" +att.AbbrevName = "8\" Mini Barrel" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "STAP 8\" Mini Barrel" +end + +att.Icon = Material("entities/att/acwatt_ud_uzi_body_mini.png", "smooth mips") +att.Description = "Compact frame with a higher firerate." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_uzi_frame" + +att.AutoStats = true +att.SortOrder = 8 + +att.Mult_AccuracyMOA = 1.25 +att.Mult_SightTime = 0.85 +att.Mult_Recoil = 1.5 +att.Mult_RecoilSide = 1.15 +att.Mult_RPM = 1.25 +att.Mult_Range = 0.75 +att.Mult_HipDispersion = 1.25 + +att.Add_BarrelLength = -4 + +att.Mult_TriggerDelayTime = 0.75 + +att.LHIK = true + +att.Override_HoldtypeActive = "pistol" +att.Override_HoldtypeSights = "revolver" + +att.Model = "models/weapons/arccw/atts/tactical_lhik.mdl" +att.ModelOffset = Vector(2, -4.1, -1.9) +att.OffsetAng = Angle(10, 5, 0) + +att.ActivateElements = {"ud_uzi_body_mini"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_uzi_cal_22.lua b/lua/arccw/shared/attachments/ud_uzi_cal_22.lua new file mode 100644 index 0000000..1d506fa --- /dev/null +++ b/lua/arccw/shared/attachments/ud_uzi_cal_22.lua @@ -0,0 +1,70 @@ +att.PrintName = "Uzi .22 LR Conversion" +att.AbbrevName = ".22 LR" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "IAL-9 .22 LR Conversion" +end +att.Slot = "ud_uzi_caliber" + +att.Icon = Material("entities/att/uc_bullets/22lr.png", "smooth mips") +att.Description = "A smaller cartridge that increases the fire rate and magazine capacity, as well as reduced recoil at the cost of greatly reduced damage and range." +att.Desc_Pros = { +} + +att.Override_Trivia_Calibre = ".22 Long Rifle" +att.Override_Ammo = "plinking" + +att.AutoStats = true + +att.Mult_Damage = ArcCW.UC.CalConv("9mm", "22lr", "max") +att.Mult_DamageMin = ArcCW.UC.CalConv("9mm", "22lr", "min") +att.Mult_Penetration = ArcCW.UC.CalConv("9mm", "22lr", "pen") + +att.Override_PhysTracerProfile = "uc_plinking" +att.Override_PhysBulletMuzzleVelocity = 365 + +att.Mult_Recoil = 0.25 +att.Mult_VisualRecoilMult = 0.25 +att.Mult_RPM = 1.5 +att.Mult_ShootSpeedMult = 1.2 + +att.Mult_ClipSize = 1.2 + +att.Override_ShellModel = "models/weapons/arccw/uc_shells/22lr.mdl" +att.Override_ShellScale = 1 +att.Override_ShellSounds = ArcCW.TinyShellSoundsTable + +local path = "arccw_uc/common/" + +local fire22 = {path .. "fire-22-01.ogg",path .. "fire-22-02.ogg",path .. "fire-22-03.ogg",path .. "fire-22-04.ogg",path .. "fire-22-05.ogg",path .. "fire-22-06.ogg"} +local fire22sup = {path .. "fire-22-sup-01.ogg",path .. "fire-22-sup-02.ogg",path .. "fire-22-sup-03.ogg",path .. "fire-22-sup-04.ogg",path .. "fire-22-sup-05.ogg",path .. "fire-22-sup-06.ogg"} + +att.Hook_GetShootSound = function(wep, sound) + if wep:GetBuff_Override("Silencer") then + return fire22sup + else + return fire22 + end +end + +local fire22dist = {path .. "fire-22-dist-01.ogg", path .. "fire-22-dist-02.ogg", path .. "fire-22-dist-03.ogg", path .. "fire-22-dist-04.ogg", path .. "fire-22-dist-05.ogg", path .. "fire-22-dist-06.ogg"} + +att.Hook_GetDistantShootSoundOutdoors = function(wep, distancesound) + if wep:GetBuff_Override("Silencer") then + -- fallback to script + else + return fire22dist + end +end + + +local fire22distint = {path .. "fire-dist-int-pistol-light-01.ogg", path .. "fire-dist-int-pistol-light-02.ogg", path .. "fire-dist-int-pistol-light-03.ogg", path .. "fire-dist-int-pistol-light-04.ogg", path .. "fire-dist-int-pistol-light-05.ogg", path .. "fire-dist-int-pistol-light-06.ogg"} + +att.Hook_GetDistantShootSoundIndoors = function(wep, distancesound) + if wep:GetBuff_Override("Silencer") then + -- fallback to script + else + return fire22distint + end +end + diff --git a/lua/arccw/shared/attachments/ud_uzi_cal_45.lua b/lua/arccw/shared/attachments/ud_uzi_cal_45.lua new file mode 100644 index 0000000..679b568 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_uzi_cal_45.lua @@ -0,0 +1,67 @@ +att.PrintName = "Uzi .45 ACP Conversion" +att.AbbrevName = ".45 ACP" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "IAL-9 .45 ACP Conversion" +end +att.Slot = "ud_uzi_caliber" + +att.Icon = Material("entities/att/uc_bullets/45acp.png", "smooth mips") +att.Description = "A large cartridge that increases close-range stopping power substantially, but greatly reduces magazine capacity." +att.Desc_Pros = { + "uc.subsonic" +} + +att.Override_Trivia_Calibre = ".45 ACP" + +att.AutoStats = true + +att.Mult_Damage = ArcCW.UC.CalConv("9mm", "45acp", "max") +att.Mult_DamageMin = ArcCW.UC.CalConv("9mm", "45acp", "min") +att.Mult_Penetration = ArcCW.UC.CalConv("9mm", "45acp", "pen") + +att.Override_PhysBulletMuzzleVelocity = 320 + +att.Mult_RangeMin = 0.5 +att.Mult_Range = .75 +att.Mult_Recoil = 1.5 +att.Mult_RecoilSide = 1.5 +att.Mult_RPM = 0.83 +att.Override_ClipSize = 16 + +local path = ")^weapons/arccw_ud/uzi/" + +att.Hook_GetShootSound = function(wep, sound) -- Temporary + if wep:GetBuff_Override("Silencer") then + return "weapons/arccw_ud/glock/fire_supp.ogg" + else + return {path .. "fire-45-01.ogg", path .. "fire-45-02.ogg", path .. "fire-45-03.ogg", path .. "fire-45-04.ogg", path .. "fire-45-05.ogg", path .. "fire-45-06.ogg"} + end +end + +att.Override_DistantShootSoundSilenced = nil + +local tail = ")^/arccw_uc/common/45acp/" + +att.Hook_GetDistantShootSoundOutdoors = function(wep, distancesound) + if wep:GetBuff_Override("Silencer") then + -- fallback to script + else + return { + tail .. "fire-dist-45acp-pistol-ext-01.ogg", + tail .. "fire-dist-45acp-pistol-ext-02.ogg", + tail .. "fire-dist-45acp-pistol-ext-03.ogg", + tail .. "fire-dist-45acp-pistol-ext-04.ogg", + tail .. "fire-dist-45acp-pistol-ext-05.ogg", + tail .. "fire-dist-45acp-pistol-ext-06.ogg" + } + end +end + +att.Hook_GetDefaultAttName = function(wep, slot) + if slot == 8 then + return "16-Round Mag" + end +end + +att.GivesFlags = {"uzi_45","cal_subsonic"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_uzi_mag_100.lua b/lua/arccw/shared/attachments/ud_uzi_mag_100.lua new file mode 100644 index 0000000..2020476 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_uzi_mag_100.lua @@ -0,0 +1,46 @@ +att.PrintName = "Uzi 100-Round C-Mag" +att.AbbrevName = "100-Round C-Mag" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "STAP 100-Round C-Mag" +end + + +att.SortOrder = 100 +att.Icon = Material("entities/att/acwatt_ud_uzi_mag_100.png", "smooth mips") +att.Description = "Twin-drum magazine for the Uzi. Allows for a long period between reloads, but harms the weapon's ergonomics significantly. Prone to jamming." +att.Desc_Pros = { +} +att.Desc_Cons = { + "uc.jam" +} +att.Desc_Neutrals = { +} +att.Slot = "ud_uzi_mag" + +att.AutoStats = true + +att.Mult_SightTime = 1.5 +--att.Mult_Recoil = 0.9 +att.Mult_ReloadTime = 1.4 +att.Mult_SpeedMult = 0.9 +att.Mult_DrawTime = 1.25 +att.Override_ClipSize = 100 +att.Mult_Sway = 2 +att.Mult_ShootSpeedMult = 0.85 + +att.Mult_HipDispersion = 1.5 + +att.ActivateElements = {"ud_uzi_100_mag"} + +--att.Override_Jamming = true +att.Override_Malfunction = true +att.Mult_MalfunctionMean = 0.75 +att.Mult_MalfunctionVariance = 1.5 + +att.Hook_SelectReloadAnimation = function(wep, anim) + return anim .. "_100" +end + +att.ExcludeFlags = {"uzi_45","uzi_22"} +att.HideIfBlocked = true diff --git a/lua/arccw/shared/attachments/ud_uzi_mag_20.lua b/lua/arccw/shared/attachments/ud_uzi_mag_20.lua new file mode 100644 index 0000000..d9d8b74 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_uzi_mag_20.lua @@ -0,0 +1,36 @@ +att.PrintName = "Uzi 20-Round Flush Mag" +att.AbbrevName = "20-Round Flush Mag" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "IAL-9 20-Round Flush Mag" +end + +att.SortOrder = 20 +att.Icon = Material("entities/att/acwatt_ud_uzi_mag_20.png", "smooth mips") +att.Description = "Low-capacity flush magazine. The lighter load makes the weapon more ergonomic." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_uzi_mag" + +att.AutoStats = true + +att.Mult_SightTime = 0.9 +att.Mult_ReloadTime = 0.85 +att.Override_ClipSize = 20 +att.Mult_Sway = 0.75 +att.Mult_ShootSpeedMult = 1.1 + +att.Mult_HipDispersion = 0.75 + +att.ActivateElements = {"ud_uzi_16_mag"} + +att.Hook_SelectReloadAnimation = function(wep, anim) + return anim .. "_16" +end + +att.ExcludeFlags = {"uzi_45","uzi_22"} +att.HideIfBlocked = true diff --git a/lua/arccw/shared/attachments/ud_uzi_mag_40.lua b/lua/arccw/shared/attachments/ud_uzi_mag_40.lua new file mode 100644 index 0000000..6691c9f --- /dev/null +++ b/lua/arccw/shared/attachments/ud_uzi_mag_40.lua @@ -0,0 +1,37 @@ +att.PrintName = "Uzi 40-Round Extended Mag" +att.AbbrevName = "40-Round Extended Mag" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "IAL-9 40-Round Extended Mag" +end + +att.SortOrder = 40 +att.Icon = Material("entities/att/acwatt_ud_uzi_mag_40.png", "smooth mips") +att.Description = "Extended magazine for the Uzi. It is only somewhat longer than the standard magazine, making it not that difficult to handle." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_uzi_mag" + +att.AutoStats = true + +att.Mult_SightTime = 1.08 +--att.Mult_Recoil = 0.9 +att.Mult_ReloadTime = 1.12 +--att.Mult_SpeedMult = 0.9 +att.Override_ClipSize = 40 +att.Mult_Sway = 1.15 + +att.Mult_HipDispersion = 1.25 + +att.ActivateElements = {"ud_uzi_41_mag"} + +att.Hook_SelectReloadAnimation = function(wep, anim) + return anim .. "_41" +end + +att.ExcludeFlags = {"uzi_45","uzi_22"} +att.HideIfBlocked = true diff --git a/lua/arccw/shared/attachments/ud_uzi_mag_45_12.lua b/lua/arccw/shared/attachments/ud_uzi_mag_45_12.lua new file mode 100644 index 0000000..dacca86 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_uzi_mag_45_12.lua @@ -0,0 +1,37 @@ +att.PrintName = "Uzi 12-Round Flush Mag" +att.AbbrevName = "12-Round Flush Mag" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "IAL-9 12-Round Flush Mag" +end + +att.SortOrder = 20 +att.Icon = Material("entities/att/acwatt_ud_uzi_mag_20.png", "smooth mips") +att.Description = "Low-capacity flush magazine. The lighter load makes the weapon more ergonomic." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_uzi_mag" + +att.AutoStats = true + +att.Mult_SightTime = 0.9 +att.Mult_ReloadTime = 0.85 +att.Override_ClipSize = 12 +att.Override_ClipSize_Priority = 2 +att.Mult_Sway = 0.75 +att.Mult_ShootSpeedMult = 1.1 + +att.Mult_HipDispersion = 0.75 + +att.ActivateElements = {"ud_uzi_mag_20"} + +att.Hook_SelectReloadAnimation = function(wep, anim) + return anim .. "_16" +end + +att.RequireFlags = {"uzi_45"} +att.HideIfBlocked = true diff --git a/lua/arccw/shared/attachments/ud_uzi_mag_45_22.lua b/lua/arccw/shared/attachments/ud_uzi_mag_45_22.lua new file mode 100644 index 0000000..0f10be7 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_uzi_mag_45_22.lua @@ -0,0 +1,38 @@ +att.PrintName = "Uzi 22-Round Extended Mag" +att.AbbrevName = "22-Round Extended Mag" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "IAL-9 22-Round Extended Mag" +end + +att.SortOrder = 40 +att.Icon = Material("entities/att/acwatt_ud_uzi_mag_40.png", "smooth mips") +att.Description = "Extended magazine for the Uzi. It is only somewhat longer than the standard magazine, making it not that difficult to handle." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_uzi_mag" + +att.AutoStats = true + +att.Mult_SightTime = 1.08 +--att.Mult_Recoil = 0.9 +att.Mult_ReloadTime = 1.12 +--att.Mult_SpeedMult = 0.9 +att.Override_ClipSize = 22 +att.Override_ClipSize_Priority = 2 +att.Mult_Sway = 1.15 + +att.Mult_HipDispersion = 1.25 + +att.ActivateElements = {"ud_uzi_41_mag"} + +att.Hook_SelectReloadAnimation = function(wep, anim) + return anim .. "_41" +end + +att.RequireFlags = {"uzi_45"} +att.HideIfBlocked = true \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_uzi_stock_folded.lua b/lua/arccw/shared/attachments/ud_uzi_stock_folded.lua new file mode 100644 index 0000000..88782ab --- /dev/null +++ b/lua/arccw/shared/attachments/ud_uzi_stock_folded.lua @@ -0,0 +1,31 @@ +att.PrintName = "Folded Stock" +att.Icon = Material("entities/att/acwatt_ud_uzi_stock_folded.png", "smooth mips") +att.Description = "Tuck in the folding stock, making the weapon easier to manuver but less controllable." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_uzi_stock" +att.AttachSound = "arccw_uc/common/stockslide.ogg" + +att.AutoStats = true +att.Free = true +att.IgnorePickX = true +att.SortOrder = 2 + +att.Mult_Recoil = 1.15 +att.Mult_RecoilSide = 1.25 +att.Mult_VisualRecoilMult = 2 +att.Mult_Sway = 1.5 + +att.Mult_SightTime = 0.85 +att.Mult_SightedSpeedMult = 1.05 +att.Mult_ShootSpeedMult = 1.05 + +att.Mult_DrawTime = 0.75 +att.Mult_HolsterTime = 0.75 +att.Add_BarrelLength = -2 + +att.ActivateElements = {"ud_uzi_folded_stock"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_uzi_stock_polymer.lua b/lua/arccw/shared/attachments/ud_uzi_stock_polymer.lua new file mode 100644 index 0000000..bb2f374 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_uzi_stock_polymer.lua @@ -0,0 +1,28 @@ +att.PrintName = "Uzi Polymer Stock" +att.AbbrevName = "Polymer Stock" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "STAP Polymer Stock" +end + +att.Icon = Material("entities/att/acwatt_ud_uzi_stock_solid.png", "smooth mips") +att.Description = "A solid, non-foldable stock made of polymer. Provides decent recoil reduction and doesn't weigh as much as a full wooden stock." +att.Desc_Pros = {} +att.Desc_Cons = {} +att.Desc_Neutrals = {} +att.Slot = "ud_uzi_stock" + +att.AutoStats = true +att.SortOrder = 3 + +att.Mult_Recoil = 0.85 +att.Mult_RecoilSide = 0.75 +att.Mult_VisualRecoilMult = 0.75 +att.Mult_Sway = 0.75 + +att.Mult_SightTime = 1.15 +att.Mult_SightedSpeedMult = 0.95 +att.Mult_ShootSpeedMult = 0.95 + +att.Mult_DrawTime = 1.25 +att.Mult_HolsterTime = 1.25 \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_uzi_stock_remove.lua b/lua/arccw/shared/attachments/ud_uzi_stock_remove.lua new file mode 100644 index 0000000..9d8075a --- /dev/null +++ b/lua/arccw/shared/attachments/ud_uzi_stock_remove.lua @@ -0,0 +1,27 @@ +att.PrintName = "No Stock" +att.Icon = nil -- Material("entities/att/acwatt_lowpolysaiga12extmag.png", "smooth mips") +att.Description = "Remove your stock. Who needs it, anyway? Not a real gangsta, that's who." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ud_uzi_stock" + +att.AutoStats = true +att.Free = true +att.SortOrder = 1 + +att.Mult_Recoil = 1.5 +att.Mult_RecoilSide = 1.25 +att.Mult_VisualRecoilMult = 2 +att.Mult_Sway = 2 + +att.Mult_SightTime = 0.75 +att.Mult_SightedSpeedMult = 1.1 +att.Mult_ShootSpeedMult = 1.1 + +att.Mult_DrawTime = 0.75 +att.Mult_HolsterTime = 0.75 +att.Add_BarrelLength = -2 \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ud_uzi_stock_wood.lua b/lua/arccw/shared/attachments/ud_uzi_stock_wood.lua new file mode 100644 index 0000000..38e3863 --- /dev/null +++ b/lua/arccw/shared/attachments/ud_uzi_stock_wood.lua @@ -0,0 +1,28 @@ +att.PrintName = "Uzi Wooden Stock" +att.AbbrevName = "Wooden Stock" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "STAP Wooden Stock" +end + +att.Icon = Material("entities/att/acwatt_ud_uzi_stock_solid.png", "smooth mips") +att.Description = "A solid, non-foldable stock made of wood. Old-fashioned and very sturdy, though less compact." +att.Desc_Pros = {} +att.Desc_Cons = {} +att.Desc_Neutrals = {} +att.Slot = "ud_uzi_stock" + +att.AutoStats = true +att.SortOrder = 4 + +att.Mult_Recoil = 0.75 +att.Mult_RecoilSide = 0.5 +att.Mult_VisualRecoilMult = 0.5 +att.Mult_Sway = 0.5 + +att.Mult_SightTime = 1.25 +att.Mult_SightedSpeedMult = 0.9 +att.Mult_ShootSpeedMult = 0.9 + +att.Mult_DrawTime = 1.25 +att.Mult_HolsterTime = 1.25 \ No newline at end of file diff --git a/lua/arccw/shared/languages/ud_en.lua b/lua/arccw/shared/languages/ud_en.lua new file mode 100644 index 0000000..7df34b4 --- /dev/null +++ b/lua/arccw/shared/languages/ud_en.lua @@ -0,0 +1,42 @@ +L = {} + +L["ud.title"] = "Urban Decay" + +-- Glock +L["ud.glock.cs"] = "+3 Default magazine capacity" +L["ud.glock.subcompact"] = "Enables Subcompact attachments" +L["ud.glock.nytesyte.1"] = "Recoil becomes sideways while aiming" +L["ud.glock.nytesyte.2"] = "Optics will be mounted sideways" + +L["ud.hushpuppy"] = "Switch to slide-lock firemode for manual action, reducing volume and imprecision" + +L["fcg.slidelock"] = "Slide-lock" +L["fcg.slidelock.abbrev"] = "S-LOCK" + +L["ud.glock.altanim"] = "Replaces the empty reload animation with a longer, flashier alternative." + +-- M16 +L["ud.flattop"] = "Lower optic position" +L["ud.m16_ch.1"] = "Mount optics on top of the carry handle instead of having a flat top." +L["ud.m16_ch.2"] = "It might improve visibility when aiming, or block your vision when hip-firing." +L["ud.m16_tl.1"] = "Mount tactical lasers on top of the weapon instead of the barrel or lower rail." +L["ud.m16_tl.2"] = "The front sight is removed, and the sight is changed to a point shooting stance." +L["ud.m16_nors"] = "This disables alternative iron sights." +L["ud.m16_a1"] = "This receiver has no flat top variant, and will apply a rail mount for optics." +L["ud.m16_altburst.1"] = "-10% Recoil in Burst fire mode" +L["ud.m16_altburst.2"] = "This receiver fires the entire burst with one trigger pull." +L["ud.usas"] = "Fire shotgun shells instead of bullets" -- deprecated +L["ud.m16_fs.1"] = "Keep the front iron sight on the gas block when mounting optics." +L["ud.m16_fs.2"] = "Certain optics will become obstructed by the front sight." +L["ud.m16.fpw1"] = "No semi-automatic mode" +L["ud.m16.fpw2"] = "+0.1s Trigger delay" +L["ud.m16.50beo"] = "Disables Lower Receiver attachments" +L["ud.m16.allowfs"] = "Allows Front Sight attachments" + +-- 870 +L["ud.870.ringsight"] = "Reduced field of vision" + +-- Deprecated +L["ud.darkrp.cantremove"] = "You can't remove this without a gun license!" +L["ud.darkrp.cantattach"] = "You need a gun license to use this attachment!" +L["ud.darkrp.cantpickup"] = "You need a gun license to pickup this attachment!" \ No newline at end of file diff --git a/lua/weapons/arccw_ud_870.lua b/lua/weapons/arccw_ud_870.lua new file mode 100644 index 0000000..0616bc2 --- /dev/null +++ b/lua/weapons/arccw_ud_870.lua @@ -0,0 +1,657 @@ +SWEP.Base = "arccw_base" +SWEP.Spawnable = true +SWEP.Category = "ArcCW - Urban Coalition" +SWEP.UC_CategoryPack = "1Urban Decay" +SWEP.AdminOnly = false +SWEP.UseHands = true + +-- Muzzle and shell effects -- + +SWEP.MuzzleEffect = "muzzleflash_shotgun" +SWEP.ShellEffect = "arccw_uc_shelleffect" +SWEP.ShellModel = "models/weapons/arccw/uc_shells/12g.mdl" +SWEP.ShellPitch = 100 +SWEP.ShellSounds = ArcCW.ShotgunShellSoundsTable +SWEP.ShellScale = 0.5 +SWEP.UC_ShellColor = Color(0.7*255, 0.2*255, 0.2*255) + +SWEP.MuzzleEffectAttachment = 1 +SWEP.CaseEffectAttachment = 2 +SWEP.CamAttachment = 3 + +-- Fake name -- + +SWEP.PrintName = "Express-12" + +-- True name -- + +SWEP.TrueName = "Remington 870" + +-- Trivia -- + +SWEP.Trivia_Class = "Shotgun" +SWEP.Trivia_Desc = "Classic pump-action shotgun, renowned for its high quality parts and assembly. A simple firearm with a simple purpose. Marketed primarily to civilians for use in hunting game and self-defense, but it has found popularity among police departments for a relatively innocuous appearance and ability to accept custom loaded less-lethal shells." +SWEP.Trivia_Manufacturer = "Mauer Armaments" +SWEP.Trivia_Calibre = "12 Gauge" +SWEP.Trivia_Mechanism = "Pump Action" +SWEP.Trivia_Country = "USA" +SWEP.Trivia_Year = 1950 + +-- Weapon slot -- + +SWEP.Slot = 3 + +-- Weapon's manufacturer real name -- + +if GetConVar("arccw_truenames"):GetBool() then + SWEP.PrintName = SWEP.TrueName + SWEP.Trivia_Manufacturer = "Remington Arms" +end + +-- Viewmodel / Worldmodel / FOV -- + +SWEP.ViewModel = "models/weapons/arccw/c_ud_870.mdl" +SWEP.WorldModel = "models/weapons/arccw/c_ud_870.mdl" +SWEP.ViewModelFOV = 60 +SWEP.AnimShoot = ACT_HL2MP_GESTURE_RANGE_ATTACK_SHOTGUN +SWEP.DefaultBodygroups = "000000000" + +SWEP.MirrorVMWM = true +SWEP.WorldModelOffset = { + pos = Vector(-5.5, 5, -5.5), + ang = Angle(-12, 0, 180), + bone = "ValveBiped.Bip01_R_Hand", + scale = 1 - ( 0.35 * 0.5 ) +} + +-- Damage parameters -- + +SWEP.Damage = ArcCW.UC.StdDmg["12g_p"].max +SWEP.DamageMin = ArcCW.UC.StdDmg["12g_p"].min +SWEP.Penetration = ArcCW.UC.StdDmg["12g_p"].pen +SWEP.Num = ArcCW.UC.StdDmg["12g_p"].num + +SWEP.Range = 50 +SWEP.RangeMin = 5 +SWEP.DamageType = DMG_BUCKSHOT +SWEP.ShootEntity = nil +SWEP.MuzzleVelocity = 365 +SWEP.PhysBulletMuzzleVelocity = 365 + +SWEP.HullSize = 0.5 + +SWEP.BodyDamageMults = ArcCW.UC.BodyDamageMults_Shotgun + +-- Mag size -- + +SWEP.ChamberSize = 1 +SWEP.Primary.ClipSize = 6 +SWEP.ExtendedClipSize = 8 +SWEP.ReducedClipSize = 6 + +-- Recoil -- + +SWEP.Recoil = 3.1 +SWEP.RecoilSide = 1 + +SWEP.RecoilRise = 0.24 +SWEP.VisualRecoilMult = 1 +SWEP.MaxRecoilBlowback = 1 +SWEP.MaxRecoilPunch = 1 + +SWEP.Sway = 0.5 + +-- Firerate / Firemodes -- + +SWEP.Delay = 60 / 60 +SWEP.Firemodes = { + { + PrintName = "fcg.pump", + Mode = 1, + }, + { + Mode = 0 + } +} + +SWEP.NoLastCycle = true +SWEP.ManualAction = true +SWEP.ShotgunReload = true + +SWEP.ShootVol = 160 +SWEP.ShootPitch = 100 + +SWEP.ProceduralRegularFire = false +SWEP.ProceduralIronFire = false + +SWEP.ReloadInSights = false + +-- NPC -- + +SWEP.NPCWeaponType = "weapon_shotgun" +SWEP.NPCWeight = 210 + +-- Accuracy -- + +SWEP.AccuracyMOA = 30 +SWEP.HipDispersion = 400 +SWEP.MoveDispersion = 100 +SWEP.JumpDispersion = 1000 + +SWEP.Primary.Ammo = "buckshot" + +-- Speed multipliers -- + +SWEP.SpeedMult = 0.9 +SWEP.SightedSpeedMult = 0.75 +SWEP.SightTime = 0.4 +SWEP.ShootSpeedMult = 0.75 + +-- Length -- + +SWEP.BarrelLength = 32 +SWEP.ExtraSightDist = 2 + +-- Ironsights / Customization / Poses -- + +SWEP.HoldtypeHolstered = "passive" +SWEP.HoldtypeActive = "ar2" +SWEP.HoldtypeSights = "rpg" + +SWEP.IronSightStruct = { + Pos = Vector(-3.66, -3, 2.2), + Ang = Angle(-0.75, 0, 2.8), + Magnification = 1.1, + SwitchToSound = "", +} + +SWEP.HolsterPos = Vector(2, 0, -2) +SWEP.HolsterAng = Angle(-5.5, 20, -20) + +SWEP.SprintPos = Vector(-0.5, -4, -2) +SWEP.SprintAng = Angle(3.5, 7, -20) + +SWEP.ActivePos = Vector(-0.75, -2, 1) +SWEP.ActiveAng = Angle(0, 0, -3) + +SWEP.CrouchPos = Vector(-3.8, -2, 0) +SWEP.CrouchAng = Angle(0, 0, -30) + +SWEP.BarrelOffsetSighted = Vector(0, 0, -1) +SWEP.BarrelOffsetHip = Vector(3, 0, -4) + + + +SWEP.Malfunction = true +SWEP.MalfunctionTakeRound = true +SWEP.MalfunctionMean = 500 +SWEP.MalfunctionVariance = 0.99 +-- Firing sounds -- + +local path = ")weapons/arccw_ud/870/" +local common = ")/arccw_uc/common/" +SWEP.ShootSound = { + path .. "fire-01.ogg", + path .. "fire-02.ogg", + path .. "fire-03.ogg", + path .. "fire-04.ogg", + path .. "fire-05.ogg", + path .. "fire-06.ogg" +} +SWEP.ShootSoundSilenced = { + path .. "fire-sup-01.ogg", + path .. "fire-sup-02.ogg", + path .. "fire-sup-03.ogg", + path .. "fire-sup-04.ogg", + path .. "fire-sup-05.ogg", + path .. "fire-sup-06.ogg" +} +--[[SWEP.DistantShootSound = path .. "fire_dist.ogg" +SWEP.DistantShootSoundSilenced = common .. "sup_tail.ogg"]] +SWEP.ShootDrySound = {path .. "mech-01.ogg", path .. "mech-02.ogg", path .. "mech-03.ogg", path .. "mech-04.ogg", path .. "mech-05.ogg", path .. "mech-06.ogg"} + +local tail = ")/arccw_uc/common/12ga/" + +SWEP.DistantShootSoundOutdoors = { + tail .. "fire-dist-12ga-pasg-ext-01.ogg", + tail .. "fire-dist-12ga-pasg-ext-02.ogg", + tail .. "fire-dist-12ga-pasg-ext-03.ogg", + tail .. "fire-dist-12ga-pasg-ext-04.ogg", + tail .. "fire-dist-12ga-pasg-ext-05.ogg", + tail .. "fire-dist-12ga-pasg-ext-06.ogg" +} +SWEP.DistantShootSoundIndoors = { + tail .. "fire-dist-12ga-pasg-int-01.ogg", + tail .. "fire-dist-12ga-pasg-int-02.ogg", + tail .. "fire-dist-12ga-pasg-int-03.ogg", + tail .. "fire-dist-12ga-pasg-int-04.ogg", + tail .. "fire-dist-12ga-pasg-int-05.ogg", + tail .. "fire-dist-12ga-pasg-int-06.ogg" +} +SWEP.DistantShootSoundOutdoorsSilenced = { + common .. "sup-tail-01.ogg", + common .. "sup-tail-02.ogg", + common .. "sup-tail-03.ogg", + common .. "sup-tail-04.ogg", + common .. "sup-tail-05.ogg", + common .. "sup-tail-06.ogg", + common .. "sup-tail-07.ogg", + common .. "sup-tail-08.ogg", + common .. "sup-tail-09.ogg", + common .. "sup-tail-10.ogg" +} +SWEP.DistantShootSoundIndoorsSilenced = { + common .. "fire-dist-int-pistol-light-01.ogg", + common .. "fire-dist-int-pistol-light-02.ogg", + common .. "fire-dist-int-pistol-light-03.ogg", + common .. "fire-dist-int-pistol-light-04.ogg", + common .. "fire-dist-int-pistol-light-05.ogg", + common .. "fire-dist-int-pistol-light-06.ogg" +} +SWEP.DistantShootSoundOutdoorsVolume = 1 +SWEP.DistantShootSoundIndoorsVolume = 1 +SWEP.Hook_AddShootSound = ArcCW.UC.InnyOuty + +SWEP.Hook_Think = ArcCW.UC.ADSReload + +local shellin = {path .. "shell-insert-01.ogg", path .. "shell-insert-02.ogg", path .. "shell-insert-03.ogg"} + +SWEP.Animations = { + ["ready"] = { + Source = "sgreload_finish_empty", + Time = 37 / 30, + LHIK = true, + LHIKIn = 0, + LHIKEaseOut = 1.2, + LHIKOut = 1.4, + SoundTable = { + {s = common .. "raise.ogg", t = 0.2}, + {s = common .. "rattle.ogg", t = 0.2}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.5}, + {s = path .. "rack_1.ogg", t = 0.4}, + {s = path .. "rack_2.ogg", t = 0.6}, + {s = common .. "shoulder.ogg", t = 0.9}, + }, + ProcDraw = true, + }, + ["idle"] = { + Source = "idle", + }, + ["idle_empty"] = { + Source = "idle", + }, + ["draw"] = { + Source = "draw", + Time = 20 / 30, + SoundTable = ArcCW.UC.DrawSounds, + }, + ["holster"] = { + Source = "holster", + Time = 20 / 30, + SoundTable = ArcCW.UC.HolsterSounds, + }, + ["fire"] = { + Source = "fire", + --Time = 23 / 30, + MinProgress = .3, + SoundTable = { + { s = {path .. "mech-01.ogg", path .. "mech-02.ogg", path .. "mech-03.ogg", path .. "mech-04.ogg", path .. "mech-05.ogg", path .. "mech-06.ogg"}, t = 0, v = 0.25 } + }, + }, + ["fire_iron"] = { + Source = "fire", + --Time = 23 / 30, + MinProgress = .3, + SoundTable = { + {s = common .. "common_mech_heavy.ogg", t = 0}, + { s = {path .. "mech-01.ogg", path .. "mech-02.ogg", path .. "mech-03.ogg", path .. "mech-04.ogg", path .. "mech-05.ogg", path .. "mech-06.ogg"}, t = 0 } + }, + }, + ["cycle"] = { + Source = "cycle", + Time = 0.85, + ShellEjectAt = 0.1, + MinProgress = 0.4, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0}, + {s = path .. "rack_1.ogg", t = 0.0, v = 0.5}, + {s = path .. "eject.ogg", t = 0.1, v = 0.5}, + {s = path .. "rack_2.ogg", t = 0.13, v = 0.5}, + }, + }, + + ["cycle_jammed"] = { + Source = "jamcycle", + --Time = 20 / 30, + ShellEjectAt = 0.1, + MinProgress = 0.26, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0}, + {s = path .. "rack_1.ogg", t = 0}, + {s = path .. "eject.ogg", t = 0.1}, + {s = path .. "rack_2.ogg", t = 0.11}, + }, + }, + + ["fix"] = { + Source = "fix", + Time = 50 / 30, + ShellEjectAt = 0.7, -- should make the shell eject offscreen cuz the anim already has it + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.5}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 1}, + {s = path .. "rack_1.ogg", t = 0.6}, + {s = path .. "eject.ogg", t = 0.7}, + {s = path .. "rack_2.ogg", t = 0.9}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 1.7}, + } + }, + ["sgreload_start"] = { + Source = "sgreload_start", + Time = 16 / 30, + TPAnim = ACT_HL2MP_GESTURE_RELOAD_SHOTGUN, + LHIK = true, + LHIKIn = 0.2, + LHIKOut = 0, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0}, + {s = common .. "shoulder.ogg", t = 0.1}, + }, + }, + ["sgreload_insert"] = { + Source = "sgreload_insert", + Time = 18 / 30, + MinProgress = 0.24, + TPAnim = ACT_HL2MP_GESTURE_RELOAD_SHOTGUN, + TPAnimStartTime = 0.3, + LHIK = true, + LHIKIn = 0, + LHIKOut = 0, + SoundTable = { + {s = shellin, t = 0}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0, v = 0.5}, + }, + }, + ["sgreload_finish"] = { + Source = "sgreload_finish", + Time = 20 / 30, + LHIK = true, + LHIKIn = 0, + LHIKEaseOut = 0.3, + LHIKOut = 0.4, + TPAnimStartTime = 0.8, + TPAnim = ACT_HL2MP_GESTURE_RELOAD_SHOTGUN, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0}, + {s = common .. "shoulder.ogg", t = 0.27}, + }, + }, + ["sgreload_finish_empty"] = { + Source = "sgreload_finish_empty", + Time = 37 / 30, + LHIK = true, + LHIKIn = 0, + LHIKEaseOut = 0.6, + LHIKOut = 0.8, + TPAnimStartTime = 0.5, + TPAnim = ACT_HL2MP_GESTURE_RELOAD_SHOTGUN, + ShellEjectAt = 0.5, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.5}, + {s = path .. "rack_1.ogg", t = 0.35}, + {s = path .. "eject.ogg", t = 0.5}, + {s = path .. "rack_2.ogg", t = 0.525}, + {s = common .. "shoulder.ogg", t = 0.9}, + }, + }, +} + +SWEP.Hook_ModifyBodygroups = function(wep, data) + local vm = data.vm + if !IsValid(vm) then return end + -- if wep.Attachments[1].Installed then + -- vm:SetBodygroup(8, 2) + -- elseif wep.Attachments[2].Installed == "ud_870_barrel_long" then + -- vm:SetBodygroup(8, 1) + -- else + -- vm:SetBodygroup(8, 0) + -- end + + -- 8rnd tube and either barrel should remove the clamp + if vm:GetBodygroup(7) == 1 and vm:GetBodygroup(1) != 0 then + vm:SetBodygroup(7, 2) + end +end + + +SWEP.BulletBones = { + [0] = "870_shell1", +} + +SWEP.DefaultSkin = 1 + +-- Bodygroups -- + +SWEP.AttachmentElements = { + ["ud_870_optic_ringsight"] = { + VMBodygroups = { + {ind = 8, bg = 1}, + }, + Override_IronSightStruct = { + Pos = Vector(-3.68, -2.75, 2.2), + Ang = Angle(-0.6, -0.03, 2), + Magnification = 1.1, + SwitchToSound = "", + }, + }, + ["optic_rail"] = { + VMBodygroups = { + {ind = 8, bg = 2}, + } + }, + ["ud_shotgun_rail_fg"] = { + VMBodygroups = {{ind = 3, bg = 1}}, + }, + ["ud_870_slide_moe"] = { + VMBodygroups = {{ind = 6, bg = 1}}, + }, + ["ud_870_slide_long"] = { + VMBodygroups = {{ind = 6, bg = 2}}, + }, + ["ud_870_slide_poly"] = { + VMBodygroups = {{ind = 6, bg = 3}}, + }, + ["ud_shotgun_rail_fg"] = { + VMBodygroups = {{ind = 3, bg = 1}}, + }, + ["ud_870_barrel_long"] = { + AttPosMods = { + [3] = { + vpos = Vector(-0.03, -0.54, 36), + } + }, + VMBodygroups = { + {ind = 1, bg = 1}, + }, + }, + ["ud_870_barrel_sawnoff"] = { + VMBodygroups = { + {ind = 1, bg = 2}, + {ind = 7, bg = 2} + }, + AttPosMods = { + [3] = { + vpos = Vector(-0.03, -0.79, 17.8), + } + }, + }, + ["ud_870_tube_reduced"] = { + VMBodygroups = { + {ind = 2, bg = 2}, + {ind = 7, bg = 2} + }, + }, + ["ud_870_tube_ext"] = { + VMBodygroups = { + {ind = 2, bg = 1}, + {ind = 7, bg = 1} + }, + }, + ["ud_870_stock_poly"] = { + VMBodygroups = {{ind = 4, bg = 1}}, + }, + ["ud_870_stock_sawnoff"] = { + VMBodygroups = {{ind = 4, bg = 2}}, + }, + ["ud_870_stock_raptor"] = { + VMBodygroups = {{ind = 4, bg = 3}}, + }, + + ["ud_870_skin_dirty"] = { + VMSkin = 0 + }, + ["ud_870_skin_custom"] = { + VMSkin = 3 + }, +} + +SWEP.Attachments = { + { + PrintName = "Optic", + DefaultAttName = "Iron Sights", + Slot = {"optic_lp","optic","optic_sniper","ud_870_optic"}, + Bone = "870_parent", + Offset = { + vpos = Vector(0, -1.75, -2), + vang = Angle(90, 0, -90), + }, + VMScale = Vector(1, 1, 1), + CorrectiveAng = Angle(1.8, 0.1, 0), + InstalledEles = {"optic_rail"} + }, + { + PrintName = "Barrel", + DefaultAttName = "16\" Standard Barrel", + DefaultAttIcon = Material("entities/att/acwatt_ud_870_barrel.png", "smooth mips"), + Slot = "ud_870_barrel", + }, + { + PrintName = "Muzzle", + DefaultAttName = "Standard Muzzle", + Slot = {"choke", "muzzle_shotgun"}, + Bone = "870_parent", + Offset = { + vpos = Vector(-0.03, -0.79, 24.6), + vang = Angle(90, 0, -90), + }, + }, + { + PrintName = "Forend", + DefaultAttName = "Factory Forend", + DefaultAttIcon = Material("entities/att/acwatt_ud_870_slide.png", "smooth mips"), + Slot = {"ud_870_slide"}, + Bone = "870_slide", + Offset = { + vpos = Vector(3, -4.4, -29), + vang = Angle(90, 0, -90), + }, + }, + { + PrintName = "Underbarrel", + Slot = {"foregrip"}, + Bone = "870_slide", + Offset = { + vpos = Vector(0, 1.1, 0), + vang = Angle(90, 0, -90), + }, + InstalledEles = {"ud_shotgun_rail_fg"}, + MergeSlots = {14}, + }, + { + PrintName = "Tactical", + Slot = {"tac_pistol"}, + Bone = "870_slide", + Offset = { + vpos = Vector(0, 1, 4.25), + vang = Angle(90, 0, -90), + }, + }, + { + PrintName = "Stock", + DefaultAttName = "Wooden Stock", + DefaultAttIcon = Material("entities/att/acwatt_ud_870_stock.png", "smooth mips"), + Slot = {"ud_870_stock"}, + }, + { + PrintName = "Tube Type", + Slot = {"ud_870_tube"}, + DefaultAttName = "6 Shell Tube", + DefaultAttIcon = Material("entities/att/acwatt_ud_870_tube.png", "smooth mips"), + }, + { + PrintName = "Ammo Type", + DefaultAttName = "\"BUCK\" #00 Buckshot", + DefaultAttIcon = Material("entities/att/arccw_uc_ammo_shotgun_generic.png", "mips smooth"), + Slot = "ud_ammo_shotgun", + }, + { + PrintName = "Training Package", + Slot = "uc_tp", + DefaultAttName = "Basic Training" + }, + { + PrintName = "Internals", + Slot = "uc_fg", -- Fire group + DefaultAttName = "Standard Internals" + }, + { + PrintName = "Charm", + Slot = {"charm", "fml_charm"}, + FreeSlot = true, + Bone = "870_parent", + Offset = { + vpos = Vector(0.7, 0, 5), + vang = Angle(90, 0, -90), + }, + }, + { + PrintName = "Skin", + Slot = "ud_870_skin", + DefaultAttName = "Polished Steel", + FreeSlot = true + }, + { + PrintName = "M203 slot", + Slot = "uc_ubgl", + Bone = "870_slide", + Offset = { + vpos = Vector(0, -0.4, -3.7), + vang = Angle(90, 0, -90), + }, + InstalledEles = {"rail_fg"}, + ExcludeFlags = {"ak_noubs","barrel_rpk"}, + Hidden = true, + } +} + +local lookup_barrel = { + default = 1, + ud_870_barrel_long = 2, + ud_870_barrel_sawnoff = 0, +} + +local lookup_tube = { + default = 1, + ud_870_tube_ext = 2, + ud_870_tube_reduced = 0, +} + +SWEP.Hook_ExtraFlags = function(wep, data) + + local barrel = wep.Attachments[2].Installed and lookup_barrel[wep.Attachments[2].Installed] or lookup_barrel["default"] + local tube = wep.Attachments[8].Installed and lookup_tube[wep.Attachments[8].Installed] or lookup_tube["default"] + + if barrel < tube then + table.insert(data, "nomuzzleblocking") + end +end \ No newline at end of file diff --git a/lua/weapons/arccw_ud_glock.lua b/lua/weapons/arccw_ud_glock.lua new file mode 100644 index 0000000..d7c8d12 --- /dev/null +++ b/lua/weapons/arccw_ud_glock.lua @@ -0,0 +1,1218 @@ +SWEP.Base = "arccw_base" +SWEP.Spawnable = true +SWEP.Category = "ArcCW - Urban Coalition" +SWEP.UC_CategoryPack = "1Urban Decay" +SWEP.AdminOnly = false +SWEP.UseHands = true + +-- Muzzle and shell effects -- + +SWEP.MuzzleEffect = "muzzleflash_1" +SWEP.ShellEffect = "arccw_uc_shelleffect" +SWEP.ShellModel = "models/weapons/arccw/uc_shells/9x19.mdl" +SWEP.ShellScale = 1 +--SWEP.ShellMaterial = "models/weapons/arcticcw/shell_9mm" +SWEP.ShellPitch = 100 +SWEP.ShellSounds = ArcCW.PistolShellSoundsTable + +SWEP.MuzzleEffectAttachment = 1 +SWEP.CaseEffectAttachment = 2 +SWEP.CamAttachment = 3 +SWEP.TracerNum = 1 +SWEP.TracerCol = Color(25, 255, 25) +SWEP.TracerWidth = 2 + +-- Fake name -- + +SWEP.PrintName = "GEN3" + +-- True name -- + +SWEP.TrueName = "Glock 17" + +-- Trivia -- + +SWEP.Trivia_Class = "Pistol" +SWEP.Trivia_Desc = [[Handgun originally designed by a curtain rod manufacturer for the Austrian military. Its reliable and cost-effective polymer design has since made it one of the most popular and widely used pistols in the world, common in military, police and civilian use alike. + +Great backup weapon due to its quick draw and sight times, but a relatively low damage output makes it a less than ideal primary.]] +SWEP.Trivia_Manufacturer = "Next Generation Weapons Inc." +SWEP.Trivia_Calibre = "9x19mm Parabellum" +SWEP.Trivia_Mechanism = "Short Recoil" +SWEP.Trivia_Country = "Austria" +SWEP.Trivia_Year = 1982 + +-- Weapon slot -- + +SWEP.Slot = 1 + +-- Weapon's manufacturer real name -- + +if GetConVar("arccw_truenames"):GetBool() then + SWEP.PrintName = SWEP.TrueName + SWEP.Trivia_Manufacturer = "Glock Ges.m.b.H." +end + +-- Viewmodel / Worldmodel / FOV -- + +SWEP.ViewModel = "models/weapons/arccw/c_ud_glock.mdl" +SWEP.WorldModel = "models/weapons/arccw/c_ud_glock.mdl" +SWEP.ViewModelFOV = 60 +SWEP.AnimShoot = ACT_HL2MP_GESTURE_RANGE_ATTACK_AR2 + +-- Damage -- + +SWEP.Damage = ArcCW.UC.StdDmg["9mm"].max +SWEP.DamageMin = ArcCW.UC.StdDmg["9mm"].min +SWEP.Penetration = ArcCW.UC.StdDmg["9mm"].pen + +SWEP.RangeMin = 15 +SWEP.Range = 50 -- 4 shot until ~35m +SWEP.DamageType = DMG_BULLET +SWEP.ShootEntity = nil +SWEP.MuzzleVelocity = 375 +SWEP.PhysBulletMuzzleVelocity = 375 + +SWEP.BodyDamageMults = ArcCW.UC.BodyDamageMults + +-- Mag size -- + +SWEP.ChamberSize = 1 +SWEP.Primary.ClipSize = 17 +SWEP.ExtendedClipSize = 33 +SWEP.ReducedClipSize = 10 + +-- Recoil -- + +SWEP.Recoil = 1.0 +SWEP.RecoilSide = 0.5 + +SWEP.RecoilRise = 0.24 +SWEP.VisualRecoilMult = 1 +SWEP.MaxRecoilBlowback = 0.5 +SWEP.MaxRecoilPunch = 0.6 + +SWEP.Sway = 1 + +-- Firerate / Firemodes -- + +SWEP.Delay = 60 / 525 +SWEP.Num = 1 +SWEP.Firemodes = { + { + Mode = 1, + }, + { + PrintName = "fcg.safe2", + Mode = 0, + } +} + +SWEP.ShootPitch = 100 +SWEP.ShootVol = 120 + +SWEP.ProceduralRegularFire = false +SWEP.ProceduralIronFire = false + +SWEP.ReloadInSights = true + +-- NPC -- + +SWEP.NPCWeaponType = "weapon_pistol" +SWEP.NPCWeight = 60 + +-- Accuracy -- + +SWEP.AccuracyMOA = 7 +SWEP.HipDispersion = 500 +SWEP.MoveDispersion = 250 +SWEP.JumpDispersion = 1000 + +SWEP.Primary.Ammo = "pistol" +SWEP.MagID = "glock" + +SWEP.HeatCapacity = 50 +SWEP.HeatDissipation = 20 +SWEP.HeatDelayTime = 3 + +SWEP.MalfunctionMean = 150 +SWEP.MalfunctionTakeRound = false + +-- Speed multipliers -- + +SWEP.SpeedMult = 0.975 +SWEP.SightedSpeedMult = 0.9 +SWEP.SightTime = 0.25 +SWEP.ShootSpeedMult = 1 + +-- Length -- + +SWEP.BarrelLength = 8 +SWEP.ExtraSightDist = 10 + +-- Ironsights / Customization / Poses -- + +SWEP.HolsterPos = Vector(-0.5, -2, -1) +SWEP.HolsterAng = Angle(3.5, 7, -20) + +SWEP.HolsterPos = Vector(-1, -2, 3) +SWEP.HolsterAng = Angle(-15.5, 2, -7) + +SWEP.HoldtypeHolstered = "normal" +SWEP.HoldtypeActive = "pistol" +SWEP.HoldtypeSights = "revolver" + +SWEP.IronSightStruct = { + Pos = Vector(-1.73, 1, 2.3), + Ang = Angle(0.3, 0, 0), + Magnification = 1, + ViewModelFOV = 55, + SwitchToSound = ratel, -- sound that plays when switching to this sight + SwitchFromSound = ratel +} + +SWEP.ActivePos = Vector(0, 1, 2) +SWEP.ActiveAng = Angle(0, 0, -6) + +SWEP.CustomizePos = Vector(7, -2, -2) +SWEP.CustomizeAng = Angle(15, 25, 0) + +SWEP.CrouchPos = Vector(-2, -2, 1) +SWEP.CrouchAng = Angle(0, 0, -20) + +SWEP.BarrelOffsetHip = Vector(3.5, 0, -3) + +SWEP.MirrorVMWM = true +SWEP.WorldModelOffset = { + pos = Vector(-10.5, 3.5, -4.8), + ang = Angle(-6, 0, 180), + bone = "ValveBiped.Bip01_R_Hand", +} + +-- Firing sounds -- + +local path = ")weapons/arccw_ud/glock/" +local path1 = ")weapons/arccw_ud/uzi/" +local common = ")/arccw_uc/common/" +SWEP.ShootSound = { + path .. "fire-01.ogg", + path .. "fire-02.ogg", + path .. "fire-03.ogg", + path .. "fire-04.ogg", + path .. "fire-05.ogg", + path .. "fire-06.ogg" +} +SWEP.ShootSoundSilenced = { + path .. "fire-sup-01.ogg", + path .. "fire-sup-02.ogg", + path .. "fire-sup-03.ogg", + path .. "fire-sup-04.ogg", + path .. "fire-sup-05.ogg", + path .. "fire-sup-06.ogg" +} + +SWEP.DistantShootSound = nil +SWEP.DistantShootSoundSilenced = nil +SWEP.ShootDrySound = path .. "dryfire.ogg" + +local tail = ")/arccw_uc/common/9x19/" + +SWEP.DistantShootSoundOutdoors = { + tail .. "fire-dist-9x19-pistol-ext-01.ogg", + tail .. "fire-dist-9x19-pistol-ext-02.ogg", + tail .. "fire-dist-9x19-pistol-ext-03.ogg", + tail .. "fire-dist-9x19-pistol-ext-04.ogg", + tail .. "fire-dist-9x19-pistol-ext-05.ogg", + tail .. "fire-dist-9x19-pistol-ext-06.ogg" +} +SWEP.DistantShootSoundIndoors = { + tail .. "fire-dist-9x19-pistol-int-01.ogg", + tail .. "fire-dist-9x19-pistol-int-02.ogg", + tail .. "fire-dist-9x19-pistol-int-03.ogg", + tail .. "fire-dist-9x19-pistol-int-04.ogg", + tail .. "fire-dist-9x19-pistol-int-05.ogg", + tail .. "fire-dist-9x19-pistol-int-06.ogg" +} +SWEP.DistantShootSoundOutdoorsSilenced = { + common .. "sup-tail-01.ogg", + common .. "sup-tail-02.ogg", + common .. "sup-tail-03.ogg", + common .. "sup-tail-04.ogg", + common .. "sup-tail-05.ogg", + common .. "sup-tail-06.ogg", + common .. "sup-tail-07.ogg", + common .. "sup-tail-08.ogg", + common .. "sup-tail-09.ogg", + common .. "sup-tail-10.ogg" +} +SWEP.DistantShootSoundIndoorsSilenced = { + common .. "fire-dist-int-pistol-light-01.ogg", + common .. "fire-dist-int-pistol-light-02.ogg", + common .. "fire-dist-int-pistol-light-03.ogg", + common .. "fire-dist-int-pistol-light-04.ogg", + common .. "fire-dist-int-pistol-light-05.ogg", + common .. "fire-dist-int-pistol-light-06.ogg", +} +SWEP.DistantShootSoundOutdoorsVolume = 1 +SWEP.DistantShootSoundIndoorsVolume = 1 +SWEP.Hook_AddShootSound = ArcCW.UC.InnyOuty + +local miss = {common .. "punch-gun-miss-01.ogg", common .. "punch-gun-miss-02.ogg", common .. "punch-gun-miss-03.ogg", common .. "punch-gun-miss-04.ogg", common .. "punch-gun-miss-05.ogg", common .. "punch-gun-miss-06.ogg"} +local hitwall = {common .. "punch-gun-wall-01.ogg", common .. "punch-gun-wall-02.ogg", common .. "punch-gun-wall-03.ogg", common .. "punch-gun-wall-04.ogg", common .. "punch-gun-wall-05.ogg", common .. "punch-gun-wall-06.ogg"} +local hitplayer = {common .. "punch-gun-player-01.ogg", common .. "punch-gun-player-02.ogg", common .. "punch-gun-player-03.ogg", common .. "punch-gun-player-04.ogg", common .. "punch-gun-player-05.ogg", common .. "punch-gun-player-06.ogg"} +SWEP.MeleeMissSound = miss +SWEP.MeleeHitSound = hitwall +SWEP.MeleeHitNPCSound = hitplayer + +-- Bodygroups -- + +SWEP.BulletBones = { + [2] = "glock_bullet1" +} + +SWEP.AttachmentElements = { + ["ud_glock_skin_tan"] = { + VMSkin = 1, + }, + ["ud_glock_skin_olive"] = { + VMSkin = 2, + }, + ["ud_glock_skin_custom"] = { + VMSkin = 3, + }, + ["ud_glock_mag_10"] = { + VMBodygroups = {{ind = 1, bg = 1}}, + AttPosMods = { + [8] = { + vpos = Vector(0.1, 1, -1.2), + vang = Angle(90, 0, -90), + } + } + }, + ["ud_glock_frame_subcompact"] = { + VMBodygroups = {{ind = 0, bg = 2}}, + }, + ["ud_glock_frame_flared"] = { + VMBodygroups = {{ind = 0, bg = 1}}, + }, + ["ud_glock_mag_33"] = { + VMBodygroups = {{ind = 1, bg = 2}}, + }, + ["ud_glock_mag_100"] = { + VMBodygroups = {{ind = 1, bg = 3}}, + }, + + ["ud_glock_rail_optic"] = { + VMBodygroups = {{ind = 2, bg = 1}}, + }, + ["ud_glock_slide_comp"] = { + VMBodygroups = {{ind = 3, bg = 1}}, + NameChange = "GEN3 Custom", + TrueNameChange = "Glock 17 Custom", + Override_IronSightStruct = { + Pos = Vector(-2.283, 0, 2.506), + Ang = Angle(0.58, 0, 0), + Magnification = 1, + } + }, + ["ud_glock_slide_lb"] = { + VMBodygroups = {{ind = 3, bg = 2}}, + NameChange = "GEN3 Extended", + TrueNameChange = "Glock 17L", + AttPosMods = { + [5] = { + vpos = Vector(0, 0, 1.5), + vang = Angle(90, 0, -90), + } + } + }, + ["ud_glock_slide_auto"] = { + VMBodygroups = {{ind = 3, bg = 3}}, + NameChange = "GEN3 Auto", + TrueNameChange = "Glock 18C", + }, + ["ud_glock_slide_subcompact"] = { + VMBodygroups = {{ind = 3, bg = 8}}, + NameChange = "GEN3K", + TrueNameChange = "Glock 26", + AttPosMods = { + [5] = { + vpos = Vector(0, 0, -0.5), + vang = Angle(90, 0, -90), + } + } + }, + ["ud_glock_slide_cs"] = { + VMBodygroups = {{ind = 3, bg = 6}}, + NameChange = "GEN3 CS", + TrueNameChange = "Glock 18CS", + }, + ["ud_glock_slide_carbine"] = { + VMBodygroups = {{ind = 3, bg = 4}, {ind=4,bg=1}}, + NameChange = "GEN3 Euro Carbine", + TrueNameChange = "Glock 17XXXL", + AttPosMods = { + [5] = { + vpos = Vector(0, 0, 11.2), + vang = Angle(90, 0, -90), + } + } + }, + ["ud_glock_slide_sd"] = { + VMBodygroups = {{ind = 3, bg = 5}}, + NameChange = "GEN3 Silent Mistress", + TrueNameChange = "Glock 17SD", + GivesFlags = {"sd"}, + AttPosMods = { + [6] = { + vpos = Vector(0, 0.1, 5), + vang = Angle(90, 0, -90), + }, + [7] = { + vpos = Vector(0, 0.1, 5), + vang = Angle(90, 0, -90), + }, + } + }, + ["ud_glock_slide_nytesyte"] = { + VMBodygroups = {{ind = 3, bg = 7}}, + NameChange = "GEN3 Homeboy", + TrueNameChange = "Glock 17 NyteSyte", + AttPosMods = { + [1] = { + vpos = Vector(-0.5, 0.05, -0.5), + vang = Angle(90, 0, 0), + } + }, + Override_IronSightStruct = { + Pos = Vector(-2.65, 0, 3.18), + Ang = Angle(0, -0.5, -90), + Magnification = 1, + } + }, +} + +local desg_barr = { + ["ud_glock_slide_auto"] = 1, + ["ud_glock_slide_lb"] = 2, + ["ud_glock_slide_carbine"] = 3, + ["ud_glock_slide_comp"] = 4, + ["ud_glock_slide_cs"] = 5, + ["ud_glock_slide_sd"] = 6, + ["ud_glock_slide_nytesyte"] = 7, + ["ud_glock_slide_subcompact"] = 8, +} +local desg_cal = { + ["ud_glock_caliber_40sw"] = 1, + ["ud_glock_caliber_357sig"] = 2, + ["ud_glock_caliber_10auto"] = 3, + ["ud_glock_caliber_45acp"] = 4, + ["ud_glock_caliber_22lr"] = 5, + ["ud_glock_caliber_380acp"] = 6, + ["ud_glock_caliber_460"] = 7, + ["ud_glock_caliber_50gi"] = 8, +} + +SWEP.Hook_NameChange = function(wep,name) + barrel = desg_barr[wep.Attachments[2].Installed] or 0 + caliber = desg_cal[wep.Attachments[4].Installed] or 0 + trueNames = GetConVar("arccw_truenames"):GetBool() + + start = "" + mid = "" + suffix = "" + + if trueNames then + start = "Glock " + + if caliber == 0 then + if barrel == 1 then + mid = "18C" + elseif barrel == 2 then + mid = "17L" + elseif barrel == 5 then + mid = "18" + elseif barrel == 8 then + mid = "26" + else + mid = "17" + end + else + if caliber == 1 then + if barrel == 2 then + mid = "24" + elseif barrel == 8 then + mid = "27" + else + mid = "22" + end + elseif caliber == 2 then + if barrel == 8 then + mid = "33" + else + mid = "31" + end + elseif caliber == 3 then + if barrel == 2 then + mid = "40" + elseif barrel == 8 then + mid = "29" + else + mid = "20" + end + elseif caliber == 4 then + if barrel == 8 then + mid = "30" + else + mid = "21" + end + elseif caliber == 5 then + mid = "44" + elseif caliber == 6 then + if barrel == 8 then + mid = "28" + else + mid = "25" + end + elseif caliber == 7 then + if barrel == 8 then + mid = "30" + else + mid = "21" + end + elseif caliber == 8 then + if barrel == 8 then + mid = "30" + else + mid = "21" + end + end + end + else + start = "GEN" + + if caliber == 0 then + mid = "3" + elseif caliber == 1 then + mid = "5" + elseif caliber == 2 then + mid = "6" + elseif caliber == 3 then + mid = "8" + elseif caliber == 4 then + mid = "11" + elseif caliber == 5 then + mid = "22" + elseif caliber == 6 then + mid = "15" + end + + if barrel == 2 then + suffix = "L" + elseif barrel == 8 then + suffix = "K" + end + end + + if barrel == 1 and (caliber ~= 0 or !trueNames) then + suffix = " Auto" + elseif barrel == 2 and !trueNames then + suffix = "L" + elseif barrel == 3 then + if trueNames then + suffix = "XXXL" + else + suffix = " Euro Carbine" + end + elseif barrel == 4 then + suffix = " Custom" + elseif barrel == 5 then + suffix = "CS" + elseif barrel == 6 then + if trueNames then + suffix = " Hush Puppy" + else + suffix = " Silent Mistress" + end + elseif barrel == 7 then + if trueNames then + suffix = " NyteSyte" + else + suffix = " Homeboy" + end + end + + -- Todo: Subcompact variants when the barrel variant comes out + return start .. mid .. suffix +end + +-- Animations -- + +SWEP.Hook_Think = ArcCW.UC.ADSReload + +-- CHAN_ITEM doesn't sound too right +local ci = CHAN_AUTO +local ratel = {path .. "pistol_rattle_1.ogg", path .. "pistol_rattle_2.ogg", path .. "pistol_rattle_3.ogg"} +local rottle = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"} +local mech = {path .. "mech-01.ogg", path .. "mech-02.ogg", path .. "mech-03.ogg", path .. "mech-04.ogg", path .. "mech-05.ogg", path .. "mech-06.ogg"} + +SWEP.Animations = { + ["ready"] = { + Source = "fix", + Time = 53 / 30, + ShellEjectAt = false, + SoundTable = { + {s = path .. "draw.ogg", t = 0}, -- Not Temporary + {s = common .. "raise.ogg", t = 0.05}, + {s = ratel, t = 0}, + {s = path .. "slide_pull_new.ogg", t = 0.7, c = ci}, + {s = path .. "sliderel_deact.ogg", t = 0.7, c = ci}, + {s = path .. "slide_rel_new.ogg", t = 0.9, c = ci}, + }, + LHIK = true, + LHIKIn = 0.2, + LHIKEaseIn = 0.1, + LHIKEaseOut = 0.1, + LHIKOut = 0.2, + ProcDraw = true, + }, + ["idle"] = { + Source = "idle", + }, + ["idle_empty"] = { + Source = "idle_empty", + }, + ["draw"] = { + Source = "draw", + SoundTable = { + {s = path .. "draw.ogg", t = 0}, -- Not Temporary + {s = common .. "raise.ogg", t = 0.05}, + }, + MinProgress = 0.4 + }, + ["draw_empty"] = { + Source = "draw_empty", + Time = 12 / 30, + SoundTable = { + {s = path .. "draw.ogg", t = 0}, -- Not Temporary + {s = common .. "raise.ogg", t = 0.05}, + }, + MinProgress = 0.4 + }, + ["holster"] = { + Source = "holster", + LHIK = true, + LHIKIn = 0.4, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0, + LHIKOut = 0, + SoundTable = { + {s = common .. "cloth_2.ogg", t = 0}, + {s = path .. "holster.ogg", t = 0.2}, -- Not Temporary + }, + }, + ["holster_empty"] = { + Source = "holster_empty", + Time = 12 / 30, + LHIK = true, + LHIKIn = 0.4, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0, + LHIKOut = 0, + SoundTable = { + {s = common .. "cloth_2.ogg", t = 0}, + {s = path .. "holster.ogg", t = 0.2}, -- Not Temporary + }, + }, + ["bash"] = { + Source = "melee2", + Time = 35 / 30, + --SoundTable = {{ s = {path .. "mech-01.ogg", path .. "mech-02.ogg", path .. "mech-03.ogg", path .. "mech-04.ogg", path .. "mech-05.ogg", path .. "mech-06.ogg"}, t = 0, v = 0.5 }}, + }, + ["bash_empty"] = { + Source = "melee2_empty", + Time = 35 / 30, + --SoundTable = {{ s = {path .. "mech-01.ogg", path .. "mech-02.ogg", path .. "mech-03.ogg", path .. "mech-04.ogg", path .. "mech-05.ogg", path .. "mech-06.ogg"}, t = 0 }}, + }, + ["fire"] = { + Source = "fire", + Time = 16 / 30, + ShellEjectAt = 0.03, + SoundTable = { + { s = mech, t = 0, v = 0.5 } + }, + }, + ["fire_iron"] = { + Source = "fire", + Time = 16 / 30, + ShellEjectAt = 0.03, + SoundTable = { + { s = common .. "common_mech_light.ogg", t = 0, v = 0.5 }, + { s = mech, t = 0 } + }, + }, + ["fire_empty"] = { + Source = "fire_empty", + Time = 16 / 30, + ShellEjectAt = 0.03, + SoundTable = { + {s = path .. "mech_last.ogg", t = 0}, -- Not Temporary + }, + }, + ["fire_iron_empty"] = { + Source = "fire_empty", + Time = 16 / 30, + ShellEjectAt = 0.03, + SoundTable = { + {s = path .. "mech_last.ogg", t = 0}, -- Not Temporary + }, + }, + ["fire_stock"] = { + Source = "fire_stock", + Time = 16 / 30, + ShellEjectAt = 0.03, + SoundTable = { + { s = mech, t = 0, v = 0.5 } + }, + }, + ["fire_empty_stock"] = { + Source = "fire_empty_stock", + Time = 16 / 30, + ShellEjectAt = 0.03, + SoundTable = { + {s = path .. "mech_last.ogg", t = 0, c = ci}, -- Not Temporary + }, + }, + ["fire_cycle"] = { + Source = "fire_cycle", + Time = 16 / 30, + }, + + ["fix"] = { + Source = "fix", + Time = 53 / 30, + ShellEjectAt = false, + SoundTable = { + {s = rottle, t = 0, c = ci}, + {s = path .. "slide_pull_new.ogg", t = 0.7, c = ci}, + {s = path .. "sliderel_deact.ogg", t = 0.7, c = ci}, + {s = path .. "slide_rel_new.ogg", t = 0.9, c = ci}, + }, + LHIK = true, + LHIKIn = 0.2, + LHIKEaseIn = 0.1, + LHIKEaseOut = 0.1, + LHIKOut = 0.2, + }, + ["fix_empty"] = { + Source = "fix_empty", + Time = 50 / 30, + ShellEjectAt = false, + SoundTable = { + {s = path .. "magtap.ogg", t = 0.18, c = ci}, + {s = path .. "slide_pull_new.ogg", t = 0.5, c = ci}, + {s = path .. "sliderel_deact.ogg", t = 0.5, c = ci}, + }, + LHIK = true, + LHIKIn = 0.2, + LHIKEaseIn = 0.1, + LHIKEaseOut = 0.1, + LHIKOut = 0.2, + }, + -- ["fix_10"] = { + -- Source = "fix_10", + -- Time = 40 / 30, + -- ShellEjectAt = false, + -- SoundTable = { + -- {s = path .. "magtap.ogg", t = 0.18, c = ci}, + -- {s = path .. "slide_pull_new.ogg", t = 0.5, c = ci}, + -- {s = path .. "sliderel_deact.ogg", t = 0.5, c = ci}, + -- {s = path .. "slide_rel_new.ogg", t = 0.7, c = ci}, + -- }, + -- LHIK = true, + -- LHIKIn = 0.2, + -- LHIKEaseIn = 0.1, + -- LHIKEaseOut = 0.1, + -- LHIKOut = 0.2, + -- }, + -- ["fix_empty_10"] = { + -- Source = "fix_empty_10", + -- Time = 40 / 30, + -- ShellEjectAt = false, + -- SoundTable = { + -- {s = path .. "magtap.ogg", t = 0.18, c = ci}, + -- {s = path .. "slide_pull_new.ogg", t = 0.5, c = ci}, + -- {s = path .. "sliderel_deact.ogg", t = 0.5, c = ci}, + -- }, + -- LHIK = true, + -- LHIKIn = 0.2, + -- LHIKEaseIn = 0.1, + -- LHIKEaseOut = 0.1, + -- LHIKOut = 0.2, + -- }, + -- ["fix_33"] = { + -- Source = "fix_33", + -- Time = 40 / 30, + -- ShellEjectAt = false, + -- SoundTable = { + -- {s = path .. "magtap.ogg", t = 0.18, c = ci}, + -- {s = path .. "slide_pull_new.ogg", t = 0.5, c = ci}, + -- {s = path .. "sliderel_deact.ogg", t = 0.5, c = ci}, + -- {s = path .. "slide_rel_new.ogg", t = 0.7, c = ci}, + -- }, + -- LHIK = true, + -- LHIKIn = 0.2, + -- LHIKEaseIn = 0.1, + -- LHIKEaseOut = 0.1, + -- LHIKOut = 0.2, + -- }, + -- ["fix_empty_33"] = { + -- Source = "fix_empty_33", + -- Time = 40 / 30, + -- ShellEjectAt = false, + -- SoundTable = { + -- {s = path .. "magtap.ogg", t = 0.18, c = ci}, + -- {s = path .. "slide_pull_new.ogg", t = 0.5, c = ci}, + -- {s = path .. "sliderel_deact.ogg", t = 0.5, c = ci}, + -- }, + -- LHIK = true, + -- LHIKIn = 0.2, + -- LHIKEaseIn = 0.1, + -- LHIKEaseOut = 0.1, + -- LHIKOut = 0.2, + -- }, + -- ["fix_100"] = { + -- Source = "fix_100", + -- Time = 40 / 30, + -- ShellEjectAt = false, + -- SoundTable = { + -- {s = ratel, t = 0}, + -- {s = path .. "slide_pull_new.ogg", t = 0.4, c = ci}, + -- {s = path .. "sliderel_deact.ogg", t = 0.4, c = ci}, + -- {s = path .. "slide_rel_new.ogg", t = 0.6, c = ci}, + -- }, + -- LHIK = true, + -- LHIKIn = 0.2, + -- LHIKEaseIn = 0.1, + -- LHIKEaseOut = 0.1, + -- LHIKOut = 0.2, + -- }, + -- ["fix_empty_100"] = { + -- Source = "cycle_empty", + -- Time = 40 / 30, + -- ShellEjectAt = false, + -- SoundTable = { + -- {s = ratel, t = 0}, + -- {s = path .. "sliderel_deact.ogg", t = 0.5, c = ci}, + -- {s = path .. "slide_pull_new.ogg", t = 0.5, c = ci}, + -- }, + -- LHIK = true, + -- LHIKIn = 0.2, + -- LHIKEaseIn = 0.1, + -- LHIKEaseOut = 0.1, + -- LHIKOut = 0.2, + -- }, + + ["cycle"] = { + Source = "cycle", + Time = 36 / 30, + MinProgress = 0.75, + ShellEjectAt = 0.4, + SoundTable = { + {s = rottle, t = 0, v = 50}, + {s = path .. "slide_pull_new.ogg", t = 0.18, c = ci, v = 50}, + {s = path .. "sliderel_deact.ogg", t = 0.18, c = ci, v = 50}, + {s = path .. "slide_rel_new.ogg", t = 0.3, c = ci, v = 50}, + }, + LHIK = true, + LHIKIn = 0.2, + LHIKEaseIn = 0.1, + LHIKEaseOut = 0.1, + LHIKOut = 0.2, + }, + ["cycle_empty"] = { + Source = "cycle_empty", + Time = 36 / 30, + ShellEjectAt = 0.4, + SoundTable = { + {s = rottle, t = 0, v = 50}, + {s = path .. "slide_pull_new.ogg", t = 0.18, c = ci, v = 50}, + {s = path .. "slide_lock.ogg", t = 0.4, c = ci, v = 50}, + }, + LHIK = true, + LHIKIn = 0.2, + LHIKEaseIn = 0.1, + LHIKEaseOut = 0.1, + LHIKOut = 0.2, + }, + + -- 17 Round Reloads -- + + ["reload"] = { + Source = "reload", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_PISTOL, + Time = 66 / 30, + MinProgress = 1.1, + LastClip1OutTime = 0.9, + LHIK = true, + LHIKIn = 0.2, + LHIKEaseIn = 0.2, + LHIKEaseOut = 0.15, + LHIKOut = 0.3, + SoundTable = { + {s = rottle, t = 0}, + {s = common .. "magpouch_pull_small.ogg", t = 0.1, v = 0.5}, + {s = path .. "magout_partial_start.ogg", t = 0.2, c = ci}, + {s = ratel, t = 0.37}, + {s = path .. "magout_partial.ogg", t = 0.5, c = ci}, + {s = ratel, t = 0.4}, + {s = path .. "magin_new.ogg", t = 0.65, c = ci}, + {s = rottle, t = 0.9, v = 0.6}, + {s = rottle, t = 1.2}, + {s = common .. "magpouch_replace_small.ogg", t = 1.375}, + {s = ratel, t = 1.6}, + {s = path .. "grab.ogg", t = 1.8, c = ci}, + }, + }, + ["reload_empty"] = { + Source = "reload_empty", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_PISTOL, + Time = 75 / 30, + MinProgress = 1.5, + LastClip1OutTime = 0.7, + LHIK = true, + LHIKIn = 0.2, + LHIKEaseIn = 0.2, + LHIKEaseOut = 0.15, + LHIKOut = 0.3, + SoundTable = { + {s = ratel, t = 0}, + {s = rottle, t = 0.1}, + {s = path .. "magout_empty.ogg", t = 0.13, c = ci}, + {s = common .. "magpouch_pull_small.ogg", t = 0.35}, + {s = rottle, t = 0.36, v = 0.6}, + {s = path .. "magin_new.ogg", t = 0.6, v = 1.5}, + {s = ratel, t = 0.5}, + {s = common .. "pistol_magdrop.ogg", t = 0.65}, + {s = rottle, t = 1.15, v = 0.6}, + {s = ratel, t = 1.55}, + {s = path .. "chamber.ogg", t = 1.55}, + {s = rottle, t = 1.6, v = 0.6}, + {s = ratel, t = 1.7}, + {s = path .. "grab.ogg", t = 1.95, c = ci}, + }, + }, + ["reload_empty_fesiug"] = { + Source = "reload_empty_fesiug", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_PISTOL, + Time = 78 / 30, + MinProgress = 1.5, + LastClip1OutTime = 0.7, + LHIK = true, + LHIKIn = 0.2, + LHIKEaseIn = 0.2, + LHIKEaseOut = 0.15, + LHIKOut = 0.3, + SoundTable = { + {s = ratel, t = 0}, + {s = path .. "magout_empty.ogg", t = 0.13, c = ci}, + {s = common .. "magpouch_pull_small.ogg", t = 0.35}, + {s = path .. "magin_new.ogg", t = 0.55, c = ci}, + {s = ratel, t = 0.5}, + {s = common .. "pistol_magdrop.ogg", t = 0.65}, + {s = ratel, t = 1.2}, + {s = path .. "sliderel_deact.ogg", t = 1.62, c = ci}, + {s = path .. "chamber.ogg", t = 1.85, v = 1.5}, + {s = rottle, t = 1.9}, + }, + }, + + -- 10 Round Reloads -- + + ["reload_10"] = { + Source = "reload_10", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_PISTOL, + Time = 65 / 30, + MinProgress = 1.1, + LastClip1OutTime = 0.9, + LHIK = true, + LHIKIn = 0.2, + LHIKEaseIn = 0.2, + LHIKEaseOut = 0.15, + LHIKOut = 0.3, + SoundTable = { + {s = ratel, t = 0}, + {s = common .. "magpouch_pull_small.ogg", t = 0.025, c = ci}, + {s = ratel, t = 0.3}, + {s = path .. "magrelease.ogg", t = 0.31, c = ci}, + {s = path .. "magout_partial.ogg", t = 0.47, c = ci}, + {s = path .. "magin_new.ogg", t = 0.53, v = 1.5}, + {s = common .. "magpouch_replace_small.ogg", t = 1.2}, + {s = rottle, t = 0.65}, + {s = path .. "grab.ogg", t = 1.78, c = ci}, + }, + }, + ["reload_empty_10"] = { + Source = "reload_empty_10", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_PISTOL, + Time = 74 / 30, + MinProgress = 1.5, + LastClip1OutTime = 0.7, + LHIK = true, + LHIKIn = 0.2, + LHIKEaseIn = 0.2, + LHIKEaseOut = 0.15, + LHIKOut = 0.3, + SoundTable = { + {s = ratel, t = 0}, + {s = path .. "magrelease.ogg", t = 0.15, c = ci}, + {s = path .. "magout_empty.ogg", t = 0.1, c = ci}, + {s = common .. "magpouch_pull_small.ogg", t = 0.3, c = ci}, + {s = path .. "magin_new.ogg", t = 0.47, c = ci}, + {s = ratel, t = 0.5}, + {s = common .. "pistol_magdrop.ogg", t = 0.65}, + {s = rottle, t = 0.9}, + {s = path .. "chamber.ogg", t = 1.45, c = ci}, + {s = path .. "grab.ogg", t = 1.89, c = ci}, + }, + }, + + -- 33 Round Reloads -- + + ["reload_33"] = { + Source = "reload_33", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_PISTOL, + Time = 66 / 30, + MinProgress = 1.1, + LastClip1OutTime = 0.9, + LHIK = true, + LHIKIn = 0.2, + LHIKEaseIn = 0.2, + LHIKEaseOut = 0.15, + LHIKOut = 0.3, + SoundTable = { + {s = ratel, t = 0}, + {s = common .. "magpouch.ogg", t = 0.05}, + {s = path .. "magrelease.ogg", t = 0.17, c = ci}, + {s = ratel, t = 0.3}, + {s = path .. "magout_partial.ogg", t = 0.49, c = ci}, + {s = path .. "magin_new.ogg", t = 0.6}, + {s = rottle, t = 0.75}, + {s = common .. "magpouchin.ogg", t = 1.25, v = .35}, + {s = path .. "grab.ogg", t = 1.8, c = ci}, + }, + }, + ["reload_empty_33"] = { + Source = "reload_empty_33", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_PISTOL, + Time = 76 / 30, + MinProgress = 1.5, + LastClip1OutTime = 0.7, + LHIK = true, + LHIKIn = 0.2, + LHIKEaseIn = 0.2, + LHIKEaseOut = 0.15, + LHIKOut = 0.3, + SoundTable = { + {s = ratel, t = 0}, + {s = path .. "magrelease.ogg", t = 0.15, c = ci}, + {s = path .. "magout_empty.ogg", t = 0.16, c = ci}, + {s = common .. "magpouch.ogg", t = 0.35, c = ci}, + {s = ratel, t = 0.5}, + {s = path .. "magin_new.ogg", t = 0.65, c = ci}, + {s = common .. "pistol_magdrop.ogg", t = 0.66}, + {s = rottle, t = 1.3}, + {s = path .. "chamber.ogg", t = 1.52, c = ci}, + {s = path .. "grab.ogg", t = 1.9, c = ci}, + }, + }, + + -- 100 Round Reloads -- + + ["reload_100"] = { + Source = "reload_100", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_PISTOL, + Time = 56 / 30, + MinProgress = 1.3, + LastClip1OutTime = 0.9, + LHIK = true, + LHIKIn = 0.2, + LHIKEaseIn = 0.2, + LHIKEaseOut = 0.15, + LHIKOut = 0.3, + SoundTable = { + {s = ratel, t = 0}, + {s = path .. "magrelease.ogg", t = 0.1, c = ci}, + {s = path .. "magout.ogg", t = 0.2, c = ci}, + {s = rottle, t = 0.25}, + {s = common .. "magpouch.ogg", t = 0.5, c = ci}, + {s = path .. "magin.ogg", t = 0.6, c = ci}, + {s = ratel, t = 0.7}, + {s = path .. "magtap.ogg", t = 1.1, c = ci}, + {s = rottle, t = 1.2}, + {s = path .. "grab.ogg", t = 1.4, c = ci}, + }, + }, + ["reload_empty_100"] = { + Source = "reload_empty_100", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_PISTOL, + Time = 66 / 30, + MinProgress = 1.75, + LastClip1OutTime = 0.7, + LHIK = true, + LHIKIn = 0.2, + LHIKEaseIn = 0.2, + LHIKEaseOut = 0.15, + LHIKOut = 0.3, + SoundTable = { + {s = ratel, t = 0}, + {s = path .. "magrelease.ogg", t = 0.12, c = ci}, + {s = path .. "magout.ogg", t = 0.12, c = ci}, + {s = path .. "magin.ogg", t = 0.5, c = ci}, + {s = common .. "magdrop.ogg", t = 0.55}, + {s = ratel, t = 0.7}, + {s = path .. "magtap.ogg", t = 1.1, c = ci}, + {s = path .. "sliderel_deact.ogg", t = 1.33, c = ci}, + {s = path .. "chamber.ogg", t = 1.525, c = ci}, + {s = rottle, t = 1.6}, + }, + }, +} + +SWEP.AutosolveSourceSeq = "idle" + +SWEP.Hook_TranslateAnimation = function(wep, anim) + if wep.Attachments[9].Installed and (anim == "fire" or anim == "fire_empty") then + return anim .. "_stock" + end +end + +SWEP.Attachments = { + { + PrintName = "Optic", + DefaultAttName = "Iron Sights", + Slot = {"optic_lp"}, + Bone = "glock_slide", + Offset = { + vpos = Vector(-0.0125, -0.4, -0.2), + vang = Angle(90, 0, -88), + }, + CorrectivePos = Vector(0, 0, 0.02), + VMScale = Vector(.9, .9, .9), + WMScale = VMScale, + --WMScale = Vector(1.25, 1.25, 1.25), + --InstalledEles = {"ud_glock_rail_optic"}, + }, + { + PrintName = "Slide", + DefaultAttName = "Standard Slide", + DefaultAttIcon = Material("entities/att/acwatt_ud_glock_slide.png", "smooth mips"), + Slot = "ud_glock_slide", + Bone = "glock_flash", + Offset = { + vpos = Vector(2.4, -0.2, -29.2), -- Op. CS slide + vang = Angle(90, 3, -90), + }, + }, + { + PrintName = "Frame", + DefaultAttName = "Standard Frame", + DefaultAttIcon = Material("entities/att/acwatt_ud_glock_frame.png", "smooth mips"), + Slot = "ud_glock_frame", + }, + { + PrintName = "Caliber", + DefaultAttName = "9x19mm Parabellum", + DefaultAttIcon = Material("entities/att/uc_bullets/9x19.png", "smooth mips"), + Slot = "ud_glock_caliber", + }, + { + PrintName = "Muzzle", + DefaultAttName = "Standard Muzzle", + Slot = {"muzzle", "ud_glock_muzzle"}, + Bone = "glock_flash", + Offset = { + vpos = Vector(0, 0, -0.5), + vang = Angle(90, 0, -90), + }, + ExcludeFlags = {"sd"}, + VMScale = Vector(0.8, 0.8, 0.8) + }, + { + PrintName = "Tactical", + Slot = {"tac_pistol", "uce_pistol_foregrip"}, + Bone = "glock_parent", + Offset = { + vpos = Vector(0, -1.3, 5), + vang = Angle(90, 0, -90), + }, + MergeSlots = {7}, + ExcludeFlags = {"ud_glock_slide_subcompact"} + }, + { + Hidden = true, + PrintName = "Tactical", + Slot = {"tac_pistol"}, + Bone = "glock_parent", + Offset = { + vpos = Vector(0, -1.3, 5), + vang = Angle(90, 0, -90), + }, -- This slot is obsolete and exists solely for compatiblity with old loadouts. Do not remove. + }, + { + PrintName = "Magazine", + Slot = {"ud_glock_mag"}, + DefaultAttIcon = Material("entities/att/acwatt_ud_glock_mag_17.png", "smooth mips"), + DefaultAttName = "17-Round Mag", + }, + { + PrintName = "Stock", + Slot = {"uc_stock", "go_stock_pistol_bt"}, + DefaultAttName = "No Stock", + Bone = "glock_parent", + Offset = { + vpos = Vector(0.1, 2.9, -2.1), + vang = Angle(90, 0, -90), + }, + ExcludeFlags = {"ud_glock_frame_subcompact"} + }, + { + PrintName = "Ammo Type", + DefaultAttName = "\"FMJ\" Full Metal Jacket", + DefaultAttIcon = Material("entities/att/arccw_uc_ammo_generic.png", "mips smooth"), + Slot = "uc_ammo", + }, + { + PrintName = "Powder Load", + Slot = "uc_powder", + DefaultAttName = "Standard Load" + }, + { + PrintName = "Training Package", + Slot = "uc_tp", + DefaultAttName = "Basic Training" + }, + { + PrintName = "Internals", + Slot = "uc_fg", -- Fire group + DefaultAttName = "Standard Internals" + }, + { + PrintName = "Charm", + Slot = {"charm", "fml_charm"}, + FreeSlot = true, + Bone = "glock_slide", + Offset = { + vpos = Vector(0.45, 0.1, 4), + vang = Angle(90, 0, -90), + }, + VMScale = Vector(0.8, 0.8, 0.8), + }, + { + PrintName = "Material", + DefaultAttName = "Black Polymer", + DefaultAttIcon = Material("entities/att/acwatt_ud_glock_material.png", "smooth mips"), + Slot = "ud_glock_skin", + FreeSlot = true, + }, +} \ No newline at end of file diff --git a/lua/weapons/arccw_ud_m1014.lua b/lua/weapons/arccw_ud_m1014.lua new file mode 100644 index 0000000..e152298 --- /dev/null +++ b/lua/weapons/arccw_ud_m1014.lua @@ -0,0 +1,776 @@ +SWEP.Base = "arccw_base" +SWEP.Spawnable = true +SWEP.Category = "ArcCW - Urban Coalition" +SWEP.UC_CategoryPack = "1Urban Decay" +SWEP.AdminOnly = false +SWEP.UseHands = true + +-- Muzzle and shell effects -- + +SWEP.MuzzleEffect = "muzzleflash_shotgun" +SWEP.ShellEffect = "arccw_uc_shelleffect" +SWEP.ShellModel = "models/weapons/arccw/uc_shells/12g.mdl" +SWEP.ShellPitch = 100 +SWEP.ShellSounds = ArcCW.ShotgunShellSoundsTable +SWEP.ShellScale = 0.5 +SWEP.UC_ShellColor = Color(0.7*255, 0.2*255, 0.2*255) + +SWEP.MuzzleEffectAttachment = 1 +SWEP.CaseEffectAttachment = 2 +SWEP.CamAttachment = 3 + +-- Fake name -- + +SWEP.PrintName = "FC1040" + +-- True name -- + +SWEP.TrueName = "Benelli M4" + +-- Trivia -- + +SWEP.Trivia_Class = "Shotgun" +SWEP.Trivia_Desc = [[Semi-automatic shotgun designed for close-quarters urban warfare. Uses an innovative short-stroke gas system that eliminates complex mechanisms found on most gas-operated automatic weapons. Its main use is in destroying locked doors. + +Devastating damage output, but control is required to avoid spending more time reloading than fighting.]] +SWEP.Trivia_Manufacturer = "Iscapelli Armaments" +SWEP.Trivia_Calibre = "12 Gauge" +SWEP.Trivia_Mechanism = "Gas-Operated Rotating Bolt" +SWEP.Trivia_Country = "Italy" +SWEP.Trivia_Year = 1998 + +-- Weapon slot -- + +SWEP.Slot = 3 + +-- Weapon's manufacturer real name -- + +if GetConVar("arccw_truenames"):GetBool() then + SWEP.PrintName = SWEP.TrueName + SWEP.Trivia_Manufacturer = "Benelli Armi SpA" +end + +-- Viewmodel / Worldmodel / FOV -- + +SWEP.ViewModel = "models/weapons/arccw/c_ud_m1014.mdl" +SWEP.WorldModel = "models/weapons/arccw/c_ud_m1014.mdl" +SWEP.ViewModelFOV = 60 +SWEP.AnimShoot = ACT_HL2MP_GESTURE_RANGE_ATTACK_SHOTGUN + +SWEP.MirrorVMWM = true +SWEP.WorldModelOffset = { + pos = Vector(-4, 4, -4.5), + ang = Angle(-12, 0, 180), + bone = "ValveBiped.Bip01_R_Hand", + scale = 1 +} +SWEP.DefaultPoseParams = {["grip"] = 0} + +-- Damage parameters -- + + +SWEP.Damage = ArcCW.UC.StdDmg["12g_s"].max +SWEP.DamageMin = ArcCW.UC.StdDmg["12g_s"].min +SWEP.Penetration = ArcCW.UC.StdDmg["12g_s"].pen +SWEP.Num = ArcCW.UC.StdDmg["12g_s"].num + +SWEP.Range = 40 +SWEP.RangeMin = 4 +SWEP.DamageType = DMG_BUCKSHOT +SWEP.ShootEntity = nil +SWEP.MuzzleVelocity = 365 +SWEP.PhysBulletMuzzleVelocity = 365 + +SWEP.HullSize = 0.25 + +SWEP.BodyDamageMults = ArcCW.UC.BodyDamageMults_Shotgun + +-- Jamming -- + +SWEP.Malfunction = true +SWEP.MalfunctionJam = true +SWEP.MalfunctionPostFire = true +SWEP.MalfunctionTakeRound = false + +-- Mag size -- + +SWEP.ChamberSize = 2 +SWEP.Primary.ClipSize = 4 +SWEP.ExtendedClipSize = 7 +SWEP.ReducedClipSize = 2 + +SWEP.ChamberLoadNonEmpty = 2 +SWEP.ChamberLoadEmpty = 1 + +-- Recoil -- + +SWEP.Recoil = 2.89 +SWEP.RecoilSide = 2 + +SWEP.RecoilRise = 0.24 +SWEP.VisualRecoilMult = 1 +SWEP.MaxRecoilBlowback = 1 +SWEP.MaxRecoilPunch = 1 + +SWEP.Sway = 0.5 + +-- Firerate / Firemodes -- + +SWEP.Delay = 60 / 220 +SWEP.Firemodes = { + { + Mode = 1, + }, + { + Mode = 0 + } +} + +SWEP.ShotgunReload = true + +SWEP.ShootVol = 160 +SWEP.ShootPitch = 100 + +SWEP.ProceduralRegularFire = false +SWEP.ProceduralIronFire = false + +SWEP.ReloadInSights = true + +-- NPC -- + +SWEP.NPCWeaponType = "weapon_shotgun" +SWEP.NPCWeight = 210 + +-- Accuracy -- + +SWEP.AccuracyMOA = 30 +SWEP.HipDispersion = 400 +SWEP.MoveDispersion = 100 +SWEP.JumpDispersion = 1000 + +SWEP.Primary.Ammo = "buckshot" + +-- Speed multipliers -- + +SWEP.SpeedMult = 0.92 +SWEP.SightedSpeedMult = 0.6 +SWEP.SightTime = 0.4 +SWEP.ShootSpeedMult = 0.75 + +-- Length -- + +SWEP.BarrelLength = 48 +SWEP.ExtraSightDist = 2 + +-- Ironsights / Customization / Poses -- + +SWEP.HoldtypeHolstered = "passive" +SWEP.HoldtypeActive = "ar2" +SWEP.HoldtypeSights = "rpg" + +SWEP.IronSightStruct = { + Pos = Vector(-2.73, -2, 1.1), + Ang = Angle(.25, 0.01, 0), + Magnification = 1.1, + SwitchToSound = "", +} + +SWEP.HolsterPos = Vector(2, 0, -3) +SWEP.HolsterAng = Angle(-5.5, 20, -20) + +SWEP.SprintPos = Vector(-0.5, -4, -3) +SWEP.SprintAng = Angle(3.5, 7, -20) + +SWEP.ActivePos = Vector(-0.1, -0.5, 0.75) +SWEP.ActiveAng = Angle(0, 0, -0) + +SWEP.CrouchPos = Vector(-4, -2, 0) +SWEP.CrouchAng = Angle(0, 0, -30) + +SWEP.BarrelOffsetSighted = Vector(0, 0, -1) +SWEP.BarrelOffsetHip = Vector(3, 0, -4.5) + +-- Firing sounds -- + +local path2 = ")weapons/arccw_ud/m16/" +local path1 = ")weapons/arccw_ud/870/" +local path = ")weapons/arccw_ud/m1014/" +local common = ")/arccw_uc/common/" +SWEP.ShootSound = { + path1 .. "fire-01.ogg", + path1 .. "fire-02.ogg", + path1 .. "fire-03.ogg", + path1 .. "fire-04.ogg", + path1 .. "fire-05.ogg", + path1 .. "fire-06.ogg" +} +SWEP.ShootSoundSilenced = { + path1 .. "fire-sup-01.ogg", + path1 .. "fire-sup-02.ogg", + path1 .. "fire-sup-03.ogg", + path1 .. "fire-sup-04.ogg", + path1 .. "fire-sup-05.ogg", + path1 .. "fire-sup-06.ogg" +} +--[[SWEP.DistantShootSound = path .. "fire_dist.ogg" +SWEP.DistantShootSoundSilenced = common .. "sup_tail.ogg"]] +SWEP.ShootDrySound = path .. "dryfire.ogg" + +local tail = ")/arccw_uc/common/12ga/" + +SWEP.DistantShootSoundOutdoors = { + tail .. "fire-dist-12ga-pasg-ext-01.ogg", + tail .. "fire-dist-12ga-pasg-ext-02.ogg", + tail .. "fire-dist-12ga-pasg-ext-03.ogg", + tail .. "fire-dist-12ga-pasg-ext-04.ogg", + tail .. "fire-dist-12ga-pasg-ext-05.ogg", + tail .. "fire-dist-12ga-pasg-ext-06.ogg" +} +SWEP.DistantShootSoundIndoors = { + tail .. "fire-dist-12ga-pasg-int-01.ogg", + tail .. "fire-dist-12ga-pasg-int-02.ogg", + tail .. "fire-dist-12ga-pasg-int-03.ogg", + tail .. "fire-dist-12ga-pasg-int-04.ogg", + tail .. "fire-dist-12ga-pasg-int-05.ogg", + tail .. "fire-dist-12ga-pasg-int-06.ogg" +} +SWEP.DistantShootSoundOutdoorsSilenced = { + common .. "sup-tail-01.ogg", + common .. "sup-tail-02.ogg", + common .. "sup-tail-03.ogg", + common .. "sup-tail-04.ogg", + common .. "sup-tail-05.ogg", + common .. "sup-tail-06.ogg", + common .. "sup-tail-07.ogg", + common .. "sup-tail-08.ogg", + common .. "sup-tail-09.ogg", + common .. "sup-tail-10.ogg" +} +SWEP.DistantShootSoundIndoorsSilenced = { + common .. "fire-dist-int-pistol-light-01.ogg", + common .. "fire-dist-int-pistol-light-02.ogg", + common .. "fire-dist-int-pistol-light-03.ogg", + common .. "fire-dist-int-pistol-light-04.ogg", + common .. "fire-dist-int-pistol-light-05.ogg", + common .. "fire-dist-int-pistol-light-06.ogg" +} +SWEP.DistantShootSoundOutdoorsVolume = 1 +SWEP.DistantShootSoundIndoorsVolume = 2.0 +SWEP.Hook_AddShootSound = ArcCW.UC.InnyOuty + +local rottle = {common .. "cloth_1.ogg", common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"} +local ratel = {common .. "rattle1.ogg", common .. "rattle2.ogg", common .. "rattle3.ogg"} + +-- Animations -- + +SWEP.Hook_Think = ArcCW.UC.ADSReload + +local shellin = {path .. "shell-insert-01.ogg", path .. "shell-insert-02.ogg", path .. "shell-insert-03.ogg"} + +SWEP.Animations = { + ["idle"] = { + Source = "idle", + }, + ["idle_empty"] = { + Source = "idle_empty", + }, + ["idle_jammed"] = { + Source = "idle_jammed", + }, + ["ready"] = { + Source = "equip", + Time = 60 / 30, + SoundTable = { + {s = rottle, t = 0.35}, + {s = path .. "chback.ogg", t = 0.35}, + {s = path .. "chamber.ogg", t = 0.6}, + {s = rottle, t = 0.75}, + }, + }, + ["draw"] = { + Source = "draw", + Time = 30 / 30, + SoundTable = ArcCW.UC.DrawSounds, + }, + ["draw_empty"] = { + Source = "draw_empty", + Time = 30 / 30, + SoundTable = ArcCW.UC.DrawSounds, + }, + ["draw_jammed"] = { + Source = "draw_jammed", + Time = 30 / 30, + SoundTable = ArcCW.UC.DrawSounds, + }, + ["holster"] = { + Source = "holster", + Time = 20 / 30, + SoundTable = ArcCW.UC.HolsterSounds, + }, + ["holster_empty"] = { + Source = "holster_empty", + Time = 20 / 30, + SoundTable = ArcCW.UC.HolsterSounds, + }, + ["holster_jammed"] = { + Source = "holster_jammed", + Time = 20 / 30, + SoundTable = ArcCW.UC.HolsterSounds, + }, + ["fire"] = { + Source = "fire", + Time = 16 / 25,--30, + ShellEjectAt = 0.01, + SoundTable = { + {s = path .. "mech-01.ogg", path .. "mech-02.ogg", path .. "mech-03.ogg", path .. "mech-04.ogg", path .. "mech-05.ogg", path .. "mech-06.ogg", t = 0, v = 0.45}, -- Not temporary + {s = path1 .. "eject.ogg", t = 0.01}, -- Not temporary + }, + }, + ["fire_iron"] = { + Source = "fire", + Time = 18 / 25,--30, + ShellEjectAt = 0.01, + SoundTable = { + {s = common .. "common_mech_heavy.ogg", t = 0}, + { s = {path .. "mech-01.ogg", path .. "mech-02.ogg", path .. "mech-03.ogg", path .. "mech-04.ogg", path .. "mech-05.ogg", path .. "mech-06.ogg"}, t = 0 }, + {s = path1 .. "eject.ogg", t = 0.01}, -- Not temporary + }, + }, + ["fire_empty"] = { + Source = "fire_empty", + Time = 18 / 25,--30, + ShellEjectAt = 0.01, + SoundTable = { + {s = path .. "mech_last.ogg", t = 0}, -- Not temporary + {s = path1 .. "eject.ogg", t = 0.01}, -- Not temporary + }, + }, + ["fire_iron_empty"] = { + Source = "fire_empty", + Time = 20 / 25,--30, + ShellEjectAt = 0.01, + SoundTable = { + {s = path .. "mech_last.ogg", t = 0}, -- Not temporary + {s = path1 .. "eject.ogg", t = 0.01}, -- Not temporary + }, + }, + ["fire_jammed"] = { + Source = "fire_jam", + Time = 23 / 25,--30, + ShellEjectAt = false, + SoundTable = { + {s = path .. "mech-01.ogg", path .. "mech-02.ogg", path .. "mech-03.ogg", path .. "mech-04.ogg", path .. "mech-05.ogg", path .. "mech-06.ogg", t = 0}, -- Not temporary + --{s = path1 .. "eject.ogg", t = 0}, -- Not temporary + }, + }, + ["unjam"] = { + Source = "jam_fix", + Time = 60 / 30, + ShellEjectAt = 0.9, + LHIK = false, + SoundTable = { + {s = rottle, t = 0}, + {s = path2 .. "grab.ogg", t = 0.1}, + {s = path .. "chback.ogg", t = 0.7}, + {s = path1 .. "eject.ogg", t = 0.8, v = 0.4}, + {s = path .. "chamber.ogg", t = 0.9}, + {s = rottle, t = 1.2}, + }, + }, + ["unjam_empty"] = { + Source = "jam_fix_empty", + Time = 60 / 30, + ShellEjectAt = 1.1, + LHIK = false, + SoundTable = { + {s = rottle, t = 0}, + {s = path2 .. "grab.ogg", t = .4}, + {s = path .. "chback.ogg", t = 0.8}, + {s = path1 .. "eject.ogg", t = 1.1}, + {s = rottle, t = 1.2}, + }, + }, + ["sgreload_start"] = { + Source = "sgreload_start", + Time = 16 / 30, + TPAnim = ACT_HL2MP_GESTURE_RELOAD_SHOTGUN, + LHIK = false, + //LHIKIn = 0.2, + //LHIKEaseIn = 0.2, + //LHIKOut = 0, + }, + ["sgreload_start_empty"] = { + Source = "sgreload_start_empty", + Time = 40 / 30, + MinProgress = 1, + LHIK = false, + //LHIKIn = 0.2, + //LHIKOut = 0, + TPAnimStartTime = 0.5, + TPAnim = ACT_HL2MP_GESTURE_RELOAD_SHOTGUN, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0}, + {s = path .. "breechload.ogg", t = 0.25}, + {s = path .. "breechclose.ogg", t = 0.9}, + }, + ForceEmpty = true, + }, + ["sgreload_insert"] = { + Source = "sgreload_insert", + Time = 18 / 30, + MinProgress = 0.24, + TPAnim = ACT_HL2MP_GESTURE_RELOAD_SHOTGUN, + TPAnimStartTime = 0.3, + LHIK = false, + //LHIKIn = 0, + //LHIKOut = 0, + SoundTable = { + {s = shellin, t = 0}, + {s = rottle, t = 0.05, v = 0.5}, + }, + }, + ["sgreload_finish"] = { + Source = "sgreload_finish", + Time = 30 / 30, + LHIK = false, + //LHIKIn = 0, + //LHIKEaseOut = 0.3, + //LHIKOut = 0.6, + TPAnim = ACT_HL2MP_GESTURE_RELOAD_SHOTGUN, + TPAnimStartTime = 0.8, + SoundTable = { + {s = rottle, t = 0, v = 0.5}, + {s = common .. "shoulder.ogg", t = 0.3}, + }, + }, + + -- stock animla below + + ["idle_stock"] = { + Source = "idle_stock", + }, + ["idle_empty_stock"] = { + Source = "idle_empty_stock", + }, + ["idle_jammed_stock"] = { + Source = "idle_jammed_stock", + }, + ["draw_stock"] = { + Source = "draw_stock", + Time = 20 / 30, + SoundTable = ArcCW.UC.DrawSounds, + }, + ["draw_empty_stock"] = { + Source = "draw_empty_stock", + Time = 20 / 30, + SoundTable = ArcCW.UC.DrawSounds, + }, + ["draw_jammed_stock"] = { + Source = "draw_jammed_stock", + Time = 20 / 30, + SoundTable = ArcCW.UC.DrawSounds, + }, + ["holster_stock"] = { + Source = "holster_stock", + Time = 20 / 30, + SoundTable = ArcCW.UC.HolsterSounds, + }, + ["holster_empty_stock"] = { + Source = "holster_empty_stock", + Time = 20 / 30, + SoundTable = ArcCW.UC.HolsterSounds, + }, + ["holster_jammed_stock"] = { + Source = "holster_jammed_stock", + Time = 20 / 30, + SoundTable = ArcCW.UC.HolsterSounds, + }, + ["fire_stock"] = { + Source = "fire_stock", + Time = 23 / 25,--30, + ShellEjectAt = 0.01, + SoundTable = { + {s = path .. "mech-01.ogg", path .. "mech-02.ogg", path .. "mech-03.ogg", path .. "mech-04.ogg", path .. "mech-05.ogg", path .. "mech-06.ogg", t = 0}, -- Not temporary + {s = path1 .. "eject.ogg", t = 0.01}, -- Not temporary + }, + }, + ["fire_empty_stock"] = { + Source = "fire_empty_stock", + Time = 23 / 25,--30, + ShellEjectAt = 0.01, + SoundTable = { + {s = path .. "mech_last.ogg", t = 0}, -- Not temporary + {s = path1 .. "eject.ogg", t = 0.01}, -- Not temporary + }, + }, + ["fire_jammed_stock"] = { + Source = "fire_jam_stock", + Time = 23 / 25,--30, + ShellEjectAt = false, + SoundTable = { + {s = path .. "mech_last.ogg", t = 0}, -- Not temporary + --{s = path1 .. "eject.ogg", t = 0}, -- Not temporary + }, + }, + ["unjam_stock"] = { + Source = "jam_fix_stock", + Time = 60 / 30, + ShellEjectAt = 1.1, + LHIK = false, + SoundTable = { + {s = rottle, t = 0}, + {s = path2 .. "grab.ogg", t = .4}, + {s = path .. "chback.ogg", t = 0.8}, + {s = path1 .. "eject.ogg", t = 1.1}, + {s = path .. "breechclose.ogg", t = 0.9}, + {s = rottle, t = 1.2}, + }, + }, + ["unjam_empty_stock"] = { + Source = "jam_fix_empty_stock", + Time = 60 / 30, + ShellEjectAt = 1.1, + LHIK = false, + SoundTable = { + {s = rottle, t = 0}, + {s = path2 .. "grab.ogg", t = .4}, + {s = path .. "chback.ogg", t = 0.8}, + {s = path1 .. "eject.ogg", t = 1.1}, + --{s = path .. "breechclose.ogg", t = 1.2}, + {s = rottle, t = 1.2}, + }, + }, + ["sgreload_start_stock"] = { + Source = "sgreload_start_stock", + Time = 16 / 30, + TPAnim = ACT_HL2MP_GESTURE_RELOAD_SHOTGUN, + LHIK = false, + //LHIKIn = 0.2, + //LHIKEaseIn = 0.2, + //LHIKOut = 0, + }, + ["sgreload_start_empty_stock"] = { + Source = "sgreload_start_empty_stock", + Time = 40 / 30, + MinProgress = 1, + LHIK = false, + //LHIKIn = 0.2, + //LHIKOut = 0, + TPAnimStartTime = 0.5, + TPAnim = ACT_HL2MP_GESTURE_RELOAD_SHOTGUN, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0}, + {s = path .. "breechload.ogg", t = 0.05}, + {s = path .. "breechclose.ogg", t = 0.75}, + }, + ForceEmpty = true, + }, + ["sgreload_finish_stock"] = { + Source = "sgreload_finish_stock", + Time = 22 / 30, + LHIK = false, + //LHIKIn = 0, + //LHIKEaseOut = 0.3, + //LHIKOut = 0.6, + TPAnim = ACT_HL2MP_GESTURE_RELOAD_SHOTGUN, + TPAnimStartTime = 0.8, + SoundTable = { + {s = common .. "shoulder.ogg", t = 0.4}, + }, + }, +} + +SWEP.BulletBones = { + --[1] = "1014_shell1", +} + +-- Bodygroups -- + +SWEP.AttachmentElements = { + ["ud_autoshotgun_barrel_short"] = { + VMBodygroups = {{ind = 1, bg = 1}}, + AttPosMods = { + [3] = { + vpos = Vector(0, -0.40, 19.6), + } + }, + }, + ["ud_autoshotgun_barrel_sawnoff"] = { + VMBodygroups = {{ind = 1, bg = 2}}, + AttPosMods = { + [3] = { + vpos = Vector(-0.03, -0.75, 22.2), + } + }, + }, + ["ud_autoshotgun_barrel_sport"] = { + VMBodygroups = {{ind = 1, bg = 2}}, + AttPosMods = { + [3] = { + vpos = Vector(0, -0.40, 26.3), + } + }, + Override_IronSightStruct = { + Pos = Vector(-2.73, -2, 1.01), + Ang = Angle(0.95, 0.01, 0), + Magnification = 1.1 + }, + }, + ["ud_autoshotgun_tube_short"] = { + VMBodygroups = { + {ind = 2, bg = 1}, + {ind = 4, bg = 1}, + }, + }, + ["ud_autoshotgun_tube_long"] = { + VMBodygroups = {{ind = 2, bg = 0}}, + }, + + ["ud_autoshotgun_stock_in"] = { + VMBodygroups = {{ind = 3, bg = 1}}, + VMPoseParams = {["grip"] = 0} + }, + ["ud_autoshotgun_stock_buffer"] = { + VMBodygroups = {{ind = 3, bg = 2}}, + VMPoseParams = {["grip"] = 0} + }, + ["ud_autoshotgun_stock_sport"] = { + VMBodygroups = { + {ind = 3, bg = 3}, + {ind = 6, bg = 1}, + }, + VMPoseParams = {["grip"] = 1} + }, + ["ud_autoshotgun_stock_gripstock"] = { + VMBodygroups = { + {ind = 3, bg = 5}, + }, + VMPoseParams = {["grip"] = 0} + }, + + ["ud_m1014_handguard_sport"] = { + VMBodygroups = {{ind = 5, bg = 2}}, + }, + ["ud_autoshotgun_rail_fg"] = { + VMBodygroups = {{ind = 5, bg = 1}}, + }, +} + +SWEP.Attachments = { + { + PrintName = "Optic", + DefaultAttName = "Iron Sights", + Slot = {"optic_lp", "optic", "optic_sniper"}, + Bone = "1014_parent", + Offset = { + vpos = Vector(-0.025, -1.35, 2.5), + vang = Angle(90, 0, -90), + }, + }, + { + PrintName = "Barrel", + DefaultAttName = "18.5\" Factory Barrel", --16\" M4 Super 90 SBS Barrel + DefaultAttIcon = Material("entities/att/acwatt_ud_m1014_barrel.png", "smooth mips"), + Slot = "ud_1014_barrel", + }, + { + PrintName = "Muzzle", + DefaultAttName = "Standard Muzzle", + Slot = {"choke", "muzzle_shotgun"}, + Bone = "1014_parent", + Offset = { + vpos = Vector(0, -0.40, 24.5), + vang = Angle(90, 0, -90), + }, + ExcludeFlags = {"nomuzzle"} + }, + { + PrintName = "Underbarrel", + Slot = {"foregrip","ud_1014_handguard"}, + Bone = "1014_parent", + Offset = { + vpos = Vector(0, 1.7, 9), + vang = Angle(90, 0, -90), + }, + InstalledEles = {"ud_autoshotgun_rail_fg"}, + }, + { + PrintName = "Tactical", + Slot = {"tac_pistol"}, + Bone = "1014_parent", + Offset = { + vpos = Vector(0.8, 0.8, 13), + vang = Angle(90, 0, 0), + }, + InstalledEles = {"ud_autoshotgun_rail_fg"}, + }, + { + PrintName = "Stock", + Slot = {"ud_1014_stock"}, + Bone = "1014_parent", + Offset = { + vpos = Vector(-0.02, 1.9, -2.07), + vang = Angle(90, 0, -90), + }, + DefaultAttName = "Extended Stock", + DefaultAttIcon = Material("entities/att/acwatt_ud_m1014_stock.png", "smooth mips"), + }, + { + PrintName = "Tube Type", + Slot = {"ud_1014_tube"}, + DefaultAttName = "4 Shell Tube", + DefaultAttIcon = Material("entities/att/acwatt_ud_m1014_tube.png", "smooth mips"), + DefaultEles = {"ud_autoshotgun_tube_short"}, + }, + { + PrintName = "Ammo Type", + DefaultAttName = "\"BUCK\" #00 Buckshot", + DefaultAttIcon = Material("entities/att/arccw_uc_ammo_shotgun_generic.png", "mips smooth"), + Slot = "ud_ammo_shotgun", + }, + { + PrintName = "Powder Load", + Slot = "uc_powder", + DefaultAttName = "Standard Load" + }, + { + PrintName = "Training Package", + Slot = "uc_tp", + DefaultAttName = "Basic Training" + }, + { + PrintName = "Internals", + Slot = "uc_fg", -- Fire group + DefaultAttName = "Standard Internals" + }, + { + PrintName = "Charm", + Slot = {"charm", "fml_charm"}, + FreeSlot = true, + Bone = "1014_parent", + Offset = { + vpos = Vector(0.7, -0.5, 4), + vang = Angle(90, 0, -90), + }, + }, +} + +local lookup_barrel = { + default = 1, + ud_m1014_barrel_short = 0, +} + +local lookup_tube = { + default = 0, + ud_m1014_tube_ext = 1, +} + +SWEP.Hook_ExtraFlags = function(wep, data) + + local barrel = wep.Attachments[2].Installed and lookup_barrel[wep.Attachments[2].Installed] or lookup_barrel["default"] + local tube = wep.Attachments[7].Installed and lookup_tube[wep.Attachments[7].Installed] or lookup_tube["default"] + + if barrel < tube then + table.insert(data, "nomuzzleblocking") + end +end \ No newline at end of file diff --git a/lua/weapons/arccw_ud_m14.lua b/lua/weapons/arccw_ud_m14.lua new file mode 100644 index 0000000..7767f23 --- /dev/null +++ b/lua/weapons/arccw_ud_m14.lua @@ -0,0 +1,994 @@ +SWEP.Base = "arccw_base" +SWEP.Spawnable = true +SWEP.Category = "ArcCW - Urban Coalition" +SWEP.UC_CategoryPack = "1Urban Decay" +SWEP.AdminOnly = false +SWEP.UseHands = true + +-- Effects -- + +SWEP.MuzzleEffect = "muzzleflash_1" +SWEP.ShellEffect = "arccw_uc_shelleffect" +SWEP.ShellModel = "models/weapons/arccw/uc_shells/762x39.mdl" +SWEP.ShellScale = 0.666 +--SWEP.ShellMaterial = "models/weapons/arcticcw/shell_762" +SWEP.ShellPitch = 100 + +SWEP.MuzzleEffectAttachment = 1 +SWEP.CaseEffectAttachment = 2 +SWEP.CamAttachment = 3 +SWEP.TracerNum = 1 +SWEP.TracerCol = Color(25, 255, 25) +SWEP.TracerWidth = 2 + +-- Fake name -- + +SWEP.PrintName = "Patriot 14" + +-- True name -- + +SWEP.TrueName = "M14" + +-- Trivia -- + +SWEP.Trivia_Class = "Selective-Fire Rifle" +SWEP.Trivia_Desc = [[The M14 rifle, officially the United States Rifle, Caliber 7.62 mm, M14, is an American selective-fire battle rifle chambered for the 7.62×51mm NATO.]] +SWEP.Trivia_Manufacturer = "Rifles International" +SWEP.Trivia_Calibre = "7.62×51mm NATO" +SWEP.Trivia_Mechanism = "Gas-Operated Rotating Bolt" +SWEP.Trivia_Country = "USA" +SWEP.Trivia_Year = 1954 + +-- Weapon slot -- + +SWEP.Slot = 2 + +-- Weapon's manufacturer real name -- + +if GetConVar("arccw_truenames"):GetBool() then + SWEP.PrintName = SWEP.TrueName + SWEP.Trivia_Manufacturer = "Springfield Armory" +end + +-- Viewmodel / Worldmodel / FOV -- + +SWEP.ViewModel = "models/weapons/arccw/c_ud_m14.mdl" +SWEP.WorldModel = "models/weapons/arccw/c_ud_m14.mdl" +SWEP.ViewModelFOV = 70 +SWEP.AnimShoot = ACT_HL2MP_GESTURE_RANGE_ATTACK_AR2 +SWEP.DefaultSkin = 0 +SWEP.DefaultPoseParams = {["grip"] = 0} + +-- Damage -- + +SWEP.Damage = ArcCW.UC.StdDmg["762_51"].max +SWEP.DamageMin = ArcCW.UC.StdDmg["762_51"].min +SWEP.RangeMin = 50 +SWEP.Range = 400 -- 4 shot until ~275m + +SWEP.Penetration = ArcCW.UC.StdDmg["762_51"].pen +SWEP.DamageType = DMG_BULLET +SWEP.ShootEntity = nil +SWEP.MuzzleVelocity = 990 +SWEP.PhysBulletMuzzleVelocity = 960 + +SWEP.BodyDamageMults = ArcCW.UC.BodyDamageMults + +-- Mag size -- + +SWEP.ChamberSize = 1 +SWEP.Primary.ClipSize = 20 +SWEP.ExtendedClipSize = 30 +SWEP.ReducedClipSize = 10 + +-- Recoil -- + +SWEP.Recoil = 1.75 +SWEP.RecoilSide = 0.4 + +SWEP.RecoilRise = 2 +SWEP.RecoilPunch = 2.5 +SWEP.VisualRecoilMult = 1.2 +SWEP.MaxRecoilBlowback = 1.2 +SWEP.MaxRecoilPunch = 1.2 +SWEP.RecoilPunchBack = 1.2 + +SWEP.Sway = 0.25 + +-- Firerate / Firemodes -- + +SWEP.Delay = 60 / 700 +SWEP.Num = 1 +SWEP.Firemodes = { + { + Mode = 2, + }, + { + Mode = 1, + }, + { + Mode = 0, + }, +} + +SWEP.ShootPitch = 100 +SWEP.ShootVol = 120 + +SWEP.ProceduralRegularFire = false +SWEP.ProceduralIronFire = false + +SWEP.ReloadInSights = true + +-- NPC -- + +SWEP.NPCWeaponType = "weapon_ar2" +SWEP.NPCWeight = 60 + +-- Accuracy -- + +SWEP.AccuracyMOA = 2 +SWEP.HipDispersion = 800 +SWEP.MoveDispersion = 150 +SWEP.JumpDispersion = 1000 + +SWEP.Primary.Ammo = "ar2" +SWEP.MagID = "m14" + +SWEP.HeatCapacity = 75 +SWEP.HeatDissipation = 5 +SWEP.HeatDelayTime = 3 + +SWEP.MalfunctionMean = 200 + +-- Speed multipliers -- + +SWEP.SpeedMult = 0.9 +SWEP.SightedSpeedMult = 0.75 +SWEP.SightTime = 0.35 +SWEP.ShootSpeedMult = 0.9 + +-- Length -- + +SWEP.BarrelLength = 36 +SWEP.ExtraSightDist = 2 + +-- Ironsights / Customization / Poses -- + +SWEP.HolsterPos = Vector(2, 0, -2) +SWEP.HolsterAng = Angle(-5.5, 20, -20) + +SWEP.SprintPos = Vector(-0.5, -4, -2) +SWEP.SprintAng = Angle(3.5, 7, -20) + +SWEP.HoldtypeHolstered = "passive" +SWEP.HoldtypeActive = "ar2" +SWEP.HoldtypeSights = "rpg" + +SWEP.IronSightStruct = { + Pos = Vector(-2.25, 0, 0.8), + Ang = Angle(0, 0, 0), + Magnification = 1, + SwitchToSound = "", + CrosshairInSights = false, +} + +SWEP.ActivePos = Vector(0, -1, 1) +SWEP.ActiveAng = Angle(0, 0, -3) + +SWEP.CustomizePos = Vector(5, -2, -2) +SWEP.CustomizeAng = Angle(15, 25, 0) + +SWEP.CrouchPos = Vector(-5, -4, 0) +SWEP.CrouchAng = Angle(0, 0, -30) + +SWEP.BarrelOffsetHip = Vector(3, 0, -3) + +SWEP.MirrorVMWM = true +SWEP.WorldModelOffset = { + pos = Vector(-10, 6.5, -6), + ang = Angle(-12, 0, 180), + bone = "ValveBiped.Bip01_R_Hand", + scale = 1 - ( 0.35 * 0.75 ) +} + +-- Firing sounds -- + +local path = ")weapons/arccw_ud/m14/" +local common = ")/arccw_uc/common/" +SWEP.ShootSound = { + path .. "fire-01.ogg", + path .. "fire-02.ogg", + path .. "fire-03.ogg", + path .. "fire-04.ogg", + path .. "fire-05.ogg", + path .. "fire-06.ogg" +} +SWEP.ShootSoundSilenced = path .. "fire_supp.ogg" +SWEP.DistantShootSound = nil +SWEP.DistantShootSoundSilenced = nil +SWEP.ShootDrySound = path .. "dryfire.ogg" + +local tail = ")/arccw_uc/common/308/" + +SWEP.DistantShootSoundOutdoors = { + tail .. "fire-dist-308-rif-ext-01.ogg", + tail .. "fire-dist-308-rif-ext-02.ogg", + tail .. "fire-dist-308-rif-ext-03.ogg", + tail .. "fire-dist-308-rif-ext-04.ogg", + tail .. "fire-dist-308-rif-ext-05.ogg", + tail .. "fire-dist-308-rif-ext-06.ogg" +} +SWEP.DistantShootSoundIndoors = { + tail .. "fire-dist-308-rif-int-01.ogg", + tail .. "fire-dist-308-rif-int-02.ogg", + tail .. "fire-dist-308-rif-int-03.ogg", + tail .. "fire-dist-308-rif-int-04.ogg", + tail .. "fire-dist-308-rif-int-05.ogg", + tail .. "fire-dist-308-rif-int-06.ogg" +} +SWEP.DistantShootSoundOutdoorsSilenced = { + common .. "sup-tail-01.ogg", + common .. "sup-tail-02.ogg", + common .. "sup-tail-03.ogg", + common .. "sup-tail-04.ogg", + common .. "sup-tail-05.ogg", + common .. "sup-tail-06.ogg", + common .. "sup-tail-07.ogg", + common .. "sup-tail-08.ogg", + common .. "sup-tail-09.ogg", + common .. "sup-tail-10.ogg" +} +SWEP.DistantShootSoundIndoorsSilenced = { + common .. "sup_tail.ogg" +} +SWEP.DistantShootSoundOutdoorsVolume = 1 +SWEP.DistantShootSoundIndoorsVolume = 1 +SWEP.Hook_AddShootSound = ArcCW.UC.InnyOuty + +-- Bodygroups -- + +SWEP.BulletBones = { + [2] = "m14_bullet1", [3] = "m14_bullet2" +} + +SWEP.AttachmentElements = { + ["ud_m14_mag_10"] = { + VMBodygroups = {{ind = 3, bg = 1}}, + }, + ["ud_m14_rail_optic"] = { + VMBodygroups = {{ind = 0, bg = 0}}, + }, + + ["ud_m14_rail_fg"] = { + VMBodygroups = {{ind = 5, bg = 1}}, + }, + + ["ud_m14_barrel_long"] = { + VMBodygroups = {{ind = 2, bg = 2}}, + AttPosMods = { + [3] = { + vpos = Vector(0, -2.15, 34.5), + }, + }, + }, + ["ud_m14_barrel_short"] = { + VMBodygroups = {{ind = 2, bg = 1}}, + AttPosMods = { + [3] = { + vpos = Vector(0, -2.15, 27.5), + }, + }, + }, + ["ud_m14_barrel_stub"] = { + VMBodygroups = {{ind = 3, bg = 3}}, + AttPosMods = { + [3] = { + vpos = Vector(0, -2.1, 25), + }, + }, + }, + + ["ud_m14_receiver_762"] = { + TrueNameChange = "Mini Thirty", + NameChange = "Patriot 816" + }, + ["ud_m14_receiver_auto"] = { + TrueNameChange = "AC-556", + NameChange = "Patriot ACC" + }, + ["ud_m14_receiver_22lr"] = { + TrueNameChange = "M14 .22 LR", + NameChange = "Patriot 822" + }, + + ["ud_m14_stock_polymer"] = { + VMBodygroups = {{ind = 1, bg = 1}}, + VMPoseParams = {["grip"] = 0} + }, + ["ud_m14_stock_tactical"] = { + VMBodygroups = {{ind = 1, bg = 4}}, + VMPoseParams = {["grip"] = 1} + }, + ["ud_m14_stock_tactical_polymer"] = { + VMBodygroups = {{ind = 1, bg = 3}}, + VMSkin = 1, + VMPoseParams = {["grip"] = 1} + }, + + ["ud_m14_clamp"] = { + VMBodygroups = {{ind = 6, bg = 1}}, + }, +} + +-- Animations -- + +SWEP.Hook_Think = ArcCW.UC.ADSReload + +SWEP.Hook_SelectReloadAnimation = function(wep,curanim) -- numero random, uno per cento + local rng = math.Truncate(util.SharedRandom("volcarona shouldnt be banned to ubers, tera is broken please hes my favourite .v.", 1,100)) + + if rng <= 10 then + if wep.Attachments[7].Installed and curanim == "reload" then return "reload_10_rare" end --- should be = something + if !wep.Attachments[7].Installed and curanim == "reload" then return "reload_rare" end + + end +end + + +SWEP.Animations = { + ["ready"] = { + Source = "deploy", + Time = 40 / 30, + SoundTable = { + {s = common .. "raise.ogg", t = 0}, + {s = common .. "rattle.ogg", t = 0.2}, + {s = path .. "chback.ogg", t = 0.25}, + {s = path .. "chforward.ogg", t = 0.35}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.8}, + {s = common .. "shoulder.ogg", t = 1}, + }, + LHIK = true, + LHIKIn = 0.5, + LHIKEaseIn = 0.5, + LHIKEaseOut = 0.15, + LHIKOut = 0.5, + ProcDraw = false, + }, + ["idle"] = { + Source = "idle", + }, + ["idle_empty"] = { + Source = "idle_empty", + }, + ["draw"] = { + Source = "draw", + SoundTable = ArcCW.UC.DrawSounds, + }, + ["draw_empty"] = { + Source = "draw_empty", + Time = 12 / 30, + SoundTable = ArcCW.UC.DrawSounds, + }, + ["holster"] = { + Source = "holster", + LHIK = true, + LHIKIn = 0.4, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0, + LHIKOut = 0, + SoundTable = ArcCW.UC.HolsterSounds, + }, + ["holster_empty"] = { + Source = "holster_empty", + Time = 12 / 30, + LHIK = true, + LHIKIn = 0.4, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0, + LHIKOut = 0, + SoundTable = ArcCW.UC.HolsterSounds, + }, + ["fire"] = { + Source = "fire", +-- Time = 20 / 30, + ShellEjectAt = 0.01, + LastClip1OutTime = 0, + SoundTable = {{ s = {path .. "mech-01.ogg", path .. "mech-02.ogg", path .. "mech-03.ogg", path .. "mech-04.ogg", path .. "mech-05.ogg", path .. "mech-06.ogg"}, t = 0, v = 0.25 }}, + }, + ["fire_iron"] = { + Source = "fire_ads", + Time = 20 / 30, + ShellEjectAt = 0.01, + LastClip1OutTime = 0, + SoundTable = { + {s = common .. "common_mech_light.ogg", t = 0}, + { s = {path .. "mech-01.ogg", path .. "mech-02.ogg", path .. "mech-03.ogg", path .. "mech-04.ogg", path .. "mech-05.ogg", path .. "mech-06.ogg"}, t = 0 } + }, + }, + ["fire_empty"] = { + Source = "fire_empty", + Time = 20 / 30, + ShellEjectAt = 0.01, + SoundTable = { + {s = path .. "mech_last.ogg", t = 0}, -- Temporary + }, + }, + ["fire_iron_empty"] = { + Source = "fire_empty", + Time = 20 / 30, + ShellEjectAt = 0.01, + SoundTable = { + {s = path .. "mech_last.ogg", t = 0}, -- Temporary + }, + }, + ["unjam"] = { + Source = "unjam", + Time = 40 / 30, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.0}, + {s = path .. "chback.ogg", t = 0.25}, + {s = path .. "chforward.ogg", t = 0.35}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.8}, + {s = common .. "shoulder.ogg", t = 1}, + }, + LHIK = true, + LHIKIn = 0.5, + LHIKEaseIn = 0.5, + LHIKEaseOut = 0.15, + LHIKOut = 0.5, + ShellEjectAt = .35, + }, + -- 20 Round Reloads -- + + ["reload"] = { + Source = "wet", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + --Time = 66 / 30, + MinProgress = 1.4, + LastClip1OutTime = 0.9, + LHIK = true, + LHIKIn = 0.3, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.4, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.0}, + {s = path .. "magout.ogg", t = 0.3}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.4}, + {s = common .. "magpouch.ogg", t = 0.8}, + {s = path .. "magin.ogg", t = 1.85}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 1.3}, + {s = common .. "shoulder.ogg", t = 1.75}, + }, + }, + ["reload_empty"] = { + Source = "dry", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + --Time = 86 / 30, + MinProgress = 2.1, + LastClip1OutTime = 1, + LHIK = true, + LHIKIn = 0.4, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.4, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.0}, + {s = path .. "magout.ogg", t = 0.15}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.4}, + {s = common .. "magpouch.ogg", t = 0.6}, + {s = common .. "rifle_magdrop.ogg", t = 1}, + {s = path .. "magin.ogg", t = 1.9}, + {s = path .. "chback.ogg", t = 2.75}, + {s = path .. "chforward.ogg", t = 2.75}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 2.2}, + {s = common .. "shoulder.ogg", t = 2.4}, + }, + }, + + -- Rare Reloads -- + + ["reload_rare"] = { + Source = "garand", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + --Time = 66 / 30, + MinProgress = 1.4, + LastClip1OutTime = 0.9, + LHIK = true, + LHIKIn = 0.3, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.4, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.0}, + {s = path .. "chback.ogg", t = 0.1}, + {s = path .. "magout.ogg", t = 0.25}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.4}, + {s = common .. "magpouch.ogg", t = 0.6}, + {s = path .. "magin.ogg", t = 1.8}, + {s = path .. "chforward.ogg", t = 2.4}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 1.3}, + {s = common .. "shoulder.ogg", t = 1.75}, + }, + }, + + ["reload_10_rare"] = { + Source = "garand_10", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + --Time = 66 / 30, + MinProgress = 1.4, + LastClip1OutTime = 0.9, + LHIK = true, + LHIKIn = 0.3, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.4, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.0}, + {s = path .. "chback.ogg", t = 0.1}, + {s = path .. "magout.ogg", t = 0.25}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.4}, + {s = common .. "magpouch.ogg", t = 0.6}, + {s = path .. "magin.ogg", t = 1.8}, + {s = path .. "chforward.ogg", t = 2.4}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 1.3}, + {s = common .. "shoulder.ogg", t = 2}, + }, + }, + + -- 10 Round Reloads -- + + ["reload_10"] = { + Source = "wet_10", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + --Time = 67 / 30, + MinProgress = 1.6, + LastClip1OutTime = 0.9, + LHIK = true, + LHIKIn = 0.3, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.4, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.0}, + {s = path .. "magout.ogg", t = 0.15}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.3}, + {s = common .. "magpouch.ogg", t = 0.6, c = ci}, + {s = path .. "magin.ogg", t = 1.10}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 1.5}, + }, + }, + ["reload_empty_10"] = { + Source = "dry_10", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + --Time = 86 / 30, + MinProgress = 2.1, + LastClip1OutTime = 0.7, + LHIK = true, + LHIKIn = 0.4, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.4, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.0}, + {s = path .. "magout.ogg", t = 0.15}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.4}, + {s = common .. "magpouch.ogg", t = 0.6, c = ci}, + {s = common .. "rifle_magdrop.ogg", t = 0.9}, + {s = path .. "magin.ogg", t = 1.10}, + {s = path .. "chback.ogg", t = 1.90}, + {s = path .. "chforward.ogg", t = 2.00}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 2.4}, + {s = common .. "shoulder.ogg", t = 2.5}, + }, + }, + + -- 30 Round Reloads -- + + ["reload_30"] = { + Source = "reload_30", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + Time = 67 / 30, + MinProgress = 1.4, + LastClip1OutTime = 0.9, + LHIK = true, + LHIKIn = 0.3, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.4, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.0}, + {s = path .. "magout.ogg", t = 0.3}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.3}, + {s = common .. "magpouch.ogg", t = 0.7, c = ci}, + {s = path .. "magplace.ogg", t = 0.95}, + {s = path .. "magin.ogg", t = 1.10}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 1.4}, + {s = common .. "shoulder.ogg", t = 1.85}, + }, + }, + ["reload_empty_30"] = { + Source = "reload_empty_30", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + Time = 86 / 30, + MinProgress = 2.3, + LastClip1OutTime = 0.7, + LHIK = true, + LHIKIn = 0.4, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.4, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.0}, + {s = path .. "magout.ogg", t = 0.2}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.3}, + {s = common .. "magpouch.ogg", t = 0.65, c = ci}, + {s = common .. "rifle_magdrop.ogg", t = 0.9}, + {s = path .. "magin.ogg", t = 1.20}, + {s = path .. "chback.ogg", t = 2}, + {s = path .. "chaforward.ogg", t = 2.1}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 2.3}, + {s = common .. "shoulder.ogg", t = 2.65}, + }, + }, + + -- 30 polymer Reloads -- + + ["reload_30_tac"] = { + Source = "reload_30_tac", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + Time = 67 / 30, + MinProgress = 1.4, + LastClip1OutTime = 0.9, + LHIK = true, + LHIKIn = 0.3, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.4, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.0}, + {s = path .. "magout.ogg", t = 0.3}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.3}, + {s = common .. "magpouch.ogg", t = 0.7, c = ci}, + {s = path .. "magin.ogg", t = 1.10}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 1.4}, + {s = common .. "shoulder.ogg", t = 1.85}, + }, + }, + ["reload_empty_30_tac"] = { + Source = "reload_empty_30_tac", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + Time = 86 / 30, + MinProgress = 2.3, + LastClip1OutTime = 0.7, + LHIK = true, + LHIKIn = 0.4, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.4, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.0}, + {s = path .. "magout.ogg", t = 0.2}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.3}, + {s = common .. "magpouch.ogg", t = 0.65, c = ci}, + {s = common .. "rifle_magdrop.ogg", t = 0.9}, + {s = path .. "magin.ogg", t = 1.20}, + {s = path .. "chback.ogg", t = 2}, + {s = path .. "chforward.ogg", t = 2.1}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 2.3}, + {s = common .. "shoulder.ogg", t = 2.65}, + }, + }, + + -- 7.62 reloads -- + + ["reload_762"] = { + Source = "reload_762", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + Time = 67 / 30, + MinProgress = 1.4, + LastClip1OutTime = 0.9, + LHIK = true, + LHIKIn = 0.3, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.4, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.0}, + {s = path .. "magout.ogg", t = 0.3}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.3}, + {s = common .. "magpouch.ogg", t = 0.7, c = ci}, + {s = path .. "magin.ogg", t = 1.10}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 1.4}, + {s = common .. "shoulder.ogg", t = 1.85}, + }, + }, + ["reload_empty_762"] = { + Source = "reload_empty_762", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + Time = 86 / 30, + MinProgress = 2.3, + LastClip1OutTime = 0.7, + LHIK = true, + LHIKIn = 0.4, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.4, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.0}, + {s = path .. "magout.ogg", t = 0.2}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.3}, + {s = common .. "magpouch.ogg", t = 0.65, c = ci}, + {s = common .. "rifle_magdrop.ogg", t = 0.9}, + {s = path .. "magin.ogg", t = 1.20}, + {s = path .. "chback.ogg", t = 2}, + {s = path .. "chforward.ogg", t = 2.1}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 2.3}, + {s = common .. "shoulder.ogg", t = 2.65}, + }, + }, + + -- 60 round reloads (?) -- + + ["reload_60"] = { + Source = "reload_60", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + Time = 67 / 30, + MinProgress = 1.4, + LastClip1OutTime = 0.9, + LHIK = true, + LHIKIn = 0.3, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.4, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.0}, + {s = path .. "magout.ogg", t = 0.35}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.3}, + {s = common .. "magpouch.ogg", t = 0.7, c = ci}, + {s = path .. "magin.ogg", t = 1.10}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 1.4}, + {s = common .. "shoulder.ogg", t = 1.85}, + }, + }, + ["reload_empty_60"] = { + Source = "reload_empty_60", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + Time = 86 / 30, + MinProgress = 2.3, + LastClip1OutTime = 0.7, + LHIK = true, + LHIKIn = 0.4, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.4, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.0}, + {s = path .. "magout.ogg", t = 0.35}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.3}, + {s = common .. "magpouch.ogg", t = 0.7, c = ci}, + {s = common .. "rifle_magdrop.ogg", t = 0.9}, + {s = path .. "magin.ogg", t = 1.20}, + {s = path .. "chback.ogg", t = 1.9}, + {s = path .. "chforward.ogg", t = 2}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 2.3}, + {s = common .. "shoulder.ogg", t = 2.65}, + }, + }, + + -- 15 22lr Round Reloads -- + + ["reload_15_22lr"] = { + Source = "reload_15_22lr", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + Time = 67 / 30, + MinProgress = 1.6, + LastClip1OutTime = 0.9, + LHIK = true, + LHIKIn = 0.3, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.45, + LHIKOut = 0.7, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.0}, + {s = path .. "magout.ogg", t = 0.15}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.3}, + {s = common .. "magpouch.ogg", t = 0.65, c = ci}, + {s = path .. "magin.ogg", t = .9}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 1.4}, + }, + }, + ["reload_empty_15_22lr"] = { + Source = "reload_empty_15_22lr", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + Time = 86 / 30, + MinProgress = 2.2, + LastClip1OutTime = 0.7, + LHIK = true, + LHIKIn = 0.4, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.45, + LHIKOut = 0.6, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.0}, + {s = path .. "magout.ogg", t = 0.15}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.5}, + {s = common .. "pistol_magdrop.ogg", t = 0.9}, + {s = common .. "magpouch.ogg", t = 0.7, c = ci}, + {s = path .. "magin.ogg", t = 1.10}, + {s = path .. "chback.ogg", t = 1.9}, + {s = path .. "chforward.ogg", t = 2.0}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 2.3}, + }, + }, + + -- Inspect -- + + ["enter_inspect"] = { + Source = "inspect_enter", + -- time = 30 / 60, + LHIK = true, + LHIKIn = 0, + LHIKOut = 2.5, + SoundTable = { + }, + }, + ["idle_inspect"] = { + Source = "inspect_loop", + -- time = 72 / 60, + LHIK = true, + LHIKIn = 0, + LHIKOut = 999, -- maybe im dumb + }, + ["exit_inspect"] = { + Source = "inspect_exit", + -- time = 30 / 60, + LHIK = true, + LHIKIn = 0, + LHIKOut = 999, -- maybe im dumb + SoundTable = { + + }, + }, +} + +SWEP.Hook_ModifyBodygroups = function(wep,data) + local vm = data.vm + if !IsValid(vm) then return end + + local atts = wep.Attachments + local barr = string.Replace(atts[2].Installed or "default","ud_m14_barrel_","") + local muzz = atts[3].Installed + local tac = atts[6].Installed + + if muzz or barr == "stub" or barr == "default" then + vm:SetBodygroup(7,2) + elseif barr == "short" then + vm:SetBodygroup(7,1) + elseif barr == "long" then + vm:SetBodygroup(7,0) + end + + if !tac then + vm:SetBodygroup(6,0) + end +end + +SWEP.Attachments = { + { + PrintName = "Optic", + DefaultAttName = "Iron Sights", + Slot = {"optic_lp","optic","optic_sniper"}, + Bone = "m14_parent", + Offset = { + vpos = Vector(0, -3.6, 6), + vang = Angle(90, 2, -90), + }, + VMScale = Vector(1.2,1.2,1.2), + WMScale = VMScale, + InstalledEles = {"ud_m14_rail_optic"}, + }, + { + PrintName = "Barrel", + DefaultAttName = "20\" Standard Barrel", + Bone = "m14_parent", + DefaultAttIcon = Material("entities/att/acwatt_ud_m14_barrel.png", "smooth mips"), + Slot = "ud_m14_barrel", + }, + { + PrintName = "Muzzle", + DefaultAttName = "Standard Muzzle", + Slot = {"muzzle"}, + Bone = "m14_parent", + Offset = { + vpos = Vector(0, -2.15, 30), + vang = Angle(90, 0, -90), + wpos = vpos, + }, + VMScale = Vector(1.5,1.5,1.5), + WMScale = VMScale, + ExcludeFlags = {"nomuzzle"}, + }, + { + PrintName = "Receiver", + DefaultAttName = "M14 Receiver", + DefaultAttIcon = Material("entities/att/acwatt_ud_m14_receiver.png", "smooth mips"), + Slot = "ud_m14_receiver", + }, + { + PrintName = "Underbarrel", + Slot = {"foregrip"}, + Bone = "m14_parent", + Offset = { + vpos = Vector(0, 0, 14), + vang = Angle(90, 0, -90), + }, + InstalledEles = {"ud_m14_rail_fg"}, + MergeSlots = {14} + }, + { + PrintName = "Tactical", + Slot = {"tac"}, + Bone = "m14_parent", + Offset = { + vpos = Vector(0, -1.5, 22.3), + vang = Angle(90, 0, -90), + }, + InstalledEles = {"ud_m14_clamp"}, + }, + { + PrintName = "Magazine", + Slot = {"ud_m14_mag"}, + DefaultAttName = "20-Round Mag", + DefaultAttIcon = Material("entities/att/acwatt_ud_m14_mag_20.png", "smooth mips"), + }, + { + PrintName = "Stock", + Slot = {"ud_m14_stock"}, + DefaultAttName = "Synthetic Stock", + DefaultAttIcon = Material("entities/att/acwatt_ud_m14_stock.png", "smooth mips"), + }, + { + PrintName = "Ammo Type", + DefaultAttName = "\"FMJ\" Full Metal Jacket", + DefaultAttIcon = Material("entities/att/arccw_uc_ammo_generic.png", "mips smooth"), + Slot = "uc_ammo", + }, + { + PrintName = "Powder Load", + Slot = "uc_powder", + DefaultAttName = "Standard Load" + }, + { + PrintName = "Training Package", + Slot = "uc_tp", + DefaultAttName = "Basic Training" + }, + { + PrintName = "Internals", + Slot = "uc_fg", -- Fire group + DefaultAttName = "Standard Internals" + }, + { + PrintName = "Charm", + Slot = {"charm", "fml_charm"}, + FreeSlot = true, + Bone = "m14_parent", + Offset = { + vpos = Vector(1.1, -0.5, 6), + vang = Angle(90, 0, -90), + }, + }, + { + PrintName = "M203 slot", + Slot = "uc_ubgl", + Bone = "m14_parent", + Offset = { + vpos = Vector(0, -1.2, 10), + vang = Angle(90, 0, -90), + }, + InstalledEles = {"ud_m14_rail_fg"}, + ExcludeFlags = {"ak_noubs","barrel_rpk"}, + Hidden = true, + } +} \ No newline at end of file diff --git a/lua/weapons/arccw_ud_m16.lua b/lua/weapons/arccw_ud_m16.lua new file mode 100644 index 0000000..c7c7e33 --- /dev/null +++ b/lua/weapons/arccw_ud_m16.lua @@ -0,0 +1,1808 @@ +SWEP.Base = "arccw_base" +SWEP.Spawnable = true +SWEP.Category = "ArcCW - Urban Coalition" +SWEP.UC_CategoryPack = "1Urban Decay" +SWEP.AdminOnly = false +SWEP.UseHands = true + +-- Muzzle and shell effects -- + +SWEP.MuzzleEffect = "muzzleflash_1" +SWEP.ShellEffect = "arccw_uc_shelleffect" +SWEP.ShellModel = "models/weapons/arccw/uc_shells/556x45.mdl" +SWEP.ShellScale = .666 +SWEP.ShellPitch = 100 + +SWEP.MuzzleEffectAttachment = 1 +SWEP.CaseEffectAttachment = 2 +SWEP.CamAttachment = 3 +SWEP.TracerNum = 1 +SWEP.TracerCol = Color(25, 255, 25) +SWEP.TracerWidth = 2 + +-- Fake name -- + +SWEP.PrintName = "RAYCAR-0" +-- AMCAR stands for (american) Colt Assault Rifle, not Carbine!! ~Fesiug +-- shut up retard ~zenith + +-- True name -- + +SWEP.TrueName = "M16A2" + +-- Trivia -- +SWEP.Trivia_Class = "Assault Rifle" +SWEP.Trivia_Desc = "Third generation of America's iconic military rifle. Army tests showed that soldiers were more likely to hit a target if they fired multiple shots, but were likely to spray in full-auto and fail to hit anything. As a result, they implemented a ratcheted three-round burst system which limited the maximum burst a soldier could fire to three shots.\n\nWell-rounded gun with no major downsides." +SWEP.Trivia_Manufacturer = "Rayter Arms Industries" +SWEP.Trivia_Calibre = "5.56x45mm NATO" +SWEP.Trivia_Mechanism = "Gas-Operated Rotating Bolt" +SWEP.Trivia_Country = "USA" +SWEP.Trivia_Year = 1959 + + +if GetConVar("arccw_truenames"):GetBool() then + SWEP.PrintName = SWEP.TrueName + SWEP.Trivia_Manufacturer = "Stoner's Legacy Ltd." +end + +local origDesc = SWEP.Trivia_Desc +local m4Desc = "Carbine variant of the M16 rifle. Originally designed in response to design faults in the CAR-15 family, it eventually replaced the M16 across much of the Army for its favorably low weight and comparable performance. The M4 variant has since become one of the most iconic and widespread American service rifles in the modern era.\n\nLight and versatile, but requires discipline to control." +local ncrDesc = "Standard-issue rifle of the New California Republic. Traditionally produced with a semi-automatic receiver, the wooden furniture is more readily replaceable and adds additional recoil control for maximum accuracy.\n\nWell-rounded gun with no major downsides." +local smgDesc = "Submachine gun based on the M16 rifle. Despite its similar appearance, it uses a different mechanism from its parent rifle. More accurate than other submachine guns due to its rifle frame and closed-bolt mechanism." +local blkDesc = "Aftermarket automatic variant of the M16 rifle. The .300 Blackout cartridge has a ballistic performance more akin to the 7.62x39mm Soviet cartridge, with a similarly sized projectile but shorter effective range." +local ukDesc = "AR-15 style rifles are a class of rifles linked to the M16, normally with a semi-automatic fire group for the civilian market. This one, however, has been neutered by authority of the British crown with a manual-action receiver. Bit cringe, innit?" +local arDesc = "Semi-automatic variant of the M16 series of rifles, produced for the civilian market. Wildly popular in the United States, this rifle can be seen in the hands of hobbyists, hunters and mass shooters alike.\n\nWell-rounded gun with no major downsides." +local beoDesc = "Aftermarket semi-automatic variant of the M16 rifle firing an oversized magnum cartridge. Provides extremely high stopping power at close range." +local carDesc = "Carbine variant of the M16 rifle, short enough to be classified as a submachine gun. Its features influenced the US Army's interest in the M4 Carbine, which went on to become their new standard rifle. Due to the small barrel, rifles of this family have high maneuverability but poor range compared to their parent platform." +local a1Desc = "Second generation of America's iconic military rifle. Developed to address problems with the original M16, which suffered notoriously frequent jamming that could get its wielder killed. The revised model evolved a positive reputation with those who used it, and is now a universal symbol of the Vietnam War.\n\nA well-rounded rifle, but difficult to control without trigger discipline - something the A2 model eventually addressed." +local a3Desc = "Variant of the M16A2 with the original full-automatic trigger group, relegated to niche roles in the US Army. Well-rounded gun with no major downsides." +local lmgDesc = "Configuration of the M16 designed for a light machine gun role, used vaguely within the Marine Corps before the adoption of the Minimi. Heavier than the standard platform, but the integral bipod can be deployed onto surfaces for excellent recoil control." +local patriotDesc = "An assault pistol developed for The Boss. The feeder mechanism inside the drum magazine forms an \"∞\" shape.\n\nThe bottomless magazine more than makes up for the awkwardness of the configuration." + +-- Weapon slot -- + +SWEP.Slot = 2 + +-- Weapon's manufacturer real name -- + +if GetConVar("arccw_truenames"):GetBool() then + SWEP.PrintName = SWEP.TrueName + SWEP.Trivia_Manufacturer = "Colt's Manufacturing Company" +end + +-- Viewmodel / Worldmodel / FOV -- + +SWEP.ViewModel = "models/weapons/arccw/c_ud_m16.mdl" +SWEP.WorldModel = "models/weapons/arccw/c_ud_m16.mdl" +SWEP.ViewModelFOV = 80 +SWEP.AnimShoot = ACT_HL2MP_GESTURE_RANGE_ATTACK_AR2 + +-- Damage -- + +SWEP.Damage = ArcCW.UC.StdDmg["556"].max +SWEP.DamageMin = ArcCW.UC.StdDmg["556"].min +SWEP.RangeMin = 50 +SWEP.Range = 350 -- 4 shot until ~250m + +SWEP.Penetration = ArcCW.UC.StdDmg["556"].pen +SWEP.DamageType = DMG_BULLET +SWEP.ShootEntity = nil +SWEP.MuzzleVelocity = 960 +SWEP.PhysBulletMuzzleVelocity = 960 + +SWEP.BodyDamageMults = ArcCW.UC.BodyDamageMults + +-- Mag size -- + +SWEP.ChamberSize = 1 +SWEP.Primary.ClipSize = 30 +SWEP.ExtendedClipSize = 40 +SWEP.ReducedClipSize = 20 + +-- Recoil -- + +SWEP.Recoil = 0.5 +SWEP.RecoilSide = 0.25 + +SWEP.RecoilRise = 0.1 +SWEP.RecoilPunch = 1 +SWEP.VisualRecoilMult = 1 +SWEP.MaxRecoilBlowback = 1 +SWEP.MaxRecoilPunch = 1 +SWEP.RecoilPunchBack = 1 + +SWEP.Sway = 0.5 + +-- Firerate / Firemodes -- + +SWEP.Delay = 60 / 900 +SWEP.Num = 1 +SWEP.Firemodes = { + { + Mode = -3, + PostBurstDelay = 0.1, + RunawayBurst = false, -- https://en.wikipedia.org/wiki/Burst_mode_(weapons) + }, + { + Mode = 1, + }, + { + Mode = 0 + } +} + +SWEP.ShootPitch = 100 +SWEP.ShootVol = 120 +SWEP.ShootPitchVariation = 0 + +SWEP.ProceduralRegularFire = false +SWEP.ProceduralIronFire = false + +SWEP.ReloadInSights = true + +-- NPC -- + +SWEP.NPCWeaponType = "weapon_ar2" +SWEP.NPCWeight = 60 + +-- Accuracy -- + +SWEP.AccuracyMOA = 4 +SWEP.HipDispersion = 800 +SWEP.MoveDispersion = 200 +SWEP.JumpDispersion = 1000 + +SWEP.Primary.Ammo = "smg1" +SWEP.MagID = "m16" + +SWEP.HeatCapacity = 150 +SWEP.HeatDissipation = 10 +SWEP.HeatDelayTime = 3 + +SWEP.MalfunctionMean = 200 +SWEP.MalfunctionTakeRound = true + +-- Speed multipliers -- + +SWEP.SpeedMult = 0.925 +SWEP.SightedSpeedMult = 0.75 +SWEP.SightTime = 0.35 +SWEP.ShootSpeedMult = 0.9 + +-- Length -- + +SWEP.BarrelLength = 48 +SWEP.ExtraSightDist = 2 + +-- Ironsights / Customization / Poses -- + +SWEP.HolsterPos = Vector(0.5, -1, 1.2) +SWEP.HolsterAng = Angle(-8.5, 8, -10) + +SWEP.HoldtypeHolstered = "passive" +SWEP.HoldtypeActive = "ar2" +SWEP.HoldtypeSights = "rpg" + +SWEP.IronSightStruct = { + Pos = Vector(-2.815, 0, 1.3), + Ang = Angle(0, 0, 0), + Magnification = 1.1, + SwitchToSound = "", +} + +SWEP.ActivePos = Vector(0.33, -2, 1.33) +SWEP.ActiveAng = Angle(0, 0, -3) + +-- SWEP.CustomizePos = Vector(5, -2, -2) +-- SWEP.CustomizeAng = Angle(15, 25, 0) +SWEP.CustomizePos = Vector(0, 0, 0) +SWEP.CustomizeAng = Angle(0, 0, 0) + +SWEP.CrouchPos = Vector(-2.5, -2, -0.6) +SWEP.CrouchAng = Angle(0, 0, -14) + +SWEP.BarrelOffsetHip = Vector(2, 0, -5) + +SWEP.MirrorVMWM = true +SWEP.WorldModelOffset = { + pos = Vector(-8.5, 4, -5), + ang = Angle(-12, 0, 180), + bone = "ValveBiped.Bip01_R_Hand", + --scale = .85 +} + +-- Firing sounds -- + +local path = ")weapons/arccw_ud/m16/" +local common = ")/arccw_uc/common/" + +SWEP.ShootSound = { + path .. "fire-01.ogg", + path .. "fire-02.ogg", + path .. "fire-03.ogg", + path .. "fire-04.ogg", + path .. "fire-05.ogg", + path .. "fire-06.ogg" +} +SWEP.ShootSoundSilenced = { + path .. "fire-sup-01.ogg", + path .. "fire-sup-02.ogg", + path .. "fire-sup-03.ogg", + path .. "fire-sup-04.ogg", + path .. "fire-sup-05.ogg", + path .. "fire-sup-06.ogg" +} + +SWEP.DistantShootSound = nil +SWEP.DistantShootSoundSilenced = nil +SWEP.ShootDrySound = path .. "dryfire.ogg" + +local tail = ")/arccw_uc/common/556x45/" + +SWEP.DistantShootSoundOutdoors = { + tail .. "fire-dist-556x45-rif-ext-01.ogg", + tail .. "fire-dist-556x45-rif-ext-02.ogg", + tail .. "fire-dist-556x45-rif-ext-03.ogg", + tail .. "fire-dist-556x45-rif-ext-04.ogg", + tail .. "fire-dist-556x45-rif-ext-05.ogg", + tail .. "fire-dist-556x45-rif-ext-06.ogg" +} +SWEP.DistantShootSoundIndoors = { + tail .. "fire-dist-556x45-rif-int-01.ogg", + tail .. "fire-dist-556x45-rif-int-02.ogg", + tail .. "fire-dist-556x45-rif-int-03.ogg", + tail .. "fire-dist-556x45-rif-int-04.ogg", + tail .. "fire-dist-556x45-rif-int-05.ogg", + tail .. "fire-dist-556x45-rif-int-06.ogg" +} +SWEP.DistantShootSoundOutdoorsSilenced = { + common .. "sup-tail-01.ogg", + common .. "sup-tail-02.ogg", + common .. "sup-tail-03.ogg", + common .. "sup-tail-04.ogg", + common .. "sup-tail-05.ogg", + common .. "sup-tail-06.ogg", + common .. "sup-tail-07.ogg", + common .. "sup-tail-08.ogg", + common .. "sup-tail-09.ogg", + common .. "sup-tail-10.ogg" +} +SWEP.DistantShootSoundIndoorsSilenced = { + common .. "fire-dist-int-pistol-light-01.ogg", + common .. "fire-dist-int-pistol-light-02.ogg", + common .. "fire-dist-int-pistol-light-03.ogg", + common .. "fire-dist-int-pistol-light-04.ogg", + common .. "fire-dist-int-pistol-light-05.ogg", + common .. "fire-dist-int-pistol-light-06.ogg" +} +SWEP.DistantShootSoundOutdoorsVolume = 1 +SWEP.DistantShootSoundIndoorsVolume = 1.0 +SWEP.Hook_AddShootSound = ArcCW.UC.InnyOuty + +SWEP.FiremodeSound = { + path .. "selector-01.ogg", + path .. "selector-02.ogg", + path .. "selector-03.ogg", + path .. "selector-04.ogg", + path .. "selector-05.ogg", + path .. "selector-06.ogg", +} + +-- Bodygroups -- + +SWEP.BulletBones = { + [2] = "m16_bullets1", [3] = "m16_bullets2" +} + +SWEP.DefaultBodygroups = "00000000000000000000000" + +SWEP.AttachmentElements = { + + ["ud_m16_mag_20"] = { + VMBodygroups = {{ind = 2, bg = 1}}, + }, + ["ud_m16_mag_40"] = { + VMBodygroups = {{ind = 2, bg = 2}}, + }, + ["ud_m16_pmag"] = { + VMBodygroups = {{ind = 2, bg = 9}}, + }, + ["ud_m16_mag_60"] = { + VMBodygroups = {{ind = 2, bg = 3}}, + }, + ["ud_m16_mag_100"] = { + VMBodygroups = {{ind = 2, bg = 4}}, + }, + ["ud_m16_9mm_mag"] = { + VMBodygroups = {{ind = 2, bg = 5}}, + }, + ["ud_m16_9mm_mag_32"] = { + VMBodygroups = {{ind = 2, bg = 6}}, + }, + ["ud_m16_mag_50beo"] = { + VMBodygroups = {{ind = 2, bg = 8}}, + }, + ["ud_m16_mag_50beo_12"] = { + VMBodygroups = {{ind = 2, bg = 0}}, + }, + + ["upper_flat"] = { + -- handled by code + --[[] + VMBodygroups = { + {ind = 1, bg = 1}, + {ind = 3, bg = 3} + }, + ]] + }, + ["upper_classic"] = { + VMBodygroups = { + {ind = 1, bg = 3}, + }, + }, + ["rail_fg"] = { + VMBodygroups = {{ind = 9, bg = 1}} + }, + + ["stock_231_ex"] = { + VMBodygroups = {{ind = 7, bg = 1}}, + }, + ["stock_231_in"] = { + VMBodygroups = {{ind = 7, bg = 2}}, + }, + ["stock_231_tube"] = { + VMBodygroups = {{ind = 7, bg = 3}}, + }, + ["stock_607_ex"] = { + VMBodygroups = {{ind = 7, bg = 4}}, + }, + ["stock_607_in"] = { + VMBodygroups = {{ind = 7, bg = 5}}, + }, + ["stock_608"] = { + VMBodygroups = {{ind = 7, bg = 6}}, + }, + ["stock_carbine_ex"] = { + VMBodygroups = {{ind = 7, bg = 7}}, + }, + ["stock_carbine_in"] = { + VMBodygroups = {{ind = 7, bg = 8}}, + }, + ["stock_wood"] = { + VMBodygroups = {{ind = 7, bg = 9}}, + }, + ["stock_adar"] = { + VMBodygroups = { + {ind = 7, bg = 10}, + {ind = 8, bg = 4} + }, + }, + ["stock_ru556"] = { + VMBodygroups = {{ind = 7, bg = 11}}, + }, + ["grip_ergo"] = { + VMBodygroups = {{ind = 8, bg = 1}}, + }, + ["grip_skel"] = { + VMBodygroups = {{ind = 8, bg = 2}}, + }, + ["grip_wood"] = { + VMBodygroups = {{ind = 8, bg = 3}}, + }, + + ["gasblock_carbine"] = { + VMBodygroups = {{ind = 6, bg = 3}}, + }, + ["fs_adar"] = { + VMBodygroups = {{ind = 6, bg = 4}}, + }, + ["remove_lug"] = { + VMBodygroups = {{ind = 12, bg = 1}}, + }, + + ["mount_14"] = { + AttPosMods = { + [8] = { + vpos = Vector(0, 0.3, 17.5), + vang = Angle(90, 0, -90), + }, + }, + }, + ["mount_11"] = { + AttPosMods = { + [8] = { + vpos = Vector(0.6, -0.3, 14.2), + vang = Angle(90, 0, 0), + }, + }, + }, + ["mount_tactical"] = { + AttPosMods = { + [8] = { + vpos = Vector(-1, -.35, 11.5), + vang = Angle(-90, 180, 0), + wang = Angle(90, 0, 0), + }, + }, + ExcludeFlags = {} + }, + -- ["mount_tactical_short"] = { + -- AttPosMods = { + -- [8] = { + -- vpos = Vector(-1, -.35, 11.5), + -- vang = Angle(-90, 180, 0), + -- wang = Angle(90, 0, 0), + -- }, + -- }, + -- AttPosMods_Priority = 2, + -- RequireFlags = {"barrel_short"} + -- }, + + ["barrel_14"] = { + VMBodygroups = { + {ind = 4, bg = 1}, + {ind = 6, bg = 2}, + }, + AttPosMods = { + [4] = { + vpos = Vector(0, -0.33, 18.85), + vang = Angle(90, 0, -90), + }, + [16] = { + vpos = Vector(0, -1.65, 12.5), -- 21.75 or 15.75 + vang = Angle(90, 0, -90), + }, + } + }, + ["barrel_11"] = { + VMBodygroups = { + {ind = 4, bg = 4}, + {ind = 6, bg = 2}, + }, + AttPosMods = { + [4] = { + vpos = Vector(0, -0.33, 15.7), + vang = Angle(90, 0, -90), + }, + [16] = { + vpos = Vector(0, -1.65, 12.5), -- 21.75 or 15.75 + vang = Angle(90, 0, -90), + }, + } + }, + ["barrel_fpw"] = { + VMBodygroups = { + {ind = 4, bg = 2}, + {ind = 6, bg = 5}, + }, + AttPosMods = { + [4] = { + vpos = Vector(0, -0.07, 21.3), + vang = Angle(90, 0, -90), + }, + } + }, + ["barrel_11_ru556"] = { + VMBodygroups = { + {ind = 4, bg = 4}, + {ind = 6, bg = 5}, + }, + AttPosMods = { + [3] = { + vpos = Vector(0, -0.07, 21.3), + vang = Angle(90, 0, -90), + }, + [6] = { + vpos = Vector(1.15, 0, 17.9), + vang = Angle(90, 0, 0), + }, + [16] = { + vpos = Vector(0, -1.65, 12.5), -- 21.75 or 15.75 + vang = Angle(90, 0, -90), + }, + } + }, + + ["hg_m16a4_ris"] = { + VMBodygroups = { + {ind = 5, bg = 2}, + }, + AttPosMods = { + [5] = { + vpos = Vector(-0.1, 1.05, 12), + vang = Angle(90, 0, -90), + }, + [6] = { + vpos = Vector(1.41, -.1, 20), + vang = Angle(90, 0, 0), + }, + [16] = { + vpos = Vector(0, -1.75, 21.75), -- 21.75 or 15.75 + vang = Angle(90, 0, -90), + }, + } + }, + ["hg_m4a1_ris"] = { + VMBodygroups = { + {ind = 5, bg = 5}, + }, + AttPosMods = { + [5] = { + vpos = Vector(0, 1.4, 12), + vang = Angle(90, 0, -90), + }, + [6] = { + vpos = Vector(-1.41, -.2, 14), + vang = Angle(90, 0, 180), + }, + [15] = { + vpos = Vector(0, -1.75, 15.75), -- 21.75 or 15.75 + vang = Angle(90, 0, -90), + }, + }, + }, + ["hg_ru556"] = { + -- VMBodygroups = { + -- {ind = 5, bg = 7}, + -- }, + AttPosMods = { + -- [5] = { + -- vpos = Vector(-0.1, 1.05, 12), + -- vang = Angle(90, 0, -90), + -- }, + -- [6] = { + -- vpos = Vector(1.1, 0, 14), + -- vang = Angle(90, 0, 0), + -- }, + [16] = { + vpos = Vector(0, -1.65, 12.5), -- 21.75 or 15.75 + vang = Angle(90, 0, -90), + }, + }, + }, + ["hg_m4a1"] = { + VMBodygroups = { + {ind = 5, bg = 4}, + } + }, + ["hg_cqbr"] = { + VMBodygroups = { + {ind = 5, bg = 4}, + }, + }, + ["hg_adar"] = { + VMBodygroups = { + {ind = 5, bg = 8}, + }, + }, + ["hg_fpw"] = { + VMBodygroups = { + {ind = 5, bg = 6}, + --{ind = 6, bg = 4}, + } + }, + ["hg_m16a1"] = { + VMBodygroups = { + {ind = 5, bg = 1}, + } + }, + ["hg_m16a1_wood"] = { + VMBodygroups = { + {ind = 5, bg = 1}, + }, + VMSkin = 1 + }, + ["ud_m16_hg_heat"] = { + VMElements = { + { + Model = "models/weapons/arccw/atts/m203iron.mdl", + Bone = "m16_parent", + Scale = Vector(1, 1, 1), + Offset = { + pos = Vector(0, -1.2, 14.9), + ang = Angle(90, 0, -90), + } + } + }, + UC_UseClassicM203Mount = true, + }, + ["hg_m605"] = { + VMBodygroups = { + {ind = 5, bg = 1}, + {ind = 4, bg = 1}, + }, + AttPosMods = { + [3] = { + vpos = Vector(0, -0.05, 25.58), + vang = Angle(90, 0, -90), + }, + [6] = { -- also has no rail + vpos = Vector(0, 0.9, 22.2), + vang = Angle(90, 0, -90), + }, + } + }, + ["hg_m605_wood"] = { + VMBodygroups = { + {ind = 5, bg = 1}, + {ind = 4, bg = 1}, + }, + AttPosMods = { + [3] = { + vpos = Vector(0, 0, 25), + vang = Angle(90, 0, -90), + }, + [6] = { -- also has no rail + vpos = Vector(0, 0.8, 22), + vang = Angle(90, 0, -90), + }, + }, + VMSkin = 1 + }, + ["hg_lmg"] = { + VMBodygroups = { + {ind = 5, bg = 3}, + } + }, + ["hg_sd"] = { + VMBodygroups = { + {ind = 5, bg = 9}, + {ind = 4, bg = 3}, + {ind = 6, bg = 5} + }, + AttPosMods = { -- no rail, just pretend it's mounted to something + -- [8] = { + -- vpos = Vector(0, 0.7, 17.5), + -- vang = Angle(90, 0, -90), + -- }, + [16] = { + vpos = Vector(0, -1.65, 11.5), -- 21.75 or 15.75 + vang = Angle(90, 0, -90), + }, + } + }, + + ["ud_m16_upper_charm"] = { + AttPosMods = { + [1] = { + vpos = Vector(0, -4, 3), + vang = Angle(90, 0, -90), + SlideAmount = { + vmin = Vector(0, -3.4, 3 - 1.5), + vmax = Vector(0, -3.4, 3 + 1.5), + } + }, + }, + }, + ["ud_m16_upper_charm2"] = { + AttPosMods = { + [1] = { + vpos = Vector(0, -4.1, 3.5), + vang = Angle(90, 0, -90), + SlideAmount = { + vmin = Vector(0, -3.5, 3.5 - 2), + vmax = Vector(0, -3.5, 3.5 + 1), + } + }, + }, + }, + ["bravo_dicks_going_fart"] = { + AttPosMods = { + [8] = { + vpos = Vector(0.25, -1.4, 12), + vang = Angle(90, 0, 90), + }, + }, + }, + + ---- Cut content + ["hg_stub"] = { + VMBodygroups = { + {ind = 5, bg = 7}, + }, + AttPosMods = { + [3] = { + vpos = Vector(0, -0.35, 7), + vang = Angle(90, 0, -90) + }, + [6] = { + vpos = Vector(1.1, -0.4, 9), + vang = Angle(90, 0, 0), + }, + } + }, + ["barrel_stub"] = { + VMBodygroups = { + {ind = 4, bg = 4}, + {ind = 6, bg = 4}, + } + }, + ["hg_smg"] = { + VMBodygroups = { + {ind = 5, bg = 0}, + } + }, + ["m16_strap"] = { + VMBodygroups = { + {ind = 13, bg = 1}, + }, + }, +} + +-- Animations -- + +SWEP.Hook_Think = ArcCW.UC.ADSReload + +local sr_pmag = { + [path .. "magout_empty.ogg"] = path .. "pmagout.ogg", + [path .. "magin.ogg"] = path .. "pmagin.ogg", +} + +local pmag1, pmag2 = {}, {"ud_m16_pmag"} +SWEP.Hook_TranslateSound = function(wep, data) + if wep:CheckFlags(pmag1, pmag2) and sr_pmag[data] then return sr_pmag[data] end +end + +local rottle = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"} +local ratel = {common .. "rattle1.ogg", common .. "rattle2.ogg", common .. "rattle3.ogg"} + +SWEP.Animations = { + ["ready"] = { + Source = "fix", + Time = 45 / 30, + LHIK = true, + LHIKIn = 0.3, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.4, + SoundTable = { + {s = common .. "raise.ogg", t = 0}, + {s = common .. "rattle.ogg", t = 0.2}, + {s = path .. "chback.ogg", t = 0.15}, + {s = common .. "cloth_4.ogg", t = 0.5}, + {s = path .. "chamber.ogg", t = 0.5}, + }, + ProcDraw = true, + }, + ["idle"] = { + Source = "idle", + }, + ["idle_empty"] = { + Source = "idle_empty", + }, + ["draw"] = { + Source = "draw", + SoundTable = { + {s = common .. "raise.ogg", t = 0}, + {s = common .. "shoulder.ogg", t = 0.15}, + {s = ratel, t = 0.2}, + }, + }, + ["draw_empty"] = { + Source = "draw_empty", + Time = 20 / 30, + SoundTable = { + {s = common .. "raise.ogg", t = 0}, + {s = common .. "shoulder.ogg", t = 0.15}, + {s = ratel, t = 0.2}, + }, + }, + ["holster"] = { + Source = "holster", + LHIK = true, + LHIKIn = 0.3, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.4, + SoundTable = { + {s = ratel, t = 0}, + {s = common .. "cloth_6.ogg", t = 0.2}, + }, + }, + ["holster_empty"] = { + Source = "holster_empty", + Time = 20 / 30, + LHIK = true, + LHIKIn = 0.3, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.4, + SoundTable = { + {s = ratel, t = 0}, + {s = common .. "cloth_6.ogg", t = 0.2}, + }, + }, + ["trigger"] = { + Source = "idle", + MinProgress = .1, + SoundTable = { + {s = ")weapons/arccw_ud/uzi/prefire.ogg", t = 0, c = ci}, + }, + }, + ["fire"] = { + Source = "fire", + Time = 13 / 30, + ShellEjectAt = 0.01, + SoundTable = {{ s = {path .. "mech-01.ogg", path .. "mech-02.ogg", path .. "mech-03.ogg", path .. "mech-04.ogg", path .. "mech-05.ogg", path .. "mech-06.ogg"}, t = 0, v = 0.25 }}, + }, + ["fire_iron"] = { + Source = "fire", + Time = 13 / 30, + ShellEjectAt = 0.01, + SoundTable = { + { s = common .. "common_mech_light.ogg", t = 0, v = 0.25 }, + { s = {path .. "mech-01.ogg", path .. "mech-02.ogg", path .. "mech-03.ogg", path .. "mech-04.ogg", path .. "mech-05.ogg", path .. "mech-06.ogg"}, t = 0 } + }, + }, + ["fire_empty"] = { + Source = "fire_empty", + Time = 13 / 30, + ShellEjectAt = 0.01, + SoundTable = { + {s = path .. "mech_last.ogg", t = 0}, -- Temporary + }, + }, + ["fire_iron_empty"] = { + Source = "fire_empty", + Time = 13 / 30, + ShellEjectAt = 0.01, + SoundTable = { + {s = path .. "mech_last.ogg", t = 0}, -- Temporary + }, + }, + + ["fire_cycle"] = { + Source = "fire", + Time = 13 / 30, + }, + + ["cycle"] = { + Source = "fix", + Time = 36 / 30 * 0.7, + ShellEjectAt = 0.3, + LHIK = true, + LHIKIn = 0.3 * 0.7, + LHIKEaseIn = 0.4 * 0.7, + LHIKEaseOut = 0.15 * 0.7, + LHIKOut = 0.4 * 0.7, + SoundTable = { + {s = path .. "chback.ogg", t = 0.05}, + {s = common .. "cloth_4.ogg", t = 0.2}, + {s = path .. "chamber.ogg", t = 0.3}, + }, + }, + + ["fix"] = { + Source = "fix", + Time = 45 / 30, + ShellEjectAt = 0.3, + LHIK = true, + LHIKIn = 0.3, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.5, + LHIKOut = 0.7, + SoundTable = { + {s = path .. "chback.ogg", t = 0.15}, + {s = common .. "cloth_4.ogg", t = 0.5}, + {s = path .. "chamber.ogg", t = 0.5}, + }, + }, + ["fix_empty"] = { + Source = "fix_empty", + Time = 45 / 30, + ShellEjectAt = false, + LHIK = true, + LHIKIn = 0.3, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.4, + SoundTable = { + {s = path .. "chback.ogg", t = 0.15}, + {s = common .. "cloth_4.ogg", t = 0.5}, + {s = path .. "ch_forward_empty.ogg", t = 0.5}, + }, + }, + + -- 30 Round Reloads -- + + ["reload"] = { + Source = "reload", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + Time = 71 / 30, + MinProgress = 1.5, + LastClip1OutTime = 0.9, + LHIK = true, + LHIKIn = 0.2, + LHIKEaseIn = 0.2, + LHIKEaseOut = 0.4, + LHIKOut = 0.7, + SoundTable = { + {s = rottle, t = 0.0}, + {s = common .. "magpouch_gear.ogg", t = 0.2, v = 0.5}, + {s = ratel, t = 0.25}, + {s = path .. "magout_empty.ogg", t = 0.23}, + {s = ratel, t = 0.5}, + {s = rottle, t = 0.6}, + {s = path .. "struggle.ogg", t = 1, v = 0.4}, + {s = path .. "magin.ogg", t = 0.97}, + {s = ratel, t = 1.1}, + {s = rottle, t = 1.15}, + {s = common .. "grab-polymer.ogg", t = 1.77, v = 0.25}, + {s = common .. "rattle_b2i_rifle.ogg", t = 1.7}, + {s = common .. "shoulder.ogg", t = 1.8}, + }, + }, + ["reload_empty"] = { + Source = "reload_empty", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + Time = 87 / 30, + MinProgress = 2, + LastClip1OutTime = 0.7, + LHIK = true, + LHIKIn = 0.2, + LHIKEaseIn = 0.2, + LHIKEaseOut = 0.4, + LHIKOut = 0.9, + SoundTable = { + {s = rottle, t = 0.0}, + {s = ratel, t = 0.25}, + {s = common .. "magpouch_gear.ogg", t = 0.1, v = 0.5}, + {s = path .. "magout_empty.ogg", t = 0.2}, + {s = ratel, t = 0.5}, + {s = common .. "rifle_magdrop.ogg", t = 0.65}, + {s = path .. "struggle.ogg", t = 0.95, v = 0.4}, + {s = path .. "magin.ogg", t = 0.95}, + {s = ratel, t = 1.1}, + {s = rottle, t = 1.39}, + {s = path .. "boltdrop.ogg", t = 1.7}, + {s = ratel, t = 1.9}, + {s = common .. "rattle_b2i_rifle.ogg", t = 2.0}, + {s = common .. "grab-polymer.ogg", t = 2.1, v = 0.35}, + {s = common .. "shoulder.ogg", t = 2.1}, + }, + }, + + -- 20 Round Reloads -- + + ["reload_20"] = { + Source = "reload_20", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + Time = 71 / 30, + MinProgress = 1.5, + LastClip1OutTime = 0.9, + LHIK = true, + LHIKIn = 0.2, + LHIKEaseIn = 0.2, + LHIKEaseOut = 0.4, + LHIKOut = 0.7, + SoundTable = { + {s = rottle, t = 0.0}, + {s = ratel, t = 0.05}, + {s = path .. "magout_20.ogg", t = 0.09}, + {s = path .. "magpouch_20.ogg", t = 0.4}, + {s = rottle, t = 0.75}, + {s = ratel, t = 0.85}, + {s = path .. "struggle_20.ogg", t = 0.9, v = 0.4}, + {s = path .. "magin_20.ogg", t = 0.9}, + {s = rottle, t = 1.1}, + {s = ratel, t = 1.125}, + {s = common .. "rattle_b2i_rifle.ogg", t = 1.65}, + {s = common .. "grab-polymer.ogg", t = 1.7, v = 0.25}, + {s = common .. "shoulder.ogg", t = 1.75}, + }, + }, + ["reload_empty_20"] = { + Source = "reload_empty_20", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + Time = 86 / 30, + MinProgress = 2, + LastClip1OutTime = 0.7, + LHIK = true, + LHIKIn = 0.2, + LHIKEaseIn = 0.2, + LHIKEaseOut = 0.3, + LHIKOut = 0.8, + SoundTable = { + {s = common .. "magpouch_gear.ogg", t = 0}, + {s = rottle, t = 0.01}, + {s = ratel, t = 0.05}, + {s = path .. "magout_20.ogg", t = 0.075}, + {s = rottle, t = 0.75}, + {s = ratel, t = 0.9}, + {s = common .. "rifle_magdrop.ogg", t = 0.65}, + {s = path .. "struggle_20.ogg", t = 0.8, v = 0.4}, + {s = path .. "magin_20.ogg", t = 0.85}, + {s = rottle, t = 1.4}, + {s = ratel, t = 1.4}, + {s = path .. "chamber_press_20.ogg", t = 1.52}, + {s = common .. "rattle_b2i_rifle.ogg", t = 1.95}, + {s = common .. "grab-polymer.ogg", t = 2.075, v = 0.25}, + {s = common .. "shoulder.ogg", t = 2.13}, + }, + }, + + -- 40 Round Reloads -- + + ["reload_40"] = { + Source = "reload_40", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + Time = 71 / 30, + MinProgress = 1.5, + LastClip1OutTime = 0.9, + LHIK = true, + LHIKIn = 0.2, + LHIKEaseIn = 0.2, + LHIKEaseOut = 0.4, + LHIKOut = 0.7, + SoundTable = { + {s = rottle, t = 0.0}, + {s = ratel, t = 0.1}, + {s = path .. "magout_empty.ogg", t = 0.2}, + {s = common .. "magpouch_gear.ogg", t = 0.25}, + {s = rottle, t = 0.75}, + {s = ratel, t = 0.8}, + {s = path .. "struggle.ogg", t = 0.95, v = 0.4}, + {s = path .. "magin.ogg", t = 1.0}, + {s = rottle, t = 1.1}, + {s = ratel, t = 1.25}, + {s = common .. "rattle_b2i_rifle.ogg", t = 1.65}, + {s = common .. "shoulder.ogg", t = 1.75}, + }, + }, + ["reload_empty_40"] = { + Source = "reload_empty_40", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + Time = 85 / 30, + MinProgress = 2, + LastClip1OutTime = 0.7, + LHIK = true, + LHIKIn = 0.2, + LHIKEaseIn = 0.2, + LHIKEaseOut = 0.4, + LHIKOut = 0.8, + SoundTable = { + {s = rottle, t = 0.0}, + {s = path .. "magout_empty.ogg", t = 0.2}, + {s = common .. "magpouch_gear.ogg", t = 0.25}, + {s = rottle, t = 0.75}, + {s = common .. "rifle_magdrop.ogg", t = 0.8}, + {s = path .. "struggle.ogg", t = 1.0, v = 0.4}, + {s = path .. "magin.ogg", t = 1.05}, + {s = rottle, t = 1.475}, + {s = ratel, t = 1.475}, + {s = path .. "boltdrop.ogg", t = 1.78}, + {s = common .. "rattle_b2i_rifle.ogg", t = 2.1}, + {s = common .. "shoulder.ogg", t = 2.2}, + }, + }, + + -- 60 Round Reloads -- + + ["reload_60"] = { + Source = "reload_60", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + Time = 71 / 30, + MinProgress = 1.5, + LastClip1OutTime = 0.9, + LHIK = true, + LHIKIn = 0.2, + LHIKEaseIn = 0.2, + LHIKEaseOut = 0.4, + LHIKOut = 0.7, + SoundTable = { + {s = rottle, t = 0.0}, + {s = common .. "magpouch_gear.ogg", t = 0.2}, + {s = path .. "magout_empty.ogg", t = 0.25}, + {s = rottle, t = 0.75}, + {s = path .. "struggle.ogg", t = 1.0, v = 0.4}, + {s = path .. "magin.ogg", t = 1.1}, + {s = rottle, t = 1.1}, + {s = common .. "grab-polymer.ogg", t = 1.78, v = 0.25}, + {s = common .. "rattle_b2i_rifle.ogg", t = 1.8}, + {s = common .. "shoulder.ogg", t = 1.9}, + }, + }, + ["reload_empty_60"] = { + Source = "reload_empty_60", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + Time = 85 / 30, + MinProgress = 2, + LastClip1OutTime = 0.7, + LHIK = true, + LHIKIn = 0.2, + LHIKEaseIn = 0.2, + LHIKEaseOut = 0.4, + LHIKOut = 0.8, + SoundTable = { + {s = rottle, t = 0.0}, + {s = common .. "magpouch_gear.ogg", t = 0.2}, + {s = path .. "magout_empty.ogg", t = 0.25}, + {s = rottle, t = 0.75}, + {s = common .. "rifle_magdrop.ogg", t = 0.8}, + {s = path .. "struggle.ogg", t = 1.0, v = 0.4}, + {s = path .. "magin.ogg", t = 1.1}, + {s = rottle, t = 1.475}, + {s = ratel, t = 1.475}, + {s = path .. "boltdrop.ogg", t = 1.8}, + {s = common .. "rattle_b2i_rifle.ogg", t = 2.1}, + {s = common .. "grab-polymer.ogg", t = 2.15, v = 0.25}, + {s = common .. "shoulder.ogg", t = 2.2}, + }, + }, + + -- 100 Round Reloads -- + + ["reload_100"] = { + Source = "reload_100", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + Time = 71 / 30, + MinProgress = 1.75, + LastClip1OutTime = 0.9, + LHIK = true, + LHIKIn = 0.2, + LHIKEaseIn = 0.2, + LHIKEaseOut = 0.3, + LHIKOut = 0.5, + SoundTable = { + {s = rottle, t = 0.0}, + {s = path .. "magout_empty.ogg", t = 0.2}, + {s = rottle, t = 0.75}, + {s = path .. "struggle.ogg", t = 0.95, v = 0.4}, + {s = path .. "magin.ogg", t = 1.05}, + {s = rottle, t = 1.1}, + {s = path .. "magtap.ogg", t = 1.59}, + {s = common .. "cloth_4.ogg", t = 1.65}, + {s = common .. "rattle_b2i_rifle.ogg", t = 1.8}, + {s = common .. "grab-polymer.ogg", t = 1.85, v = 0.25}, + {s = common .. "shoulder.ogg", t = 2.0}, + }, + }, + ["reload_empty_100"] = { + Source = "reload_empty_100", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + Time = 90 / 30, + MinProgress = 2.5, + LastClip1OutTime = 0.7, + LHIK = true, + LHIKIn = 0.2, + LHIKEaseIn = 0.2, + LHIKEaseOut = 0.3, + LHIKOut = 0.6, + SoundTable = { + {s = rottle, t = 0.0}, + {s = path .. "magout_empty.ogg", t = 0.2}, + {s = rottle, t = 0.75}, + {s = common .. "magdrop.ogg", t = 0.65}, + {s = path .. "struggle.ogg", t = 0.95, v = 0.4}, + {s = path .. "magin.ogg", t = 1.05}, + {s = path .. "magtap.ogg", t = 1.59}, + {s = rottle, t = 1.75}, + {s = path .. "chback.ogg", t = 2.0}, + {s = common .. "cloth_4.ogg", t = 2.05}, + {s = path .. "chamber.ogg", t = 2.22}, + {s = common .. "rattle_b2i_rifle.ogg", t = 2.5}, + {s = common .. "grab-polymer.ogg", t = 2.55, v = 0.25}, + {s = common .. "shoulder.ogg", t = 2.6}, + }, + }, + + -- 9mm 32 Round Reloads -- + + ["reload_9mm"] = { + Source = "reload_9mm", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + Time = 70 / 30, + MinProgress = 1.5, + LastClip1OutTime = 0.9, + LHIK = true, + LHIKIn = 0.4, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.5, + SoundTable = { + {s = rottle, t = 0.0}, + {s = common .. "magpouch.ogg", t = 0.15}, + {s = "weapons/arccw_ud/uzi/" .. "magout.ogg", t = 16 / 30}, + {s = rottle, t = 0.75}, + {s = "weapons/arccw_ud/uzi/" .. "magin.ogg", t = 27 / 30}, + {s = rottle, t = 1.1}, + {s = common .. "magpouchin.ogg", t = 1.55}, + {s = common .. "shoulder.ogg", t = 1.93}, + }, + }, + ["reload_empty_9mm"] = { + Source = "reload_empty_9mm", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + Time = 80 / 30, + MinProgress = 2, + LastClip1OutTime = 0.7, + LHIK = true, + LHIKIn = 0.1, + LHIKEaseIn = 0.1, + LHIKEaseOut = 0.4, + LHIKOut = 0.9, + SoundTable = { + {s = rottle, t = 0.0}, + {s = "weapons/arccw_ud/uzi/" .. "magout.ogg", t = 0.1}, + {s = common .. "magpouch.ogg", t = 0.45}, + {s = rottle, t = 0.75}, + {s = "weapons/arccw_ud/uzi/" .. "magin.ogg", t = 0.8}, + {s = path .. "chamber_press.ogg", t = 1.7}, + {s = rottle, t = 1.39}, + {s = common .. "shoulder.ogg", t = 2.15}, + }, + }, + + + ["enter_inspect"] = { + Source = "inspect_enter", + -- time = 35 / 60, + LHIK = false, + LHIKIn = 0, + LHIKOut = 2.5, + SoundTable = { + {s = rottle, t = 0}, + {s = common .. "movement-rifle-02.ogg", t = 0.1}, + }, + }, + ["idle_inspect"] = { + Source = "inspect_loop", + -- time = 72 / 60, + LHIK = false, + LHIKIn = 0, + LHIKOut = 999, -- maybe im dumb + }, + ["exit_inspect"] = { + Source = "inspect_exit", + -- time = 66 / 60, + LHIK = false, + LHIKIn = 0, + LHIKOut = 999, -- maybe im dumb + SoundTable = { + {s = common .. "movement-rifle-04.ogg", t = 0.2}, + {s = rottle, t = 0.25}, + {s = rottle, t = 1.2}, + {s = common .. "movement-rifle-03.ogg", t = 1.25}, + }, + }, + ["enter_inspect_empty"] = { + Source = "inspect_enter_empty", + -- time = 35 / 60, + LHIK = false, + LHIKIn = 0, + LHIKOut = 2.5, + SoundTable = { + {s = rottle, t = 0}, + {s = common .. "movement-rifle-02.ogg", t = 0.1}, + }, + }, + ["idle_inspect_empty"] = { + Source = "inspect_loop_empty", + -- time = 72 / 60, + LHIK = false, + LHIKIn = 0, + LHIKOut = 999, + }, + ["exit_inspect_empty"] = { + Source = "inspect_exit_empty", + -- time = 66 / 60, + LHIK = false, + LHIKIn = 0, + LHIKOut = 999, + SoundTable = { + {s = common .. "movement-rifle-04.ogg", t = 0.2}, + {s = rottle, t = 0.25}, + {s = rottle, t = 1.2}, + {s = common .. "movement-rifle-03.ogg", t = 1.25}, + }, + }, +} + +local hgLookup = { + ["default"] = {0,4,0}, + ["tactical"] = {2,5,0}, + ["a1"] = {1,1,1}, + ["heat"] = {10,10,1}, + ["heatm203"] = {11,11,1}, + ["wood"] = {1,1,1}, + ["lmg"] = {3,3,1}, + ["fpw"] = {6,6,2}, + ["ru556"] = {7,7,3}, + ["adar"] = {8,8,2}, + ["hk416"] = {9,9,3}, + ["607"] = {9,9,0}, +} +-- Structure: 20in appearance, 14/11in appearance, gas block mode +-- Gas block modes: 0 standard, 1 always at 20" position, 2 at ADAR position when short, 3 at ADAR position when short and not flat + +local barrLookup = { + ["sd"] = -1, + ["20in"] = 0, + ["14in"] = 1, + ["fpw"] = 1, + ["10in"] = 2, +} + +SWEP.Hook_ModifyBodygroups = function(wep, data) + local vm = data.vm + local atts = wep.Attachments + if !IsValid(vm) then return end + + local barrel = string.Replace(atts[2].Installed or "20in","ud_m16_barrel_","") + local barr = barrLookup[barrel] + local hg = string.Replace(atts[3].Installed or "default","ud_m16_hg_","") + hg = string.Replace(hg,"uf_m16_hg_","") + + local optic = atts[1].Installed + local muzz = atts[4].Installed or barrel == "sd" + local laser = atts[8].Installed + local fs = atts[16].Installed + local retro = wep:GetBuff_Override("TopMount") + + -- Retro rail + if optic then + if retro then + -- Raised rail (retro) + vm:SetBodygroup(3, retro) + else + -- Flat rail + vm:SetBodygroup(1, 1) + vm:SetBodygroup(3, 2) + end + end + + -- Dynamic handguard + if barr == -1 then + vm:SetBodygroup(5,9) + elseif barr == 0 and hgLookup[hg] then + vm:SetBodygroup(5,hgLookup[hg][1]) + elseif hgLookup[hg] then + vm:SetBodygroup(5,hgLookup[hg][2]) + else + vm:SetBodygroup(5,9) + end + + -- Gas block + if barrel == "sd" or (atts[6].Installed == "ud_m16_receiver_fpw" and barr > 0) then + vm:SetBodygroup(6,5) + else + local gbPos = hgLookup[hg] and hgLookup[hg][3] or 0 + local lwr = atts[6].Installed + local flat = ( + wep:GetBuff_Override("FrontSight") + or atts[6].Installed == "ud_m16_receiver_fpw" + or (optic and fs ~= "ud_m16_charm_fs" and !(wep:GetBuff_Override("IronSight") or wep:GetBuff_Override("TopMount"))) + ) and 1 or 0 + + if gbPos == 1 or barr == 0 then + vm:SetBodygroup(6, 0 + flat) + elseif gbPos == 2 then + vm:SetBodygroup(6, 4 + flat * 2) + elseif gbPos == 3 then + vm:SetBodygroup(6, 4 - flat) + else + vm:SetBodygroup(6, 2 + flat) + end + end + + -- Default flash hider + if !muzz then + if barr == 0 then + vm:SetBodygroup(11,1) + elseif barr == 1 then + vm:SetBodygroup(11,2) + else + vm:SetBodygroup(11,3) + end + else + vm:SetBodygroup(11,0) + end + + -- Tactical clamp + if laser and hg ~= "tactical" then + if barr == 0 then + vm:SetBodygroup(10,1) + elseif barr == 1 then + vm:SetBodygroup(10,3) + else + vm:SetBodygroup(10,2) + end + else + vm:SetBodygroup(10,0) + end + + -- Disable tac rail element with tac hg + if hg == "tactical" and (atts[7].Installed or atts[18].Installed) then + vm:SetBodygroup(9,0) + end + + -- .50 Beowulf magazines + if atts[5].Installed == "ud_m16_receiver_50beo" and !atts[11].Installed then + vm:SetBodygroup(2, 8) + end +end + +-- RAYCAR-0, rifle barrel +local bar0_fake = "First variation of the RAYCAR rifle. Tests showed that users were more likely to hit a target if they fired multiple shots, but were likely to spray in full-auto and fail to hit anything. As a result, a ratcheted three-round burst system was implemented which limited the maximum burst a user could fire to three shots.\n\nWell-rounded gun with no major downsides." + +-- RAYCAR-1, carbine barrel +local bar1_fake = "Second variation of the RAYCAR rifle. It eventually replaced the RAYCAR-0 across much of the Army for its favorably low weight and comparable performance. The -1 variant has since become one of the most iconic and widespread American service rifles in the modern era.\n\nLight and versatile, but requires discipline to control." + +-- RAYCAR-2, commando barrel +local bar2_fake = "Third variation of the RAYCAR rifle. Developed with assistance from the Navy, the \"commando\" barrel allows for the weapon to be very compact, even short enough to be classified as a submachine gun, enhancing usability in vehicles and in enclosed spaces.\n\nVery lightweight and manuverable, but with very aggressive recoil to match." + +-- RAYPAW :3 +local smgDesc_fake = "Submachine gun based on the RAYCAR rifle. Despite its similar appearance, it uses a different mechanism from its parent rifle.\n\nMore accurate than other submachine guns due to its rifle frame and closed-bolt mechanism." + +-- RBY50 +local beoDesc_fake = "Aftermarket semi-automatic variant of the RAYCAR rifle firing an oversized magnum cartridge.\n\nProvides extremely high stopping power at close range." + +-- RBY300 +local blkDesc_fake = "Aftermarket automatic variant of the RAYCAR rifle. The .300 Blackout cartridge has a ballistic performance more akin to the 7.62x39mm Soviet cartridge, with a similarly sized projectile but shorter effective range.\n\nSlightly more inaccurate, made up with a higher stopping power and a subsonic projectile." + +-- UKCAR +local ukDesc_fake = "Normally, RAYCAR style rifles are imported with a semi-automatic fire group for the civilian market. This one, however, has been neutered by authority of the British crown with a manual-action receiver.\n\nBit cringe, innit?" + +-- RAYSAW +local lmgDesc_fake = "Configuration of the RAYCAR designed for a light machine gun role, used vaguely within the Marine Corps before the adoption of the Minimi.\n\nHeavier than the standard platform, but the integral bipod can be deployed onto surfaces for excellent recoil control." + +-- Fallout barrel or sumn idk +local ncrDesc_fake = "Standard-issue rifle of the New California Republic. Traditionally produced with a semi-automatic receiver, the wooden furniture is more readily replaceable and adds additional recoil control for maximum accuracy.\n\nWell-rounded gun with no major downsides." + +-- Patriot easter egg. Is it overpowered? I don't think so, a configuration like this is already pretty uncontrollable and imprecise as is, and overheating is the new magazine. +local a1, a2 = {}, {"patr1", "patr2", "patr3", "patr4", "patr5"} +SWEP.O_Hook_Override_BottomlessClip = function(wep, data) + if wep:CheckFlags(a1, a2) then + data.current = true + end +end + + +SWEP.Hook_NameChange = function(wep, name) + local trueNames = GetConVar("arccw_truenames"):GetBool() + local atts = wep.Attachments + local flat = atts[1].Installed and !wep:GetBuff_Override("TopMount") + + local barrel = string.Replace(atts[2].Installed or "20in","ud_m16_barrel_","") + local barr = barrLookup[barrel] + local hg = string.Replace(atts[3].Installed or "default","ud_m16_hg_","") + local upr = string.Replace(atts[5].Installed or "default","ud_m16_receiver_","") + local lwr = string.Replace(atts[6].Installed or "default","ud_m16_receiver_","") + + if wep:CheckFlags(a1, a2) then -- Patriot configuration + wep.Trivia_Desc = patriotDesc + return "The Patriot" + elseif !trueNames then -- Custom lore-based fake names + local pre = (lwr == "auto" and "AM" or "RAY") + if upr == "9mm" then + local sd = (barr == -1) + wep.Trivia_Desc = smgDesc_fake + if flat then + return (sd and pre .. "SSMG-NG") or pre .. "PAW-" .. barr .. "NG" + end + return (sd and pre .. "SSMG") or pre .. "PAW-" .. barr + elseif upr == "50beo" then + wep.Trivia_Desc = beoDesc_fake + return "RBY"--50" + elseif upr == "300blk" then + wep.Trivia_Desc = blkDesc_fake + return "RBY"--300" + elseif lwr == "fpw" then + wep.Trivia_Desc = bar1_fake + return pre .. "FPW" + elseif lwr == "cali" then + wep.Trivia_Desc = ukDesc_fake + return "UKCAR" + else + if barr == 0 then + if hg == "lmg" then + wep.Trivia_Desc = lmgDesc_fake + return pre .. "SAW" .. (flat and "-NG" or "") + elseif flat then + return pre .. "CAR-0NG" + else + wep.Trivia_Desc = bar0_fake + return pre .. "CAR-0" + end + elseif barr == 1 then + wep.Trivia_Desc = bar1_fake + if flat then + return pre .. "CAR-1NG" + end + return pre .. "CAR-1" + elseif barr == 2 then + wep.Trivia_Desc = bar2_fake + if flat then + return pre .. "CAR-2NG" + end + return pre .. "CAR-2" + end + end + + wep.Trivia_Desc = bar0_fake + return pre .. "CAR-0" + + else + + if upr == "9mm" then + local sd = (barr == -1) + wep.Trivia_Desc = smgDesc + if lwr == "semi" then + return "AR-15 9mm" + elseif flat then + return "R0991" + end + return "R0635" + + end + + if lwr == "auto" then + if upr == "a1" then + wep.Trivia_Desc = a1Desc + if barr == 0 then + return "M16A1" + elseif barr == 1 then + return "M605" + end + wep.Trivia_Desc = carDesc + return "M609" + end + if barr == 0 then + wep.Trivia_Desc = a3Desc + if hg == "lmg" then + wep.Trivia_Desc = lmgDesc + return "Colt LMG" + elseif flat and hg == "tactical" then + return "R0901" + end + return "M16A3" + elseif barr == 1 then + wep.Trivia_Desc = m4Desc + if flat then + return "M4A1" + end + return "XM4" + else + wep.Trivia_Desc = carDesc + if flat then + wep.Trivia_Desc = m4Desc + if upr == "300blk" then + return "Mk 18" + end + return "Mk 18 Mod 0" + end + return "CAR-15" + end + elseif lwr == "semi" or upr == "50beo" then + wep.Trivia_Desc = arDesc + if hg == "wood" then + wep.Trivia_Desc = ncrDesc + if barr == 0 then + return "Service Rifle" + end + return "Service Carbine" + elseif flat and hg == "adar" then + return "ADAR 2-15" + elseif barr > 0 then + if barr == 2 and atts[10].Installed == "ud_m16_stock_buffer" then + return "AR-15 Pistol" + elseif upr == "a1" and barr == 1 then + return "CRXM177E2B" + else + return "AR-15 SBR" + end + elseif upr == "a1" then + return "CRM16A1" + end + return "AR-15" + elseif lwr == "fpw" then + wep.Trivia_Desc = m4Desc + return "M231 FPW" + elseif lwr == "cali" then + wep.Trivia_Desc = ukDesc + return "AR-15GB" + else + wep.Trivia_Desc = origDesc + if barr == 0 and flat then + return "M16A4" + elseif barr == 1 then + wep.Trivia_Desc = m4Desc + return "M4 Carbine" + elseif barr == 2 then + return "M16 Commando" + end + end + + wep.Trivia_Desc = origDesc + return "M16A2" + + end +end + + + +SWEP.Attachments = { + { + PrintName = "Optic", + DefaultAttName = "Iron Sights", + InstalledEles = {"upper_flat"}, + Slot = {"optic","optic_sniper","ud_m16_rs"}, + Bone = "m16_parent", + Offset = { + vpos = Vector(0, -1.75, 3), + vang = Angle(90, 0, -90), + }, + SlideAmount = { + vmin = Vector(0, -1.6, 3 - 2), + vmax = Vector(0, -1.6, 3 + 1), + }, + }, + { + PrintName = "Barrel", + DefaultAttName = "20\" Standard Barrel", + DefaultAttIcon = Material("entities/att/acwatt_ud_m16_barrel_20.png", "smooth mips"), + Slot = "ud_m16_blen", + Bone = "m16_parent", + Offset = { + vpos = Vector(2.8, -4.2, -11.5), + vang = Angle(90, 0, -90), + }, + }, + { + PrintName = "Handguard", + DefaultAttName = "Ribbed Handguard", + DefaultAttIcon = Material("entities/att/acwatt_ud_m16_hg_ribbed.png", "smooth mips"), + Slot = "ud_m16_hg", + Bone = "m16_parent", + Offset = { + vpos = Vector(0, -1.63, -0.41), + vang = Angle(90, 0, -90), + }, + ExcludeFlags = {"sd"} + }, + { + PrintName = "Muzzle", + DefaultAttName = "Standard Muzzle", + Slot = {"muzzle", "ud_m16_muzzle"}, + Bone = "m16_parent", + VMScale = Vector(1, 1, 1), + WMScale = VMScale, + Offset = { + vpos = Vector(0, -.33, 23.27), + vang = Angle(90, 0, -90), + }, + ExcludeFlags = {"sd", "m16_stub"}, + }, + { + PrintName = "Upper Receiver", + DefaultAttName = "5.56x45mm Upper", + DefaultAttIcon = Material("entities/att/uc_bullets/556x45.png", "smooth mips"), + Slot = {"ud_m16_receiver"}, + Bone = "m16_parent", + Offset = { + vpos = Vector(2.8, -4.2, -11.5), + vang = Angle(90, 0, -90), + }, + ExcludeFlags = {"ud_m16_fpw"} + }, + { + PrintName = "Lower Receiver", + DefaultAttName = "Burst Lower", + DefaultAttIcon = Material("entities/att/acwatt_ud_m16_receiver_default.png", "smooth mips"), + Slot = {"ud_m16_fcg"}, + Bone = "m16_parent", + Offset = { + vpos = Vector(2.8, -4.2, -11.5), + vang = Angle(90, 0, -90), + }, + ExcludeFlags = {"m16_nolower"} + }, + { + PrintName = "Underbarrel", + Slot = "foregrip", + Bone = "m16_parent", + Offset = { + vpos = Vector(0, 6, 11), + vang = Angle(90, 0, -90), + }, + InstalledEles = {"rail_fg"}, + ExcludeFlags = {"m16_lmg", "m16_stub"}, + SlideAmount = { + vmin = Vector(0, .65, 11.5), + vmax = Vector(0, .65, 7.5), + }, + MergeSlots = {18}, + }, + { + PrintName = "Tactical", + Slot = {"tac"}, + Bone = "m16_parent", + Offset = { + vpos = Vector(0, 0.3, 21.25), + vang = Angle(90, 0, -90), + }, + GivesFlags = {"tac"}, + --InstalledEles = {"ud_m16_clamp_fullsize"} + }, + { + PrintName = "Grip Type", + Slot = {"ud_m16_grip"}, + DefaultAttName = "Standard Grip", + DefaultAttIcon = Material("entities/att/acwatt_ud_m16_grip_default.png", "smooth mips"), + ExcludeFlags = {"m16_adar"} + }, + { + PrintName = "Stock", + Slot = {"ud_m16_stock","go_stock"}, + DefaultAttName = "Full Stock", + DefaultAttIcon = Material("entities/att/acwatt_ud_m16_stock_default.png", "smooth mips"), + -- GSO support + InstalledEles = {"stock_231_tube"}, + Bone = "m16_parent", + Offset = { + vpos = Vector(-0.02, 0, -2.7), + vang = Angle(90, 0, -90), + }, + }, + { + PrintName = "Magazine", + Slot = {"ud_m16_mag"}, + DefaultAttName = "30-Round Mag", + DefaultAttIcon = Material("entities/att/acwatt_ud_m16_mag_30.png", "smooth mips"), + }, + { + PrintName = "Ammo Type", + DefaultAttName = "\"FMJ\" Full Metal Jacket", + DefaultAttIcon = Material("entities/att/arccw_uc_ammo_generic.png", "mips smooth"), + Slot = "uc_ammo", + }, + { + PrintName = "Powder Load", + Slot = "uc_powder", + DefaultAttName = "Standard Load" + }, + { + PrintName = "Training Package", + Slot = "uc_tp", + DefaultAttName = "Basic Training" + }, + { + PrintName = "Internals", + Slot = "uc_fg", -- Fire group + DefaultAttName = "Standard Internals" + }, + { + PrintName = "Front Sight", + Slot = {"ud_m16_fs", "ud_m16_charm"}, + FreeSlot = true, + Bone = "m16_parent", + Offset = { + vpos = Vector(0, -1.65, 16.75), -- 21.75 or 15.75 + vang = Angle(90, 0, -90), + }, + ExcludeFlags = {"sight_magpul"} + }, + { + PrintName = "Charm", + Slot = {"charm", "fml_charm"}, -- "ud_m16_charm" + FreeSlot = true, + Bone = "m16_parent", + Offset = { + vpos = Vector(0.48, 0.5, 3.9), + vang = Angle(90, 0, -90), + }, + -- MergeSlots = {17} + }, + { + PrintName = "M203 slot", + Slot = "uc_ubgl", + Bone = "m16_parent", + Offset = { + vpos = Vector(0, -0.4, 7.2), + vang = Angle(90, 0, -90), + }, + Hidden = true, + InstalledEles = {"rail_fg"}, + ExcludeFlags = {"m16_lmg", "m16_stub"}, + } +} \ No newline at end of file diff --git a/lua/weapons/arccw_ud_m79.lua b/lua/weapons/arccw_ud_m79.lua new file mode 100644 index 0000000..f6dcc11 --- /dev/null +++ b/lua/weapons/arccw_ud_m79.lua @@ -0,0 +1,453 @@ +SWEP.Base = "arccw_base" +SWEP.Spawnable = true +SWEP.Category = "ArcCW - Urban Coalition" +SWEP.UC_CategoryPack = "1Urban Decay" +SWEP.AdminOnly = false +SWEP.UseHands = true + +-- Muzzle and shell effects -- + +SWEP.MuzzleEffect = "muzzleflash_m79" +SWEP.ShellEffect = "arccw_uc_shelleffect" +SWEP.ShellModel = "models/weapons/arccw/ud_shells/12.mdl" +SWEP.ShellPitch = 100 +SWEP.ShellSounds = ArcCW.ShotgunShellSoundsTable +SWEP.ShellScale = 0 + +SWEP.MuzzleEffectAttachment = 1 +SWEP.CaseEffectAttachment = 3 +SWEP.CamAttachment = 2 + +-- Fake name -- + +SWEP.PrintName = "AMSGL" +-- (American) Squad Grenade Launcher or something. similar to M16's fake name + +-- True name -- + +SWEP.TrueName = "M79" + +-- Trivia -- + +SWEP.Trivia_Class = "Grenade Launcher" +SWEP.Trivia_Desc = "Single-shot 40mm grenade launcher intended to provide infantry with portable long-range explosive firepower. Accurate, flexible and reliable, it is well-respected among American soldiers." +SWEP.Trivia_Manufacturer = "Stoner's Legacy Ltd." +SWEP.Trivia_Calibre = "40x46mm" +SWEP.Trivia_Mechanism = "Break-action" +SWEP.Trivia_Country = "USA" +SWEP.Trivia_Year = 1961 + +-- Weapon slot -- + +SWEP.Slot = 4 + +-- Weapon's manufacturer real name -- + +if GetConVar("arccw_truenames"):GetBool() then + SWEP.PrintName = SWEP.TrueName + SWEP.Trivia_Manufacturer = "Springfield Armory" +end + +-- Viewmodel / Worldmodel / FOV -- + +SWEP.ViewModel = "models/weapons/arccw/c_ud_m79.mdl" +SWEP.WorldModel = "models/weapons/arccw/c_ud_m79.mdl" +SWEP.ViewModelFOV = 60 +SWEP.AnimShoot = ACT_HL2MP_GESTURE_RANGE_ATTACK_SHOTGUN + +SWEP.MirrorVMWM = true +SWEP.WorldModelOffset = { + pos = Vector(-8, 5.5, -4.5), + ang = Angle(-12, 0, 180), + bone = "ValveBiped.Bip01_R_Hand", + scale = 1 - ( 0.35 * 0.5 ) +} + +-- Damage parameters -- + +SWEP.Damage = 200 +SWEP.DamageMin = 200 +SWEP.Range = 40 +SWEP.RangeMin = 0 + +SWEP.Num = 1 +SWEP.Penetration = 0 + +SWEP.ShootEntity = "arccw_uc_40mm_he" +SWEP.MuzzleVelocity = 5000 + +-- Mag size -- + +SWEP.ChamberSize = 0 +SWEP.Primary.ClipSize = 1 +SWEP.ExtendedClipSize = 1 +SWEP.ReducedClipSize = 1 + +-- Recoil -- + +SWEP.Recoil = 4 +SWEP.RecoilSide = 2 +SWEP.RecoilSide = 1 + +SWEP.RecoilRise = 0.24 +SWEP.VisualRecoilMult = 1 +SWEP.MaxRecoilBlowback = 1 +SWEP.MaxRecoilPunch = 1 + +SWEP.Sway = 0.5 + +-- Firerate / Firemodes -- + +SWEP.Delay = 60 / 220 +SWEP.Firemodes = { + { + Mode = 1, + PrintName = "fcg.break", + }, + { + Mode = 0 + } +} + +SWEP.ShootVol = 160 +SWEP.ShootPitch = 100 + +SWEP.ProceduralRegularFire = false +SWEP.ProceduralIronFire = false + +-- NPC -- + +SWEP.NPCWeaponType = "weapon_rpg" +SWEP.NPCWeight = 210 + +-- Accuracy -- + +SWEP.AccuracyMOA = 30 +SWEP.HipDispersion = 500 +SWEP.MoveDispersion = 200 +SWEP.JumpDispersion = 1000 + +SWEP.Primary.Ammo = "smg1_grenade" + +-- Speed multipliers -- + +SWEP.SpeedMult = 0.92 +SWEP.SightedSpeedMult = 0.5 +SWEP.SightTime = 0.4 +SWEP.ShootSpeedMult = 0.75 + +-- Length -- + +SWEP.BarrelLength = 48 +SWEP.ExtraSightDist = 2 + +-- Ironsights / Customization / Poses -- + +SWEP.HoldtypeHolstered = "passive" +SWEP.HoldtypeActive = "ar2" +SWEP.HoldtypeSights = "rpg" + +SWEP.IronSightStruct = { + Pos = Vector(-3.51, -5, 2.2), + Ang = Angle(0, 0, 0), + Midpoint = { + Pos = Vector(0, 0, 0), + Ang = Angle(0, -1, 0), + }, + Magnification = 1, + SwitchToSound = "", + CrosshairInSights = false, +} + +SWEP.HolsterPos = Vector(-0.5, -4, -3) +SWEP.HolsterAng = Angle(3.5, 7, -20) + +SWEP.ActivePos = Vector(0, 0, 0) +SWEP.ActiveAng = Angle(0, 0, 0) + +SWEP.CrouchPos = Vector(-4, -2, 0) +SWEP.CrouchAng = Angle(0, 0, -30) + +SWEP.BarrelOffsetSighted = Vector(0, 0, -4) +SWEP.BarrelOffsetHip = Vector(6, 0, -8) + +-- Firing sounds -- + +local common = ")/arccw_uc/common/" +local path = ")/arccw_uc/common/40mm/" +local rottle = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"} +local casing = {"arccw_uc/common/40mm/casing-40mm-01.ogg", "arccw_uc/common/40mm/casing-40mm-02.ogg", "arccw_uc/common/40mm/casing-40mm-03.ogg", "arccw_uc/common/40mm/casing-40mm-04.ogg", "arccw_uc/common/40mm/casing-40mm-05.ogg", "arccw_uc/common/40mm/casing-40mm-06.ogg"} + +--SWEP.Hook_AddShootSound = ArcCW.UC.InnyOuty + +SWEP.ShootSound = { + path .. "fire-01.ogg", + path .. "fire-02.ogg", + path .. "fire-03.ogg", + path .. "fire-04.ogg", + path .. "fire-05.ogg", + path .. "fire-06.ogg" +} +SWEP.DistantShootSound = { + path .. "fire-dist-01.ogg", + path .. "fire-dist-02.ogg", + path .. "fire-dist-03.ogg", + path .. "fire-dist-04.ogg", + path .. "fire-dist-05.ogg", + path .. "fire-dist-06.ogg" +} +--[[SWEP.DistantShootSoundOutdoors = { + path .. "fire-dist-01.ogg", + path .. "fire-dist-02.ogg", + path .. "fire-dist-03.ogg", + path .. "fire-dist-04.ogg", + path .. "fire-dist-05.ogg", + path .. "fire-dist-06.ogg" +} +SWEP.DistantShootSoundIndoors = { + common .. "fire-dist-int-shotgun-01.ogg", + common .. "fire-dist-int-shotgun-02.ogg", + common .. "fire-dist-int-shotgun-03.ogg", + common .. "fire-dist-int-shotgun-04.ogg", + common .. "fire-dist-int-shotgun-05.ogg", + common .. "fire-dist-int-shotgun-06.ogg" +}]] + +-- Animations -- + +SWEP.Hook_Think = ArcCW.UC.ADSReload + +SWEP.Animations = { + ["idle"] = { + Source = "idle", + }, + ["draw"] = { + Source = "draw", + SoundTable = ArcCW.UC.DrawSounds, + }, + ["holster"] = { + Source = "holster", + SoundTable = ArcCW.UC.HolsterSounds, + }, + ["fire"] = { + Source = "fire", + Time = 20 / 30, + SoundTable = {{ s = {path .. "mech-01.ogg", path .. "mech-02.ogg", path .. "mech-03.ogg", path .. "mech-04.ogg", path .. "mech-05.ogg", path .. "mech-06.ogg"}, t = 0, v = 0.25 }}, + }, + ["fire_iron"] = { + Source = "fire", + Time = 20 / 30, + SoundTable = { + { s = common .. "common_mech_heavy.ogg", t = 0 }, + { s = {path .. "mech-01.ogg", path .. "mech-02.ogg", path .. "mech-03.ogg", path .. "mech-04.ogg", path .. "mech-05.ogg", path .. "mech-06.ogg"}, t = 0 } + }, + }, + ["reload"] = { + Source = "reload", + Time = 101 / 30, + TPAnim = ACT_HL2MP_GESTURE_RELOAD_SHOTGUN, + LHIK = true, + LHIKIn = 0.6, + LHIKEaseIn = 0.2, + LHIKEaseOut = 0.2, + LHIKOut = 0.5, + LastClip1OutTime = 1.5, + MinProgress = 2.2, + SoundTable = { + {s = rottle, t = 0}, + {s = common .. "breaker_open.ogg", t = 0.2}, + {s = common .. "gl_remove.ogg", t = 0.9}, + {s = rottle, t = 1.0}, + {s = common .. "magpouch.ogg", t = 1.4}, + {s = casing, t = 1.45, v = 0.25}, + {s = common .. "gl_insert.ogg", t = 1.5}, + {s = rottle, t = 2.25}, + {s = common .. "breaker_close.ogg", t = 2.2}, + -- { + -- t = 0.6, + -- e = "RagdollImpact", -- Please add some kind of smoke particle after opening the chamber + -- att = 1, + -- mag = 100, + -- } + }, + },["reload_shotgun"] = { + Source = "reload", + Time = 101 / 30, + TPAnim = ACT_HL2MP_GESTURE_RELOAD_SHOTGUN, + LHIK = true, + LHIKIn = 0.6, + LHIKEaseIn = 0.2, + LHIKEaseOut = 0.2, + LHIKOut = 0.5, + LastClip1OutTime = 1.5, + SoundTable = { + {s = rottle, t = 0}, + {s = common .. "breaker_open.ogg", t = 0.3}, + {s = common .. "gl_remove.ogg", t = 0.9}, + {s = rottle, t = 1.0}, + {s = common .. "40mm_casing_1.ogg", t = 1.6}, + {s = common .. "gl_insert.ogg", t = 2.0}, + {s = rottle, t = 2.25}, + {s = common .. "breaker_close.ogg", t = 2.5}, + { + t = 1, ind = 1, bg = 2, -- Empty shell bodygroup + }, + { + t = 1.5, ind = 1, bg = 1, + } + }, + }, + ["reload_caseless"] = { + Source = "reload_caseless", + Time = 101 / 30, + TPAnim = ACT_HL2MP_GESTURE_RELOAD_SHOTGUN, + LHIK = true, + LHIKIn = 0.74, + LHIKEaseIn = 0.2, + LHIKEaseOut = 0.2, + LHIKOut = 0.6, + SoundTable = { + {s = rottle, t = 0}, + {s = common .. "breaker_open.ogg", t = 0.3}, + {s = rottle, t = 0.75}, + {s = common .. "gl_insert.ogg", t = 1.5}, + {s = rottle, t = 2.0}, + {s = common .. "breaker_close.ogg", t = 2.25}, + -- { + -- t = 0.6, + -- e = "muzzleflash_m79", -- Please add some kind of smoke particle after opening the chamber + -- att = nil, + -- mag = 100, + -- } + }, + }, +} + +SWEP.BulletBones = { + [1] = "m79_grenade", +} + +-- Bodygroups -- + +SWEP.AttachmentElements = { + ["m79_pirategun"] = { + VMBodygroups = {{ind = 0, bg = 1}}, + }, + ["m79_nostock"] = { + VMBodygroups = {{ind = 2, bg = 1}}, + }, + ["m79_rail"] = { + VMBodygroups = {{ind = 3, bg = 1}}, + }, + + ["40mm_buckshot"] = { + VMBodygroups = {{ind = 1, bg = 1}}, + }, + ["40mm_buckshot_empty"] = { + VMBodygroups = {{ind = 1, bg = 2}}, + }, + ["40mm_caseless"] = { + VMBodygroups = {{ind = 1, bg = 3}}, + }, + ["40mm_hornetnest"] = { + VMBodygroups = {{ind = 1, bg = 4}}, + }, + ["40mm_incendiary"] = { + VMBodygroups = {{ind = 1, bg = 5}}, + }, + ["40mm_napalm"] = { + VMBodygroups = {{ind = 1, bg = 5}}, + }, +} + +SWEP.Attachments = { + { + PrintName = "Optic", + DefaultAttName = "Iron Sights", + Slot = {"optic_lp", "optic", "optic_sniper"}, + Bone = "m79_front", + Offset = { + vpos = Vector(0, -3.6, 1), + vang = Angle(90, 2, -90), + }, + InstalledEles = {"m79_rail"}, + ExcludeFlags = {"m79_pirategun"}, + }, + { + PrintName = "Tube", + DefaultAttName = "Standard Tube", + DefaultAttIcon = Material("entities/att/acwatt_ud_m79_barrel.png", "smooth mips"), + Slot = "ud_m79_barrel", + Bone = "m79_front", + Offset = { + vpos = Vector(3.45, -5.3, -22), + vang = Angle(90, 2, -90), + }, + }, + { + PrintName = "Underbarrel", + Slot = {"foregrip"}, + Bone = "m79_front", + Offset = { + vpos = Vector(0, 0.4, 1.25), + vang = Angle(90, 0, -90), + }, + InstalledEles = {"m79_rail"}, + ExcludeFlags = {"m79_pirategun"}, + MergeSlots = {10}, + }, + { + PrintName = "Tactical", + Slot = {"tac_pistol"}, + Bone = "m79_front", + Offset = { + vpos = Vector(0.25, 0, 5), + vang = Angle(90, 0, -90), + }, + ExcludeFlags = {"m79_pirategun"}, + }, + { + PrintName = "Stock", + Slot = {"ud_m79_stock"}, + DefaultAttName = "Wooden Stock", + DefaultAttIcon = Material("entities/att/acwatt_ud_m79_stock.png", "smooth mips"), + }, + { + PrintName = "Grenade Type", + DefaultAttName = "High Explosive", + DefaultAttIcon = Material("entities/att/arccw_uc_40mm_generic.png", "smooth mips"), + Slot = "uc_40mm", + }, + { + PrintName = "Training Package", + Slot = "uc_tp", + DefaultAttName = "Basic Training" + }, + { + PrintName = "Internals", + Slot = "uc_fg_singleshot", -- Fire group + DefaultAttName = "Standard Internals", + }, + { + PrintName = "Charm", + Slot = {"charm", "fml_charm"}, + FreeSlot = true, + Bone = "m79_front", + Offset = { + vpos = Vector(0.8, -1, 0), + vang = Angle(90, 0, -90), + }, + }, + { + PrintName = "M203 slot", + Slot = "uc_ubgl", + Bone = "m79_front", + Offset = { + vpos = Vector(0, -1.1, 0.9), + vang = Angle(90, 0, -90), + }, + InstalledEles = {"m79_rail"}, + ExcludeFlags = {"m79_pirategun"}, + Hidden = true, + } +} \ No newline at end of file diff --git a/lua/weapons/arccw_ud_mini14.lua b/lua/weapons/arccw_ud_mini14.lua new file mode 100644 index 0000000..6bdc843 --- /dev/null +++ b/lua/weapons/arccw_ud_mini14.lua @@ -0,0 +1,925 @@ +SWEP.Base = "arccw_base" +SWEP.Spawnable = true +SWEP.Category = "ArcCW - Urban Coalition" +SWEP.UC_CategoryPack = "1Urban Decay" +SWEP.AdminOnly = false +SWEP.UseHands = true + +-- Effects -- + +SWEP.MuzzleEffect = "muzzleflash_1" +SWEP.ShellEffect = "arccw_uc_shelleffect" +SWEP.ShellModel = "models/weapons/arccw/uc_shells/556x45.mdl" +SWEP.ShellScale = 0.666 +--SWEP.ShellMaterial = "models/weapons/arcticcw/shell_556" +SWEP.ShellPitch = 100 + +SWEP.MuzzleEffectAttachment = 1 +SWEP.CaseEffectAttachment = 2 +SWEP.CamAttachment = 3 +SWEP.TracerNum = 1 +SWEP.TracerCol = Color(25, 255, 25) +SWEP.TracerWidth = 2 + +-- Fake name -- + +SWEP.PrintName = "Patriot 809" + +-- True name -- + +SWEP.TrueName = "Mini-14" + +-- Trivia -- + +SWEP.Trivia_Class = "Semi-Automatic Rifle" +SWEP.Trivia_Desc = [[Autoloading rifle designed for better accuracy than competing models. Due to its appearance, it is sometimes exempted from gun control laws targeting "Assault Weapons" despite its identical ability to kill. This has helped it find success despite its higher cost and non-standard magazine well. + +While it can perform well in close-quarters combat, its high accuracy excels in mid-range engagements.]] +SWEP.Trivia_Manufacturer = "Rifles International" +SWEP.Trivia_Calibre = "5.56x45mm NATO" +SWEP.Trivia_Mechanism = "Gas-Operated Rotating Bolt" +SWEP.Trivia_Country = "USA" +SWEP.Trivia_Year = 1973 + +-- Weapon slot -- + +SWEP.Slot = 2 + +-- Weapon's manufacturer real name -- + +if GetConVar("arccw_truenames"):GetBool() then + SWEP.PrintName = SWEP.TrueName + SWEP.Trivia_Manufacturer = "Sturm, Ruger & Company" +end + +-- Viewmodel / Worldmodel / FOV -- + +SWEP.ViewModel = "models/weapons/arccw/c_ud_mini14.mdl" +SWEP.WorldModel = "models/weapons/arccw/c_ud_mini14.mdl" +SWEP.ViewModelFOV = 70 +SWEP.AnimShoot = ACT_HL2MP_GESTURE_RANGE_ATTACK_AR2 +SWEP.DefaultSkin = 0 +SWEP.DefaultPoseParams = {["grip"] = 0} + +-- Damage -- + +SWEP.Damage = ArcCW.UC.StdDmg["556"].max +SWEP.DamageMin = ArcCW.UC.StdDmg["556"].min +SWEP.RangeMin = 50 +SWEP.Range = 400 -- 4 shot until ~275m + +SWEP.Penetration = ArcCW.UC.StdDmg["556"].pen +SWEP.DamageType = DMG_BULLET +SWEP.ShootEntity = nil +SWEP.MuzzleVelocity = 990 +SWEP.PhysBulletMuzzleVelocity = 960 + +SWEP.BodyDamageMults = ArcCW.UC.BodyDamageMults + +-- Mag size -- + +SWEP.ChamberSize = 1 +SWEP.Primary.ClipSize = 20 +SWEP.ExtendedClipSize = 30 +SWEP.ReducedClipSize = 10 + +-- Recoil -- + +SWEP.Recoil = 0.45 +SWEP.RecoilSide = 0.2 + +SWEP.RecoilRise = 0.1 +SWEP.RecoilPunch = 1 +SWEP.VisualRecoilMult = 1 +SWEP.MaxRecoilBlowback = 1 +SWEP.MaxRecoilPunch = 1 +SWEP.RecoilPunchBack = 1 + +SWEP.Sway = 0.25 + +-- Firerate / Firemodes -- + +SWEP.Delay = 60 / 540 +SWEP.Num = 1 +SWEP.Firemodes = { + { + Mode = 1, + }, + { + Mode = 0, + }, +} + +SWEP.ShootPitch = 100 +SWEP.ShootVol = 120 + +SWEP.ProceduralRegularFire = false +SWEP.ProceduralIronFire = false + +SWEP.ReloadInSights = true + +-- NPC -- + +SWEP.NPCWeaponType = "weapon_ar2" +SWEP.NPCWeight = 60 + +-- Accuracy -- + +SWEP.AccuracyMOA = 2 +SWEP.HipDispersion = 800 +SWEP.MoveDispersion = 150 +SWEP.JumpDispersion = 1000 + +SWEP.Primary.Ammo = "smg1" +SWEP.MagID = "mini14" + +SWEP.HeatCapacity = 75 +SWEP.HeatDissipation = 5 +SWEP.HeatDelayTime = 3 + +SWEP.MalfunctionMean = 100 + +-- Speed multipliers -- + +SWEP.SpeedMult = 0.9 +SWEP.SightedSpeedMult = 0.75 +SWEP.SightTime = 0.35 +SWEP.ShootSpeedMult = 0.9 + +-- Length -- + +SWEP.BarrelLength = 36 +SWEP.ExtraSightDist = 2 + +-- Ironsights / Customization / Poses -- + +SWEP.HolsterPos = Vector(2, 0, -2) +SWEP.HolsterAng = Angle(-5.5, 20, -20) + +SWEP.SprintPos = Vector(-0.5, -4, -2) +SWEP.SprintAng = Angle(3.5, 7, -20) + +SWEP.HoldtypeHolstered = "passive" +SWEP.HoldtypeActive = "ar2" +SWEP.HoldtypeSights = "rpg" + +SWEP.IronSightStruct = { + Pos = Vector(-4.305, -7, 2.55), + Ang = Angle(0, 0, 0), + Magnification = 1, + SwitchToSound = "", + CrosshairInSights = false, +} + +SWEP.ActivePos = Vector(-1, -1, 1) +SWEP.ActiveAng = Angle(0, 0, -3) + +SWEP.CustomizePos = Vector(5, -2, -2) +SWEP.CustomizeAng = Angle(15, 25, 0) + +SWEP.CrouchPos = Vector(-5, -4, 0) +SWEP.CrouchAng = Angle(0, 0, -30) + +SWEP.BarrelOffsetHip = Vector(3, 0, -3) + +SWEP.MirrorVMWM = true +SWEP.WorldModelOffset = { + pos = Vector(-10, 6.5, -6), + ang = Angle(-12, 0, 180), + bone = "ValveBiped.Bip01_R_Hand", + scale = 1 - ( 0.35 * 0.75 ) +} + +-- Firing sounds -- + +local path = ")weapons/arccw_ud/mini14/" +local common = ")/arccw_uc/common/" +SWEP.ShootSound = { + path .. "fire-01.ogg", + path .. "fire-02.ogg", + path .. "fire-03.ogg", + path .. "fire-04.ogg", + path .. "fire-05.ogg", + path .. "fire-06.ogg" +} +SWEP.ShootSoundSilenced = path .. "fire_supp.ogg" +SWEP.DistantShootSound = nil +SWEP.DistantShootSoundSilenced = common .. "sup_tail.ogg" +SWEP.ShootDrySound = path .. "dryfire.ogg" + +local tail = ")/arccw_uc/common/556x45/" + +SWEP.DistantShootSoundOutdoors = { + tail .. "fire-dist-556x45-rif-ext-01.ogg", + tail .. "fire-dist-556x45-rif-ext-02.ogg", + tail .. "fire-dist-556x45-rif-ext-03.ogg", + tail .. "fire-dist-556x45-rif-ext-04.ogg", + tail .. "fire-dist-556x45-rif-ext-05.ogg", + tail .. "fire-dist-556x45-rif-ext-06.ogg" +} +SWEP.DistantShootSoundIndoors = { + tail .. "fire-dist-556x45-rif-int-01.ogg", + tail .. "fire-dist-556x45-rif-int-02.ogg", + tail .. "fire-dist-556x45-rif-int-03.ogg", + tail .. "fire-dist-556x45-rif-int-04.ogg", + tail .. "fire-dist-556x45-rif-int-05.ogg", + tail .. "fire-dist-556x45-rif-int-06.ogg" +} +SWEP.DistantShootSoundOutdoorsSilenced = { + common .. "sup-tail-01.ogg", + common .. "sup-tail-02.ogg", + common .. "sup-tail-03.ogg", + common .. "sup-tail-04.ogg", + common .. "sup-tail-05.ogg", + common .. "sup-tail-06.ogg", + common .. "sup-tail-07.ogg", + common .. "sup-tail-08.ogg", + common .. "sup-tail-09.ogg", + common .. "sup-tail-10.ogg" +} +SWEP.DistantShootSoundIndoorsSilenced = { + common .. "fire-dist-int-pistol-light-01.ogg", + common .. "fire-dist-int-pistol-light-02.ogg", + common .. "fire-dist-int-pistol-light-03.ogg", + common .. "fire-dist-int-pistol-light-04.ogg", + common .. "fire-dist-int-pistol-light-05.ogg", + common .. "fire-dist-int-pistol-light-06.ogg" +} +SWEP.DistantShootSoundOutdoorsVolume = 1 +SWEP.DistantShootSoundIndoorsVolume = 1 +SWEP.Hook_AddShootSound = ArcCW.UC.InnyOuty + +-- Bodygroups -- + +SWEP.BulletBones = { + [2] = "mini14_bullet1", [3] = "mini14_bullet2" +} + +SWEP.AttachmentElements = { + ["ud_mini14_mag_10"] = { + VMBodygroups = {{ind = 4, bg = 2}}, + }, + ["ud_mini14_mag_30"] = { + VMBodygroups = {{ind = 4, bg = 1}}, + }, + ["ud_mini14_mag_42"] = { + VMBodygroups = {{ind = 4, bg = 4}}, + }, + ["ud_mini14_mag_60"] = { + VMBodygroups = {{ind = 4, bg = 5}}, + }, + ["ud_mini14_mag_15_22lr"] = { + VMBodygroups = {{ind = 4, bg = 3}}, + }, + ["ud_mini14_mag_30_762"] = { + VMBodygroups = {{ind = 4, bg = 6}}, + }, + ["ud_mini14_rail_optic"] = { + VMBodygroups = {{ind = 2, bg = 1}}, + }, + + ["ud_mini14_rail_fg"] = { + VMBodygroups = {{ind = 5, bg = 1}}, + }, + + ["ud_mini14_barrel_long"] = { + VMBodygroups = {{ind = 3, bg = 1}}, + AttPosMods = { + [3] = { + vpos = Vector(0, -2.15, 34.5), + }, + }, + }, + ["ud_mini14_barrel_short"] = { + VMBodygroups = {{ind = 3, bg = 2}}, + AttPosMods = { + [3] = { + vpos = Vector(0, -2.15, 27.5), + }, + }, + }, + ["ud_mini14_barrel_stub"] = { + VMBodygroups = {{ind = 3, bg = 3}}, + AttPosMods = { + [3] = { + vpos = Vector(0, -2.1, 25), + }, + }, + }, + + ["ud_mini14_receiver_762"] = { + TrueNameChange = "Mini Thirty", + NameChange = "Patriot 816" + }, + ["ud_mini14_receiver_auto"] = { + TrueNameChange = "AC-556", + NameChange = "Patriot ACC" + }, + ["ud_mini14_receiver_22lr"] = { + TrueNameChange = "Mini-14 .22 LR", + NameChange = "Patriot 822" + }, + + ["ud_mini14_stock_polymer"] = { + VMBodygroups = {{ind = 1, bg = 1}}, + VMPoseParams = {["grip"] = 0} + }, + ["ud_mini14_stock_sawnoff"] = { + VMBodygroups = {{ind = 1, bg = 2}}, + VMPoseParams = {["grip"] = 0} + }, + ["ud_mini14_stock_tactical"] = { + VMBodygroups = {{ind = 1, bg = 4}}, + VMPoseParams = {["grip"] = 1} + }, + ["ud_mini14_stock_tactical_polymer"] = { + VMBodygroups = {{ind = 1, bg = 3}}, + VMSkin = 1, + VMPoseParams = {["grip"] = 1} + }, + + ["ud_mini14_clamp"] = { + VMBodygroups = {{ind = 6, bg = 1}}, + }, +} + +-- Animations -- + +SWEP.Hook_Think = ArcCW.UC.ADSReload + +SWEP.Animations = { + ["ready"] = { + Source = "unjam", + Time = 40 / 30, + SoundTable = { + {s = common .. "raise.ogg", t = 0}, + {s = common .. "rattle.ogg", t = 0.2}, + {s = path .. "chback.ogg", t = 0.25}, + {s = path .. "chamber.ogg", t = 0.35}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.8}, + {s = common .. "shoulder.ogg", t = 1}, + }, + LHIK = true, + LHIKIn = 0.5, + LHIKEaseIn = 0.5, + LHIKEaseOut = 0.15, + LHIKOut = 0.5, + ProcDraw = true, + }, + ["idle"] = { + Source = "idle", + }, + ["idle_empty"] = { + Source = "idle_empty", + }, + ["draw"] = { + Source = "draw", + SoundTable = ArcCW.UC.DrawSounds, + }, + ["draw_empty"] = { + Source = "draw_empty", + Time = 12 / 30, + SoundTable = ArcCW.UC.DrawSounds, + }, + ["holster"] = { + Source = "holster", + LHIK = true, + LHIKIn = 0.4, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0, + LHIKOut = 0, + SoundTable = ArcCW.UC.HolsterSounds, + }, + ["holster_empty"] = { + Source = "holster_empty", + Time = 12 / 30, + LHIK = true, + LHIKIn = 0.4, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0, + LHIKOut = 0, + SoundTable = ArcCW.UC.HolsterSounds, + }, + ["fire"] = { + Source = "fire", + Time = 20 / 30, + ShellEjectAt = 0.01, + LastClip1OutTime = 0, + SoundTable = {{ s = {path .. "mech-01.ogg", path .. "mech-02.ogg", path .. "mech-03.ogg", path .. "mech-04.ogg", path .. "mech-05.ogg", path .. "mech-06.ogg"}, t = 0, v = 0.25 }}, + }, + ["fire_iron"] = { + Source = "fire", + Time = 20 / 30, + ShellEjectAt = 0.01, + LastClip1OutTime = 0, + SoundTable = { + {s = common .. "common_mech_light.ogg", t = 0}, + { s = {path .. "mech-01.ogg", path .. "mech-02.ogg", path .. "mech-03.ogg", path .. "mech-04.ogg", path .. "mech-05.ogg", path .. "mech-06.ogg"}, t = 0 } + }, + }, + ["fire_empty"] = { + Source = "fire_empty", + Time = 20 / 30, + ShellEjectAt = 0.01, + SoundTable = { + {s = path .. "mech_last.ogg", t = 0}, -- Temporary + }, + }, + ["fire_iron_empty"] = { + Source = "fire_empty", + Time = 20 / 30, + ShellEjectAt = 0.01, + SoundTable = { + {s = path .. "mech_last.ogg", t = 0}, -- Temporary + }, + }, + ["unjam"] = { + Source = "unjam", + Time = 40 / 30, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.0}, + {s = path .. "chback.ogg", t = 0.25}, + {s = path .. "chamber.ogg", t = 0.35}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.8}, + {s = common .. "shoulder.ogg", t = 1}, + }, + LHIK = true, + LHIKIn = 0.5, + LHIKEaseIn = 0.5, + LHIKEaseOut = 0.15, + LHIKOut = 0.5, + ShellEjectAt = .35, + }, + -- 20 Round Reloads -- + + ["reload"] = { + Source = "reload", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + Time = 66 / 30, + MinProgress = 1.4, + LastClip1OutTime = 0.9, + LHIK = true, + LHIKIn = 0.3, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.4, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.0}, + {s = path .. "magout.ogg", t = 0.25}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.4}, + {s = common .. "magpouch.ogg", t = 0.6}, + {s = path .. "magin.ogg", t = 1.05}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 1.3}, + {s = common .. "shoulder.ogg", t = 1.75}, + }, + }, + ["reload_empty"] = { + Source = "reload_empty", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + Time = 86 / 30, + MinProgress = 2.1, + LastClip1OutTime = 1, + LHIK = true, + LHIKIn = 0.4, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.4, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.0}, + {s = path .. "magout.ogg", t = 0.15}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.4}, + {s = common .. "magpouch.ogg", t = 0.6}, + {s = common .. "rifle_magdrop.ogg", t = 0.9}, + {s = path .. "magin.ogg", t = 1.10}, + {s = path .. "chback.ogg", t = 1.85}, + {s = path .. "chamber.ogg", t = 1.95}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 2.2}, + {s = common .. "shoulder.ogg", t = 2.4}, + }, + }, + + -- 10 Round Reloads -- + + ["reload_10"] = { + Source = "reload_10", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + Time = 67 / 30, + MinProgress = 1.6, + LastClip1OutTime = 0.9, + LHIK = true, + LHIKIn = 0.3, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.4, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.0}, + {s = path .. "magout.ogg", t = 0.15}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.3}, + {s = common .. "magpouch.ogg", t = 0.6, c = ci}, + {s = path .. "magin.ogg", t = 1.10}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 1.5}, + }, + }, + ["reload_empty_10"] = { + Source = "reload_empty_10", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + Time = 86 / 30, + MinProgress = 2.1, + LastClip1OutTime = 0.7, + LHIK = true, + LHIKIn = 0.4, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.4, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.0}, + {s = path .. "magout.ogg", t = 0.15}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.4}, + {s = common .. "magpouch.ogg", t = 0.6, c = ci}, + {s = common .. "rifle_magdrop.ogg", t = 0.9}, + {s = path .. "magin.ogg", t = 1.10}, + {s = path .. "chback.ogg", t = 1.90}, + {s = path .. "chamber.ogg", t = 2.00}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 2.4}, + {s = common .. "shoulder.ogg", t = 2.5}, + }, + }, + + -- 30 Round Reloads -- + + ["reload_30"] = { + Source = "reload_30", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + Time = 67 / 30, + MinProgress = 1.4, + LastClip1OutTime = 0.9, + LHIK = true, + LHIKIn = 0.3, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.4, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.0}, + {s = path .. "magout.ogg", t = 0.3}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.3}, + {s = common .. "magpouch.ogg", t = 0.7, c = ci}, + {s = path .. "magin.ogg", t = 1.10}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 1.4}, + {s = common .. "shoulder.ogg", t = 1.85}, + }, + }, + ["reload_empty_30"] = { + Source = "reload_empty_30", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + Time = 86 / 30, + MinProgress = 2.3, + LastClip1OutTime = 0.7, + LHIK = true, + LHIKIn = 0.4, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.4, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.0}, + {s = path .. "magout.ogg", t = 0.2}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.3}, + {s = common .. "magpouch.ogg", t = 0.65, c = ci}, + {s = common .. "rifle_magdrop.ogg", t = 0.9}, + {s = path .. "magin.ogg", t = 1.20}, + {s = path .. "chback.ogg", t = 2}, + {s = path .. "chamber.ogg", t = 2.1}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 2.3}, + {s = common .. "shoulder.ogg", t = 2.65}, + }, + }, + + -- 30 polymer Reloads -- + + ["reload_30_tac"] = { + Source = "reload_30_tac", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + Time = 67 / 30, + MinProgress = 1.4, + LastClip1OutTime = 0.9, + LHIK = true, + LHIKIn = 0.3, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.4, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.0}, + {s = path .. "magout.ogg", t = 0.3}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.3}, + {s = common .. "magpouch.ogg", t = 0.7, c = ci}, + {s = path .. "magin.ogg", t = 1.10}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 1.4}, + {s = common .. "shoulder.ogg", t = 1.85}, + }, + }, + ["reload_empty_30_tac"] = { + Source = "reload_empty_30_tac", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + Time = 86 / 30, + MinProgress = 2.3, + LastClip1OutTime = 0.7, + LHIK = true, + LHIKIn = 0.4, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.4, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.0}, + {s = path .. "magout.ogg", t = 0.2}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.3}, + {s = common .. "magpouch.ogg", t = 0.65, c = ci}, + {s = common .. "rifle_magdrop.ogg", t = 0.9}, + {s = path .. "magin.ogg", t = 1.20}, + {s = path .. "chback.ogg", t = 2}, + {s = path .. "chamber.ogg", t = 2.1}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 2.3}, + {s = common .. "shoulder.ogg", t = 2.65}, + }, + }, + + -- 7.62 reloads -- + + ["reload_762"] = { + Source = "reload_762", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + Time = 67 / 30, + MinProgress = 1.4, + LastClip1OutTime = 0.9, + LHIK = true, + LHIKIn = 0.3, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.4, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.0}, + {s = path .. "magout.ogg", t = 0.3}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.3}, + {s = common .. "magpouch.ogg", t = 0.7, c = ci}, + {s = path .. "magin.ogg", t = 1.10}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 1.4}, + {s = common .. "shoulder.ogg", t = 1.85}, + }, + }, + ["reload_empty_762"] = { + Source = "reload_empty_762", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + Time = 86 / 30, + MinProgress = 2.3, + LastClip1OutTime = 0.7, + LHIK = true, + LHIKIn = 0.4, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.4, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.0}, + {s = path .. "magout.ogg", t = 0.2}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.3}, + {s = common .. "magpouch.ogg", t = 0.65, c = ci}, + {s = common .. "rifle_magdrop.ogg", t = 0.9}, + {s = path .. "magin.ogg", t = 1.20}, + {s = path .. "chback.ogg", t = 2}, + {s = path .. "chamber.ogg", t = 2.1}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 2.3}, + {s = common .. "shoulder.ogg", t = 2.65}, + }, + }, + + -- 60 round reloads (?) -- + + ["reload_60"] = { + Source = "reload_60", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + Time = 67 / 30, + MinProgress = 1.4, + LastClip1OutTime = 0.9, + LHIK = true, + LHIKIn = 0.3, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.4, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.0}, + {s = path .. "magout.ogg", t = 0.35}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.3}, + {s = common .. "magpouch.ogg", t = 0.7, c = ci}, + {s = path .. "magin.ogg", t = 1.10}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 1.4}, + {s = common .. "shoulder.ogg", t = 1.85}, + }, + }, + ["reload_empty_60"] = { + Source = "reload_empty_60", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + Time = 86 / 30, + MinProgress = 2.3, + LastClip1OutTime = 0.7, + LHIK = true, + LHIKIn = 0.4, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.4, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.0}, + {s = path .. "magout.ogg", t = 0.35}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.3}, + {s = common .. "magpouch.ogg", t = 0.7, c = ci}, + {s = common .. "rifle_magdrop.ogg", t = 0.9}, + {s = path .. "magin.ogg", t = 1.20}, + {s = path .. "chback.ogg", t = 1.9}, + {s = path .. "chamber.ogg", t = 2}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 2.3}, + {s = common .. "shoulder.ogg", t = 2.65}, + }, + }, + + -- 15 22lr Round Reloads -- + + ["reload_15_22lr"] = { + Source = "reload_15_22lr", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + Time = 67 / 30, + MinProgress = 1.6, + LastClip1OutTime = 0.9, + LHIK = true, + LHIKIn = 0.3, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.45, + LHIKOut = 0.7, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.0}, + {s = path .. "magout.ogg", t = 0.15}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.3}, + {s = common .. "magpouch.ogg", t = 0.65, c = ci}, + {s = path .. "magin.ogg", t = .9}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 1.4}, + }, + }, + ["reload_empty_15_22lr"] = { + Source = "reload_empty_15_22lr", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + Time = 86 / 30, + MinProgress = 2.2, + LastClip1OutTime = 0.7, + LHIK = true, + LHIKIn = 0.4, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.45, + LHIKOut = 0.6, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.0}, + {s = path .. "magout.ogg", t = 0.15}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.5}, + {s = common .. "pistol_magdrop.ogg", t = 0.9}, + {s = common .. "magpouch.ogg", t = 0.7, c = ci}, + {s = path .. "magin.ogg", t = 1.10}, + {s = path .. "chback.ogg", t = 1.9}, + {s = path .. "chamber.ogg", t = 2.0}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 2.3}, + }, + }, +} + +SWEP.Hook_ModifyBodygroups = function(wep,data) + local vm = data.vm + if !IsValid(vm) then return end + + local atts = wep.Attachments + local barr = string.Replace(atts[2].Installed or "default","ud_mini14_barrel_","") + local muzz = atts[3].Installed + local tac = atts[6].Installed + + if muzz or barr == "stub" or barr == "default" then + vm:SetBodygroup(7,2) + elseif barr == "short" then + vm:SetBodygroup(7,1) + elseif barr == "long" then + vm:SetBodygroup(7,0) + end + + if !tac then + vm:SetBodygroup(6,0) + end +end + +SWEP.Attachments = { + { + PrintName = "Optic", + DefaultAttName = "Iron Sights", + Slot = {"optic_lp","optic","optic_sniper"}, + Bone = "mini14_parent", + Offset = { + vpos = Vector(0, -3.6, 6), + vang = Angle(90, 2, -90), + }, + VMScale = Vector(1.2,1.2,1.2), + WMScale = VMScale, + InstalledEles = {"ud_mini14_rail_optic"}, + }, + { + PrintName = "Barrel", + DefaultAttName = "20\" Standard Barrel", + DefaultAttIcon = Material("entities/att/acwatt_ud_mini14_barrel.png", "smooth mips"), + Slot = "ud_mini14_barrel", + }, + { + PrintName = "Muzzle", + DefaultAttName = "Standard Muzzle", + Slot = {"muzzle"}, + Bone = "mini14_parent", + Offset = { + vpos = Vector(0, -2.15, 30), + vang = Angle(90, 0, -90), + wpos = vpos, + }, + VMScale = Vector(1.5,1.5,1.5), + WMScale = VMScale, + ExcludeFlags = {"nomuzzle"}, + }, + { + PrintName = "Receiver", + DefaultAttName = "Mini-14 Receiver", + DefaultAttIcon = Material("entities/att/acwatt_ud_mini14_receiver.png", "smooth mips"), + Slot = "ud_mini14_receiver", + }, + { + PrintName = "Underbarrel", + Slot = {"foregrip"}, + Bone = "mini14_parent", + Offset = { + vpos = Vector(0, 0, 14), + vang = Angle(90, 0, -90), + }, + InstalledEles = {"ud_mini14_rail_fg"}, + MergeSlots = {14} + }, + { + PrintName = "Tactical", + Slot = {"tac"}, + Bone = "mini14_parent", + Offset = { + vpos = Vector(0, -1.5, 22.3), + vang = Angle(90, 0, -90), + }, + InstalledEles = {"ud_mini14_clamp"}, + }, + { + PrintName = "Magazine", + Slot = {"ud_mini14_mag"}, + DefaultAttName = "20-Round Mag", + DefaultAttIcon = Material("entities/att/acwatt_ud_mini14_mag_20.png", "smooth mips"), + }, + { + PrintName = "Stock", + Slot = {"ud_mini14_stock"}, + DefaultAttName = "Wooden Stock", + DefaultAttIcon = Material("entities/att/acwatt_ud_mini14_stock.png", "smooth mips"), + }, + { + PrintName = "Ammo Type", + DefaultAttName = "\"FMJ\" Full Metal Jacket", + DefaultAttIcon = Material("entities/att/arccw_uc_ammo_generic.png", "mips smooth"), + Slot = "uc_ammo", + }, + { + PrintName = "Powder Load", + Slot = "uc_powder", + DefaultAttName = "Standard Load" + }, + { + PrintName = "Training Package", + Slot = "uc_tp", + DefaultAttName = "Basic Training" + }, + { + PrintName = "Internals", + Slot = "uc_fg", -- Fire group + DefaultAttName = "Standard Internals" + }, + { + PrintName = "Charm", + Slot = {"charm", "fml_charm"}, + FreeSlot = true, + Bone = "mini14_parent", + Offset = { + vpos = Vector(1.1, -0.5, 6), + vang = Angle(90, 0, -90), + }, + }, + { + PrintName = "M203 slot", + Slot = "uc_ubgl", + Bone = "mini14_parent", + Offset = { + vpos = Vector(0, -1.2, 10), + vang = Angle(90, 0, -90), + }, + InstalledEles = {"ud_mini14_rail_fg"}, + ExcludeFlags = {"ak_noubs","barrel_rpk"}, + Hidden = true, + } +} \ No newline at end of file diff --git a/lua/weapons/arccw_ud_uzi.lua b/lua/weapons/arccw_ud_uzi.lua new file mode 100644 index 0000000..faafa7d --- /dev/null +++ b/lua/weapons/arccw_ud_uzi.lua @@ -0,0 +1,820 @@ +SWEP.Base = "arccw_base" +SWEP.Spawnable = true +SWEP.Category = "ArcCW - Urban Coalition" +SWEP.UC_CategoryPack = "1Urban Decay" +SWEP.AdminOnly = false +SWEP.UseHands = true + +-- Effects -- + +SWEP.MuzzleEffect = "muzzleflash_1" +SWEP.ShellEffect = "arccw_uc_shelleffect" +SWEP.ShellModel = "models/weapons/arccw/uc_shells/9x19.mdl" +SWEP.ShellScale = 1 +--SWEP.ShellMaterial = "models/weapons/arcticcw/shell_9mm" +SWEP.ShellPitch = 100 +SWEP.ShellSounds = ArcCW.PistolShellSoundsTable + +SWEP.MuzzleEffectAttachment = 1 +SWEP.CaseEffectAttachment = 2 +SWEP.CamAttachment = 3 +SWEP.TracerNum = 1 +SWEP.TracerCol = Color(25, 255, 25) +SWEP.TracerWidth = 2 + +-- Fake name -- + +SWEP.PrintName = "IAL-9" + +-- True name -- + +SWEP.TrueName = "Uzi" + +-- Trivia -- + +SWEP.Trivia_Class = "Submachine Gun" +SWEP.Trivia_Desc = "Revolutionary submachine gun developed to arm a young State of Israel following the Second World War. Its ergonomic design, low cost, reliability, and great handling made it popular among militaries, police forces, and private security firms worldwide.\n\nBoasts excellent recoil control partially due to a below average cyclic rate. Good for hip firing in close quarters." +SWEP.Trivia_Manufacturer = "IAL Metal Industries" +SWEP.Trivia_Calibre = "9x19mm Parabellum" +SWEP.Trivia_Mechanism = "Open Bolt" +SWEP.Trivia_Country = "Israel" +SWEP.Trivia_Year = 1950 + +-- Weapon slot -- + +SWEP.Slot = 2 + +-- Weapon's manufacturer real name -- + +if GetConVar("arccw_truenames"):GetBool() then + SWEP.PrintName = SWEP.TrueName + SWEP.Trivia_Manufacturer = "Israeli Military Industries" +end + +-- Viewmodel / Worldmodel / FOV -- + +SWEP.ViewModel = "models/weapons/arccw/c_ud_uzi.mdl" +SWEP.WorldModel = "models/weapons/arccw/c_ud_uzi.mdl" +SWEP.ViewModelFOV = 70 +SWEP.AnimShoot = ACT_HL2MP_GESTURE_RANGE_ATTACK_AR2 + +-- Damage -- + +SWEP.Damage = ArcCW.UC.StdDmg["9mm"].max +SWEP.DamageMin = ArcCW.UC.StdDmg["9mm"].min +SWEP.Penetration = ArcCW.UC.StdDmg["9mm"].pen + +SWEP.RangeMin = 15 +SWEP.Range = 100 -- 4 shot until ~35m + +SWEP.DamageType = DMG_BULLET +SWEP.ShootEntity = nil +SWEP.MuzzleVelocity = 400 +SWEP.PhysBulletMuzzleVelocity = 400 + +SWEP.BodyDamageMults = ArcCW.UC.BodyDamageMults + +-- Mag size -- + +SWEP.ChamberSize = 0 +SWEP.Primary.ClipSize = 32 +SWEP.ExtendedClipSize = 40 +SWEP.ReducedClipSize = 16 + +-- Recoil -- + +SWEP.Recoil = 0.28 +SWEP.RecoilSide = 0.35 + +SWEP.RecoilRise = 0.2 +SWEP.RecoilPunch = 1 +SWEP.VisualRecoilMult = 1 +SWEP.MaxRecoilBlowback = 1 +SWEP.MaxRecoilPunch = 0.6 +SWEP.RecoilPunchBack = 1.5 + +SWEP.Sway = 0.3 + +-- Firerate / Firemodes -- + +SWEP.TriggerDelay = true + +SWEP.Delay = 60 / 700 +SWEP.Num = 1 +SWEP.Firemodes = { + { + Mode = 2, + Mult_TriggerDelayTime = 2, + }, + { + Mode = 1, + Mult_TriggerDelayTime = 1, + }, + { + Mode = 0, + }, +} + +SWEP.ShootPitch = 100 +SWEP.ShootVol = 120 + +SWEP.ProceduralRegularFire = false +SWEP.ProceduralIronFire = false + +SWEP.ReloadInSights = true + +-- NPC -- + +SWEP.NPCWeaponType = "weapon_smg1" +SWEP.NPCWeight = 60 + +-- Accuracy -- + +SWEP.AccuracyMOA = 6 +SWEP.HipDispersion = 400 +SWEP.MoveDispersion = 100 +SWEP.JumpDispersion = 1000 + +SWEP.Primary.Ammo = "pistol" +SWEP.MagID = "uzi" + +SWEP.HeatCapacity = 75 +SWEP.HeatDissipation = 15 +SWEP.HeatDelayTime = 3 + +SWEP.MalfunctionMean = 200 +SWEP.MalfunctionTakeRound = false + +-- Speed multipliers -- + +SWEP.SpeedMult = 0.95 +SWEP.SightedSpeedMult = 0.75 +SWEP.SightTime = 0.3 +SWEP.ShootSpeedMult = 0.95 + +-- Length -- + +SWEP.BarrelLength = 24 +SWEP.ExtraSightDist = 7 + +-- Ironsights / Customization / Poses -- + +SWEP.HolsterPos = Vector(0.5, -2, 1) +SWEP.HolsterAng = Angle(-8.5, 8, -10) + +SWEP.HoldtypeHolstered = "normal" +SWEP.HoldtypeActive = "ar2" +SWEP.HoldtypeSights = "rpg" + +SWEP.IronSightStruct = { + Pos = Vector(-2.869, -6, 1.95), + Ang = Angle(0, 0, 0), + Magnification = 1, + SwitchToSound = "", + ViewModelFOV = 55, +} + +SWEP.ActivePos = Vector(0.4, -1.9, 1.4) +SWEP.ActiveAng = Angle(0, 0, -3) + +SWEP.CustomizePos = Vector(5, -2, -2) +SWEP.CustomizeAng = Angle(15, 25, 0) + +SWEP.CrouchPos = Vector(-3, -3, 0) +SWEP.CrouchAng = Angle(0, 0, -30) + +SWEP.BarrelOffsetHip = Vector(4, 0, -4) + +SWEP.MirrorVMWM = true +SWEP.WorldModelOffset = { + pos = Vector(-16, 4, -3), + ang = Angle(-12, 0, 180), + bone = "ValveBiped.Bip01_R_Hand", + scale = 1 +} + +-- Firing sounds -- +local path = ")weapons/arccw_ud/uzi/" +local path1 = ")weapons/arccw_ud/glock/" +local common = ")/arccw_uc/common/" +--SWEP.FirstShootSound = path .. "fire.ogg" +--SWEP.ShootSound = path .. "fire_auto.ogg" +SWEP.ShootSoundSilenced = path1 .. "fire_supp.ogg" +SWEP.ShootDrySound = path .. "dryfire.ogg" + +SWEP.ShootSound = { + path .. "fire-01.ogg", + path .. "fire-02.ogg", + path .. "fire-03.ogg", + path .. "fire-04.ogg", + path .. "fire-05.ogg", + path .. "fire-06.ogg" +} + +local tail = ")/arccw_uc/common/9x19/" + +SWEP.DistantShootSoundOutdoors = { + tail .. "fire-dist-9x19-smg-ext-01.ogg", + tail .. "fire-dist-9x19-smg-ext-02.ogg", + tail .. "fire-dist-9x19-smg-ext-03.ogg", + tail .. "fire-dist-9x19-smg-ext-04.ogg", + tail .. "fire-dist-9x19-smg-ext-05.ogg", + tail .. "fire-dist-9x19-smg-ext-06.ogg" +} +SWEP.DistantShootSoundIndoors = { + tail .. "fire-dist-9x19-pistol-int-01.ogg", + tail .. "fire-dist-9x19-pistol-int-02.ogg", + tail .. "fire-dist-9x19-pistol-int-03.ogg", + tail .. "fire-dist-9x19-pistol-int-04.ogg", + tail .. "fire-dist-9x19-pistol-int-05.ogg", + tail .. "fire-dist-9x19-pistol-int-06.ogg" +} +SWEP.DistantShootSoundOutdoorsSilenced = { + common .. "sup-tail-01.ogg", + common .. "sup-tail-02.ogg", + common .. "sup-tail-03.ogg", + common .. "sup-tail-04.ogg", + common .. "sup-tail-05.ogg", + common .. "sup-tail-06.ogg", + common .. "sup-tail-07.ogg", + common .. "sup-tail-08.ogg", + common .. "sup-tail-09.ogg", + common .. "sup-tail-10.ogg" +} +SWEP.DistantShootSoundIndoorsSilenced = { + common .. "fire-dist-int-pistol-light-01.ogg", + common .. "fire-dist-int-pistol-light-02.ogg", + common .. "fire-dist-int-pistol-light-03.ogg", + common .. "fire-dist-int-pistol-light-04.ogg", + common .. "fire-dist-int-pistol-light-05.ogg", + common .. "fire-dist-int-pistol-light-06.ogg" +} +SWEP.DistantShootSoundOutdoorsVolume = 1 +SWEP.DistantShootSoundIndoorsVolume = 0.5 +SWEP.Hook_AddShootSound = ArcCW.UC.InnyOuty + +-- Bodygroups -- + +SWEP.BulletBones = { + [1] = "uzi_b1", [2] = "uzi_b2", [3] = "uzi_b3", [4] = "uzi_b4" +} + +SWEP.AttachmentElements = { + + ["ud_uzi_mag_20"] = { + VMBodygroups = {{ind = 2, bg = 1}}, + }, + ["ud_uzi_mag_40"] = { + VMBodygroups = {{ind = 2, bg = 2}}, + }, + ["ud_uzi_mag_100"] = { + VMBodygroups = {{ind = 2, bg = 3}}, + }, + ["ud_uzi_mag_45_10"] = { + VMBodygroups = {{ind = 2, bg = 1}}, + }, + ["ud_uzi_mag_45_22"] = { + VMBodygroups = {{ind = 2, bg = 2}}, + }, + + ["ud_uzi_rail_optic"] = { + VMBodygroups = {{ind = 4, bg = 2}}, + }, + + ["ud_uzi_clamp"] = { + VMBodygroups = {{ind = 6, bg = 1}}, + }, + + ["ud_uzi_rail_fg"] = { + VMBodygroups = {{ind = 5, bg = 1}}, + }, + + ["ud_uzi_stock_wood"] = { + VMBodygroups = {{ind = 3, bg = 2}}, + }, + ["ud_uzi_stock_polymer"] = { + VMBodygroups = {{ind = 3, bg = 3}}, + }, + ["ud_uzi_stock_folded"] = { + VMBodygroups = {{ind = 3, bg = 1}}, + }, + ["ud_uzi_stock_remove"] = { + VMBodygroups = {{ind = 3, bg = 4}}, + }, + + ["ud_uzi_body_carbine"] = { + VMBodygroups = {{ind = 1, bg = 1}}, + NameChange = "IAL-C9", + TrueNameChange = "Uzi Carbine", + AttPosMods = { + [4] = { + vpos = Vector(-0.2, 0.5, 20.8), + }, + }, + }, + ["ud_uzi_body_mini"] = { + VMBodygroups = {{ind = 1, bg = 2}}, + NameChange = "IAL-S9", + TrueNameChange = "Mini Uzi", + AttPosMods = { + [4] = { + vpos = Vector(-0.2, 0.5, 11.8), + }, + }, + }, + ["ud_uzi_body_micro"] = { + VMBodygroups = {{ind = 1, bg = 3},{ind = 4, bg = 1},{ind = 3, bg = 4}}, + NameChange = "IAL-M9", + TrueNameChange = "Micro Uzi", + Override_IronSightStruct = { + Pos = Vector(-2.869, 3, 1.95), + Ang = Angle(-0, 0.035, 0), + Magnification = 1, + CrosshairInSights = false + }, + AttPosMods = { + [1] = { + vpos = Vector(-0.2, -1.8, -1.5), + }, + [4] = { + vpos = Vector(-0.2, 0.3, 7.8), + }, + [6] = { + vpos = Vector(-0.25, 1.4, 6), + vang = Angle(90, 0, -90), + }, + }, + }, + ["ud_uzi_body_civvy"] = { + VMBodygroups = {{ind = 1, bg = 4}}, + NameChange = "IAL-C9 Model GB", + TrueNameChange = "Uzi Action-B", + AttPosMods = { + [4] = { + vpos = Vector(-0.2, 0.5, 23.8), + }, + }, + }, +} + +SWEP.Hook_ModifyBodygroups = function(wep, data) + local vm = data.vm + if !IsValid(vm) then return end + local barrel = wep.Attachments[2].Installed + if barrel == "ud_uzi_body_micro" then + if wep.Attachments[1].Installed then + vm:SetBodygroup(4, 3) + end + if wep.Attachments[6].Installed then + vm:SetBodygroup(6, 0) + vm:SetBodygroup(5, 2) + end + end +end + +-- Animations -- + +SWEP.Hook_Think = ArcCW.UC.ADSReload + +SWEP.Animations = { + ["ready"] = { + Source = "fix", + Time = 40 / 30, + ShellEjectAt = false, + LHIK = true, + LHIKIn = 0.4, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.4, + SoundTable = { + {s = common .. "raise.ogg", t = 0}, + {s = common .. "rattle.ogg", t = 0.2}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.15}, + {s = path .. "chback.ogg", t = 0.3, c = ci}, + {s = path .. "chforward.ogg", t = 0.65, c = ci}, + }, + ProcDraw = true, + }, + ["idle"] = { + Source = "idle", + }, + ["idle_empty"] = { + Source = "idle_empty", + }, + ["draw"] = { + Source = "draw", + SoundTable = ArcCW.UC.DrawSounds, + }, + ["draw_empty"] = { + Source = "draw_empty", + SoundTable = ArcCW.UC.DrawSounds, + }, + ["holster"] = { + Source = "holster", + Time = 0.25, + SoundTable = ArcCW.UC.HolsterSounds, + }, + ["holster_empty"] = { + Source = "holster_empty", + Time = 0.25, + SoundTable = ArcCW.UC.HolsterSounds, + }, + ["fire"] = { + Source = "fire", + Time = 13 / 30, + ShellEjectAt = 0.03, + SoundTable = { + { s = {path .. "mech-01.ogg", path .. "mech-02.ogg", path .. "mech-03.ogg", path .. "mech-04.ogg", path .. "mech-05.ogg", path .. "mech-06.ogg"}, t = 0, v = 0.25 } + }, + }, + ["fire_iron"] = { + Source = "fire", + Time = 13 / 30, + ShellEjectAt = 0.03, + SoundTable = { + {s = common .. "common_mech_light.ogg", t = 0, v = 0.25 }, + { s = {path .. "mech-01.ogg", path .. "mech-02.ogg", path .. "mech-03.ogg", path .. "mech-04.ogg", path .. "mech-05.ogg", path .. "mech-06.ogg"}, t = 0 } + }, + }, + ["fire_empty"] = { + Source = "fire_empty", + Time = 13 / 30, + ShellEjectAt = 0.03, + SoundTable = {{ s = path .. "chforward.ogg", t = 0 }}, + }, + + ["trigger"] = { + Source = "idle", + Time = 0.025, + SoundTable = { + { s = {path .. "prefire-01.ogg", path .. "prefire-02.ogg", path .. "prefire-03.ogg"}, t = 0 }, + }, + }, + ["trigger_empty"] = { + Source = "idle", + Time = 0, + SoundTable = nil, + }, + + ["fix"] = { + Source = "fix", + Time = 40 / 30, + ShellEjectAt = 0.4, + LHIK = true, + LHIKIn = 0.4, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.4, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.15}, + {s = path .. "chback.ogg", t = 0.3, c = ci}, + {s = path .. "chforward.ogg", t = 0.65, c = ci}, + }, + }, + ["fix_empty"] = { + Source = "fix_empty", + Time = 40 / 30, + ShellEjectAt = false, + LHIK = true, + LHIKIn = 0.4, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.4, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.15}, + {s = path .. "chback.ogg", t = 0.3, c = ci}, + {s = path .. "chforward.ogg", t = 0.65, c = ci}, + }, + }, + + ["fix_micro"] = { + Source = "fix_micro", + Time = 40 / 30, + ShellEjectAt = false, + LHIK = true, + LHIKIn = 0.4, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.4, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.15}, + {s = path .. "chback.ogg", t = 0.3, c = ci}, + {s = path .. "chforward.ogg", t = 0.65, c = ci}, + }, + }, + ["fix_empty_micro"] = { + Source = "fix_empty_micro", + Time = 40 / 30, + ShellEjectAt = false, + LHIK = true, + LHIKIn = 0.4, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.4, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.15}, + {s = path .. "chback.ogg", t = 0.3, c = ci}, + {s = path .. "chforward.ogg", t = 0.65, c = ci}, + }, + }, + + -- 32 Round Reloads -- + + ["reload"] = { + Source = "reload", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_SMG1, + Time = 67 / 30, + MinProgress = 1.2, + LastClip1OutTime = 67 / 30, + LHIK = true, + LHIKIn = 0.4, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.6, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0}, + {s = common .. "magpouch.ogg", t = 0.025}, + {s = path .. "magout.ogg", t = 0.25, c = ci}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.25}, + {s = path .. "magin.ogg", t = 0.55, c = ci}, + {s = common .. "magpouchin.ogg", t = 1.35, v = .35}, + {s = common .. "shoulder.ogg", t = 1.75}, + }, + }, + ["reload_empty"] = { + Source = "reload_empty", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_SMG1, + Time = 90 / 30, + MinProgress = 2.2, + LastClip1OutTime = 1.8, + LHIK = true, + LHIKIn = 0.3, + LHIKEaseIn = 0.3, + LHIKEaseOut = 0.2, + LHIKOut = 0.55, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0}, + {s = path .. "magout.ogg", t = 0.4, c = ci}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.25}, + {s = common .. "magpouch.ogg", t = 0.85}, + {s = common .. "magdrop_smg.ogg", t = 1.0}, + {s = path .. "magin.ogg", t = 1.1, c = ci}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 1.25}, + {s = path .. "chback.ogg", t = 1.935, c = ci}, + {s = path .. "chforward.ogg", t = 2.15, c = ci}, + {s = common .. "shoulder.ogg", t = 2.6}, + }, + }, + + -- 16 Round Reloads -- + + ["reload_16"] = { + Source = "reload_16", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_SMG1, + Time = 67 / 30, + MinProgress = 1.2, + LastClip1OutTime = 67 / 30, + LHIK = true, + LHIKIn = 0.4, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.6, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0}, + {s = common .. "magpouch.ogg", t = 0.025}, + {s = path .. "magout.ogg", t = 0.25, c = ci}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.25}, + {s = path .. "magin.ogg", t = 0.55, c = ci}, + {s = common .. "magpouchin.ogg", t = 1.35, v = .35}, + {s = common .. "shoulder.ogg", t = 1.75}, + }, + }, + ["reload_empty_16"] = { + Source = "reload_empty_16", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_SMG1, + Time = 90 / 30, + MinProgress = 2.2, + LastClip1OutTime = 1.8, + LHIK = true, + LHIKIn = 0.3, + LHIKEaseIn = 0.3, + LHIKEaseOut = 0.2, + LHIKOut = 0.55, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0}, + {s = path .. "magout.ogg", t = 0.4, c = ci}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.25}, + {s = common .. "magpouch.ogg", t = 0.85}, + {s = common .. "magdrop_smg.ogg", t = 1.0}, + {s = path .. "magin.ogg", t = 1.1, c = ci}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 1.25}, + {s = path .. "chback.ogg", t = 1.947, c = ci}, + {s = path .. "chforward.ogg", t = 2.15, c = ci}, + {s = common .. "shoulder.ogg", t = 2.45}, + }, + }, + + -- 41 Round Reloads -- + + ["reload_41"] = { + Source = "reload_41", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_SMG1, + Time = 67 / 30, + MinProgress = 1.2, + LastClip1OutTime = 67 / 30, + LHIK = true, + LHIKIn = 0.4, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.6, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0}, + {s = common .. "magpouch.ogg", t = 0.025}, + {s = path .. "magout.ogg", t = 0.35, c = ci}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.25}, + {s = path .. "magin.ogg", t = 0.65, c = ci}, + {s = common .. "magpouchin.ogg", t = 1.35, v = .35}, + {s = common .. "shoulder.ogg", t = 1.75}, + }, + }, + ["reload_empty_41"] = { + Source = "reload_empty_41", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_SMG1, + Time = 90 / 30, + MinProgress = 2.2, + LastClip1OutTime = 1.8, + LHIK = true, + LHIKIn = 0.3, + LHIKEaseIn = 0.3, + LHIKEaseOut = 0.2, + LHIKOut = 0.55, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0}, + {s = path .. "magout.ogg", t = 0.4, c = ci}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.25}, + {s = common .. "magpouch.ogg", t = 0.85}, + {s = common .. "magdrop_smg.ogg", t = 1.0}, + {s = path .. "magin.ogg", t = 1.1, c = ci}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 1.25}, + {s = path .. "chback.ogg", t = 1.947, c = ci}, + {s = path .. "chforward.ogg", t = 2.15, c = ci}, + {s = common .. "shoulder.ogg", t = 2.6}, + }, + }, + + -- 100 Round Reloads -- + + ["reload_100"] = { + Source = "reload_100", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_SMG1, + Time = 67 / 30, + MinProgress = 1.6, + LastClip1OutTime = 1, + LHIK = true, + LHIKIn = 0.4, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.4, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0}, + {s = path .. "magout.ogg", t = 0.25, c = ci}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.25}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.75}, + {s = path .. "magin.ogg", t = 1.15, c = ci}, + {s = common .. "cloth_4.ogg", t = 1.65}, + {s = common .. "shoulder.ogg", t = 1.95}, + }, + }, + ["reload_empty_100"] = { + Source = "reload_empty_100", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_SMG1, + Time = 90 / 30, + MinProgress = 2.4, + LastClip1OutTime = 1.8, + LHIK = true, + LHIKIn = 0.3, + LHIKEaseIn = 0.3, + LHIKEaseOut = 0.2, + LHIKOut = 0.55, + SoundTable = { + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0}, + {s = path .. "magout.ogg", t = 0.25, c = ci}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.25}, + {s = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_5.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.75}, + {s = common .. "magdrop.ogg", t = 1.0}, + {s = path .. "magin.ogg", t = 1.15, c = ci}, + {s = common .. "cloth_4.ogg", t = 1.65}, + {s = path .. "chback.ogg", t = 2.0, c = ci}, + {s = path .. "chforward.ogg", t = 2.25, c = ci}, + {s = common .. "shoulder.ogg", t = 2.7}, + }, + }, +} + +SWEP.AutosolveSourceSeq = "idle" + +SWEP.Attachments = { + { + PrintName = "Optic", + DefaultAttName = "Iron Sights", + Slot = {"optic_lp","optic"}, -- ,"optic" + Bone = "uzi_parent", + Offset = { + vpos = Vector(-0.2, -1.55, -0.5), + vang = Angle(90, 0, -90), + }, + InstalledEles = {"ud_uzi_rail_optic"} + }, + { + PrintName = "Barrel", + DefaultAttName = "10\" Standard Barrel", + DefaultAttIcon = Material("entities/att/acwatt_ud_uzi_body.png", "smooth mips"), + Slot = "ud_uzi_frame", + Bone = "uzi_parent", + Offset = { + vpos = Vector(2.6, -3.7, -17.3), + vang = Angle(90, 0, -90), + }, + }, + { + PrintName = "Caliber", + DefaultAttName = "9x19mm Parabellum", + DefaultAttIcon = Material("entities/att/uc_bullets/9x19.png", "smooth mips"), + Slot = "ud_uzi_caliber", + }, + { + PrintName = "Muzzle", + DefaultAttName = "Standard Muzzle", + Slot = {"muzzle"}, + Bone = "uzi_parent", + Offset = { + vpos = Vector(-0.2, 0.5, 14.8), + vang = Angle(90, 0, -90), + }, + }, + { + PrintName = "Underbarrel", + Slot = {"foregrip"}, + Bone = "uzi_parent", + Offset = { + vpos = Vector(-0.2, 1.85, 6.9), -- nice + vang = Angle(90, 0, -90), + }, + InstalledEles = {"ud_uzi_rail_fg"}, + ExcludeFlags = {"micro"} + }, + { + PrintName = "Tactical", + Slot = {"tac_pistol"}, + Bone = "uzi_parent", + Offset = { + vpos = Vector(-1.35, 0.9,5.8), + vang = Angle(90, 0, 180), + }, + InstalledEles = {"ud_uzi_clamp"} + }, + { + PrintName = "Stock", + Slot = {"ud_uzi_stock"}, + DefaultAttName = "Folding Stock", + DefaultAttIcon = Material("entities/att/acwatt_ud_uzi_stock.png", "smooth mips"), + ExcludeFlags = {"micro"}, + }, + { + PrintName = "Magazine", + Slot = {"ud_uzi_mag"}, + DefaultAttName = "32-Round Mag", + DefaultAttIcon = Material("entities/att/acwatt_ud_uzi_mag_32.png", "smooth mips"), + }, + { + PrintName = "Ammo Type", + DefaultAttName = "\"FMJ\" Full Metal Jacket", + DefaultAttIcon = Material("entities/att/arccw_uc_ammo_generic.png", "mips smooth"), + Slot = "uc_ammo", + }, + { + PrintName = "Powder Load", + Slot = "uc_powder", + DefaultAttName = "Standard Load" + }, + { + PrintName = "Training Package", + Slot = "uc_tp", + DefaultAttName = "Basic Training" + }, + { + PrintName = "Internals", + Slot = "uc_fg", -- Fire group + DefaultAttName = "Standard Internals" + }, + { + PrintName = "Charm", + Slot = {"charm", "fml_charm"}, + FreeSlot = true, + Bone = "uzi_parent", + Offset = { + vpos = Vector(0.4, 1.3, 2.3), + vang = Angle(90, 0, -90), + }, + }, +}