commit 1dcc202dd88f702bef4ab7af86505e7d3c48834a Author: Fesiug Date: Thu Feb 29 22:16:56 2024 -0500 Initial commit 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..b56ac73 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# Renewal + Urban Renewal for Garry's Mod diff --git a/lua/arccw/shared/attachments/ur_1911_cal_10auto.lua b/lua/arccw/shared/attachments/ur_1911_cal_10auto.lua new file mode 100644 index 0000000..481ee82 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_1911_cal_10auto.lua @@ -0,0 +1,86 @@ +att.PrintName = "Delta Elite 10mm Auto Conversion" +att.AbbrevName = "10mm Auto" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "AMAS-FBI 10mm Auto Conversion" +end + +-- att.Hook_NameChange = function(wep,name) +-- name = "Ruger SR1911" +-- end + +att.SortOrder = 10 +att.Icon = Material("entities/att/uc_bullets/10.png", "smooth mips") +att.Description = "The FBI's preferred caliber of choice.\nDespite its distinctive power, it's not as large as .45 ACP, though its damage curve is more balanced." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ur_m1911_caliber" + +att.AutoStats = true + +att.Override_Trivia_Calibre = "10mm Auto" +-- att.Override_Trivia_Manufacturer = "Ruger" + +att.Mult_Damage = 35 / 45 +att.Mult_DamageMin = 20 / 15 +att.Mult_Penetration = 8 / 9 +att.Mult_RangeMin = 1.5 + +-- att.Mult_Recoil = 1.3 +-- att.Mult_RecoilSide = 1.25 +-- att.Mult_ReloadTime = 1.2 +-- att.Mult_MalfunctionMean = 0.75 + +att.Mult_PhysBulletMuzzleVelocity = 1.5 --380 / 253 +att.Override_TracerNum = 1 +att.Override_TracerNum_Priority = 0.5 -- subsonic can override + +att.Mult_ClipSize = 8 / 7 +att.Override_ShellScale = 1 + +local path = ")^weapons/arccw_ur/1911/" + +att.Hook_GetShootSound = function(wep, sound) -- Temporary + if wep:GetBuff_Override("Silencer") 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" + } + else + return {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"} + end +end + +att.Hook_GetDistantShootSoundOutdoors = function(wep, distancesound) + if wep:GetBuff_Override("Silencer") then + return -- fallback to script + else + return {path .. "fire-10-dist-01.ogg", path .. "fire-10-dist-02.ogg", path .. "fire-10-dist-03.ogg", path .. "fire-10-dist-04.ogg", path .. "fire-10-dist-05.ogg", path .. "fire-10-dist-06.ogg"} + end +end + +--[[ +att.Override_ClipSize = 15 +att.Override_ClipSize_Priority = -1 +local slotinfo = { + [7] = {"15-Round Mag", "15-Round Mag", nil}, +} +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/ur_1911_cal_9mm.lua b/lua/arccw/shared/attachments/ur_1911_cal_9mm.lua new file mode 100644 index 0000000..0679bc1 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_1911_cal_9mm.lua @@ -0,0 +1,67 @@ +att.PrintName = "SR1911 9x19mm Parabellum Conversion" +att.AbbrevName = "9x19mm Parabellum" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "AMAS Competition 9mm Parabellum Conversion" +end + +att.SortOrder = 9 +att.Icon = Material("entities/att/uc_bullets/9x19.png", "smooth mips") +att.Description = "A popular alternative caliber to .45 ACP. With a reduced diameter, the round achieves greater muzzle velocity and magazine capacity." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ur_m1911_caliber" + +att.AutoStats = true + +att.Override_Trivia_Calibre = "9x19mm Parabellum" +att.Override_Trivia_Manufacturer = "Sturm, Ruger & Company" + +att.Mult_Damage = 30 / 45 +att.Mult_DamageMin = 17 / 15 +att.Mult_Penetration = 6 / 9 +att.Mult_Range = 1.25 +att.Mult_RPM = 525 / 450 +att.Mult_ReloadTime = .9 + +att.Mult_Recoil = 0.85 +att.Mult_RecoilSide = 0.75 + +att.Mult_PhysBulletMuzzleVelocity = 1.4 -- 350 / 253 +att.Override_TracerNum = 1 +att.Override_TracerNum_Priority = 0.5 -- subsonic can override + +att.Mult_ClipSize = 9 / 7 +att.Override_ShellModel = "models/weapons/arccw/uc_shells/9x19.mdl" +att.Override_ShellScale = 1 + +local path = ")^weapons/arccw_ur/1911/" + +att.Hook_GetShootSound = function(wep, sound) -- Temporary + if wep:GetBuff_Override("Silencer") then + return {path .. "fire-9-sup-01.ogg", path .. "fire-9-sup-02.ogg", path .. "fire-9-sup-03.ogg", path .. "fire-9-sup-04.ogg", path .. "fire-9-sup-05.ogg", path .. "fire-9-sup-06.ogg"} + else + return {path .. "fire-9-01.ogg", path .. "fire-9-02.ogg", path .. "fire-9-03.ogg", path .. "fire-9-04.ogg", path .. "fire-9-05.ogg", path .. "fire-9-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 \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_1911_grip_pachmayr.lua b/lua/arccw/shared/attachments/ur_1911_grip_pachmayr.lua new file mode 100644 index 0000000..3eb2cb6 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_1911_grip_pachmayr.lua @@ -0,0 +1,12 @@ +att.PrintName = "M1911 Pachmayr Grip" +att.AbbrevName = "Pachmayr Grip" +att.Icon = Material("entities/att/ur_1911/grip_pach.png","mips smooth") +att.Description = "Aftermarket grip with finger grooves and a pleasant rosewood texture.\nThe finger grooves steadies aim, but is a bit slower to draw." + +att.AutoStats = true +att.Slot = "ur_m1911_grip" + +att.Mult_Sway = 0.75 +att.Mult_Recoil = 0.95 +att.Mult_DrawTime = 1.25 +att.Mult_HolsterTime = 1.25 diff --git a/lua/arccw/shared/attachments/ur_1911_grip_snake.lua b/lua/arccw/shared/attachments/ur_1911_grip_snake.lua new file mode 100644 index 0000000..54dc0f5 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_1911_grip_snake.lua @@ -0,0 +1,10 @@ +att.PrintName = "M1911 Snake Grip" +att.AbbrevName = "Snake Grip" +att.Icon = Material("entities/att/ur_1911/grip_snake.png","mips smooth") +att.Description = "A gaudy grip for those with too much taste and those with too little taste. Made from genuine rattlesnake skin.\nIts rough texture marginally reduces moving spread.\n\n\"Whoever did this is a professional, no question. This thing could shoot a one-hole at 25 yards in a machine rest.\"" + +att.AutoStats = true +att.Slot = "ur_m1911_grip" + +att.Mult_MoveDispersion = 0.9 +att.Mult_RecoilSide = 1.15 \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_1911_mag_ext.lua b/lua/arccw/shared/attachments/ur_1911_mag_ext.lua new file mode 100644 index 0000000..a454053 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_1911_mag_ext.lua @@ -0,0 +1,22 @@ +att.PrintName = "AMAS 11-Round Extended Magazine" +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "M1911 11-Round Extended Magazine" +end +att.AbbrevName = "11-Round Extended Mag" +att.Icon = Material("entities/att/ur_1911/mag11.png","mips smooth") +att.Description = "A higher capacity magazine increases the time you can spend without reloading." +att.Slot = "ur_m1911_mag" +att.AutoStats = true + +att.Override_ClipSize = 11 +att.Mult_SightTime = 1.1 +att.Mult_ReloadTime = 1.15 +att.Mult_Sway = 1.25 +att.Mult_SpeedMult = 0.98 +att.Mult_ShootSpeedMult = 0.95 + +att.Mult_HipDispersion = 1.25 + +att.Hook_SelectReloadAnimation = function(wep, anim) + return anim .. "_10" +end \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_1911_skin_custom.lua b/lua/arccw/shared/attachments/ur_1911_skin_custom.lua new file mode 100644 index 0000000..877ae36 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_1911_skin_custom.lua @@ -0,0 +1,14 @@ +att.PrintName = "M1911 Custom Finish" +att.AbbrevName = "Custom" +att.Icon = Material("entities/att/ur_1911/skin.png","mips smooth") +att.Description = "A configurable finish for your gun. There are many like it, but this one is yours." +att.SortOrder = 7 + +att.Desc_Neutrals = { + "uc.cosmetic", + "uc.custcolor", +} + +att.AutoStats = true +att.Slot = "ur_m1911_skin" +att.Free = true diff --git a/lua/arccw/shared/attachments/ur_1911_skin_nickel.lua b/lua/arccw/shared/attachments/ur_1911_skin_nickel.lua new file mode 100644 index 0000000..a916ecf --- /dev/null +++ b/lua/arccw/shared/attachments/ur_1911_skin_nickel.lua @@ -0,0 +1,15 @@ +att.PrintName = "M1911 Nickel Finish" +att.AbbrevName = "Nickel" +att.Icon = Material("entities/att/ur_1911/skin_dark.png","mips smooth") +att.Description = "A warm, shiny nickel finish that glows vibrantly under the sun." +att.SortOrder = 9 + +att.Desc_Neutrals = { + "uc.cosmetic" +} + +att.AutoStats = true +att.Slot = "ur_m1911_skin" +att.Free = true + +att.Ignore = true \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_1911_skin_silver.lua b/lua/arccw/shared/attachments/ur_1911_skin_silver.lua new file mode 100644 index 0000000..648d36f --- /dev/null +++ b/lua/arccw/shared/attachments/ur_1911_skin_silver.lua @@ -0,0 +1,13 @@ +att.PrintName = "M1911 Silver Finish" +att.AbbrevName = "Silver" +att.Icon = Material("entities/att/ur_1911/skin_silver.png","mips smooth") +att.Description = "This gun may be old, but it will never be out of style." +att.SortOrder = 9 + +att.Desc_Neutrals = { + "uc.cosmetic" +} + +att.AutoStats = true +att.Slot = "ur_m1911_skin" +att.Free = true diff --git a/lua/arccw/shared/attachments/ur_1911_skin_tan.lua b/lua/arccw/shared/attachments/ur_1911_skin_tan.lua new file mode 100644 index 0000000..8a72813 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_1911_skin_tan.lua @@ -0,0 +1,13 @@ +att.PrintName = "M1911 Tan Finish" +att.AbbrevName = "Tan" +att.Icon = Material("entities/att/ur_1911/skin_tan.png","mips smooth") +att.Description = "For those who fight for freedom, democracy, and the interests of oil companies." +att.SortOrder = 8 + +att.Desc_Neutrals = { + "uc.cosmetic" +} + +att.AutoStats = true +att.Slot = "ur_m1911_skin" +att.Free = true diff --git a/lua/arccw/shared/attachments/ur_1911_slide_compact.lua b/lua/arccw/shared/attachments/ur_1911_slide_compact.lua new file mode 100644 index 0000000..4298047 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_1911_slide_compact.lua @@ -0,0 +1,20 @@ +att.PrintName = "Colt Officer's Model 3.5\" Slide" +att.AbbrevName = "3.5\" Officer Slide" +att.Icon = Material("entities/att/ur_1911/slide_compact.png","mips smooth") +att.Description = "A shortened slide reduces the amount of holster to clear and further improves agility to the detriment of long-range performance and recoil control." + +att.AutoStats = true +att.Slot = "ur_m1911_slide" +att.SortOrder = 3.5 + +att.Mult_DrawTime = 0.85 +att.Mult_HolsterTime = 0.85 +att.Add_BarrelLength = -1 + +att.Mult_Sway = 0.75 +att.Mult_HipDispersion = 0.85 +att.Mult_SightTime = 0.85 + +att.Mult_AccuracyMOA = 1.5 +att.Mult_Range = 0.8 +att.Mult_Recoil = 1.2 \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_1911_slide_compact_custom.lua b/lua/arccw/shared/attachments/ur_1911_slide_compact_custom.lua new file mode 100644 index 0000000..e1536b7 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_1911_slide_compact_custom.lua @@ -0,0 +1,24 @@ +att.PrintName = "Colt Officer's Model 3.5\" Slide w/ Custom Finish" +att.AbbrevName = "3.5\" Officer Slide (Custom)" +att.Icon = Material("entities/att/ur_1911/slide_compact.png","mips smooth") +att.Description = "A shortened slide reduces the amount of holster to clear and further improves agility to the detriment of long-range performance and recoil control.\n\nThis variant will use your configured custom color for that extra flair." + +att.Desc_Neutrals = { + "uc.custcolor", +} +att.AutoStats = true +att.Slot = "ur_m1911_slide" +att.SortOrder = 3.5 - 0.01 +att.InvAtt = "ur_1911_slide_compact" + +att.Mult_DrawTime = 0.85 +att.Mult_HolsterTime = 0.85 +att.Add_BarrelLength = -1 + +att.Mult_Sway = 0.75 +att.Mult_HipDispersion = 0.85 +att.Mult_SightTime = 0.85 + +att.Mult_AccuracyMOA = 1.5 +att.Mult_Range = 0.8 +att.Mult_Recoil = 1.2 \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_1911_slide_custom.lua b/lua/arccw/shared/attachments/ur_1911_slide_custom.lua new file mode 100644 index 0000000..988f323 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_1911_slide_custom.lua @@ -0,0 +1,13 @@ +att.PrintName = "5\" Government Slide w/ Custom Finish" +att.AbbrevName = "5\" Custom Slide" +att.Icon = Material("entities/att/ur_1911/slide_std.png","mips smooth") +att.Description = "A factory slide with a secondary color, for use with obnoxious two-tone finishes." + +att.Desc_Neutrals = { + "uc.cosmetic", + "uc.custcolor", +} +att.AutoStats = true +att.Slot = "ur_m1911_slide" +att.SortOrder = 99 +att.Free = true \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_1911_slide_m45.lua b/lua/arccw/shared/attachments/ur_1911_slide_m45.lua new file mode 100644 index 0000000..0479894 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_1911_slide_m45.lua @@ -0,0 +1,15 @@ +att.PrintName = "M45 MEUSOC 5\" Slide" +att.AbbrevName = "5\" M45 Slide (Tan)" +att.Icon = Material("entities/att/ur_1911/slide_45tan.png","mips smooth") +att.Description = "Modernized slide, hammer and trigger assembly designed and hand-built for the U.S. Marine Corps, bringing an old gun to a new age.\nImproves handling and ballistics, but is worse when hip fired." + +att.AutoStats = true +att.Slot = "ur_m1911_slide" +att.SortOrder = 5.1 + +att.Mult_RPM = 1.05 +att.Mult_SightTime = 0.9 +att.Mult_AccuracyMOA = 0.8 +att.Mult_RangeMin = 1.5 + +att.Mult_HipDispersion = 1.25 \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_1911_slide_m45_custom.lua b/lua/arccw/shared/attachments/ur_1911_slide_m45_custom.lua new file mode 100644 index 0000000..ee327bc --- /dev/null +++ b/lua/arccw/shared/attachments/ur_1911_slide_m45_custom.lua @@ -0,0 +1,20 @@ +att.PrintName = "M45 MEUSOC 5\" Slide w/ Custom Finish" +att.AbbrevName = "5\" M45 Slide (Custom)" +att.Icon = Material("entities/att/ur_1911/slide_45.png","mips smooth") +att.Description = "Modernized slide, hammer and trigger assembly designed and hand-built for the U.S. Marine Corps, bringing an old gun to a new age.\nImproves handling and ballistics, but is worse when hip fired.\n\nThis variant will use your configured custom color for that extra flair." + +att.Desc_Neutrals = { + "uc.custcolor", +} + +att.AutoStats = true +att.Slot = "ur_m1911_slide" +att.SortOrder = 5 +att.InvAtt = "ur_1911_slide_m45" + +att.Mult_RPM = 1.05 +att.Mult_SightTime = 0.9 +att.Mult_AccuracyMOA = 0.8 +att.Mult_RangeMin = 1.5 + +att.Mult_HipDispersion = 1.25 \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_329_barrel_m29.lua b/lua/arccw/shared/attachments/ur_329_barrel_m29.lua new file mode 100644 index 0000000..1af4bf4 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_329_barrel_m29.lua @@ -0,0 +1,23 @@ +att.PrintName = "6\" Model 29 Barrel" +att.AbbrevName = "6\" Full-Size Barrel" +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "6\" Thunderbolt Barrel" +end +att.Icon = Material("entities/att/acwatt_ur_329_barrel_m29.png","smooth mips") +att.Description = "Extended barrel that provides extra counterweight in addition to marginal ballistic enhancements." +att.Slot = "ur_329_barrel" +att.AutoStats = true +att.SortOrder = 6 + +att.Mult_AccuracyMOA = 0.7 +att.Mult_Range = 1.5 +att.Mult_Recoil = 0.85 +att.Mult_SightTime = 1.25 +att.Mult_Sway = 1.15 +att.Mult_HipDispersion = 1.1 +att.Mult_PhysBulletMuzzleVelocity = 1.15 + +att.Add_BarrelLength = 4 + +att.Mult_DrawTime = 1.15 +att.Mult_HolsterTime = 1.15 \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_329_barrel_master.lua b/lua/arccw/shared/attachments/ur_329_barrel_master.lua new file mode 100644 index 0000000..09b37d5 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_329_barrel_master.lua @@ -0,0 +1,21 @@ +att.PrintName = "7\" Master Barrel" +att.AbbrevName = "7\" Master Barrel" +att.Icon = Material("entities/att/acwatt_ur_329_barrel_master.png","smooth mips") +att.Description = "Huge, imposing barrel with extra frontal weight and precision rifling. Hard to keep steady, but hones accuracy even further." +att.Slot = "ur_329_barrel" +att.AutoStats = true +att.SortOrder = 7 + +att.Mult_AccuracyMOA = 0.5 +att.Mult_Range = 1.6 +att.Mult_Recoil = 0.75 +att.Mult_SightTime = 1.3 +att.Mult_Sway = 1.4 +att.Mult_HipDispersion = 1.15 +att.Mult_PhysBulletMuzzleVelocity = 1.2 +att.Mult_SightedSpeedMult = .8 + +att.Add_BarrelLength = 5 + +att.Mult_DrawTime = 1.25 +att.Mult_HolsterTime = 1.25 \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_329_barrel_pocket.lua b/lua/arccw/shared/attachments/ur_329_barrel_pocket.lua new file mode 100644 index 0000000..fac170b --- /dev/null +++ b/lua/arccw/shared/attachments/ur_329_barrel_pocket.lua @@ -0,0 +1,25 @@ +att.PrintName = "3\" Model 629 Pocket Barrel" +att.AbbrevName = "3\" Pocket Barrel" +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "3\" Companion .44 Pocket Barrel" +end +att.Icon = Material("entities/att/acwatt_ur_329_barrel_m29.png","smooth mips") +att.Description = "Even shorter barrel, associated with police officers. Being as compact as possible improves draw time, but the barrel cannot handle gas expansion well." +att.Slot = "ur_329_barrel" +att.AutoStats = true +att.SortOrder = 3 + +att.Mult_AccuracyMOA = 1.3 +att.Mult_Range = 0.75 +att.Mult_Recoil = 1.3 +att.Mult_SightTime = 0.85 +att.Mult_Sway = 0.85 +att.Mult_HipDispersion = 0.9 +att.Mult_PhysBulletMuzzleVelocity = 0.85 + +att.Add_BarrelLength = -1 + +att.Mult_DrawTime = 0.75 +att.Mult_HolsterTime = 0.75 + +att.Ignore = true -- Texture is too fucked for this to make it to release \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_329_caliber_44special.lua b/lua/arccw/shared/attachments/ur_329_caliber_44special.lua new file mode 100644 index 0000000..a6d2dd7 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_329_caliber_44special.lua @@ -0,0 +1,52 @@ +att.PrintName = "Model 329PD .44 Special Chambering" +att.AbbrevName = ".44 Special" +att.Icon = Material("entities/att/uc_bullets/44special.png","smooth mips") +att.Description = "A shorter length cartridge with lower recoil but reduced stopping power." + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Enforcement .44 Special Chambering" +end + +att.AutoStats = true +att.Slot = "ur_329_caliber" + +att.Mult_RangeMin = 0.5 +att.Mult_Range = 0.6 +att.Mult_Recoil = 0.75 +att.Override_PhysBulletMuzzleVelocity = 265 + +att.Override_Trivia_Calibre = ".44 Special" + +local path = "weapons/arccw_ur/sw329/" + +att.Hook_GetShootSound = function(wep, sound) + if wep:GetBuff_Override("Silencer") then + return -- how tf did you equip a suppressor with this + else + return { + path .. "fire-01.ogg", + path .. "fire-02.ogg", + path .. "fire-03.ogg", + path .. "fire-04.ogg", + path .. "fire-05.ogg", + path .. "fire-06.ogg", + } -- Placeholder(?) + end +end + +local tail = ")^/arccw_uc/common/44mag/" + +att.Hook_GetDistantShootSoundOutdoors = function(wep, distancesound) + if wep:GetBuff_Override("Silencer") then + -- fallback to script + else + return { + tail .. "fire-dist-44mag-pistol-ext-01.ogg", + tail .. "fire-dist-44mag-pistol-ext-02.ogg", + tail .. "fire-dist-44mag-pistol-ext-03.ogg", + tail .. "fire-dist-44mag-pistol-ext-04.ogg", + tail .. "fire-dist-44mag-pistol-ext-05.ogg", + tail .. "fire-dist-44mag-pistol-ext-06.ogg" + } + end +end diff --git a/lua/arccw/shared/attachments/ur_329_caliber_snakeshot.lua b/lua/arccw/shared/attachments/ur_329_caliber_snakeshot.lua new file mode 100644 index 0000000..3297ea7 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_329_caliber_snakeshot.lua @@ -0,0 +1,66 @@ +att.PrintName = "Model 329PD .44 Snakeshot Chambering" +att.AbbrevName = ".44 Snakeshot" +att.Icon = Material("entities/att/uc_bullets/44special.png","smooth mips") +att.Description = "Rounds containing small lead shots. Due to bullet diameter and barrel length, this round has an extremely low effective range.\nAs its name implies, it's mostly useful for shooting snakes and rodents only." + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Enforcement .44 Snakeshot Chambering" +end +-- Todo: alt shoot sound + +att.AutoStats = true +att.Desc_Pros = { + "ur.329.snakeshot.1" +} +att.Desc_Cons = { + "ur.329.snakeshot.2", + "ur.329.snakeshot.3" +} +att.Slot = "ur_329_caliber" +att.SortOrder = -1 + +att.Override_Num = 4 +att.Override_AccuracyMOA = 65 +att.Override_AccuracyMOA_Priority = 0 + +att.Override_HullSize = 0.1 +att.Override_BodyDamageMults = ArcCW.UC.BodyDamageMults_Shotgun +att.Override_Penetration = 1 + +att.Mult_Damage = 70 / 60 + +att.Mult_Range = 0.4 +att.Mult_RangeMin = 2 + +att.Mult_PhysBulletMuzzleVelocity = 0.6 + +-- att.Override_IsShotgun = true +-- att.Override_Ammo = "buckshot" +-- att.Override_ShellModel = "models/weapons/arccw/uc_shells/410bore.mdl" +-- att.Override_ShellScale = 0.8 +-- att.Override_ShellSounds = ArcCW.ShotgunShellSoundsTable +att.Override_Trivia_Calibre = att.AbbrevName -- E F F I C I E N C Y + +local slotinfo = { + [6] = {"\"SS\" Snakeshot", "\"SS\" Snakeshot", Material("entities/att/arccw_uc_ammo_shotgun_generic.png", "mips smooth")}, +} +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_GetShootSound = function(wep, sound) + if wep:GetBuff_Override("Silencer") then + return "weapons/arccw_ur/deagle/fire_supp_10.ogg" -- Placeholder + else + return {"weapons/arccw_ur/deagle/fire-410-01.ogg", "weapons/arccw_ur/deagle/fire-410-02.ogg", "weapons/arccw_ur/deagle/fire-410-03.ogg", "weapons/arccw_ur/deagle/fire-410-04.ogg", "weapons/arccw_ur/deagle/fire-410-05.ogg", "weapons/arccw_ur/deagle/fire-410-06.ogg"} -- Not Placeholder + end +end + +att.GivesFlags = {"329_ss"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_329_grip_polymer.lua b/lua/arccw/shared/attachments/ur_329_grip_polymer.lua new file mode 100644 index 0000000..ef04f0d --- /dev/null +++ b/lua/arccw/shared/attachments/ur_329_grip_polymer.lua @@ -0,0 +1,18 @@ +att.PrintName = "Model 329PD Polymer Grip" +att.AbbrevName = "Polymer Grip" +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Enforcement .44 Polymer Grip" +end +att.Icon = Material("entities/att/acwatt_ur_deagle_grip_plastic.png","mips smooth") +att.Description = "Polymer grip which improves handling at the cost of increased recoil." +att.Slot = "ur_329_grip" +att.Ignore = true +att.AutoStats = true +att.SortOrder = 6 + +att.Mult_Recoil = 1.2 +att.Mult_RecoilSide = 1.1 + +att.Mult_SightTime = 0.85 +att.Mult_DrawTime = 0.9 +att.Mult_HolsterTime = 0.9 \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_ak_barrel_105.lua b/lua/arccw/shared/attachments/ur_ak_barrel_105.lua new file mode 100644 index 0000000..6931850 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_ak_barrel_105.lua @@ -0,0 +1,42 @@ +att.PrintName = "AK-105 12\" Carbine Barrel" +att.AbbrevName = "12\" Carbine Barrel" +att.Icon = Material("entities/att/ur_ak/barrel/105.png", "mips smooth") +att.Description = "Reduced length barrel that serves as a middle ground between full-size and SMG-length barrels. Reduces weight and profile while keeping the weapon accurate and controllable." +att.Slot = {"ur_ak_barrel"} +att.AutoStats = true + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "KF-104 12\" Carbine Barrel" +end + +att.SortOrder = 12 + +att.Mult_Sway = .85 +att.Mult_SightTime = .8 +att.Add_BarrelLength = -3 +att.Mult_SightedSpeedMult = 1.05 + +att.Mult_Recoil = 1.3 +att.Mult_AccuracyMOA = 1.5 +att.Mult_Range = .75 +att.Mult_RPM = 625/600 +att.Mult_ShootPitch = 105/100 + +-- att.ToggleLockDefault = true +-- att.ToggleStats = { +-- { +-- PrintName = "Black", +-- ActivateElements = {"barrel_105"}, +-- }, +-- { +-- PrintName = "Plum", +-- ActivateElements = {"barrel_105_red"}, +-- }, +-- { +-- PrintName = "Olive Drab", +-- ActivateElements = {"barrel_105_green"}, +-- }, +-- } + +att.ActivateElements = {"barrel_105"} +att.GivesFlags = {"ak_barrelchange","nodong"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_ak_barrel_krinkov.lua b/lua/arccw/shared/attachments/ur_ak_barrel_krinkov.lua new file mode 100644 index 0000000..95561a0 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_ak_barrel_krinkov.lua @@ -0,0 +1,34 @@ +att.PrintName = "AKS-74U 8\" Compact Barrel" +att.AbbrevName = "8\" Compact Barrel" +att.Icon = Material("entities/att/ur_ak/barrel/aksu.png", "mips smooth") +att.Description = "Special carbine length handguard and barrel. Its reduced length leads to less unwieldiness, and the shortened gas system increases cyclic rate respectably.\nThese traits combined, however, result in a difficult weapon to control." +att.Slot = {"ur_ak_barrel"} +att.AutoStats = true + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "KFSU-76 8\" Compact Barrel" +end + +att.SortOrder = 8 + +att.Mult_ShootPitch = 115 / 100 +att.Add_BarrelLength = -6 +att.Mult_RPM = 1.131 +att.Mult_SightTime = 0.8 +att.Mult_HipDispersion = 0.8 +att.Mult_SightedSpeedMult = 1.1 +att.Mult_SpeedMult = 1.02 +att.Mult_Sway = 0.75 + +att.Mult_Recoil = 1.5 +att.Mult_AccuracyMOA = 2 +att.Mult_Range = .5 + +att.ActivateElements = {"barrel_krinkov"} +att.GivesFlags = {"ak_barrelchange", "barrel_carbine", "ak_barrelkrinkov"} + +att.LHIK = true + +att.ModelOffset = Vector(-24, -3.1, 3.6) +att.OffsetAng = Angle(10, 0, 0) +att.Model = "models/weapons/arccw/ak_lhik_u.mdl" \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_ak_barrel_rpk.lua b/lua/arccw/shared/attachments/ur_ak_barrel_rpk.lua new file mode 100644 index 0000000..e725da8 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_ak_barrel_rpk.lua @@ -0,0 +1,31 @@ +att.PrintName = "RPK 23\" SAW Barrel" +att.AbbrevName = "23\" SAW Barrel" +att.Icon = Material("entities/att/ur_ak/barrel/rpk.png", "mips smooth") +att.Description = "Light machine gun barrel as used on the RPK. In addition to improved precision from the elongated barrel, it features an integrated bipod which can be deployed for even greater accuracy and control.\nVery front-heavy due to the long, more massive barrel." +att.Slot = {"ur_ak_barrel"} +att.AutoStats = true + +att.SortOrder = 23 + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "PKF-67 23\" SAW Barrel" +end + +att.Add_BarrelLength = 5 +att.Mult_SightTime = 1.2 +att.Mult_SpeedMult = .95 +att.Mult_SightedSpeedMult = 0.8 +att.Mult_Sway = 1.5 + +att.Mult_Recoil = .8 +att.Mult_AccuracyMOA = .7 +att.Mult_Range = 1.5 +att.Mult_MalfunctionMean = 2 +att.Mult_HipDispersion = 1.5 + +att.Bipod = true +att.Mult_BipodRecoil = .25 +att.Mult_BipodDispersion = .2 + +att.ActivateElements = {"barrel_rpk"} +att.GivesFlags = {"ak_barrelchange", "uc_noubgl"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_ak_barrel_t56.lua b/lua/arccw/shared/attachments/ur_ak_barrel_t56.lua new file mode 100644 index 0000000..87c6fc6 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_ak_barrel_t56.lua @@ -0,0 +1,43 @@ +att.PrintName = "Type 56 16\" Bayonet Barrel" +att.AbbrevName = "16\" Bayonet Barrel" +att.Icon = Material("entities/att/ur_ak/barrel/type.png", "mips smooth") +att.Description = "Chinese derivative barrel with a fully hooded front sight and a folding spike bayonet. When unfolded, the bayonet increases melee damage substantially, but adds some forward weight." +att.Slot = {"ur_ak_barrel"} +att.AutoStats = true + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Yucha 7 16\" Bayonet Barrel" -- Chinese for harpoon +end + +att.SortOrder = 16 + +att.Mult_SightedSpeedMult = .95 + +--att.ToggleLockDefault = true +att.ToggleStats = { + { + PrintName = "Extended", + ActivateElements = {"barrel_t56_ext"}, + AutoStats = true, + Add_MeleeRange = 16, + Mult_MeleeDamage = 3, + Mult_MeleeWaitTime = 2, + Add_BarrelLength = 10, + Mult_Sway = 1.2, + -- Override_BashPreparePos = Vector(4, -5, -1.8), + -- Override_BashPrepareAng = Angle(-15, -5, -5), + -- Override_BashPos = Vector(-1, 12, 4.5), -- i'm too impatient to not make this bat you in the face with the stock + -- Override_BashAng = Angle(-7, 3, 25), + Hook_SelectBashAnim = function(wep,anim) + return "bash_bayonet" + end + }, + { + PrintName = "Folded", + AutoStats = true, + ActivateElements = {"barrel_t56"}, + }, +} + +att.GivesFlags = {"ak_bayonet1"} +att.ExcludeFlags = {"ak_bayonet2"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_ak_barrel_vepr.lua b/lua/arccw/shared/attachments/ur_ak_barrel_vepr.lua new file mode 100644 index 0000000..e4b0e86 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_ak_barrel_vepr.lua @@ -0,0 +1,26 @@ +att.PrintName = "Vepr 20\" Marksman Barrel" +att.AbbrevName = "20\" Marksman Barrel" +att.Icon = Material("entities/att/ur_ak/barrel/vepr.png", "mips smooth") +att.Description = "Long civilian hunting barrel. Improved performance at range, but fires much slower." +att.Slot = {"ur_ak_barrel"} +att.AutoStats = true + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Amur 20\" Marksman Barrel" +end + +att.SortOrder = 20 + +att.Add_BarrelLength = 4 +att.Mult_SightTime = 1.15 +att.Mult_SpeedMult = .97 +att.Mult_SightedSpeedMult = 0.85 + +att.Mult_Recoil = 0.85 +att.Mult_AccuracyMOA = 0.5 +att.Mult_Range = 1.5 +att.Mult_HipDispersion = 1.25 +att.Mult_ShootPitch = 0.9 +att.Mult_RPM = 0.8 +att.ActivateElements = {"barrel_vepr"} +att.GivesFlags = {"ak_barrelchange"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_ak_barrel_vityaz.lua b/lua/arccw/shared/attachments/ur_ak_barrel_vityaz.lua new file mode 100644 index 0000000..472f2e5 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_ak_barrel_vityaz.lua @@ -0,0 +1,34 @@ +att.PrintName = "PP-19 9\" SMG Barrel" +att.AbbrevName = "9\" SMG Barrel" +att.Icon = Material("entities/att/ur_ak/barrel/smg.png", "mips smooth") +att.Description = "Submachine gun barrel with a rail interface for additional modularity. More lightweight than the compact barrel, but confers more recoil." +att.Slot = {"ur_ak_barrel"} +att.AutoStats = true + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Bogatyr SMG 9\" SMG Barrel" +end + +att.SortOrder = 9 + +att.Add_BarrelLength = -5 +att.Mult_ShootPitch = 115 / 100 +att.Mult_RPM = 1.131 +att.Mult_SightTime = 0.7 +att.Mult_HipDispersion = 0.7 +att.Mult_SightedSpeedMult = 1.12 +att.Mult_SpeedMult = 1.03 +att.Mult_Sway = 0.85 + +att.Mult_Recoil = 1.4 +att.Mult_AccuracyMOA = 1.5 +att.Mult_Range = 0.65 + +att.ActivateElements = {"barrel_vityaz"} +att.GivesFlags = {"ak_barrelchange", "barrel_carbine", "ak_railedguard"} + +att.LHIK = true + +att.ModelOffset = Vector(-24, -3.4, 3.3) +att.OffsetAng = Angle(10, 0, 0) +att.Model = "models/weapons/arccw/ak_lhik_u.mdl" \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_ak_cal_366.lua b/lua/arccw/shared/attachments/ur_ak_cal_366.lua new file mode 100644 index 0000000..075e8d3 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_ak_cal_366.lua @@ -0,0 +1,75 @@ +att.PrintName = "VPO-209 .366 TKM Receiver" +att.AbbrevName = ".366 TKM Receiver" + +--att.Icon = Material("entities/att/uc_bullets/366tkm.png", "mips smooth") +att.Icon = Material("entities/att/uc_bullets/762x39.png", "mips smooth") +att.Description = "Hunting round based on 7.62x39mm, with more powerful ranged ballistics than the parent cartridge. Weapons chambered for it are exclusively produced for the Russian civilian market, and are therefore semi-automatic only." + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "KFN-209 .366 TKM Receiver" +end + +att.Desc_Pros = { +} +att.Desc_Cons = { + "uc.semionly" +} +att.Desc_Neutrals = { +} +att.Slot = "ur_ak_cal" +att.AutoStats = true + +att.Mult_Damage = 1.2 +att.Mult_DamageMin = 1.2 +att.Mult_Range = 1.25 +att.Mult_PrecisionMOA = .75 +att.Mult_Penetration = 1.5 +--att.Mult_ReloadTime = .9 + +att.Mult_RPM = 0.8 +att.Mult_Recoil = 1.5 +-- att.Override_ClipSize = 10 +att.Mult_ShootVol = 130 / 125 + + +-- att.Hook_SelectReloadAnimation = function(wep, anim) +-- return anim .. "_10rnd" +-- end + +att.Override_Firemodes = { + { + Mode = 1, + }, + { + Mode = 0 + } +} + +att.Override_ShellModel = "models/weapons/arccw/uc_shells/366tkm.mdl" +att.Override_ShellScale = .666 +--att.Override_Trivia_Class = "Shotgun" -- The VPO-209 is considered a shotgun because of its smoothbore barrel +att.Override_Trivia_Calibre = ".366 TKM" +att.Override_Trivia_Manufacturer = "Molot-Oruzhiye" +-- att.ActivateElements = {"mag_366"} +att.GivesFlags = {"cal_366"} + +local path = ")weapons/arccw_ur/ak/" + +att.Hook_GetShootSound = function(wep, fsound) + if fsound == wep.ShootSound or fsound == wep.FirstShootSound then return {path .. "fire_366_1.ogg", path .. "fire_366_2.ogg", path .. "fire_366_3.ogg"} end + if fsound == wep.ShootSoundSilenced then return path .. "fire_sup_1.ogg" end -- Temporary? +end + +-- local slotinfo = { +-- [5] = {"10-Round Mag", "10-Round Mag", Material("entities/att/ur_ak/magazines/366_10.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/ur_ak_cal_545.lua b/lua/arccw/shared/attachments/ur_ak_cal_545.lua new file mode 100644 index 0000000..fdfcd05 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_ak_cal_545.lua @@ -0,0 +1,71 @@ +att.PrintName = "AK-74 5.45x39mm Receiver" +att.AbbrevName = "5.45x39mm Receiver" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "KF-76 5.45x39mm Receiver" +end + +att.Icon = Material("entities/att/uc_bullets/545x39.png", "mips smooth") +att.Description = "Lighter, more accurate cartridge that maintains wounding potential up close, but lacks penetration." +att.Slot = {"ur_ak_cal"} +att.AutoStats = true + +att.SortOrder = 10 + +att.Override_Ammo = "smg1" +att.Override_Trivia_Calibre = "5.45x39mm Soviet" + +att.Mult_Range = 1.2 +att.Mult_RPM = 1.083 -- 650 rpm +att.Mult_SightedSpeedMult = 1.05 +att.Mult_ReloadTime = .95 +att.Mult_Recoil = .85 +att.Mult_AccuracyMOA = .85 +att.Mult_HipDispersion = .75 + +att.Mult_Penetration = .65 +att.Mult_DamageMin = .8 +att.Mult_Damage = .8 +att.ShootPitchVariation = 1 +att.Override_ShellModel = "models/weapons/arccw/uc_shells/545x39.mdl" +att.Override_ShellScale = 0.666 +att.GivesFlags = {"cal_545"} + +att.ActivateElements = {"mag_545_30"} +local path = ")weapons/arccw_ur/ak/545_39/" +local path1 = ")weapons/arccw_ur/ak/" +local tail = ")/arccw_uc/common/556x45/" +local fire545dist = {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"} +local fire545 = {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 fire545supp = {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"} + +att.Hook_GetShootSound = function(wep, fsound) + if wep:GetBuff_Override("Silencer") then + return fire545supp + else + return fire545 + end +end + + +att.Hook_GetDistantShootSoundOutdoors = function(wep, distancesound) + if wep:GetBuff_Override("Silencer") then + -- fallback to script + else + return fire545dist + end +end + +local slotinfo = { + [6] = {"30-Round Mag", "30-Round Mag", Material("entities/att/ur_ak/magazines/545_30.png", "mips smooth")}, +} +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/ur_ak_cal_556.lua b/lua/arccw/shared/attachments/ur_ak_cal_556.lua new file mode 100644 index 0000000..2df84c5 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_ak_cal_556.lua @@ -0,0 +1,77 @@ +att.PrintName = "AK-101 5.56x45mm NATO Receiver" +att.AbbrevName = "5.56x45mm Receiver" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "KF-45 5.56x45mm NATO Receiver" +end + +att.Icon = Material("entities/att/uc_bullets/556x45.png", "mips smooth") +att.Description = "Designed for the export market, this receiever uses the NATO standard 5.56x45mm cartridge.\nThe smaller round yields a higher muzzle velocity and accuracy at range with similiar wounding potential to 5.45x39mm, but with a slower cyclic rate." +att.Slot = {"ur_ak_cal"} +att.AutoStats = true + +att.SortOrder = 10 + +att.Override_Ammo = "smg1" +att.Override_Trivia_Calibre = "5.56x45mm NATO" + +att.Mult_Range = 1.5 +att.Mult_SightedSpeedMult = 1.05 +att.Mult_ReloadTime = 0.95 +att.Mult_Recoil = 0.65 +att.Mult_AccuracyMOA = 0.6 +att.Mult_HipDispersion = .75 + +att.Mult_Penetration = 12 / 16 +att.Mult_DamageMin = 20 / 25 +att.Mult_Damage = 34 / 50 + +att.Override_Trivia_Country = "Russia" + +att.ShootPitchVariation = 1 +att.Override_ShellModel = "models/weapons/arccw/uc_shells/556x45.mdl" +att.Override_ShellScale = .666 +att.GivesFlags = {"cal_556"} + +att.ActivateElements = {"mag_556_30"} +local path = ")weapons/arccw_ur/ak/556/" +local path1 = ")weapons/arccw_ur/ak/" + +att.Hook_GetShootSound = function(wep, fsound) + --[[if fsound == wep.FirstShootSound or fsound == wep.FirstShootSound then return { + path .. "stalol/fire_545_1.wav", + } end]] + if fsound == wep.ShootSound or fsound == wep.FirstShootSound then return {path .. "fire-01.ogg", path .. "fire-02.ogg", path .. "fire-03.ogg", path .. "fire-04.ogg", path .. "fire-05.ogg", path .. "fire-06.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/556x45/" + +att.Hook_GetDistantShootSoundOutdoors = function(wep, distancesound) + if wep:GetBuff_Override("Silencer") then + -- fallback to script + else + return { + 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" + } + end +end + +local slotinfo = { + [6] = {"30-Round Mag", "30-Round Mag", Material("entities/att/ur_ak/magazines/556_30.png", "mips smooth")}, +} +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 diff --git a/lua/arccw/shared/attachments/ur_ak_cal_9mm.lua b/lua/arccw/shared/attachments/ur_ak_cal_9mm.lua new file mode 100644 index 0000000..6c11fb7 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_ak_cal_9mm.lua @@ -0,0 +1,96 @@ +att.PrintName = "PP-19 Vityaz 9x19mm Parabellum Receiver" +att.AbbrevName = "9x19mm Receiver" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Bogatyr SMG 9x19mm Parabellum Receiver" +end + +att.Icon = Material("entities/att/uc_bullets/9x19.png", "mips smooth") +att.Description = "Converts the weapon to a submachine gun. The smaller caliber drastically reduces recoil, but has much less range and is less accurate." +att.Slot = {"ur_ak_cal"} +att.AutoStats = true + +att.SortOrder = 9 + +att.Override_Ammo = "pistol" +att.Override_Trivia_Calibre = att.AbbrevName +att.Override_Trivia_Class = "Submachine Gun" + +att.Mult_Range = 0.6 +att.Mult_RPM = 1.178 -- 800 rpm with the carbine barrels +att.Mult_ReloadTime = .95 +att.Mult_Recoil = .35 +att.Mult_AccuracyMOA = .85 +att.Mult_HipDispersion = .75 +att.Mult_ShootPitch = 90 / 100 + +att.Mult_Penetration = 0.125 +att.Mult_DamageMin = 0.85 +att.Mult_Damage = 0.64 + +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 + +att.Hook_SelectReloadAnimation = function(wep, anim) + return anim .. "_9mm" +end + +att.GivesFlags = {"cal_9mm"} +att.ActivateElements = {"mag_9mm"} +local path = ")weapons/arccw_ur/ak/9mm/" + +local soundpath = ")weapons/arccw_ur/1911/fire-9-" + +att.Hook_GetShootSound = function(wep, fsound) + if fsound == wep.ShootSound or fsound == wep.FirstShootSoundSilenced then return { + soundpath .. "01.ogg", + soundpath .. "02.ogg", + soundpath .. "03.ogg", + soundpath .. "04.ogg", + soundpath .. "05.ogg", + soundpath .. "06.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 = { + [6] = {"30-Round Mag", "30-Round Mag", Material("entities/att/ur_ak/magazines/9_30.png", "mips smooth")}, +} +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/ur_ak_charm_tl.lua b/lua/arccw/shared/attachments/ur_ak_charm_tl.lua new file mode 100644 index 0000000..93a1827 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_ak_charm_tl.lua @@ -0,0 +1,27 @@ +att.PrintName = "Tactical Laser Position" +att.Icon = Material("entities/att/aksidemount.png", "smooth mips") +att.Description = "Give your AN/PEQ a reason to be thin." +att.Desc_Pros = {} +att.Desc_Cons = {} +att.Desc_Neutrals = { + "ur.ak.tl.1", + "ur.ak.tl.2" +} +att.Slot = "ur_ak_charm" + +att.ActivateElements = {"optic_raillaser"} +att.AdditionalSights = { + { + Pos = Vector(0, 20, -6), + Ang = Angle(0, 0, -25), + GlobalPos = false, + GlobalAng = true, + Magnification = 1, + ScrollFunc = ArcCW.SCROLL_NONE + } +} + +att.SortOrder = 998 +-- att.TacLaserPos = true +att.RequireFlags = {"tac"} +att.GivesFlags = {"ak_norail"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_ak_cover_alpha.lua b/lua/arccw/shared/attachments/ur_ak_cover_alpha.lua new file mode 100644 index 0000000..f5ef03e --- /dev/null +++ b/lua/arccw/shared/attachments/ur_ak_cover_alpha.lua @@ -0,0 +1,15 @@ +att.PrintName = "Alpha AK Dust Cover" +att.AbbrevName = "Alpha Dust Cover" +att.Icon = Material("entities/att/ur_ak/dustcover_alpha.png", "mips smooth") +att.Description = "Alternative US-made dust cover with an upper picattiny rail." +att.Slot = {"ur_ak_cover"} +att.AutoStats = true + +att.Desc_Neutrals = { + "uc.cosmetic", + "ur.ak.alpha" +} + +att.ActivateElements = {"cover_alpha"} +att.GivesFlags = {"cover_rail"} +att.ExcludeFlags = {"ak_barrelkrinkov", "ak_norail"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_ak_cover_smooth.lua b/lua/arccw/shared/attachments/ur_ak_cover_smooth.lua new file mode 100644 index 0000000..14430cc --- /dev/null +++ b/lua/arccw/shared/attachments/ur_ak_cover_smooth.lua @@ -0,0 +1,8 @@ +att.PrintName = "Smooth Dust Cover" +att.Icon = Material("entities/att/ur_ak/dustcover_ribbed.png", "mips smooth") +att.Description = "Early dust cover with a smooth profile. Realistically down to preference." +att.Slot = {"ur_ak_cover"} + +att.Desc_Neutrals = {"uc.cosmetic"} + +att.ActivateElements = {"cover_ribbed"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_ak_cover_truniun_rail.lua b/lua/arccw/shared/attachments/ur_ak_cover_truniun_rail.lua new file mode 100644 index 0000000..3427835 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_ak_cover_truniun_rail.lua @@ -0,0 +1,15 @@ +att.PrintName = "Trunnion Sight Mount" +att.Icon = Material("entities/att/ur_ak/dustcover_mount.png", "mips smooth") +att.Description = "Picatinny rail mounted on trunnion sights" +att.Slot = {"ur_ak_cover"} + +att.Desc_Neutrals = {"uc.cosmetic"} +att.Desc_Cons = {"Obstructs ironsights, install any scope" +-- , "Only small scopes can be installed" ? +} + +att.ActivateElements = {"cover_trail"} +att.GivesFlags = {"cover_rail"} +att.ExcludeFlags = {"ak_barrelkrinkov","ak_norail"} + +-- att.Ignore = true \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_ak_grip_alpha.lua b/lua/arccw/shared/attachments/ur_ak_grip_alpha.lua new file mode 100644 index 0000000..0009629 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_ak_grip_alpha.lua @@ -0,0 +1,11 @@ +att.PrintName = "Helix Polymer Grip" +att.AbbrevName = "Polymer Grip" +att.Icon = Material("entities/att/ur_ak/grip_helix.png", "mips smooth") +att.Description = "Rough US-made polymer grip, prodiving a bit more sighted mobility." +att.AutoStats = true +att.Slot = {"ur_ak_grip"} + +att.Mult_Recoil = 1.05 +att.Mult_SightedSpeedMult = 1.05 + +att.ActivateElements = {"grip_alpha"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_ak_grip_type3.lua b/lua/arccw/shared/attachments/ur_ak_grip_type3.lua new file mode 100644 index 0000000..de408b1 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_ak_grip_type3.lua @@ -0,0 +1,11 @@ +att.PrintName = "Vintage Grip" +att.Icon = Material("entities/att/ur_ak/grip_3.png", "mips smooth") +att.Description = "Original pistol grip with a rougher, heavier shape." +att.AutoStats = true +att.Slot = {"ur_ak_grip"} + + +att.Mult_Recoil = 0.95 +att.Mult_SightTime = 1.05 + +att.ActivateElements = {"grip_akm"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_ak_hg_74m.lua b/lua/arccw/shared/attachments/ur_ak_hg_74m.lua new file mode 100644 index 0000000..29dea8c --- /dev/null +++ b/lua/arccw/shared/attachments/ur_ak_hg_74m.lua @@ -0,0 +1,27 @@ +att.PrintName = "Polymer Handguard" +att.Icon = Material("entities/att/ur_ak/handguards/poly.png", "mips smooth") +att.Description = "Light polymer handguard with superior agility, but higher recoil from the reduced counterweight." +att.Slot = {"ur_ak_hg"} +att.AutoStats = true + +att.SortOrder = 16 + +att.Mult_Sway = 0.9 +att.Mult_SightTime = 0.9 +att.Mult_Recoil = 1.1 + +att.ToggleLockDefault = true +att.ToggleStats = { + { + PrintName = "Black", + ActivateElements = {"barrel_74m"}, + }, + { + PrintName = "Plum", + ActivateElements = {"barrel_74m_red"}, + }, + { + PrintName = "Olive Drab", + ActivateElements = {"barrel_74m_green"}, + }, +} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_ak_hg_alpha.lua b/lua/arccw/shared/attachments/ur_ak_hg_alpha.lua new file mode 100644 index 0000000..2d483e7 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_ak_hg_alpha.lua @@ -0,0 +1,26 @@ +att.PrintName = "AK Zenitco Aluminum Handguard" +att.AbbrevName = "Aluminum Handguard" +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "KF Aluminum Handguard" +end +att.Icon = Material("entities/att/ur_ak/handguards/alpha.png", "mips smooth") +att.Description = "Fancy Russian-made handguard featuring a rail interface for additional modularity. Especially lightweight, though less comfortable to grip." +att.Slot = {"ur_ak_hg"} +att.AutoStats = true + +--att.Desc_Neutrals = {"uc.cosmetic"} nvm +att.SortOrder = 15.9 + +att.Mult_Sway = 1.15 +att.Mult_SightedSpeedMult = 1.15 +-- att.Mult_SpeedMult = 1.05 +att.Mult_Recoil = 1.08 + +att.GivesFlags = {"ak_railedguard","nodong"} +att.ActivateElements = {"barrel_alpha"} + +att.LHIK = true + +att.ModelOffset = Vector(-22, -3.4, 3.3) +att.OffsetAng = Angle(5, 0, 0) +att.Model = "models/weapons/arccw/ak_lhik_u.mdl" \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_ak_hg_dong.lua b/lua/arccw/shared/attachments/ur_ak_hg_dong.lua new file mode 100644 index 0000000..a5fdc86 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_ak_hg_dong.lua @@ -0,0 +1,23 @@ +att.PrintName = "\"Romanian Dong\" Integral Foregrip" +att.AbbrevName = "Dong Foregrip" +att.Icon = Material("entities/att/ur_ak/dong.png", "mips smooth") +att.Description = "Romanian lower handguard design, shaped into an integrated foregrip." +att.Slot = {"ur_ak_hg"} +att.Desc_Cons = {"uc.noubs"} +att.AutoStats = true + +att.SortOrder = 16 + +att.Mult_Recoil = .82 +att.Mult_SightTime = 1.12 +att.Mult_MoveDispersion = 1.25 + +att.ActivateElements = {"barrel_dong"} +att.GivesFlags = {"ak_noubs"} + +att.LHIK = true + +att.ModelOffset = Vector(-23, -2.6, 3.8) +att.Model = "models/weapons/arccw/ak_lhik_dong.mdl" + +att.Override_HoldtypeActive = "smg" \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_ak_hg_rpk74m.lua b/lua/arccw/shared/attachments/ur_ak_hg_rpk74m.lua new file mode 100644 index 0000000..00635d5 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_ak_hg_rpk74m.lua @@ -0,0 +1,13 @@ +att.PrintName = "Polymer SAW Handguard" +att.Icon = Material("entities/att/ur_ak/handguards/rpk.png", "mips smooth") +att.Description = "Light polymer handguard used on the RPK-74M. Its additional grooves makes it a bit steadier to hold." +att.Slot = {"ur_ak_hg"} +att.AutoStats = true + +att.SortOrder = 16 + +att.Mult_Sway = .8 +att.Mult_SightTime = 1.1 +att.Mult_Recoil = 0.9 + +att.ActivateElements = {"barrel_rpk74m"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_ak_hg_type3.lua b/lua/arccw/shared/attachments/ur_ak_hg_type3.lua new file mode 100644 index 0000000..5626ddc --- /dev/null +++ b/lua/arccw/shared/attachments/ur_ak_hg_type3.lua @@ -0,0 +1,16 @@ +att.PrintName = "Type 3 Vintage Handguard" +att.AbbrevName = "Vintage Handguard" +att.Icon = Material("entities/att/ur_ak/handguards/vintage.png", "mips smooth") -- todo +att.Description = "Lacks grip protrusions, reducing grip surface but enhancing agility." +att.Slot = {"ur_ak_hg"} +att.AutoStats = true + +--att.Desc_Neutrals = {"uc.cosmetic"} nvm +att.SortOrder = 16 + +att.Mult_Recoil = 1.05 +att.Mult_SightedSpeedMult = 1.08 + +att.ActivateElements = {"barrel_akm"} + +--att.Ignore = true \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_ak_hg_vepr.lua b/lua/arccw/shared/attachments/ur_ak_hg_vepr.lua new file mode 100644 index 0000000..bb9cfcf --- /dev/null +++ b/lua/arccw/shared/attachments/ur_ak_hg_vepr.lua @@ -0,0 +1,16 @@ +att.PrintName = "Heavy Handguard" +att.Icon = Material("entities/att/ur_ak/handguards/vepr.png", "mips smooth") +att.Description = "Bottom-heavy marksman handguard. Hard to handle, but steady and accurate. Does not have a bottom rail, and thus cannot accept underbarrel attachments." +att.Slot = {"ur_ak_hg"} +att.Desc_Cons = {"uc.noubs"} +att.AutoStats = true + +att.Mult_SightedSpeedMult = 0.75 +att.Mult_HipDispersion = 1.25 + +att.Mult_Sway = 0.7 +att.Mult_Recoil = 0.75 + +att.ActivateElements = {"hg_vepr"} +att.GivesFlags = {"ak_noubs"} +att.ExcludeFlags = {"ur_ak_barrel_rpk"} diff --git a/lua/arccw/shared/attachments/ur_ak_mag_545_45.lua b/lua/arccw/shared/attachments/ur_ak_mag_545_45.lua new file mode 100644 index 0000000..af927a6 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_ak_mag_545_45.lua @@ -0,0 +1,30 @@ +att.PrintName = "45-Round Extended Mag" +att.Icon = Material("entities/att/ur_ak/magazines/545_45.png", "mips smooth") +att.Description = "Extended magazine for the AK-74. While intended for squad gunners, the extra ammo is useful for any loadout, though the longer mag is noticeably heavier." +att.Slot = {"ur_ak_mag"} +att.AutoStats = true +att.Desc_Cons = { + "uc.jam" +} + +att.SortOrder = 45 + +att.HideIfBlocked = true + +att.Override_ClipSize = 45 + +att.Mult_SightTime = 1.25 +att.Mult_ReloadTime = 1.15 +att.Mult_Sway = 1.5 +att.Mult_RecoilSide = 1.2 +att.Mult_SpeedMult = 0.95 +att.Mult_ShootSpeedMult = 0.9 + +att.Override_Malfunction = true +att.Mult_MalfunctionMean = 0.85 +att.Mult_MalfunctionVariance = 1.5 + +att.Mult_HipDispersion = 1.25 + +att.ActivateElements = {"mag_545_45"} +att.RequireFlags = {"cal_545"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_ak_mag_545_black.lua b/lua/arccw/shared/attachments/ur_ak_mag_545_black.lua new file mode 100644 index 0000000..9ec183e --- /dev/null +++ b/lua/arccw/shared/attachments/ur_ak_mag_545_black.lua @@ -0,0 +1,16 @@ +att.PrintName = "30-Round Black Bakelite Mag" +att.AbbrevName = "30-Round Mag (Black)" +att.Icon = Material("entities/att/ur_ak/magazines/545_30_b.png", "mips smooth") +att.Description = "Identical to the stock magazine, spray-painted black. Might suit your taste better." +att.Slot = {"ur_ak_mag"} +att.AutoStats = true +att.Desc_Neutrals = { + "uc.cosmetic", +} + +att.SortOrder = 99 + +att.HideIfBlocked = true + +att.ActivateElements = {"mag_545_black"} +att.RequireFlags = {"cal_545"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_ak_mag_762_10.lua b/lua/arccw/shared/attachments/ur_ak_mag_762_10.lua new file mode 100644 index 0000000..886a0be --- /dev/null +++ b/lua/arccw/shared/attachments/ur_ak_mag_762_10.lua @@ -0,0 +1,37 @@ +att.PrintName = "AK-47 10-Round Compact Mag" +att.AbbrevName = "10-Round Compact Mag" +att.Icon = Material("entities/att/ur_ak/magazines/366_10.png", "mips smooth") +att.Description = "Sporting purpose magazine with a very low capacity. The lighter load reduces the weapon's weight significantly." +att.Slot = {"ur_ak_mag"} +att.AutoStats = true + +att.SortOrder = 10 +att.GivesFlags = {"mag_366"} + +att.HideIfBlocked = true + +att.Override_ClipSize = 10 + +att.Mult_SightTime = 0.8 +att.Mult_ReloadTime = 0.85 +att.Mult_Sway = 0.5 + +att.Mult_SpeedMult = 1.025 +att.Mult_ShootSpeedMult = 1.05 + +att.Mult_HipDispersion = 0.75 + +att.Mult_MalfunctionMean = 1.6 + +att.Hook_SelectReloadAnimation = function(wep, anim) + return anim .. "_10rnd" +end + +-- att.Hook_TranslateAnimation = function(wep, anim) +-- if (anim == "fix") then +-- return anim .. "_75" +-- end +-- end + +att.ActivateElements = {"mag_762_75"} +att.ExcludeFlags = {"cal_545","cal_9mm","cal_12g","cal_308","cal_556"} -- Includes .366 \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_ak_mag_762_75.lua b/lua/arccw/shared/attachments/ur_ak_mag_762_75.lua new file mode 100644 index 0000000..6bb596d --- /dev/null +++ b/lua/arccw/shared/attachments/ur_ak_mag_762_75.lua @@ -0,0 +1,43 @@ +att.PrintName = "AK-47 75-Round Drum Mag" +att.AbbrevName = "75-Round Drum Mag" +att.Icon = Material("entities/att/ur_ak/magazines/762_75.png", "mips smooth") +att.Description = "Cylindrical drum magazine with capacity for a very large number of rounds, ideal for machine gunners. It is heavy enough to shift the weapon's center of mass, disorienting recoil control in addition to the existing drawbacks of extreme weight. Prone to feeding failures." +att.Slot = {"ur_ak_mag"} +att.Desc_Cons = {"uc.jam"} +att.AutoStats = true + +att.SortOrder = 75 +att.GivesFlags = {"mag_drum"} + +att.HideIfBlocked = true + +att.Override_ClipSize = 75 + +att.Mult_SightTime = 1.3 +att.Mult_ReloadTime = 1.25 +att.Mult_Sway = 2.5 +att.Mult_SpeedMult = 0.9 +att.Mult_ShootSpeedMult = 0.8 +att.Mult_DrawTime = 1.2 +att.Mult_RecoilSide = 1.5 +att.Mult_HolsterTime = 1.2 +att.Mult_RecoilSide = 1.1 + +att.Override_Malfunction = true +att.Mult_MalfunctionMean = 0.7 +att.Mult_MalfunctionVariance = 1.5 + +att.Mult_HipDispersion = 1.5 + +att.Hook_SelectReloadAnimation = function(wep, anim) + return anim .. "_75" +end + +att.Hook_TranslateAnimation = function(wep, anim) + if (anim == "fix") then + return anim .. "_75" + end +end + +att.ActivateElements = {"mag_762_75"} +att.ExcludeFlags = ArcCW.UR.AKCalFlags \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_ak_mag_762_bakelite.lua b/lua/arccw/shared/attachments/ur_ak_mag_762_bakelite.lua new file mode 100644 index 0000000..bb06fde --- /dev/null +++ b/lua/arccw/shared/attachments/ur_ak_mag_762_bakelite.lua @@ -0,0 +1,16 @@ +att.PrintName = "30-Round Bakelite Mag" +att.AbbrevName = "30-Round Mag (Bakelite)" +att.Icon = Material("entities/att/ur_ak/magazines/762_b.png", "mips smooth") +att.Description = "Plastic variant of the standard issue magazine. Might suit your taste better." +att.Slot = {"ur_ak_mag"} +att.AutoStats = true +att.Desc_Neutrals = { + "uc.cosmetic", +} + +att.SortOrder = 30 + +att.HideIfBlocked = true + +att.ActivateElements = {"mag_762_bakelite"} +att.ExcludeFlags = {"cal_545","cal_9mm","cal_12g","cal_308","cal_556"} -- Includes .366 \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_ak_mag_762_pmag.lua b/lua/arccw/shared/attachments/ur_ak_mag_762_pmag.lua new file mode 100644 index 0000000..f2f54b9 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_ak_mag_762_pmag.lua @@ -0,0 +1,16 @@ +att.PrintName = "PMAG 30 AK/AKM MOE" +att.AbbrevName = "30-Round PMAG" +att.Icon = Material("entities/att/ur_ak/magazines/762_p.png", "mips smooth") +att.Description = "American aftermarket magazine. The grooves give it a slightly better grip surface, but the difference in practice is negligible." +att.Slot = {"ur_ak_mag"} +att.AutoStats = true +att.Desc_Neutrals = { + "uc.cosmetic", +} + +att.SortOrder = 30 + +att.HideIfBlocked = true + +att.ActivateElements = {"mag_762_pmag"} +att.ExcludeFlags = {"cal_545","cal_9mm","cal_12g","cal_308","cal_556"} -- Includes .366 \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_ak_muzzle_ak74.lua b/lua/arccw/shared/attachments/ur_ak_muzzle_ak74.lua new file mode 100644 index 0000000..9c30732 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_ak_muzzle_ak74.lua @@ -0,0 +1,26 @@ +att.PrintName = "100 Series Compensator" + +att.Icon = Material("entities/att/ur_ak/muzzle_74m.png", "mips smooth") +att.Description = "Modernized compensator produced for AKs of multiple calibers." +att.AutoStats = true +att.Slot = {"ur_ak_muzzle"} + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Modern Compensator" + att.Description = string.Replace(att.Description,"AKs","KFs") -- so we don't have to change the desc twice +end + +att.Mult_Recoil = .95 +att.Mult_RecoilSide = .65 + +att.Add_BarrelLength = 2.5 +att.Mult_SightTime = 1.05 +att.Mult_Sway = 1.25 + +att.SortOrder = 999 + +att.AttachSound = "arccw_uc/common/gunsmith/suppressor_thread.ogg" +att.ActivateElements = {"muzzle_ak74"} +att.ExcludeFlags = {"ak_barrelchange","cal_545","cal_556"} + +att.HideIfBlocked = false \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_ak_muzzle_akm.lua b/lua/arccw/shared/attachments/ur_ak_muzzle_akm.lua new file mode 100644 index 0000000..dd32e29 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_ak_muzzle_akm.lua @@ -0,0 +1,26 @@ +att.PrintName = "Slant Muzzle Brake" +att.Icon = Material("entities/att/ur_ak/muzzle_m.png", "mips smooth") +att.Description = "External muzzle brake unique to the AKM and some derivatives. The slant-cut design counters muzzle rise without adding as much weight as a universal compensator." +att.AutoStats = true +att.Slot = {"ur_ak_muzzle"} + +if !GetConVar("arccw_truenames"):GetBool() then + att.Description = string.Replace(att.Description,"AKM","AVR-59") -- so we don't have to change the desc twice +end + +att.Mult_Recoil = .9 +att.Mult_RecoilSide = .95 + +att.Add_BarrelLength = 1 +att.Mult_SightTime = 1.025 +att.Mult_Sway = 1.05 +att.Mult_ShootVol = 1.1 + +att.SortOrder = 998 + +att.AttachSound = "arccw_uc/common/gunsmith/suppressor_thread.ogg" +att.ActivateElements = {"muzzle_akm"} +att.ExcludeFlags = {"ak_barrelchange"} +att.RequireFlags = {"cal_default"} + +att.Ignore = true \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_ak_muzzle_bayonet.lua b/lua/arccw/shared/attachments/ur_ak_muzzle_bayonet.lua new file mode 100644 index 0000000..93d440f --- /dev/null +++ b/lua/arccw/shared/attachments/ur_ak_muzzle_bayonet.lua @@ -0,0 +1,29 @@ +att.PrintName = "Type 2 Bayonet" +att.Icon = Material("entities/att/ur_ak/acwatt_ur_ak_muzzle_bayonet.png", "mips smooth") +att.Description = "External bayonet unique to early AK-pattern rifles. Wide and sharp, it's a bit bulky but allows for a devastating melee attack." +att.AutoStats = true +att.Slot = {"ur_ak_muzzle"} + +att.SortOrder = 997 + +att.Add_MeleeRange = 16 +att.Mult_MeleeDamage = 3.5 +att.Mult_MeleeWaitTime = 2 +att.Add_BarrelLength = 10 +att.Mult_Sway = 1.4 +att.Mult_SightTime = 1.1 +att.Mult_MeleeTime = 1.1 + +att.Override_BashPreparePos = Vector(4, -5, -1.8) +att.Override_BashPrepareAng = Angle(-15, -5, -5) +att.Override_BashPos = Vector(-1, 12, 4.5) -- i'm too impatient to not make this bat you in the face with the stock +att.Override_BashAng = Angle(-7, 3, 25) + +att.Hook_SelectBashAnim = function(wep,anim) + return "bash_bayonet" +end + +att.AttachSound = "arccw_uc/common/gunsmith/suppressor_thread.ogg" +att.ActivateElements = {"muzzle_bayonet"} +att.GivesFlags = {"ak_bayonet2"} +att.ExcludeFlags = {"ak_barrelchange","ak_bayonet1"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_ak_stock_ak74m.lua b/lua/arccw/shared/attachments/ur_ak_stock_ak74m.lua new file mode 100644 index 0000000..452b1dc --- /dev/null +++ b/lua/arccw/shared/attachments/ur_ak_stock_ak74m.lua @@ -0,0 +1,42 @@ +att.PrintName = "AK Polymer Stock" +att.AbbrevName = "Polymer Stock" +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "KF Polymer Stock" +end +att.Icon = Material("entities/att/ur_ak/stock/n.png", "mips smooth") +att.Description = [[Full side-folding stock. While extended, it functions similarly to a standard wood stock, albeit with less stability. +Folding the stock boosts mobility and recoil, though not as significantly as skeletal folding stocks. + +Toggling this stock modifies performance accordingly.]] +att.AutoStats = true +att.Slot = {"ur_ak_stock"} + +att.SortOrder = 1 + +att.ToggleLockDefault = true +att.ToggleSound = "arccw_uc/common/stockslide.ogg" +att.ExcludeFlags = {"mag_drum"} +att.ToggleStats = { + { + PrintName = "Extended", + Mult_SightTime = 0.95, + Mult_Sway = 1.2, + + ActivateElements = {"stock_ak74m"}, + AutoStats = true, + }, + { + PrintName = "Folded", + Mult_SightTime = 0.85, + Mult_DrawTime = 0.9, + Mult_HolsterTime = 0.9, + Mult_Recoil = 1.25, + Mult_RecoilSide = 1.75, + Mult_SightedSpeedMult = 1.05, + Mult_ShootSpeedMult = 1.05, + Add_BarrelLength = -9, + Mult_Sway = 2.5, + ActivateElements = {"stock_ak74m_folded"}, + AutoStats = true, + } +} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_ak_stock_aks.lua b/lua/arccw/shared/attachments/ur_ak_stock_aks.lua new file mode 100644 index 0000000..106c36d --- /dev/null +++ b/lua/arccw/shared/attachments/ur_ak_stock_aks.lua @@ -0,0 +1,42 @@ +att.PrintName = "AK Sidefolding Stock" +att.AbbrevName = "Sidefolding Stock" +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "KF Sidefolding Stock" +end +att.Icon = Material("entities/att/ur_ak/stock/fold.png", "mips smooth") +att.Description = [[Side-folding stock found since the 74 series' debut. The triangular structure reduces its compromise on stability, but it is still less effective than a fixed stock. Folding the stock provides massively boosted maneuverability at the cost of severe recoil. + +Toggling this stock modifies performance accordingly.]] +att.AutoStats = true +att.Slot = {"ur_ak_stock"} + +att.SortOrder = 1 + +att.ToggleLockDefault = true +att.ToggleSound = "arccw_uc/common/stockslide.ogg" +att.ExcludeFlags = {"mag_drum"} +att.ToggleStats = { + { + PrintName = "Extended", + Mult_SightTime = .8, + Mult_RecoilSide = 1.25, + Mult_Sway = 1.2, + Mult_SightedSpeedMult = 1.05, + ActivateElements = {"stock_aks"}, + AutoStats = true, + }, + { + PrintName = "Folded", + Mult_SightTime = 0.6, + Mult_DrawTime = 0.85, + Mult_HolsterTime = 0.85, + Mult_Recoil = 1.5, + Mult_RecoilSide = 2, + Mult_SightedSpeedMult = 1.2, + Mult_ShootSpeedMult = 1.15, + Add_BarrelLength = -9, + Mult_Sway = 3, + ActivateElements = {"stock_aks_folded"}, + AutoStats = true, + } +} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_ak_stock_alpha.lua b/lua/arccw/shared/attachments/ur_ak_stock_alpha.lua new file mode 100644 index 0000000..f049397 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_ak_stock_alpha.lua @@ -0,0 +1,19 @@ +att.PrintName = "AK SOPMOD Stock" +att.AbbrevName = "Carbine Stock" +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "KF SOPMOD Stock" +end +att.Icon = Material("entities/att/ur_ak/stock/helix.png", "mips smooth") +att.Description = "US-made lightweight stock that mounts on an AR buffer tube. More maneuverable than the solid wood stock." +att.Slot = {"ur_ak_stock"} +att.AutoStats = true + +att.SortOrder = 2 + +att.Mult_ShootSpeedMult = 1.1 +att.Mult_SightedSpeedMult = 1.15 +att.Mult_RecoilSide = 1.5 +att.Mult_Sway = 1.25 +att.Add_BarrelLength = -2 + +att.ActivateElements = {"stock_alpha"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_ak_stock_none.lua b/lua/arccw/shared/attachments/ur_ak_stock_none.lua new file mode 100644 index 0000000..f4ecf86 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_ak_stock_none.lua @@ -0,0 +1,22 @@ +att.PrintName = "No Stock" +att.Icon = Material("arccw/hud/atts/default.png", "mips smooth") +att.Description = "You see Ivan, when take buttstock off rifle, you stronger than recoil for fear of hitting face." +-- att.Description = "Buttstock? What are you, Western capitalist WEAKLING? Real comrades channel strength of Siberian bear and shoot Kalashnikov without stock; withstand kick harder than 20 bottles of vodka." +att.Slot = {"ur_ak_stock"} +att.AutoStats = true +att.Free = true + +att.SortOrder = -1 + +att.Mult_SightTime = 0.5 +att.Mult_DrawTime = 0.6 +att.Mult_HolsterTime = 0.6 +att.Mult_Recoil = 1.65 +att.Mult_RecoilSide = 1.95 +att.Mult_SightedSpeedMult = 1.25 +att.Mult_SpeedMult = 1.1 +att.Mult_ShootSpeedMult = 1.15 +att.Add_BarrelLength = -9 +att.Mult_Sway = 3 + +att.ActivateElements = {"stock_none"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_ak_stock_rpk.lua b/lua/arccw/shared/attachments/ur_ak_stock_rpk.lua new file mode 100644 index 0000000..8f900f5 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_ak_stock_rpk.lua @@ -0,0 +1,18 @@ +att.PrintName = "AK Clubfoot Stock" +att.AbbrevName = "Clubfoot Stock" +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "KF Clubfoot Stock" +end +att.Icon = Material("entities/att/ur_ak/stock/rpk.png", "mips smooth") +att.Description = "Heavy-duty machine gun stock, designed with prone shooting in mind. It has more mass than the factory stock, but is generally more comfortable to aim and shoot with." +att.Slot = {"ur_ak_stock"} +att.AutoStats = true + +att.SortOrder = 3 + +att.Mult_Recoil = .85 +att.Mult_Sway = .75 +att.Mult_SightTime = 1.1 +att.Mult_SpeedMult = .9 + +att.ActivateElements = {"stock_rpk"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_ak_stock_skeletal.lua b/lua/arccw/shared/attachments/ur_ak_stock_skeletal.lua new file mode 100644 index 0000000..9c35946 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_ak_stock_skeletal.lua @@ -0,0 +1,21 @@ +att.PrintName = "Skeletal Stock" +att.Icon = Material("entities/att/ur_ak/stock/saiga.png", "mips smooth") +att.Description = [[Lightens the weapon by reducing mass in the stock. Unlike other skeletal stocks for this platform, this stock cannot be folded.]] +att.AutoStats = true +att.Slot = {"ur_ak_stock"} + +att.SortOrder = 2 + +att.Mult_SightTime = .8 +att.Mult_SightedSpeedMult = 1.1 +att.Mult_SpeedMult = 1.05 + +att.Mult_Sway = 1.1 +att.Mult_Recoil = 1.35 +att.Mult_RecoilSide = 1.15 + +att.ActivateElements = {"stock_skeletal"} + +att.Ignore = true +att.Icon = Material("entities/att/obsolete.png", "mips smooth") +att.Description = "stop looking at deprecated shit you suka" \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_ak_stock_type3.lua b/lua/arccw/shared/attachments/ur_ak_stock_type3.lua new file mode 100644 index 0000000..0e2cd19 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_ak_stock_type3.lua @@ -0,0 +1,15 @@ +att.PrintName = "Type 3 Slanted Stock" +att.AbbrevName = "Slanted Stock" +att.Icon = Material("entities/att/ur_ak/stock/3.png", "mips smooth") +att.Description = "A solid, slanted stock that eases handling. The slant design has a lowered cheek rest, which can impede accuracy." +att.Slot = {"ur_ak_stock"} +att.AutoStats = true + +att.SortOrder = 4 + +att.Mult_Recoil = .9 +att.Mult_SightTime = .95 +att.Mult_Sway = 1.25 +att.Mult_HipDispersion = 1.05 + +att.ActivateElements = {"stock_akn"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_ak_stock_underfolder.lua b/lua/arccw/shared/attachments/ur_ak_stock_underfolder.lua new file mode 100644 index 0000000..42dd1fe --- /dev/null +++ b/lua/arccw/shared/attachments/ur_ak_stock_underfolder.lua @@ -0,0 +1,43 @@ +att.PrintName = "AK Underfolding Stock" +att.AbbrevName = "Underfolding Stock" +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "KF Underfolding Stock" +end +att.Icon = Material("entities/att/ur_ak/stock/under.png", "mips smooth") +att.Description = [[Folding stock of the AKS-47. While not as stable as a full wood stock, it is much lighter. Folding the stock provides massively boosted maneuverability at the cost of severe recoil. + +Toggling this stock modifies performance accordingly.]] +att.AutoStats = true +att.Slot = {"ur_ak_stock"} + +att.SortOrder = 1 + +att.ToggleLockDefault = true +att.ToggleSound = "arccw_uc/common/stockslide.ogg" + +att.ToggleStats = { + { + PrintName = "Extended", + Mult_SightTime = .8, + Mult_RecoilSide = 1.35, + Mult_Sway = 1.25, + Mult_SightedSpeedMult = 1.1, + Mult_SpeedMult = 1.025, + ActivateElements = {"stock_underfolder"}, + AutoStats = true, + }, + { + PrintName = "Folded", + Mult_SightTime = 0.6, + Mult_DrawTime = 0.85, + Mult_HolsterTime = 0.85, + Mult_Recoil = 1.5, + Mult_RecoilSide = 2, + Mult_SightedSpeedMult = 1.2, + Mult_ShootSpeedMult = 1.15, + Add_BarrelLength = -9, + Mult_Sway = 3, + ActivateElements = {"stock_underfolder_folded"}, + AutoStats = true, + } +} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_ak_stock_vepr.lua b/lua/arccw/shared/attachments/ur_ak_stock_vepr.lua new file mode 100644 index 0000000..d661914 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_ak_stock_vepr.lua @@ -0,0 +1,23 @@ +att.PrintName = "AK Thumbhole Stock" +att.AbbrevName = "Thumbhole Stock" +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "KF Thumbhole Stock" +end +att.Icon = Material("entities/att/ur_ak/stock/vepr.png", "mips smooth") +att.Description = "Marksman stock with integrated grip. The thumbhole design provides unparalleled stability." +att.Slot = {"ur_ak_stock"} +att.AutoStats = true +att.Desc_Cons = { + "uc.nogrip" +} + +att.SortOrder = 3 + +att.Mult_Recoil = 0.85 +att.Mult_Sway = 0.5 +att.Mult_SightTime = 1.15 +att.Mult_SpeedMult = 0.95 +att.Mult_SightedSpeedMult = 0.8 + +att.ActivateElements = {"stock_vepr"} +att.GivesFlags = {"stock_vepr"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_aw_barrel_long.lua b/lua/arccw/shared/attachments/ur_aw_barrel_long.lua new file mode 100644 index 0000000..1bd70af --- /dev/null +++ b/lua/arccw/shared/attachments/ur_aw_barrel_long.lua @@ -0,0 +1,29 @@ +att.PrintName = "AW 27\" Magnum Barrel" +att.AbbrevName = "27\" Magnum Barrel" +att.Icon = Material("entities/att/ur_aw/bar_long.png", "mips smooth") + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "AP 27\" Magnum Barrel" +end + +--att.Icon = Material("entities/att/acwatt_ud_mini14_barrel_long.png", "smooth mips") +att.SortOrder = 27 +att.Description = "Lengthened fluted-steel barrel used with high-caliber setups for enhanced muzzle velocity and recoil reduction." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ur_aw_barrel" + +att.Mult_Range = 1.1 +att.Mult_Recoil = .8 + +att.Mult_SightTime = 1.15 +att.Mult_Sway = 1.25 + +att.Add_BarrelLength = 3 + +att.AutoStats = true +att.ActivateElements = {"barrel_long"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_aw_barrel_sd.lua b/lua/arccw/shared/attachments/ur_aw_barrel_sd.lua new file mode 100644 index 0000000..db80a3b --- /dev/null +++ b/lua/arccw/shared/attachments/ur_aw_barrel_sd.lua @@ -0,0 +1,33 @@ +att.PrintName = "AWS 28\" Suppressed Barrel" +att.AbbrevName = "28\" SD Barrel" +att.Icon = Material("entities/att/ur_aw/bar_sup.png", "mips smooth") + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "APS 28\" SD Barrel" +end + +--att.Icon = Material("entities/att/acwatt_ud_mini14_barrel_long.png", "smooth mips") +att.SortOrder = 28 +att.Description = "Integrally suppressed barrel for the Arctic Warfare, designed for use with subsonic ammunition. Very effective for noise reduction, but reduces effective range.\nIncompatible with magnum ammunition." +att.Desc_Pros = { +} +att.Desc_Cons = { + "uc.nomuzzle" +} +att.Desc_Neutrals = { +} +att.Slot = "ur_aw_barrel" + +att.Silencer = true +att.Override_MuzzleEffect = "muzzleflash_suppressed" +att.Mult_ShootPitch = 1.1 +att.Mult_ShootVol = 0.6 + +att.Mult_Range = .85 +att.Add_BarrelLength = 3 +att.Mult_SightedSpeedMult = 0.85 + +att.AutoStats = true +att.ExcludeFlags = {"mag_338","mag_300"} +att.ActivateElements = {"barrel_sd"} +att.GivesFlags = {"barrel_sd"} diff --git a/lua/arccw/shared/attachments/ur_aw_barrel_short.lua b/lua/arccw/shared/attachments/ur_aw_barrel_short.lua new file mode 100644 index 0000000..508071b --- /dev/null +++ b/lua/arccw/shared/attachments/ur_aw_barrel_short.lua @@ -0,0 +1,31 @@ +att.PrintName = "AT 20\" Shortened Barrel" +att.AbbrevName = "20\" Shortened Barrel" +att.Icon = Material("entities/att/ur_aw/bar_short.png", "mips smooth") + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "AP 20\" Shortened Barrel" +end + +--att.Icon = Material("entities/att/acwatt_ud_mini14_barrel_long.png", "smooth mips") +att.SortOrder = 20 +att.Description = "Custom-tooled \"close-quarters\" barrel that compromises long-range performance, but reduces forward weight significantly." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ur_aw_barrel" + +att.Mult_SightTime = 0.75 +att.Mult_Sway = 0.5 +att.Mult_HipDispersion = 0.5 +att.Mult_SpeedMult = 1.05 +att.Add_BarrelLength = -4 + +att.Mult_Range = 0.3 +att.Mult_AccuracyMOA = 4 +att.Mult_Recoil = 1.25 + +att.AutoStats = true +att.ActivateElements = {"barrel_short"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_aw_cal_300.lua b/lua/arccw/shared/attachments/ur_aw_cal_300.lua new file mode 100644 index 0000000..14357de --- /dev/null +++ b/lua/arccw/shared/attachments/ur_aw_cal_300.lua @@ -0,0 +1,80 @@ +att.PrintName = "AWM .300 Winchester Magnum Receiver" +att.AbbrevName = ".300 Winchester Magnum" +att.Icon = Material("entities/att/uc_bullets/300winchester.png", "mips smooth") +att.Description = "Versatile magnum cartridge identical in diameter to 7.62x51mm rounds but with significantly higher muzzle energy. Liable to overpenetration at close range." +att.Slot = "ur_aw_cal" +att.Desc_Pros = { + --"ur.aw.velocity" +} + +att.AutoStats = true + +att.Mult_Damage = 50 / 80 +att.Mult_DamageMin = 90 / 50 +--att.Mult_Range = 2 +att.Override_Range = 50 +att.Override_RangeMin = 10 + + +att.Mult_PhysBulletMuzzleVelocity = 1000 / 850 +-- att.Override_PhysBulletMuzzleVelocity = 1000 + +att.Mult_Penetration = 1.25 +att.Mult_Recoil = 1.5 +att.Mult_ReloadTime = 5.55 / 5.15 + +att.Mult_ShootSpeedMult = 0.9 + +local path = ")weapons/arccw_ur/aw_placeholders/338/" +local path1 = ")weapons/arccw_ur/aw_placeholders/" + +local fire300 = {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"} +local fire300sup = {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"} + +att.Hook_GetShootSound = function(wep, sound) + if wep:GetBuff_Override("Silencer") then + return fire300sup + else + return fire300 + end +end + +local tail = ")/arccw_uc/common/338lm/" +local fire338dist = {tail .. "fire-dist-338lm-rif-ext-01.ogg", tail .. "fire-dist-338lm-rif-ext-02.ogg", tail .. "fire-dist-338lm-rif-ext-03.ogg", tail .. "fire-dist-338lm-rif-ext-04.ogg", tail .. "fire-dist-338lm-rif-ext-05.ogg", tail .. "fire-dist-338lm-rif-ext-06.ogg"} +local fire338distint = {tail .. "fire-dist-338lm-rif-int-01.ogg", tail .. "fire-dist-338lm-rif-int-02.ogg", tail .. "fire-dist-338lm-rif-int-03.ogg", tail .. "fire-dist-338lm-rif-int-04.ogg", tail .. "fire-dist-338lm-rif-int-05.ogg", tail .. "fire-dist-338lm-rif-int-06.ogg"} + +att.Hook_GetDistantShootSoundOutdoors = function(wep, distancesound) + if wep:GetBuff_Override("Silencer") then + -- fallback to script + else + return fire338dist + end +end + +att.Hook_GetDistantShootSoundIndoors = function(wep, distancesound) + if wep:GetBuff_Override("Silencer") then + -- fallback to script + else + return fire338distint + end +end + +att.Hook_SelectReloadAnimation = function(wep, anim) + return anim .. "_338" +end + +-- local slotinfo = { +-- [5] = {"5-Round Mag", "5-Round Mag", Material("entities/att/ur_aw/mag338_5.png", "mips smooth")}, +-- } + +-- att.Hook_GetDefaultAttIcon = function(wep, slot) +-- if slotinfo[slot] then +-- return slotinfo[slot][3] +-- end +-- end + +att.Override_Trivia_Calibre = ".300 Winchester Magnum" +att.Override_ShellModel = "models/weapons/arccw/ud_shells/338.mdl" +att.Override_Ammo = "SniperPenetratedRound" +att.GivesFlags = {"mag_300"} +--att.ActivateElements = {"mag_338"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_aw_cal_338.lua b/lua/arccw/shared/attachments/ur_aw_cal_338.lua new file mode 100644 index 0000000..555a721 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_aw_cal_338.lua @@ -0,0 +1,82 @@ +att.PrintName = "AWM .338 Lapua Magnum Receiver" +att.AbbrevName = ".338 Lapua Magnum" +att.Icon = Material("entities/att/uc_bullets/338lapua.png", "mips smooth") +att.Description = "Powerful sniper cartridge that exerts substantially more muzzle energy, practically guaranteed to be fatal on a successful hit beyond point blank. The recoil is tremendous, and the lengthened bolt required to accommodate the cartridge is harder to cycle." +att.Slot = "ur_aw_cal" + +att.AutoStats = true +att.Desc_Pros = { + --"ur.aw.velocity" +} +att.Desc_Cons = { + "Disables Magazine attachments" +} + +--att.Mult_Damage = 85 / 80 +att.Mult_DamageMin = 160 / 50 +--att.Mult_Range = 2 +att.Override_Range = 100 +att.Override_RangeMin = 20 + +att.Mult_PhysBulletMuzzleVelocity = 950 / 850 + +att.Mult_Penetration = 2 +att.Mult_Recoil = 2 +att.Mult_CycleTime = 1.24 +att.Mult_ReloadTime = 5.55 / 5.15 + +att.Mult_ShootSpeedMult = 0.8 + +local path = ")weapons/arccw_ur/aw_placeholders/338/" +local path1 = ")weapons/arccw_ur/aw_placeholders/" + +local fire338 = {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 fire338sup = {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"} + +att.Hook_GetShootSound = function(wep, sound) + if wep:GetBuff_Override("Silencer") then + return fire338sup + else + return fire338 + end +end + +local tail = ")/arccw_uc/common/338lm/" +local fire338dist = {tail .. "fire-dist-338lm-rif-ext-01.ogg", tail .. "fire-dist-338lm-rif-ext-02.ogg", tail .. "fire-dist-338lm-rif-ext-03.ogg", tail .. "fire-dist-338lm-rif-ext-04.ogg", tail .. "fire-dist-338lm-rif-ext-05.ogg", tail .. "fire-dist-338lm-rif-ext-06.ogg"} +local fire338distint = {tail .. "fire-dist-338lm-rif-int-01.ogg", tail .. "fire-dist-338lm-rif-int-02.ogg", tail .. "fire-dist-338lm-rif-int-03.ogg", tail .. "fire-dist-338lm-rif-int-04.ogg", tail .. "fire-dist-338lm-rif-int-05.ogg", tail .. "fire-dist-338lm-rif-int-06.ogg"} + +att.Hook_GetDistantShootSoundOutdoors = function(wep, distancesound) + if wep:GetBuff_Override("Silencer") then + -- fallback to script + else + return fire338dist + end +end + +att.Hook_GetDistantShootSoundIndoors = function(wep, distancesound) + if wep:GetBuff_Override("Silencer") then + -- fallback to script + else + return fire338distint + end +end + +att.Hook_SelectReloadAnimation = function(wep, anim) + return anim .. "_338" +end + +local slotinfo = { + [5] = {"5-Round Mag", "5-Round Mag", Material("entities/att/ur_aw/mag338_5.png", "mips smooth")}, +} + +att.Hook_GetDefaultAttIcon = function(wep, slot) + if slotinfo[slot] then + return slotinfo[slot][3] + end +end + +att.Override_Trivia_Calibre = ".338 Lapua Magnum" +att.Override_ShellModel = "models/weapons/arccw/ud_shells/338.mdl" +att.Override_Ammo = "SniperPenetratedRound" +att.GivesFlags = {"mag_338"} +att.ActivateElements = {"mag_338"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_aw_mag_10.lua b/lua/arccw/shared/attachments/ur_aw_mag_10.lua new file mode 100644 index 0000000..59b5654 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_aw_mag_10.lua @@ -0,0 +1,39 @@ +att.PrintName = "AW 10-Round Extended Mag" +att.AbbrevName = "10-Round Extended Mag" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "AP 10-Round Extended Mag" +end + +att.SortOrder = 10 +att.Icon = Material("entities/att/ur_aw/mag308_10.png", "mips smooth") +att.Description = "Extended magazine for the Arctic Warfare. The extra rounds add weight to the magazine, but allow for twice as many shots to be taken between reloads." +att.Desc_Pros = {} +att.Desc_Neutrals = {} +att.Slot = "ur_aw_mag" + +att.AutoStats = true +att.HideIfBlocked = true + +att.Override_ClipSize = 10 + +att.Desc_Cons = { + --"+ Reload time" +} + +att.Mult_SightTime = 1.25 +att.Mult_ReloadTime = 5.675 / 5.15 -- compensation for longer anim length +att.Mult_Sway = 1.25 + +att.Mult_SpeedMult = 0.975 +att.Mult_ShootSpeedMult = 0.95 + +att.Mult_HipDispersion = 1.25 + +att.ActivateElements = {"mag_ext"} + +att.Hook_SelectReloadAnimation = function(wep, anim) + return anim .. "_10" +end + +att.ExcludeFlags = {"mag_338","mag_300"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_aw_mag_10m.lua b/lua/arccw/shared/attachments/ur_aw_mag_10m.lua new file mode 100644 index 0000000..5460800 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_aw_mag_10m.lua @@ -0,0 +1,38 @@ +att.PrintName = "AWM .300 10-Round Extended Mag" +att.AbbrevName = "10-Round Extended Mag" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "AP 10-Round Extended Mag" +end + +att.SortOrder = 10 +att.Icon = Material("entities/att/ur_aw/mag338_10.png", "mips smooth") +att.Description = "Extended magazine for the Arctic Warfare. The extra rounds add weight to the magazine, but allow for twice as many shots to be taken between reloads." +att.Desc_Pros = {} +att.Desc_Cons = {} +att.Desc_Neutrals = {} +att.Slot = "ur_aw_mag" + +att.AutoStats = true + +att.HideIfBlocked = true + +att.Override_ClipSize = 10 + +att.Mult_SightTime = 1.25 +att.Mult_ReloadTime = 6 / 5.55 +att.Mult_Sway = 1.25 + +att.Mult_SpeedMult = 0.975 +att.Mult_ShootSpeedMult = 0.95 + +att.Mult_HipDispersion = 1.25 + +att.ActivateElements = {"mag_ext_338"} + +att.Hook_SelectReloadAnimation = function(wep, anim) + return anim .. "_10_338" +end + +att.RequireFlags = {"mag_300"} +att.ExcludeFlags = {"mag_308"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_aw_muzzle_brake.lua b/lua/arccw/shared/attachments/ur_aw_muzzle_brake.lua new file mode 100644 index 0000000..d8463fc --- /dev/null +++ b/lua/arccw/shared/attachments/ur_aw_muzzle_brake.lua @@ -0,0 +1,19 @@ +att.PrintName = "AI Muzzle Brake" +att.Icon = Material("entities/att/ur_aw/muzzle.png", "mips smooth") +att.Description = "Light muzzle brake unique to the AW platform." +att.AutoStats = true +att.Slot = {"ur_aw_muzzle"} + +att.Mult_Recoil = .9 +att.Mult_RecoilSide = .9 + +att.Add_BarrelLength = 2 +att.Mult_SightTime = 1.05 +att.Mult_Sway = 1.05 + +att.SortOrder = 999 + +att.AttachSound = "arccw_uc/common/gunsmith/suppressor_thread.ogg" +att.Model = "models/weapons/arccw/ur_aw_muzzle.mdl" +att.ModelScale = Vector(2/3,2/3,2/3) +att.ModelOffset = Vector(0,0,-.075) \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_aw_muzzle_brake_sights.lua b/lua/arccw/shared/attachments/ur_aw_muzzle_brake_sights.lua new file mode 100644 index 0000000..8f24144 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_aw_muzzle_brake_sights.lua @@ -0,0 +1,21 @@ +att.PrintName = "AI Ironsight Brake" +att.Icon = Material("entities/att/ur_aw/muzzle_sights.png", "mips smooth") +att.Description = "Light muzzle brake unique to the AW platform.\n\nEquips alternative \"compact\" iron sights." +att.AutoStats = true +att.Slot = {"ur_aw_muzzle"} + +att.Mult_Recoil = .9 +att.Mult_RecoilSide = .9 + +att.Add_BarrelLength = 2 +att.Mult_SightTime = 1.05 +att.Mult_Sway = 1.05 + +att.SortOrder = 998 + +att.AttachSound = "arccw_uc/common/gunsmith/suppressor_thread.ogg" +att.Model = "models/weapons/arccw/ur_aw_muzzlesight.mdl" +att.ModelScale = Vector(2/3,2/3,2/3) +att.ModelOffset = Vector(0,0,-.075) + +att.GivesFlags = {"sights_compact"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_aw_skin_black.lua b/lua/arccw/shared/attachments/ur_aw_skin_black.lua new file mode 100644 index 0000000..6d789f9 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_aw_skin_black.lua @@ -0,0 +1,12 @@ +att.PrintName = "Black Finish" +att.Icon = Material("entities/att/ur_aw/skin_black.png", "mips smooth") +--att.Icon = Material("entities/att/acwatt_ur_deagle_finish_chrome.png","mips smooth") +att.Description = "As used by law enforcement, or those lacking a father figure." +att.Slot = "ur_aw_skin" +att.Desc_Neutrals = { + "uc.cosmetic" +} +att.SortOrder = 2 + +att.IgnorePickX = true +att.ActivateElements = {"skin_black"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_aw_skin_custom.lua b/lua/arccw/shared/attachments/ur_aw_skin_custom.lua new file mode 100644 index 0000000..b05187f --- /dev/null +++ b/lua/arccw/shared/attachments/ur_aw_skin_custom.lua @@ -0,0 +1,13 @@ +att.PrintName = "Custom Finish" +att.AbbrevName = "Custom" +att.Icon = Material("entities/att/ur_aw/skin_rainbow.png", "mips smooth") +att.Description = "A customizable finish. Let your imagination run wild." +att.Slot = "ur_aw_skin" +att.Desc_Neutrals = { + "uc.cosmetic", + "uc.custcolor", +} +att.SortOrder = 1 + +att.IgnorePickX = true +att.ActivateElements = {"skin_cust"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_aw_skin_tan.lua b/lua/arccw/shared/attachments/ur_aw_skin_tan.lua new file mode 100644 index 0000000..0a6aa12 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_aw_skin_tan.lua @@ -0,0 +1,12 @@ +att.PrintName = "Flat Dark Earth Finish" +att.AbbrevName = "Flat Dark Earth" +att.Icon = Material("entities/att/ur_aw/skin_tan.png", "mips smooth") +att.Description = "The fury of the sandstorm, realized." +att.Slot = "ur_aw_skin" +att.Desc_Neutrals = { + "uc.cosmetic" +} +att.SortOrder = 1 + +att.IgnorePickX = true +att.ActivateElements = {"skin_tan"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_aw_stock_at.lua b/lua/arccw/shared/attachments/ur_aw_stock_at.lua new file mode 100644 index 0000000..998d4de --- /dev/null +++ b/lua/arccw/shared/attachments/ur_aw_stock_at.lua @@ -0,0 +1,14 @@ +att.PrintName = "Tactical Stock" +att.Description = "Variant folding stock with a pistol grip design. Lighter and perhaps more comfortable, but not as sturdy." +att.Icon = Material("entities/att/ur_aw/stock_at.png", "mips smooth") +att.Slot = {"ur_aw_stock"} +att.AutoStats = true + +att.SortOrder = 3 + +att.Mult_SightTime = .85 +att.Mult_Sway = 1.25 +att.Mult_Recoil = 1.1 + +att.ActivateElements = {"stock_at"} +att.GivesFlags = {"pistolgrip"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_aw_stock_fixed.lua b/lua/arccw/shared/attachments/ur_aw_stock_fixed.lua new file mode 100644 index 0000000..2926e05 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_aw_stock_fixed.lua @@ -0,0 +1,12 @@ +att.PrintName = "Fixed Stock" +att.Description = "Variant, one-piece stock without a hinge for folding. More rigid than side-folding stocks, but the lack of folding makes it harder to conceal." +att.Icon = Material("entities/att/ur_aw/stock_nonfold.png", "mips smooth") +att.Slot = {"ur_aw_stock"} +att.AutoStats = true + +att.SortOrder = 3 + +att.Mult_Sway = .85 +att.Mult_DrawTime = 1.2 + +att.ActivateElements = {"stock_fixed"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_aw_stock_none.lua b/lua/arccw/shared/attachments/ur_aw_stock_none.lua new file mode 100644 index 0000000..62d749e --- /dev/null +++ b/lua/arccw/shared/attachments/ur_aw_stock_none.lua @@ -0,0 +1,22 @@ +att.PrintName = "No Stock" +att.Description = "Your wrists may never function again." +att.Icon = Material("entities/att/ur_aw/stock_removed.png", "mips smooth") +att.Slot = {"ur_aw_stock"} +att.AutoStats = true +att.Free = true + +att.SortOrder = -1 + +att.Mult_SightTime = 0.75 +att.Mult_DrawTime = 0.6 +att.Mult_HolsterTime = 0.6 +att.Mult_Recoil = 2.5 +att.Mult_RecoilSide = 1.55 +att.Mult_SightedSpeedMult = 1.25 +att.Mult_SpeedMult = 1.1 +att.Mult_ShootSpeedMult = 1.15 +att.Add_BarrelLength = -9 +att.Mult_Sway = 3.5 + +att.ActivateElements = {"stock_none"} +att.GivesFlags = {"pistolgrip"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_aw_stock_ru.lua b/lua/arccw/shared/attachments/ur_aw_stock_ru.lua new file mode 100644 index 0000000..c5b1946 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_aw_stock_ru.lua @@ -0,0 +1,23 @@ +att.PrintName = "RU556 Fixed-Adjustable Stock" +att.AbbrevName = "Fixed-Adjustable Stock" + +att.Icon = Material("entities/att/ur_aw/stock_ru.png", "mips smooth") +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Magpul UBR GEN2 Stock" +end + +att.Description = "Polymer stock designed for assault rifles. Unstable, but provides much-needed mobility." +att.Slot = {"ur_aw_stock"} +att.AutoStats = true + +att.SortOrder = 2.1 + +att.Mult_SpeedMult = 1.08 +att.Mult_MoveDispersion = .6 +att.Mult_SightTime = .9 + +att.Mult_Sway = 1.5 +att.Mult_RecoilSide = 1.5 + +att.ActivateElements = {"stock_ru"} +att.GivesFlags = {"pistolgrip"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_aw_stock_ru_rubber.lua b/lua/arccw/shared/attachments/ur_aw_stock_ru_rubber.lua new file mode 100644 index 0000000..5dbe650 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_aw_stock_ru_rubber.lua @@ -0,0 +1,21 @@ +att.PrintName = "RU556 Fixed-Adjustable Stock (Rubberized)" +att.AbbrevName = "Rubberized Carbine Stock" + +att.Icon = Material("entities/att/ur_aw/stock_rurubber.png", "mips smooth") +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Magpul UBR GEN2 Stock (Rubberized)" +end + +att.Description = "Polymer stock designed for assault rifles. Rubber accents reduce the impact on aim sway, but weigh the stock down." +att.Slot = {"ur_aw_stock"} +att.AutoStats = true + +att.SortOrder = 2 + +att.Mult_MoveDispersion = .6 + +att.Mult_Sway = 1.25 +att.Mult_RecoilSide = 1.2 + +att.ActivateElements = {"stock_ru_rubber"} +att.GivesFlags = {"pistolgrip"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_dbs_barrel_compact.lua b/lua/arccw/shared/attachments/ur_dbs_barrel_compact.lua new file mode 100644 index 0000000..d4a94f3 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_dbs_barrel_compact.lua @@ -0,0 +1,24 @@ +att.PrintName = "IZh-58 18\" Coach Gun Barrel" +att.AbbrevName = "18\" Coach Gun Barrel" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Volga SuperShotgun 18\" Coach Gun Barrel" +end + +att.Icon = Material("entities/att/ur_dbs/bcomp.png","smooth mips") +att.Description = "Named for use by private guards aboard stagecoaches in the Wild West, its short length is ideal for small rooms, though not quite as ideal at any longer distances." +att.Slot = {"ur_db_barrel"} +att.AutoStats = true + +att.Mult_Sway = .75 +att.Add_BarrelLength = -9 +att.Mult_SightTime = .9 +att.Mult_HipDispersion = 0.8 + +att.Mult_Recoil = 1.2 +att.Mult_AccuracyMOA = 1.25 +att.Mult_Range = .85 + +att.ActivateElements = {"barrel_compact"} + +att.SortOrder = 18 \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_dbs_barrel_mid.lua b/lua/arccw/shared/attachments/ur_dbs_barrel_mid.lua new file mode 100644 index 0000000..b47a81a --- /dev/null +++ b/lua/arccw/shared/attachments/ur_dbs_barrel_mid.lua @@ -0,0 +1,25 @@ +att.PrintName = "IZh-58 22\" Trimmed Barrel" +att.AbbrevName = "22\" Trimmed Barrel" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Volga SuperShotgun 22\" Trimmed Barrel" +end + +att.Icon = Material("entities/att/ur_dbs/bmid.png","smooth mips") +att.Description = "Take off just a bit of the barrel for an edge in close-quarters while maintaining as much performance as possible." +att.Slot = {"ur_db_barrel"} +att.AutoStats = true +att.SortOrder = 22 + + +att.Mult_Sway = .85 +att.Add_BarrelLength = -4 +att.Mult_SightTime = 0.95 +att.Mult_HipDispersion = 0.9 + +att.Mult_Recoil = 1.1 +att.Mult_AccuracyMOA = 1.1 +att.Mult_Range = 0.9 + + +att.ActivateElements = {"barrel_mid"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_dbs_barrel_sawedoff.lua b/lua/arccw/shared/attachments/ur_dbs_barrel_sawedoff.lua new file mode 100644 index 0000000..e96680c --- /dev/null +++ b/lua/arccw/shared/attachments/ur_dbs_barrel_sawedoff.lua @@ -0,0 +1,29 @@ +att.PrintName = "IZh-58 12\" Sawed-off Barrel" +att.AbbrevName = "12\" Sawed-off Barrel" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Volga SuperShotgun 12\" Sawed-off Barrel" +end + +att.Icon = Material("entities/att/ur_dbs/bsw.png","smooth mips") +att.Description = "Sawed-off barrel, often associated with outlaws. Enhances portability and looks the part for hunting unholy creatures." +att.Slot = {"ur_db_barrel"} +att.AutoStats = true +att.SortOrder = 12 + + +att.Add_BarrelLength = -16 +att.Mult_Sway = .6 +att.Mult_SightTime = .85 +att.Mult_DrawTime = .85 +att.Mult_HolsterTime = .85 +att.Mult_SpeedMult = 1.03 +att.Mult_HipDispersion = 0.75 + +att.Mult_Recoil = 1.4 +att.Mult_AccuracyMOA = 2 +att.Mult_Range = .65 + + +att.ActivateElements = {"barrel_sw"} +att.GivesFlags = {"sawnoff"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_dbs_barrel_sawedoffplus.lua b/lua/arccw/shared/attachments/ur_dbs_barrel_sawedoffplus.lua new file mode 100644 index 0000000..4740c15 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_dbs_barrel_sawedoffplus.lua @@ -0,0 +1,34 @@ +att.PrintName = "IZh-58 10\" Jury-rigged Barrel" +att.AbbrevName = "10\" Jury-rigged Barrel" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Volga SuperShotgun 10\" Jury-rigged Barrel" +end + +att.Icon = Material("entities/att/ur_dbs/bswp.png","smooth mips") +att.Description = "So cut down that you need a custom handguard to go with it. Reduces the weapon to a pistol-like profile, ruining accuracy." +att.Slot = {"ur_db_barrel"} +att.AutoStats = true + +att.ModelOffset = Vector(-21, -2.2, 8.3) +att.Model = "models/weapons/arccw/ur_g3_lhik_slim.mdl" +att.LHIK = true + +att.SortOrder = 10 + + +att.Add_BarrelLength = -20 +att.Mult_Sway = .5 +att.Mult_SightTime = .75 +att.Mult_DrawTime = .75 +att.Mult_HolsterTime = .75 +att.Mult_SpeedMult = 1.05 +att.Mult_HipDispersion = 0.5 + +att.Mult_Recoil = 1.5 +att.Mult_AccuracyMOA = 2.5 +att.Mult_Range = .5 + + +att.ActivateElements = {"barrel_swplus"} +att.GivesFlags = {"sawnoff"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_dbs_fg_extractor.lua b/lua/arccw/shared/attachments/ur_dbs_fg_extractor.lua new file mode 100644 index 0000000..ee8ad2d --- /dev/null +++ b/lua/arccw/shared/attachments/ur_dbs_fg_extractor.lua @@ -0,0 +1,23 @@ +att.PrintName = "Custom Extractor" +att.Icon = nil--Material("entities/att/acwatt_ur_dbs_tp_doom.png", "smooth mips") +att.Description = "Install a heavy aftermarket extractor to speeden reloads." +att.Desc_Pros = { + "Speeds up reloads" +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "uc_db_fg" + +att.AutoStats = true +att.SortOrder = 999 + +att.Mult_SightTime = 1.14 +att.Mult_MoveSpeed = 0.92 + +att.Hook_SelectReloadAnimation = function(wep, anim) + return anim .. "_extractor" +end + +att.AttachSound = "arccw_uc/common/gunsmith/internal_modification.ogg" \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_dbs_stock_sawedoff.lua b/lua/arccw/shared/attachments/ur_dbs_stock_sawedoff.lua new file mode 100644 index 0000000..e05446c --- /dev/null +++ b/lua/arccw/shared/attachments/ur_dbs_stock_sawedoff.lua @@ -0,0 +1,30 @@ +att.PrintName = "IZh-58 Sawed-off Stock" +att.AbbrevName = "Sawed-off Stock" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Volga SuperShotgun Sawed-off Stock" +end + +att.Icon = Material("entities/att/ur_dbs/ssw.png","smooth mips") +att.Description = "You can keep it under your trenchcoat now." +att.Slot = {"ur_db_stock"} +att.AutoStats = true +att.Free = true +att.SortOrder = -1 + +att.Mult_SpeedMult = 1.05 + +att.Mult_SightTime = 0.75 +att.Mult_DrawTime = 0.75 +att.Mult_HolsterTime = 0.75 + +att.Mult_Recoil = 1.4 +att.Mult_RecoilSide = 1.25 + +att.Mult_SightedSpeedMult = 1.2 +att.Mult_ShootSpeedMult = 1.15 + +att.Add_BarrelLength = -12 +att.Mult_Sway = 3 + +att.ActivateElements = {"stock_sw"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_dbs_tp_doom.lua b/lua/arccw/shared/attachments/ur_dbs_tp_doom.lua new file mode 100644 index 0000000..4fc36dd --- /dev/null +++ b/lua/arccw/shared/attachments/ur_dbs_tp_doom.lua @@ -0,0 +1,28 @@ +att.PrintName = "The Slayer" +att.Icon = Material("entities/att/acwatt_ur_dbs_tp_doom.png", "smooth mips") +att.Description = "They are rage, brutal, without mercy. But you. You will be worse." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { + "uc.cosmetic" +} +att.Slot = "uc_db_tp" + +att.AutoStats = true +att.SortOrder = 999 + +att.LHIK = true +att.LHIKHide = false + +att.Override_ActivePos = Vector(-1.5, 0, 1.2) +att.Override_ActivePos_Priority = 10 +att.Override_ActiveAng = Angle(0, -0.5, 3) +att.Override_ActiveAng_Priority = 10 + +att.Free = true +att.IgnorePickX = true + +att.RequireFlags = {"sawnoff", "ur_dbs_stock_sawedoff", "uc_tp_gong"} +att.HideIfBlocked = true \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_deagle_barrel_annihilator.lua b/lua/arccw/shared/attachments/ur_deagle_barrel_annihilator.lua new file mode 100644 index 0000000..7d7fee0 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_deagle_barrel_annihilator.lua @@ -0,0 +1,27 @@ +att.PrintName = "6.75\" Desert Eagle Annihilator Barrel" +att.AbbrevName = "6.75\" Annihilator Barrel" +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "6.75\" Predator Annihilator Barrel" +end +att.Icon = Material("entities/att/acwatt_ur_deagle_barrel_annihilator.png","smooth mips") +att.Description = "Heavily modified barrel with gilded parts and an oversized integral muzzle brake. Effects are exacerbated, and the sheer volume of vented gas can get disorienting." +att.Slot = "ur_deagle_barrel" +att.AutoStats = true +att.Desc_Cons = { + "+150% Visual recoil", + --"uc.nomuzzle" +} +att.SortOrder = 6 + +att.Mult_Recoil = 0.8 +att.Mult_RecoilSide = 0.6 +att.Mult_VisualRecoilMult = 2.5 +att.Mult_ShootVol = 1.2 +att.Mult_Range = 0.8 +att.Mult_ShootPitch = 0.95 +att.Mult_SightedSpeedMult = 1.05 +att.Mult_AccuracyMOA = 1.15 +att.Mult_RPM = .8 + +--att.ActivateElements = {"ur_deagle_barrel_annihilator"} +att.GivesFlags = {"barrel_annihilator"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_deagle_barrel_compact.lua b/lua/arccw/shared/attachments/ur_deagle_barrel_compact.lua new file mode 100644 index 0000000..76f105a --- /dev/null +++ b/lua/arccw/shared/attachments/ur_deagle_barrel_compact.lua @@ -0,0 +1,22 @@ +att.PrintName = "5.5\" Desert Eagle Compact Barrel" +att.AbbrevName = "5.5\" Compact Barrel" +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "5.5\" Predator Compact Barrel" +end +att.Icon = Material("entities/att/acwatt_ur_deagle_barrel_compact.png","smooth mips") +att.Description = "Aftermarket reduced barrel that enhances concealability and ergonomics at the cost of ranged performance." +att.Slot = "ur_deagle_barrel" +att.AutoStats = true +att.SortOrder = 5.5 + +att.Mult_AccuracyMOA = 1.25 +att.Mult_Range = 0.9 +att.Mult_SightTime = 0.9 +att.Mult_Sway = 0.8 +att.Add_BarrelLength = -2 +att.Mult_HipDispersion = 0.95 + +att.Mult_DrawTime = 0.9 +att.Mult_HolsterTime = 0.9 + +att.ActivateElements = {"ur_deagle_barrel_compact"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_deagle_barrel_compen.lua b/lua/arccw/shared/attachments/ur_deagle_barrel_compen.lua new file mode 100644 index 0000000..165dfff --- /dev/null +++ b/lua/arccw/shared/attachments/ur_deagle_barrel_compen.lua @@ -0,0 +1,25 @@ +att.PrintName = "6\" Desert Eagle Compensated Barrel" +att.AbbrevName = "6\" Compensated Barrel" +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "6\" Predator Compensated Barrel" +end +att.Icon = Material("entities/att/acwatt_ur_deagle_barrel_compensated.png","smooth mips") +att.Description = "Barrel with an integral muzzle brake. Redirects propellant gases to stabilize the weapon's heavy recoil, but the reduced volume of gas directed to the bolt mechanism results in a lower cyclic rate." +att.Slot = "ur_deagle_barrel" +att.AutoStats = true +att.Desc_Cons = { + --"uc.nomuzzle" +} +att.SortOrder = 6 + +att.Mult_Recoil = 0.85 +att.Mult_RecoilSide = 0.75 +--att.Mult_VisualRecoilMult = 1.5 +att.Mult_ShootVol = 1.1 +att.Mult_Range = 0.95 +att.Mult_ShootPitch = 0.95 +--att.Mult_SightedSpeedMult = .9 +att.Mult_RPM = .9 + +--att.ActivateElements = {"ur_deagle_barrel_compen", "tac_rail"} +att.GivesFlags = {"barrel_annihilator"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_deagle_barrel_ext.lua b/lua/arccw/shared/attachments/ur_deagle_barrel_ext.lua new file mode 100644 index 0000000..26e668c --- /dev/null +++ b/lua/arccw/shared/attachments/ur_deagle_barrel_ext.lua @@ -0,0 +1,24 @@ +att.PrintName = "7\" Desert Eagle Extended Barrel" +att.AbbrevName = "7\" Extended Barrel" +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "7\" Predator Extended Barrel" +end +att.Icon = Material("entities/att/acwatt_ur_deagle_barrel_long.png","smooth mips") +att.Description = "Slightly extended barrel that provides extra counterweight in addition to marginal ballistic enhancements." +att.Slot = "ur_deagle_barrel" +att.AutoStats = true +att.SortOrder = 7 + +att.Mult_AccuracyMOA = 0.8 +att.Mult_Range = 1.25 +att.Mult_Recoil = 0.9 +att.Mult_SightTime = 1.1 +att.Mult_Sway = 1.15 +att.Mult_HipDispersion = 1.1 + +att.Add_BarrelLength = 4 + +att.Mult_DrawTime = 1.25 +att.Mult_HolsterTime = 1.25 + +att.ActivateElements = {"ur_deagle_barrel_ext"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_deagle_barrel_marksman.lua b/lua/arccw/shared/attachments/ur_deagle_barrel_marksman.lua new file mode 100644 index 0000000..10804dc --- /dev/null +++ b/lua/arccw/shared/attachments/ur_deagle_barrel_marksman.lua @@ -0,0 +1,25 @@ +att.PrintName = "10\" Desert Eagle Marksman Barrel" +att.AbbrevName = "10\" Marksman Barrel" +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "10\" Predator Marksman Barrel" +end +att.Icon = Material("entities/att/acwatt_ur_deagle_barrel_police.png","smooth mips") +att.Description = "Elongated barrel for niche mid-range roles. Especially front-heavy." +att.Slot = "ur_deagle_barrel" +att.AutoStats = true +att.SortOrder = 10 + +att.Mult_AccuracyMOA = 0.5 +att.Mult_Range = 2 +att.Mult_Recoil = 0.75 +att.Mult_SightTime = 1.25 +att.Mult_Sway = 1.25 +att.Mult_ShootPitch = 0.9 +att.Mult_HipDispersion = 1.2 + +att.Add_BarrelLength = 10 + +att.Mult_DrawTime = 1.5 +att.Mult_HolsterTime = 1.5 + +att.ActivateElements = {"ur_deagle_barrel_marksman"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_deagle_barrel_modern.lua b/lua/arccw/shared/attachments/ur_deagle_barrel_modern.lua new file mode 100644 index 0000000..bb7e1d9 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_deagle_barrel_modern.lua @@ -0,0 +1,12 @@ +att.PrintName = "6\" Desert Eagle Mark XIX Barrel" +att.AbbrevName = "6\" Modern Barrel" +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "6\" Predator Modern Barrel" +end +att.Icon = Material("entities/att/acwatt_ur_deagle_barrel_modern.png","smooth mips") +att.Description = "Variation of the factory barrel with a built-in Weaver attachment mount." +att.Slot = "ur_deagle_barrel" +att.Desc_Neutrals = {"uc.cosmetic"} +att.SortOrder = 5.5 + +--att.ActivateElements = {"ur_deagle_barrel_modern", "tac_rail"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_deagle_caliber_357.lua b/lua/arccw/shared/attachments/ur_deagle_caliber_357.lua new file mode 100644 index 0000000..fc77ff7 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_deagle_caliber_357.lua @@ -0,0 +1,47 @@ +att.PrintName = "Desert Eagle .357 Magnum Conversion" +att.AbbrevName = ".357 Magnum" +att.Icon = Material("entities/att/uc_bullets/357magnum.png","smooth mips") +att.Description = "A more practical caliber with higher capacity magazines and actually manageable recoil, but not as much raw power." + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Predator .357 Magnum Conversion" +end + +local path = ")^weapons/arccw_ur/sw586/" +local fire357 = {path .. "fire-01.ogg", path .. "fire-02.ogg", path .. "fire-03.ogg", path .. "fire-04.ogg", path .. "fire-05.ogg", path .. "fire-06.ogg"} + +att.Hook_GetShootSound = function(wep, sound) + if wep:GetBuff_Override("Silencer") then + return fire357sup + else + return fire357 + end +end + +local tail = ")/arccw_uc/common/357mag/" +local fire357dist = {tail .. "fire-dist-357mag-pistol-ext-01.ogg", tail .. "fire-dist-357mag-pistol-ext-02.ogg", tail .. "fire-dist-357mag-pistol-ext-03.ogg", tail .. "fire-dist-357mag-pistol-ext-04.ogg", tail .. "fire-dist-357mag-pistol-ext-05.ogg", tail .. "fire-dist-357mag-pistol-ext-06.ogg"} +local common = ")/arccw_uc/common/" + +att.Hook_GetDistantShootSoundOutdoors = function(wep, distancesound) + if wep:GetBuff_Override("Silencer") then + -- fallback to script + else + return fire357dist + end +end + + +att.AutoStats = true +att.Slot = "ur_deagle_caliber" + +att.Mult_ClipSize = 1.3 +att.Mult_Recoil = 0.7 +att.Mult_Damage = 60 / 80 +att.Mult_DamageMin = 20 / 12 + +att.Mult_ShootSpeedMult = 1.2 +att.Mult_RPM = 1 + (1/3) + +att.Override_Trivia_Calibre = att.AbbrevName -- E F F I C I E N C Y +att.Override_ShellModel = "models/weapons/arccw/uc_shells/357sig.mdl" +att.Override_ShellScale = 1 \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_deagle_caliber_410.lua b/lua/arccw/shared/attachments/ur_deagle_caliber_410.lua new file mode 100644 index 0000000..333fe62 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_deagle_caliber_410.lua @@ -0,0 +1,83 @@ +att.PrintName = "Desert Eagle .410 Bore Conversion" +att.AbbrevName = ".410 Bore" +att.Icon = Material("entities/att/uc_bullets/20g.png","smooth mips") +att.Description = "Hobbyist conversion that allows the weapon to accept .410 bore shotgun shells. Because the weapon was never meant to fire these, performance beyond point blank is poor." + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Predator .410 Bore Conversion" +end +-- Todo: alt shoot sound + +att.AutoStats = true +att.Desc_Pros = { + "ur.deagle.410.1" +} +att.Desc_Cons = { + "ur.deagle.410.2" +} +att.Slot = "ur_deagle_caliber" +att.SortOrder = -1 + +att.Override_Num = 4 +att.Mult_Range = 0.5 +att.Override_AccuracyMOA = 35 +att.Override_AccuracyMOA_Priority = 0 +att.Mult_ClipSize = 1.15 +att.Mult_Recoil = 0.75 + +att.Mult_Damage = 72 / 70 +att.Mult_DamageMin = 20 / 17 + +att.Override_HullSize = 0.1 +att.Override_BodyDamageMults = ArcCW.UC.BodyDamageMults_Shotgun +att.Override_Penetration = 1 + +--att.Override_Malfunction = true +--att.Mult_MalfunctionVariance = 1.5 + +att.Override_IsShotgun = true +att.Override_Ammo = "buckshot" +att.Override_ShellModel = "models/weapons/arccw/uc_shells/410bore.mdl" +att.Override_ShellScale = 1 +att.Override_ShellSounds = ArcCW.ShotgunShellSoundsTable +att.Override_Trivia_Class = "Shot Pistol" +att.Override_Trivia_Calibre = att.AbbrevName -- E F F I C I E N C Y + +local slotinfo = { + [6] = {"8-Round Mag", "8-Round Mag", Material("entities/att/acwatt_ur_deagle_mag_7.png", "mips smooth")}, + [9] = {"\"BUCK\" #000 Buckshot", "\"BUCK\" #000 Buckshot", Material("entities/att/arccw_uc_ammo_shotgun_generic.png", "mips smooth")}, +} +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_GetShootSound = function(wep, sound) + if wep:GetBuff_Override("Silencer") then + return "weapons/arccw_ur/deagle/fire_supp_10.ogg" -- Placeholder + else + return {"weapons/arccw_ur/deagle/fire-410-01.ogg", "weapons/arccw_ur/deagle/fire-410-02.ogg", "weapons/arccw_ur/deagle/fire-410-03.ogg", "weapons/arccw_ur/deagle/fire-410-04.ogg", "weapons/arccw_ur/deagle/fire-410-05.ogg", "weapons/arccw_ur/deagle/fire-410-06.ogg"} -- Not Placeholder + end +end + +local tail = ")/arccw_uc/common/357mag/" + +att.Hook_GetDistantShootSoundOutdoors = function(wep, distancesound) + if wep:GetBuff_Override("Silencer") then + -- fallback to script + else + return { + tail .. "fire-dist-357mag-pistol-ext-01.ogg", + tail .. "fire-dist-357mag-pistol-ext-02.ogg", + tail .. "fire-dist-357mag-pistol-ext-03.ogg", + tail .. "fire-dist-357mag-pistol-ext-04.ogg", + tail .. "fire-dist-357mag-pistol-ext-05.ogg", + tail .. "fire-dist-357mag-pistol-ext-06.ogg" + } + end +end \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_deagle_caliber_44.lua b/lua/arccw/shared/attachments/ur_deagle_caliber_44.lua new file mode 100644 index 0000000..d48890e --- /dev/null +++ b/lua/arccw/shared/attachments/ur_deagle_caliber_44.lua @@ -0,0 +1,47 @@ +att.PrintName = "Desert Eagle .44 Magnum Conversion" +att.AbbrevName = ".44 Magnum" +att.Icon = Material("entities/att/uc_bullets/44magnum.png","smooth mips") +att.Description = "Smaller (comparatively speaking) caliber that retains most of .50 AE's iconic punch, but is small enough to fit an extra round in the magazine." + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Predator .44 Magnum Conversion" +end +-- Todo: alt shoot sound + +att.AutoStats = true +att.Slot = "ur_deagle_caliber" + +att.Mult_ClipSize = 1.15 +att.Mult_Recoil = 0.85 +att.Mult_Damage = 75 / 80 +att.Mult_DamageMin = 16 / 12 + +att.Mult_ShootSpeedMult = 1.1 +att.Mult_RPM = 1 + (1/6) + +att.Override_Trivia_Calibre = att.AbbrevName -- E F F I C I E N C Y +att.Override_ShellModel = "models/weapons/arccw/uc_shells/9x19.mdl" +att.Override_ShellScale = 1 + +local path = ")^weapons/arccw_ur/sw329/" +local fire44 = {path .. "fire-01.ogg", path .. "fire-02.ogg", path .. "fire-03.ogg", path .. "fire-04.ogg", path .. "fire-05.ogg", path .. "fire-06.ogg"} + +att.Hook_GetShootSound = function(wep, sound) + if wep:GetBuff_Override("Silencer") then + return fire44sup + else + return fire44 + end +end + +local tail = ")/arccw_uc/common/44mag/" +local fire44dist = {tail .. "fire-dist-44mag-pistol-ext-01.ogg", tail .. "fire-dist-44mag-pistol-ext-02.ogg", tail .. "fire-dist-44mag-pistol-ext-03.ogg", tail .. "fire-dist-44mag-pistol-ext-04.ogg", tail .. "fire-dist-44mag-pistol-ext-05.ogg", tail .. "fire-dist-44mag-pistol-ext-06.ogg"} +local common = ")/arccw_uc/common/" + +att.Hook_GetDistantShootSoundOutdoors = function(wep, distancesound) + if wep:GetBuff_Override("Silencer") then + -- fallback to script + else + return fire44dist + end +end \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_deagle_grip_rubber.lua b/lua/arccw/shared/attachments/ur_deagle_grip_rubber.lua new file mode 100644 index 0000000..ec35ccd --- /dev/null +++ b/lua/arccw/shared/attachments/ur_deagle_grip_rubber.lua @@ -0,0 +1,15 @@ +att.PrintName = "Desert Eagle Rubberized Grip" +att.AbbrevName = "Rubberized Grip" +att.Icon = Material("entities/att/acwatt_ur_deagle_grip_rubber.png","mips smooth") +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Predator Rubberized Grip" +end +att.Description = "Creates higher friction against the shooter's hands, dampening recoil slightly." +att.Slot = "ur_deagle_grip" +att.AutoStats = true + +att.Mult_Recoil = 0.95 +att.Mult_RecoilSide = 0.9 +att.Mult_SightedSpeedMult = 0.95 + +att.ActivateElements = {"ur_deagle_grip_rubber"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_deagle_grip_wood.lua b/lua/arccw/shared/attachments/ur_deagle_grip_wood.lua new file mode 100644 index 0000000..f0a4a98 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_deagle_grip_wood.lua @@ -0,0 +1,15 @@ +att.PrintName = "Desert Eagle Wooden Grip" +att.AbbrevName = "Wooden Grip" +att.Icon = Material("entities/att/acwatt_ur_deagle_grip_plastic.png","smooth mips") +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Predator Wooden Grip" +end +att.Description = "Premium and hand-carved. Classy and smooth, but more difficult to grip." +att.Slot = "ur_deagle_grip" +att.AutoStats = true + +att.Mult_Recoil = 1.05 +att.Mult_RecoilSide = 1.1 +att.Mult_SightTime = 0.95 + +att.ActivateElements = {"ur_deagle_grip_wooden"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_deagle_mag_10.lua b/lua/arccw/shared/attachments/ur_deagle_mag_10.lua new file mode 100644 index 0000000..c33d46b --- /dev/null +++ b/lua/arccw/shared/attachments/ur_deagle_mag_10.lua @@ -0,0 +1,26 @@ +att.PrintName = "Desert Eagle 10-Round Extended Magazine" +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Predator 10-Round Extended Magazine" +end +att.AbbrevName = "10-Round Extended Mag" +att.Icon = Material("entities/att/acwatt_ur_deagle_mag_10.png","mips smooth") +att.Description = "A higher capacity magazine increases the time you can spend without reloading. However, the extra rounds add even more weight to an already unwieldy weapon." +att.Slot = "ur_deagle_mag" +att.AutoStats = true + +att.Override_ClipSize = 10 +att.Mult_SightTime = 1.1 +att.Mult_ReloadTime = 1.15 +att.Mult_Sway = 1.5 +att.Mult_SpeedMult = 0.98 +att.Mult_ShootSpeedMult = 0.95 + +att.Mult_HipDispersion = 1.25 + +att.Hook_SelectReloadAnimation = function(wep, anim) + return anim .. "_10" +end +-- 10-round anims don't exist yet +-- now exist + +att.ActivateElements = {"ur_deagle_mag_ext"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_deagle_skin_black.lua b/lua/arccw/shared/attachments/ur_deagle_skin_black.lua new file mode 100644 index 0000000..b94d176 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_deagle_skin_black.lua @@ -0,0 +1,15 @@ +att.PrintName = "Desert Eagle Matte Black Finish" +att.AbbrevName = "Matte Black" +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Predator Matte Black Finish" +end +att.Icon = Material("entities/att/acwatt_ur_deagle_finish_black.png","mips smooth") +att.Description = "The finish of choice for assassins and agents everywhere.\n\n\"We're willing to wipe the slate clean, give you a fresh start. All that we're asking in return is your cooperation in bringing a known terrorist to justice.\"" +att.Slot = "ur_deagle_skin" +att.Desc_Neutrals = { + "uc.cosmetic" +} +att.SortOrder = 2 + +att.IgnorePickX = true +att.ActivateElements = {"ur_deagle_skin_black"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_deagle_skin_chrome.lua b/lua/arccw/shared/attachments/ur_deagle_skin_chrome.lua new file mode 100644 index 0000000..04c2036 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_deagle_skin_chrome.lua @@ -0,0 +1,15 @@ +att.PrintName = "Desert Eagle Polished Chrome Finish" +att.AbbrevName = "Polished Chrome" +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Predator Polished Chrome Finish" +end +att.Icon = Material("entities/att/acwatt_ur_deagle_finish_chrome.png","mips smooth") +att.Description = "A luster that demands attention.\n\n\"I had to kill Bob Morton because he made a mistake. Now it's time to erase that mistake.\"" +att.Slot = "ur_deagle_skin" +att.Desc_Neutrals = { + "uc.cosmetic" +} +att.SortOrder = 2 + +att.IgnorePickX = true +att.ActivateElements = {"ur_deagle_skin_chrome"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_deagle_skin_gold.lua b/lua/arccw/shared/attachments/ur_deagle_skin_gold.lua new file mode 100644 index 0000000..d5d9735 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_deagle_skin_gold.lua @@ -0,0 +1,17 @@ +att.PrintName = "Desert Eagle Titanium Gold Finish" +att.AbbrevName = "Titanium Gold" +att.Icon = Material("entities/att/acwatt_ur_deagle_finish_gold.png","mips smooth") +att.Description = "Look, you're already using a Desert Eagle, so we might as well gut whatever sense of modesty you have left." +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Predator Titanium Gold Finish" + att.Description = "Look, you're already using a Predator, so we might as well gut whatever sense of modesty you have left." +end +att.Description = att.Description .. "\n\n\"The time has come to show our true strength. They underestimate our resolve. Let us show that we do not fear them. As one people, we shall free our brethren from the yoke of foreign oppression!\"" +att.Slot = "ur_deagle_skin" +att.Desc_Neutrals = { + "uc.cosmetic" +} +att.SortOrder = 1 + +att.IgnorePickX = true +att.ActivateElements = {"ur_deagle_skin_gold"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_deagle_skin_modern.lua b/lua/arccw/shared/attachments/ur_deagle_skin_modern.lua new file mode 100644 index 0000000..1e9f69b --- /dev/null +++ b/lua/arccw/shared/attachments/ur_deagle_skin_modern.lua @@ -0,0 +1,15 @@ +att.PrintName = "Desert Eagle Two-Tone Finish" +att.AbbrevName = "Two-Tone" +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Predator Two-Tone Finish" +end +att.Icon = Material("entities/att/acwatt_ur_deagle_finish_modern.png","mips smooth") +att.Description = "Double trouble. Yin and yang. Call it whatever you like; it will remain an ornate look for an ornate man.\n\n\"You ever hear the old saying, 'the enemy of my enemy is my friend?'\"" +att.Slot = "ur_deagle_skin" +att.Desc_Neutrals = { + "uc.cosmetic" +} +att.SortOrder = 2 + +att.IgnorePickX = true +att.ActivateElements = {"ur_deagle_skin_modern", "tac_rail"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_deagle_skin_sex.lua b/lua/arccw/shared/attachments/ur_deagle_skin_sex.lua new file mode 100644 index 0000000..0db8976 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_deagle_skin_sex.lua @@ -0,0 +1,35 @@ +att.PrintName = "The Ultimate" +att.AbbrevName = "The Ultimate" +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "The Ultimate" +end +att.Icon = Material("entities/att/acwatt_ur_deagle_finish_sex.png","mips smooth") +att.Description = "Administrator powers not included.\n\n\"This is an extremely OP admin weapon. fires every .05 seconds, 75 bullets per shot, and no recoil..... it's awesome.\n\nRight click spawns rapid fire explosions\"" +att.Slot = "ur_deagle_skin" +att.Desc_Neutrals = { + "uc.cosmetic" +} + +--[[] +att.Hook_NameChange = function(wep, name) return "Sexyness" end + +att.AdminOnly = true +att.SortOrder = 2 +att.Mult_Damage = 100 +att.Mult_RPM = 100 +att.Override_Num = 10 +att.Mult_Recoil = 0.1 +att.Mult_AccuracyMOA = 0.001 + +att.Override_BottomlessClip = true +att.Override_Firemodes_Priority = 100 +att.Override_Firemodes = { + { + PrintName = "SEX", + Mode = 2, + }, +} +]] + +att.IgnorePickX = true +att.ActivateElements = {"ur_deagle_skin_sex"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_deagle_tritium.lua b/lua/arccw/shared/attachments/ur_deagle_tritium.lua new file mode 100644 index 0000000..55ed112 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_deagle_tritium.lua @@ -0,0 +1,11 @@ +att.PrintName = "Tritium Night Sights" +att.AbbrevName = "Tritium Sights" +att.Icon = Material("entities/att/acwatt_ur_deagle_tritium.png", "mips smooth") +att.Description = "A set of luminescent iron sights for use in low-lit conditions." +att.Slot = "ur_deagle_tritium" +att.Desc_Neutrals = { + "uc.cosmetic" +} +att.SortOrder = 999 + +att.ActivateElements = {"ur_deagle_tritium"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_g3_barrel_12.lua b/lua/arccw/shared/attachments/ur_g3_barrel_12.lua new file mode 100644 index 0000000..ff759a0 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_g3_barrel_12.lua @@ -0,0 +1,26 @@ +att.PrintName = "G3KA4 12\" Carbine Barrel" +att.AbbrevName = "12\" Carbine Barrel" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "AG58K 12\" Carbine Barrel" +end + +att.Icon = Material("entities/att/ur_g3/barrel_k.png","smooth mips") +att.Description = "Shortened barrel for the carbine variant of the rifle. Improves both fire rate and handling." +att.Slot = "ur_g3_barrel" +att.AutoStats = true + +att.SortOrder = 12 + +att.Mult_SightTime = 0.9 +att.Add_BarrelLength = -4 +att.Mult_SightedSpeedMult = 1.05 +att.Mult_HipDispersion = 0.9 +att.Mult_Sway = 0.7 + +att.Mult_Recoil = 1.15 +att.Mult_AccuracyMOA = 1.5 +att.Mult_Range = 0.5 +att.Mult_RPM = 1.1 + +att.GivesFlags = {"g3_not8"} diff --git a/lua/arccw/shared/attachments/ur_g3_barrel_15.lua b/lua/arccw/shared/attachments/ur_g3_barrel_15.lua new file mode 100644 index 0000000..5964924 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_g3_barrel_15.lua @@ -0,0 +1,24 @@ +att.PrintName = "HK33A2 15\" Assault Barrel" +att.AbbrevName = "15\" Assault Barrel" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "CN66 15\" Assault Barrel" +end + +att.Icon = Material("entities/att/ur_g3/barrel_33.png","smooth mips") +att.Description = "Standard barrel for the intermediate carbine variant of the rifle. Improves weapon handling while marginally reducing range." +att.Slot = "ur_g3_barrel" +att.AutoStats = true + +att.SortOrder = 15 + +att.Mult_SightTime = 0.9 +att.Add_BarrelLength = -4 +att.Mult_SightedSpeedMult = 1.05 +att.Mult_Sway = 0.85 + +att.Mult_Recoil = 1.1 +att.Mult_AccuracyMOA = 1.1 +att.Mult_Range = 0.75 + +att.GivesFlags = {"g3_not8"} diff --git a/lua/arccw/shared/attachments/ur_g3_barrel_26.lua b/lua/arccw/shared/attachments/ur_g3_barrel_26.lua new file mode 100644 index 0000000..04f581e --- /dev/null +++ b/lua/arccw/shared/attachments/ur_g3_barrel_26.lua @@ -0,0 +1,35 @@ +att.PrintName = "PSG-1 26\" Sniper Barrel" +att.AbbrevName = "26\" Sniper Barrel" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "PMR-2 26\" Sniper Barrel" +end + +att.Icon = Material("entities/att/ur_g3/barrel_psg.png","smooth mips") +att.Description = "Long barrel and handguard assembly for the sniper variant of the rifle. Reduces fire rate, but enhances ranged performance greatly.\nDesigned purely for long range usage, this barrel lacks a front sight post." +att.Slot = "ur_g3_barrel" +att.Desc_Cons = { + "uc.nofs", +} +att.AutoStats = true + +att.SortOrder = 26 + +att.Mult_SightTime = 1.2 +att.Add_BarrelLength = 6 +att.Mult_SightedSpeedMult = 0.85 + +att.Mult_Recoil = 0.75 +att.Mult_AccuracyMOA = 0.5 +att.Mult_RangeMin = 2 +att.Mult_Range = 1.25 +att.Mult_RPM = 360 / 400 + +att.A_Hook_Add_SightsDispersion = function(wep, data) + if data and !wep.Attachments[1].Installed then + data.add = data.add + 250 + end +end + + +att.GivesFlags = {"g3_nohg","g3_not8"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_g3_barrel_8.lua b/lua/arccw/shared/attachments/ur_g3_barrel_8.lua new file mode 100644 index 0000000..d215e17 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_g3_barrel_8.lua @@ -0,0 +1,30 @@ +att.PrintName = "HK51 8\" Compact Barrel" +att.AbbrevName = "8\" Compact Barrel" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "CN102 8\" Blitz Barrel" + att.AbbrevName = "8\" Blitz Barrel" +end + +att.Icon = Material("entities/att/ur_g3/barrel_51.png","smooth mips") +att.Description = "Ridiculously short aftermarket barrel. Colloquially known as a \"flashbang dispenser,\" the tiny barrel drastically increases fire rate - for better and for worse.\n\nThe reduced dimensions are compatible with some MP5 furniture." +att.Slot = "ur_g3_barrel" +att.Desc_Pros = { + "ur.g3.8" +} +att.AutoStats = true + +att.SortOrder = 8 + +att.Mult_SightTime = 0.85 +att.Add_BarrelLength = -6 +att.Mult_SightedSpeedMult = 1.2 +att.Mult_HipDispersion = 0.75 +att.Mult_Sway = 0.5 + +att.Mult_Recoil = 1.3 +att.Mult_AccuracyMOA = 2 +att.Mult_Range = 0.35 +att.Mult_RPM = 1.2 + +att.GivesFlags = {"g3_hk51hg"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_g3_bayobipod_bayonet.lua b/lua/arccw/shared/attachments/ur_g3_bayobipod_bayonet.lua new file mode 100644 index 0000000..c7ce26f --- /dev/null +++ b/lua/arccw/shared/attachments/ur_g3_bayobipod_bayonet.lua @@ -0,0 +1,14 @@ +att.PrintName = "G3 Bayonet" +att.AbbrevName = "Muzzle Bayonet" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "G58 Bayonet" +end + +att.Icon = false +att.Description = "Bayonet" +att.Slot = "ur_g3_bayobipod" +att.SortOrder = 999 + +att.IgnorePickX = true +att.Ignore = true \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_g3_bayobipod_bipod.lua b/lua/arccw/shared/attachments/ur_g3_bayobipod_bipod.lua new file mode 100644 index 0000000..2fb3849 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_g3_bayobipod_bipod.lua @@ -0,0 +1,14 @@ +att.PrintName = "G3 Bipod" +att.AbbrevName = "Integrated Bipod" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "G58 Bipod" +end + +att.Icon = false +att.Description = "Bipod" +att.Slot = "ur_g3_bayobipod" +att.SortOrder = 998 + +att.IgnorePickX = true +att.Ignore = true \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_g3_hg_51_flash.lua b/lua/arccw/shared/attachments/ur_g3_hg_51_flash.lua new file mode 100644 index 0000000..8bffed4 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_g3_hg_51_flash.lua @@ -0,0 +1,44 @@ +att.PrintName = "Surefire Handguard" + +att.Description = "Surefire handguard, custom-fitted for the HK51." +att.Desc_Cons = { + "uc.noubs" +} +att.AutoStats = true + +att.Slot = "ur_g3_handguard" + +att.SortOrder = 3 + +att.HideIfBlocked = true + +att.Model = "models/weapons/arccw/atts/ud_flashlight_1.mdl" +att.ModelOffset = Vector(0,0,.1) +att.OffsetAng = Angle(0,0,180) +att.ModelScale = Vector(.01,.01,.01) -- THIS IS TEMPORARY UNTIL THE MODEL GETS THE BONE WE NEED, DO NOT RELEASE WITH A TINY FLASHLIGHT INSIDE THE MODEL + +att.Flashlight = false +att.FlashlightFOV = 50 +att.FlashlightFarZ = 1024 -- how far it goes +att.FlashlightNearZ = 1 -- how far away it starts +att.FlashlightAttenuationType = ArcCW.FLASH_ATT_LINEAR -- LINEAR, CONSTANT, QUADRATIC are available +att.FlashlightColor = Color(255, 242, 229) +att.FlashlightTexture = "effects/flashlight001" +att.FlashlightBrightness = 3 +att.FlashlightBone = "light" + +att.ToggleStats = { + { + PrintName = "On", + Flashlight = true + }, + { + PrintName = "Off", + Flashlight = false, + } +} + +att.GivesFlags = {"g3_noub"} +att.RequireFlags = {"g3_hk51hg"} + +att.Ignore = true \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_g3_hg_51_mlok.lua b/lua/arccw/shared/attachments/ur_g3_hg_51_mlok.lua new file mode 100644 index 0000000..c6c3d13 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_g3_hg_51_mlok.lua @@ -0,0 +1,26 @@ +att.PrintName = "MLOK Handguard" +att.Description = "Aftermarket hanguard designed for the HK51 Carbine. Light but unwieldy." +att.Desc_Cons = { + "uc.noubs" +} +att.AutoStats = true + +att.Slot = "ur_g3_handguard" + +att.SortOrder = 2 + +att.ModelOffset = Vector(-21, -2.2, 4.3) +att.Model = "models/weapons/arccw/ur_g3_lhik_slim.mdl" +att.LHIK = true + +att.HideIfBlocked = true + +att.Mult_Sway = .85 +att.Mult_SightTime = 1.05 +att.Mult_Recoil = .9 + + +att.GivesFlags = {"g3_noub"} +att.RequireFlags = {"g3_hk51hg"} + +att.Ignore = true \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_g3_hg_pica.lua b/lua/arccw/shared/attachments/ur_g3_hg_pica.lua new file mode 100644 index 0000000..7132921 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_g3_hg_pica.lua @@ -0,0 +1,13 @@ +att.PrintName = "RIS Handguard" +att.Icon = Material("entities/att/ur_g3/hg_pica.png","smooth mips") +att.Description = "A handguard with three picatinny rails extending down the barrel, enabling higher modularity." +att.AutoStats = true +att.Desc_Neutrals = { + "uc.cosmetic" +} + +att.Slot = "ur_g3_handguard" + +att.SortOrder = 5 + + diff --git a/lua/arccw/shared/attachments/ur_g3_hg_slim.lua b/lua/arccw/shared/attachments/ur_g3_hg_slim.lua new file mode 100644 index 0000000..60308a5 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_g3_hg_slim.lua @@ -0,0 +1,16 @@ +att.PrintName = "Slim Handguard" +att.Icon = Material("entities/att/ur_g3/hg_slim.png","smooth mips") +att.Description = "Alternative factory handguard influenced by older models. Lighter than the bulkier standard, but more difficult to brace." -- use mp5 slim hg stats --why didn't you copy them yourself +att.AutoStats = true + +att.Slot = "ur_g3_handguard" + +att.SortOrder = 5 + +att.ModelOffset = Vector(-21, -2.2, 4.3) +att.Model = "models/weapons/arccw/ur_g3_lhik_slim.mdl" +att.LHIK = true + +att.Mult_Sway = .85 +att.Mult_SightTime = .85 +att.Mult_Recoil = 1.1 \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_g3_mag_10.lua b/lua/arccw/shared/attachments/ur_g3_mag_10.lua new file mode 100644 index 0000000..df42aca --- /dev/null +++ b/lua/arccw/shared/attachments/ur_g3_mag_10.lua @@ -0,0 +1,32 @@ +att.PrintName = "G3 10-Round Marksman Mag" +att.AbbrevName = "10-Round Marksman Mag" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "G58 10-Round Marksman Mag" +end + +att.Icon = Material("entities/att/ur_g3/mag10.png","smooth mips") +att.Description = "Magazine with a very low capacity. The lighter load reduces the weapon's weight significantly." +att.Slot = {"ur_g3_mag"} +att.AutoStats = true + +att.SortOrder = 14 + +att.HideIfBlocked = true + +att.Override_ClipSize = 10 + +att.Mult_SightTime = 0.9 +att.Mult_ReloadTime = 0.95 -- darsu: there was 0.8 but i changed because it looked pretty bad please balance +att.Mult_Sway = 0.7 + +att.Mult_SpeedMult = 1.025 +att.Mult_ShootSpeedMult = 1.05 + +att.Mult_HipDispersion = 0.85 + +att.ExcludeFlags = {"cal_556"} + +-- att.Hook_SelectReloadAnimation = function(wep, anim) +-- return anim .. "_10rnd" +-- end \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_g3_mag_20_556.lua b/lua/arccw/shared/attachments/ur_g3_mag_20_556.lua new file mode 100644 index 0000000..c1794b9 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_g3_mag_20_556.lua @@ -0,0 +1,31 @@ +att.PrintName = "HK33 20-Round Compact Mag" +att.AbbrevName = "20-Round Compact Mag" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "CN66 20-Round Compact Mag" +end + +att.Icon = Material("entities/att/ur_g3/mag556_20.png","smooth mips") +att.Description = "Low-capacity magazine for the 5.56 variant of the rifle. The lighter load makes the weapon more ergonomic." +att.Slot = {"ur_g3_mag"} +att.AutoStats = true + +att.HideIfBlocked = true +att.SortOrder = 10 + +att.Override_ClipSize = 20 +att.Override_ClipSize_Priority = 2 + +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.RequireFlags = {"cal_556"} + +-- att.Hook_SelectReloadAnimation = function(wep, anim) +-- return anim +-- end \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_g3_mag_40_556.lua b/lua/arccw/shared/attachments/ur_g3_mag_40_556.lua new file mode 100644 index 0000000..6a1a5d4 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_g3_mag_40_556.lua @@ -0,0 +1,30 @@ +att.PrintName = "HK33 40-Round Extended Mag" +att.AbbrevName = "40-Round Extended Mag" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "CN66 40-Round Extended Mag" +end + +att.Icon = Material("entities/att/ur_g3/mag556_40.png","smooth mips") +att.Description = "Extended magazine for the 5.56 variant of the rifle. Though very reliable, its oblong design makes it awkward to load." +att.Slot = {"ur_g3_mag"} +att.AutoStats = true + +att.HideIfBlocked = true +att.SortOrder = 10 + +att.Override_ClipSize = 40 +att.Override_ClipSize_Priority = 2 + +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.RequireFlags = {"cal_556"} + +-- att.Hook_SelectReloadAnimation = function(wep, anim) +-- return anim .. "_30rnd" +-- end \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_g3_mag_50.lua b/lua/arccw/shared/attachments/ur_g3_mag_50.lua new file mode 100644 index 0000000..6322ab2 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_g3_mag_50.lua @@ -0,0 +1,38 @@ +att.PrintName = "G3 50-Round Drum Mag" +att.AbbrevName = "50-Round Drum Mag" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "G58 50-Round Drum Mag" +end + +att.Icon = Material("entities/att/ur_g3/mag50.png","smooth mips") +att.Description = "50 round drum-style magazine. Though highly cumbersome and unreliable, it more than doubles the standard capacity of the rifle." +att.Slot = {"ur_g3_mag"} +att.AutoStats = true +att.Desc_Cons = { + "uc.jam" +} + +att.SortOrder = 15 +att.HideIfBlocked = true + +att.Override_Malfunction = true +att.Mult_MalfunctionMean = 0.75 +att.Mult_MalfunctionVariance = 1.5 + +att.Override_ClipSize = 50 + +att.Mult_SightTime = 1.1 +att.Mult_ReloadTime = 1.2 +att.Mult_Sway = 1.1 + +att.Mult_SpeedMult = 0.9 +att.Mult_ShootSpeedMult = 0.85 + +att.Mult_HipDispersion = 1.5 + +att.ExcludeFlags = {"cal_556"} + +-- att.Hook_SelectReloadAnimation = function(wep, anim) +-- return anim .. "_50rnd" +-- end \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_g3_optic_psg1.lua b/lua/arccw/shared/attachments/ur_g3_optic_psg1.lua new file mode 100644 index 0000000..bd0f5b6 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_g3_optic_psg1.lua @@ -0,0 +1,53 @@ +att.PrintName = "Hensoldt ZF 6x42 PSG1" +att.AbbrevName = "PSG-1 Optic (6x)" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Hensoldt ZF 6x42 PMR-2" + att.AbbrevName = "PMR-2 Optic (6x)" +end + +att.Icon = Material("entities/att/acwatt_ur_g3_optic_psg1.png", "mips smooth") +att.Description = "Long range combat scope for precision shooting.\nExclusive to the G3 pattern rifle." +-- need icon +att.SortOrder = 300 + +att.Desc_Pros = { + "autostat.holosight", + "autostat.zoom", +} +att.Desc_Cons = { +} +att.AutoStats = true +att.Slot = {"ur_g3_optic"} + +att.Model = "models/weapons/arccw/atts/g3_optic_psg.mdl" +att.ModelOffset = Vector(0.55, 0, -1.7) + +att.AdditionalSights = { + { + Pos = Vector(0.01, 9.25, -1.12), + Ang = Angle(0, 0, 0), + Magnification = 1.1, + HolosightData = { + Holosight = true, + HolosightReticle = Material("hud/scopes/PSG1_reticle.png", "mips smooth"), + HolosightNoFlare = true, + HolosightSize = 15, + HolosightPiece = "models/weapons/arccw/atts/g3_optic_psg_hsp.mdl", + HolosightBlackbox = true, + HolosightMagnification = UC_HalfScope( 6 ), + Colorable = true, + }, + } +} + +-- att.Holosight = true +-- att.HolosightReticle = Material("mifl_tarkov_reticle/dot.png", "mips smooth") + +att.HolosightPiece = "models/weapons/arccw/atts/g3_optic_psg_hsp.mdl" +-- att.HolosightNoFlare = true +-- att.HolosightSize = 1 +-- att.HolosightBone = "holosight" +att.Colorable = true + +att.Mult_SightedSpeedMult = 0.84 \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_g3_optic_sg1.lua b/lua/arccw/shared/attachments/ur_g3_optic_sg1.lua new file mode 100644 index 0000000..68a790e --- /dev/null +++ b/lua/arccw/shared/attachments/ur_g3_optic_sg1.lua @@ -0,0 +1,58 @@ +att.PrintName = "Zeiss Diavari DA 1.5-6x Sniper Scope" +att.AbbrevName = "G3SG/1 Optic (1.5-6x)" + +if !GetConVar("arccw_truenames"):GetBool() then + att.AbbrevName = "SSR Optic (1.5-6x)" +end + +att.Icon = Material("entities/att/acwatt_ur_g3_optic_sg1.png", "mips smooth") +att.Description = "Variable power scope, adjustable for a very wide range of magnifications.\nExclusive to the G3 pattern rifle." +-- need icon +att.SortOrder = 300 + +att.Desc_Pros = { + "autostat.holosight", + "autostat.zoom", +} +att.Desc_Cons = { +} +att.AutoStats = true +att.Slot = {"ur_g3_optic"} + +att.Model = "models/weapons/arccw/atts/g3_optic_sg1.mdl" +att.ModelOffset = Vector(0.55, 0, -1.7) + +att.AdditionalSights = { + { + Pos = Vector(0.01, 8.5, -1.18), + Ang = Angle(0, 0, 0), + Magnification = 1.1, + ScrollFunc = ArcCW.SCROLL_ZOOM, + ScopeMagnificationMin = UC_HalfScope( 1.5 ), + ScopeMagnificationMax = UC_HalfScope( 6 ), + ScopeMagnification = UC_HalfScope( 4.5 ), + HolosightData = { + Holosight = true, + HolosightReticle = Material("hud/scopes/SG1_reticle.png", "mips smooth"), + HolosightNoFlare = true, + HolosightSize = 16, + HolosightPiece = "models/weapons/arccw/atts/g3_optic_sg1_hsp.mdl", + HolosightBlackbox = true, + HolosightMagnification = UC_HalfScope( 4.5 ), + HolosightMagnificationMin = UC_HalfScope( 1.5 ), + HolosightMagnificationMax = UC_HalfScope( 6 ), + Colorable = true, + }, + } +} + +-- att.Holosight = true +-- att.HolosightReticle = Material("mifl_tarkov_reticle/dot.png", "mips smooth") + +att.HolosightPiece = "models/weapons/arccw/atts/g3_optic_sg1_hsp.mdl" +-- att.HolosightNoFlare = true +-- att.HolosightSize = 1 +-- att.HolosightBone = "holosight" +att.Colorable = true + +att.Mult_SightedSpeedMult = 0.78 diff --git a/lua/arccw/shared/attachments/ur_g3_rec_hk33.lua b/lua/arccw/shared/attachments/ur_g3_rec_hk33.lua new file mode 100644 index 0000000..1b8cede --- /dev/null +++ b/lua/arccw/shared/attachments/ur_g3_rec_hk33.lua @@ -0,0 +1,96 @@ +att.PrintName = "HK33 5.56x45mm Receiver" +att.AbbrevName = "HK33 5.56 Receiver" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "CN66 5.56x45mm Receiver" + att.AbbrevName = "CN66 5.56 Receiver" +end + +att.Description = "Receiver and barrel group that accepts an intermediate cartridge, changing the weapon into an assault rifle." +att.Icon = Material("entities/att/ur_g3/rec_33.png","smooth mips") +att.Slot = "ur_g3_rec" +att.AutoStats = true + +att.SortOrder = 12 + + +att.Override_ClipSize = 30 + +att.Override_Ammo = "smg1" +att.Override_Trivia_Calibre = "5.56x45mm NATO" +att.Override_Trivia_Class = "Assault Rifle" + +att.Mult_RPM = 650 / 520 -- 650 rpm +att.Mult_SightedSpeedMult = 1.05 +att.Mult_ReloadTime = .95 +att.Mult_Recoil = 0.45 +att.Mult_HipDispersion = .75 + +att.Mult_Penetration = 14 / 20 +att.Mult_DamageMin = 20 / 35 +att.Mult_Damage = 34 / 65 +att.ShootPitchVariation = 1 +att.Override_ShellModel = "models/weapons/arccw/uc_shells/556x45.mdl" +att.Override_ShellScale = 1 + +att.GivesFlags = {"cal_556"} + +att.Override_Firemodes_Priority = 0.5 +att.Override_Firemodes = { + { + Mode = 2, + }, + { + Mode = 1, + }, + { + Mode = 0 + } +} + +local path = ")weapons/arccw_ur/g3/" +local path1 = ")weapons/arccw_ur/ak/556/" + +local fire556 = {path .. "fire-556-01.ogg",path .. "fire-556-02.ogg",path .. "fire-556-03.ogg",path .. "fire-556-04.ogg",path .. "fire-556-05.ogg",path .. "fire-556-06.ogg"} +local fire556sup = {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"} + +att.Hook_GetShootSound = function(wep, sound) + if wep:GetBuff_Override("Silencer") then + return fire556sup + else + return fire556 + end +end + +local tail = ")/arccw_uc/common/556x45/" +local fire556dist = {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"} +local common = ")/arccw_uc/common/" + +att.Hook_GetDistantShootSoundOutdoors = function(wep, distancesound) + if wep:GetBuff_Override("Silencer") then + -- fallback to script + else + return fire556dist + end +end + + +local slotinfo = { + [9] = {"30-Round 5.56 Mag", "30-Round 5.56 Mag", Material("entities/att/ur_g3/mag556_30.png", "mips smooth")}, +} + +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 .. "_30rnd" +-- end \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_g3_rec_psg.lua b/lua/arccw/shared/attachments/ur_g3_rec_psg.lua new file mode 100644 index 0000000..0037358 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_g3_rec_psg.lua @@ -0,0 +1,35 @@ +att.PrintName = "PSG-1 Receiver" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "PMR-2 Receiver" +end + +att.Description = "Infamously expensive semi-automatic receiver. Comes with sublime long-range performance and a comfortable wooden grip that improves handling." +att.Icon = Material("entities/att/ur_g3/rec_psg.png","smooth mips") +att.Slot = "ur_g3_rec" +att.Desc_Cons = { + "uc.semionly" +} +att.AutoStats = true + +att.SortOrder = 13 + +att.Mult_RPM = 400 / 520 +att.Mult_Recoil = 0.6 +att.Mult_AccuracyMOA = 0.5 +att.Mult_Range = 1.25 +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 = "Sniper Rifle" \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_g3_skin_custom.lua b/lua/arccw/shared/attachments/ur_g3_skin_custom.lua new file mode 100644 index 0000000..7d45eef --- /dev/null +++ b/lua/arccw/shared/attachments/ur_g3_skin_custom.lua @@ -0,0 +1,17 @@ +att.PrintName = "G3 Custom Furniture" +att.AbbrevName = "Custom" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "G58 Custom Furniture" +end + +att.Description = "Custom color furniture. \n\n(Note: Do not let a gun purist see this.)" +att.Icon = Material("entities/att/ur_g3/skin_cust.png","smooth mips") +att.Slot = "ur_g3_skin" +att.Desc_Neutrals = { + "uc.cosmetic", + "uc.custcolor", +} +att.SortOrder = 1 + +att.IgnorePickX = true \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_g3_skin_olive.lua b/lua/arccw/shared/attachments/ur_g3_skin_olive.lua new file mode 100644 index 0000000..eed1feb --- /dev/null +++ b/lua/arccw/shared/attachments/ur_g3_skin_olive.lua @@ -0,0 +1,16 @@ +att.PrintName = "G3 Olive Drab Furniture" +att.AbbrevName = "Olive" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "G58 Olive Drab Furniture" +end + +att.Description = "Olive drab furniture; less official but more iconic." +att.Icon = Material("entities/att/ur_g3/skin_oliva.png","smooth mips") +att.Slot = "ur_g3_skin" +att.Desc_Neutrals = { + "uc.cosmetic", +} +att.SortOrder = 1 + +att.IgnorePickX = true \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_g3_skin_tan.lua b/lua/arccw/shared/attachments/ur_g3_skin_tan.lua new file mode 100644 index 0000000..6dc55cf --- /dev/null +++ b/lua/arccw/shared/attachments/ur_g3_skin_tan.lua @@ -0,0 +1,16 @@ +att.PrintName = "G3 Flat Dark Earth Furniture" +att.AbbrevName = "FDE" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "G58 Flat Dark Earth Furniture" +end + +att.Description = "FDE furniture for the two-tone tacticool feel... or desert operations." +att.Icon = Material("entities/att/ur_g3/skin_fde.png","smooth mips") +att.Slot = "ur_g3_skin" +att.Desc_Neutrals = { + "uc.cosmetic", +} +att.SortOrder = 1 + +att.IgnorePickX = true \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_g3_skin_wood.lua b/lua/arccw/shared/attachments/ur_g3_skin_wood.lua new file mode 100644 index 0000000..7259e4d --- /dev/null +++ b/lua/arccw/shared/attachments/ur_g3_skin_wood.lua @@ -0,0 +1,16 @@ +att.PrintName = "G3 CETME Wooden Furniture" +att.AbbrevName = "Wood" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "G58 Wooden Furniture" +end + +att.Icon = Material("entities/att/ur_g3/skin_wood.png","smooth mips") +att.Description = "Old-fashioned wooden furniture that makes you feel like the apocalypse is near." +att.Slot = "ur_g3_skin" +att.Desc_Neutrals = { + "uc.cosmetic", +} +att.SortOrder = 1 + +att.IgnorePickX = true \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_g3_stock_collapsible.lua b/lua/arccw/shared/attachments/ur_g3_stock_collapsible.lua new file mode 100644 index 0000000..70de0b1 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_g3_stock_collapsible.lua @@ -0,0 +1,39 @@ +att.PrintName = "G3 Collapsible Stock" -- I just copied the mp5 collapsible stock for the stats. --that's ok, i probably would have done the same +att.AbbrevName = "Collapsible Stock" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "AG58 Collapsible Stock" +end + +att.Icon = Material("entities/att/ur_g3/stock_colap.png","smooth mips") +att.Description = "Lightweight collapsable stock that significantly shortens the rifle when collapsed. Though sturdy for a collapsing stock, acquiring a proper cheek weld is practically impossible, and its felt recoil reduction is poor.\n\nToggling the stock modifies performance accordingly." +att.AutoStats = true +att.Slot = {"ur_g3_stock"} + +att.SortOrder = 10 + +att.Mult_SightTime = 0.75 + +att.ToggleLockDefault = true +att.ToggleSound = "arccw_uc/common/stockslide.ogg" +att.ToggleStats = { + { + PrintName = "Extended", + ActivateElements = {"stock_g3_collapsible"}, + AutoStats = true, + Mult_Recoil = 1.2, + }, + { + PrintName = "Collapsed", + ActivateElements = {"stock_g3_collapsed"}, + AutoStats = true, + Mult_HipDispersion = .8, + Mult_DrawTime = 0.85, + Mult_HolsterTime = 0.85, + Mult_ShootSpeedMult = 1.15, + Add_BarrelLength = -5, + Mult_Recoil = 1.5, + Mult_RecoilSide = 1.25, + Mult_Sway = 3, + } +} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_g3_stock_psg.lua b/lua/arccw/shared/attachments/ur_g3_stock_psg.lua new file mode 100644 index 0000000..08aea02 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_g3_stock_psg.lua @@ -0,0 +1,19 @@ +att.PrintName = "PSG-1 Sniper Stock" +att.AbbrevName = "Sniper Stock" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "PMR-2 Sniper Stock" +end + +att.Icon = Material("entities/att/ur_g3/stock_psg.png","smooth mips") +att.Description = [[Heavy-duty marksman stock made for the sniper variant of the rifle. Cumbersome, but very comfortable to shoot with.]] +att.AutoStats = true +att.Slot = {"ur_g3_stock"} + +att.SortOrder = 11 + +att.Mult_Recoil = 0.85 +att.Mult_Sway = .6 + +att.Mult_SightTime = 1.1 +att.Mult_SpeedMult = 0.8 \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_g3_stock_rucar.lua b/lua/arccw/shared/attachments/ur_g3_stock_rucar.lua new file mode 100644 index 0000000..9235a42 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_g3_stock_rucar.lua @@ -0,0 +1,19 @@ +att.PrintName = "RU556 Fixed-Adjustable Stock" +att.AbbrevName = "Fixed-Adjustable Stock" +att.Icon = Material("entities/att/ur_g3/stock_ar.png","smooth mips") +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "Magpul UBR GEN2 Stock" +end + +att.Description = [[AR-style buffer tube adapter fit with an adjustable aftermarket stock. Improves weapon control on the move, but lacks weight.]] -- i suggest you use settings from m16's fixed-adjustable stock +att.AutoStats = true +att.Slot = {"ur_g3_stock"} + +att.SortOrder = 9 + +att.Mult_SpeedMult = 1.05 +att.Mult_MoveDispersion = .6 +att.Mult_SightTime = .9 + +att.Mult_Sway = 1.5 +att.Mult_RecoilSide = 1.5 \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_g3_stock_sg.lua b/lua/arccw/shared/attachments/ur_g3_stock_sg.lua new file mode 100644 index 0000000..fab43e4 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_g3_stock_sg.lua @@ -0,0 +1,18 @@ +att.PrintName = "G3 Padded Stock" +att.AbbrevName = "Padded Stock" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "AG58 Marksman Stock" +end + +att.Icon = Material("entities/att/ur_g3/stock_sg.png","smooth mips") +att.Description = [[Padded stock found on the marksman rifle variant of the rifle. The cheek padding reduces sway but weighs the stock down.]] +att.AutoStats = true +att.Slot = {"ur_g3_stock"} + +att.SortOrder = 11 + + +att.Mult_Sway = .75 + +att.Mult_SightTime = 1.075 \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_mp5_barrel_eod.lua b/lua/arccw/shared/attachments/ur_mp5_barrel_eod.lua new file mode 100644 index 0000000..9d0c32f --- /dev/null +++ b/lua/arccw/shared/attachments/ur_mp5_barrel_eod.lua @@ -0,0 +1,31 @@ +att.PrintName = "11\" EOD Barrel" + +att.Icon = Material("entities/att/ur_mp5/upper_eod.png", "smooth mips") +att.Description = "Extended barrel and handguard assembly with a massive integrated muzzle brake to protect underbarrel weapons.\nDecreases muzzle rise, but performs poorly when hip firing." +att.Desc_Pros = { +} +att.Desc_Cons = { + "uc.nomuzzle", + "uc.nohg", +} +att.AutoStats = true + +att.Slot = "ur_mp5_barrel" + +att.SortOrder = 11 + +att.Mult_SightTime = 1.1 +att.Mult_Sway = 1.15 +att.Mult_Range = 1.25 +att.Mult_Recoil = 0.8 +att.Mult_AccuracyMOA = 0.75 +att.Mult_HipDispersion = 1.2 +att.Add_BarrelLength = 4 + +att.ActivateElements = {"ur_mp5_barrel_eod"} +att.GivesFlags = {"barrel_eod"} + +att.Hook_AddShootSound = function(wep) + wep:EmitSound("weapons/arccw_ur/mp5/eod" .. math.random(1, 5) .. ".ogg", 70, math.Rand(98, 102), 1, CHAN_STATIC) + wep:EmitSound("weapons/arccw_ur/mp5/eo2" .. math.random(1, 6) .. ".ogg", 70, 100, 0.5, CHAN_STATIC) +end \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_mp5_barrel_kurz.lua b/lua/arccw/shared/attachments/ur_mp5_barrel_kurz.lua new file mode 100644 index 0000000..c2a7c3b --- /dev/null +++ b/lua/arccw/shared/attachments/ur_mp5_barrel_kurz.lua @@ -0,0 +1,34 @@ +att.PrintName = "4.5\" Kurz Upper" + +att.Icon = Material("entities/att/ur_mp5/upper_k.png", "smooth mips") +att.Description = "Machine pistol variant with a maximally compact barrel and a lightened bolt assembly for increased cyclic rate.\nMid-range accuracy is poor, and recoil is noticibly increased." +att.AutoStats = true + +att.Slot = "ur_mp5_barrel" + +att.SortOrder = 4.5 + +att.LHIK = true + +att.ModelOffset = Vector(6.5, -0.5, -1) +att.Model = "models/weapons/arccw/atts/lhik_kurz.mdl" + +att.Add_BarrelLength = -4 +att.Mult_Sway = .5 +att.Mult_SightTime = .75 +att.Mult_RPM = 1.125 + +att.Mult_Recoil = 1.25 +att.Mult_AccuracyMOA = 3 +att.Mult_Range = .5 + +att.Mult_HipDispersion = 0.85 + +att.GivesFlags = {"mp5_kurz"} +att.Override_Trivia_Class = "Machine Pistol" + +att.Hook_SelectReloadAnimation = function(wep, anim) + return anim .. "_kurz" +end + +att.Mult_PhysBulletMuzzleVelocity = 0.9375 \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_mp5_barrel_long.lua b/lua/arccw/shared/attachments/ur_mp5_barrel_long.lua new file mode 100644 index 0000000..98f8e4b --- /dev/null +++ b/lua/arccw/shared/attachments/ur_mp5_barrel_long.lua @@ -0,0 +1,21 @@ +att.PrintName = "16\" Carbine Barrel" + +att.Icon = Material("entities/att/ur_mp5/upper_fish.png", "smooth mips") +att.Description = "Carbine-length barrel used on some civilian sporting variants of the weapon. Improves long range performance, but adds weight." +att.AutoStats = true + +att.Slot = "ur_mp5_barrel" + +att.SortOrder = 13 + +att.Mult_AccuracyMOA = 0.75 +att.Mult_Recoil = 0.85 +att.Mult_Range = 1.25 + +att.Mult_SightTime = 1.25 +att.Mult_Sway = 1.5 +att.Add_BarrelLength = 7 + +att.Mult_PhysBulletMuzzleVelocity = 1.15 + +att.Ignore = true \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_mp5_barrel_sd.lua b/lua/arccw/shared/attachments/ur_mp5_barrel_sd.lua new file mode 100644 index 0000000..8eb747d --- /dev/null +++ b/lua/arccw/shared/attachments/ur_mp5_barrel_sd.lua @@ -0,0 +1,55 @@ +att.PrintName = "13\" Schalldämpfer Barrel" +att.AbbrevName = "13\" SD Barrel" + +-- if !GetConVar("arccw_truenames"):GetBool() then +-- att.PrintName = "Schalldämpfer Barrel" +-- end + +att.Icon = Material("entities/att/ur_mp5/upper_sd.png", "smooth mips") +att.Description = "Large, specialized integral suppressor for the MP5.\nMuzzle velocity is reduced, resulting in an extremely quiet report but reduced effective range." +att.Desc_Pros = { + -- "pro.invistracers", + -- "uc.subsonic" +} +att.Desc_Cons = { + "uc.nomuzzle", + "uc.nohg", + -- "uc.nopowder" +} +att.Desc_Neutrals = {"uc.supptail"} + +att.AutoStats = true + +att.Slot = "ur_mp5_barrel" + +att.SortOrder = 13 + +att.Silencer = true +att.Mult_ShootVol = 0.55 +att.Mult_Recoil = 0.9 +att.Override_MuzzleEffect = "muzzleflash_suppressed" +att.Override_PhysTracerProfile = 7 +att.Override_TracerNum = 0 + +att.Mult_SightTime = 1.15 +att.Mult_Sway = 1.25 +att.Mult_Range = 0.65 +att.Add_BarrelLength = 4 + +att.Mult_PhysBulletMuzzleVelocity = 0.7 + +att.Hook_GetDistantShootSound = function(wep, distancesound) + if distancesound == wep.DistantShootSoundSilenced then + return false end +end +att.Mult_ShootPitch = 1.15 + +att.ActivateElements = {"ur_mp5_barrel_sd"} +att.GivesFlags = {"barrel_sd"} --, "powder_subsonic" +--att.ExcludeFlags = {"ur_mp5_cal_10mm","ur_mp5_cal_40sw"} + +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/ur_mp5_barrel_sword.lua b/lua/arccw/shared/attachments/ur_mp5_barrel_sword.lua new file mode 100644 index 0000000..5bc76f9 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_mp5_barrel_sword.lua @@ -0,0 +1,32 @@ +att.PrintName = "9\" Swordfish Upper" + +att.Icon = Material("entities/att/ur_mp5/upper_fish.png", "smooth mips") +att.Description = "Aftermarket upper receiver that aggressively counters recoil using an integrated compensator. The added weight makes the weapon harder to aim with." +att.Desc_Cons = { + "uc.nomuzzle" +} +att.AutoStats = true + +att.Slot = "ur_mp5_barrel" + +att.SortOrder = 9 + +att.Mult_Recoil = 0.7 + +att.Mult_SightedSpeedMult = 0.8 +att.Mult_SightTime = 1.1 +att.Mult_Sway = 1.5 +att.Add_BarrelLength = 3 + +att.Mult_PhysBulletMuzzleVelocity = 1.15 + +att.Override_IronSightStruct = { + Pos = Vector(-3.17, -4, -0.22), + Ang = Angle(0, 0, 0), + Magnification = 1, + SwitchToSound = "", + ViewModelFOV = 74, +} + +att.ActivateElements = {"ur_mp5_barrel_swordfish"} +att.GivesFlags = {"barrel_sword"} diff --git a/lua/arccw/shared/attachments/ur_mp5_caliber_10auto.lua b/lua/arccw/shared/attachments/ur_mp5_caliber_10auto.lua new file mode 100644 index 0000000..fb02763 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_mp5_caliber_10auto.lua @@ -0,0 +1,81 @@ +att.PrintName = "MP5/10 10mm Auto Conversion" +att.AbbrevName = "10mm Auto Receiver" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "PK5/10 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 with reliability issues, and weapon handling suffers." +att.Desc_Pros = { +} +att.Desc_Cons = { + "uc.jam" +} +att.Desc_Neutrals = { +} +att.Slot = "ur_mp5_caliber" + +att.AutoStats = true + +att.Override_Trivia_Calibre = "10mm Auto" + +att.Mult_Damage = 1.15 +att.Mult_DamageMin = 1.15 + +att.Mult_Recoil = 1.25 +att.Mult_RecoilSide = 1.25 +att.Mult_ReloadTime = 1.15 + +--att.Mult_ClipSize = 0.9 +att.Override_ShellScale = 1.1 + +att.Override_Malfunction = true +att.Mult_MalfunctionMean = 0.4 +att.Mult_MalfunctionVariance = 1.5 + +local path = ")weapons/arccw_ur/1911/" +local path1 = ")weapons/arccw_ur/mp5/" +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 = {path1 .. "fire-40-sup-01.ogg",path1 .. "fire-40-sup-02.ogg",path1 .. "fire-40-sup-03.ogg",path1 .. "fire-40-sup-04.ogg",path1 .. "fire-40-sup-05.ogg",path1 .. "fire-40-sup-06.ogg"} + +att.Hook_GetShootSound = function(wep, sound) + if wep:GetBuff_Override("Silencer") then + return fire10sup + else + return fire10 + end +end + +local tail = ")/arccw_uc/common/10x25/" +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 common = ")/arccw_uc/common/" + +att.Hook_GetDistantShootSoundOutdoors = function(wep, distancesound) + if wep:GetBuff_Override("Silencer") then + -- fallback to script + else + return fire10dist + end +end + + +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_GetDistantShootSoundIndoors = function(wep, distancesound) + if wep:GetBuff_Override("Silencer") then + -- fallback to script + else + return fire10distint + end +end + +-- att.Hook_GetDistantShootSound = function(wep, distancesound) +-- if distancesound == wep.DistantShootSound then +-- return "weapons/arccw_ud/glock/fire_dist_10.ogg" end +-- end + +att.GivesFlags = {"ur_mp5_cal_10mm"} +--att.ExcludeFlags = {"barrel_sd"} +att.ActivateElements = {"ur_mp5_mag_waffle"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_mp5_caliber_22lr.lua b/lua/arccw/shared/attachments/ur_mp5_caliber_22lr.lua new file mode 100644 index 0000000..3a1780c --- /dev/null +++ b/lua/arccw/shared/attachments/ur_mp5_caliber_22lr.lua @@ -0,0 +1,92 @@ +att.PrintName = "MP5 .22 LR Conversion" +att.AbbrevName = ".22 LR Receiver" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "PK5/22 .22 LR Conversion" +end + +att.Description = "A semi-automatic civilian model of the MP5 rechambered in .22 Long Rifle.\nThe low lethality of the cartridge makes this unfit for tactical operations, but far more fun to plink with." + +att.Icon = Material("entities/att/uc_bullets/22lr.png", "smooth mips") +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ur_mp5_caliber" + +att.AutoStats = true +att.SortOrder = -1 + +att.Override_Trivia_Calibre = ".22 Long Rifle" +att.Override_Ammo = "plinking" + +att.Mult_Damage = 0.4 +att.Mult_DamageMin = 0.4 +att.Mult_Penetration = 3 / 6 + +att.Mult_Recoil = 0.25 +att.Mult_VisualRecoilMult = 0.25 +--att.Mult_RPM = 1.25 +att.Mult_Penetration = 0.1 +att.Mult_ShootSpeedMult = 1.2 + + +att.Override_PhysBulletMuzzleVelocity = 320 +att.Mult_HipDispersion = 0.75 + +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 + +att.GivesFlags = {"ur_mp5_cal_22lr"} + + +att.Override_Firemodes_Priority = 0.5 +att.Override_Firemodes = { + { + Mode = 1, + }, + { + Mode = 0 + } +} + +att.ActivateElements = {"receiver_lower_semi"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_mp5_caliber_40sw.lua b/lua/arccw/shared/attachments/ur_mp5_caliber_40sw.lua new file mode 100644 index 0000000..ee19e3b --- /dev/null +++ b/lua/arccw/shared/attachments/ur_mp5_caliber_40sw.lua @@ -0,0 +1,72 @@ +att.PrintName = "MP5/40 .40 Smith & Wesson Conversion" +att.AbbrevName = ".40 S&W Receiver" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "PK5/40 .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 = "ur_mp5_caliber" + +att.AutoStats = true + +att.Override_Trivia_Calibre = ".40 Smith & Wesson" + +att.Mult_DamageMin = 1.35 +att.Mult_RangeMin = 0.75 +att.Mult_Recoil = 1.15 + +--att.Mult_ClipSize = .9 +att.Override_ShellScale = 1.1 + +local path = ")weapons/arccw_ur/mp5/" +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"} + +att.Hook_GetShootSound = function(wep, sound) + if wep:GetBuff_Override("Silencer") then + return fire40sup + else + return fire40 + end +end + +local tail = ")/arccw_uc/common/40sw/" +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 common = ")/arccw_uc/common/" + +att.Hook_GetDistantShootSoundOutdoors = function(wep, distancesound) + if wep:GetBuff_Override("Silencer") then + -- fallback to script + else + return fire40dist + end +end + + +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_GetDistantShootSoundIndoors = function(wep, distancesound) + if wep:GetBuff_Override("Silencer") then + -- fallback to script + else + return fire40distint + end +end + +-- att.Hook_GetDistantShootSound = function(wep, distancesound) +-- if distancesound == wep.DistantShootSound then +-- return "weapons/arccw_ud/glock/fire_dist_40.ogg" end +-- end + +att.GivesFlags = {"ur_mp5_cal_40sw"} +--att.ExcludeFlags = {"barrel_sd"} +att.ActivateElements = {"ur_mp5_mag_waffle"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_mp5_caliber_noburst.lua b/lua/arccw/shared/attachments/ur_mp5_caliber_noburst.lua new file mode 100644 index 0000000..7c01173 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_mp5_caliber_noburst.lua @@ -0,0 +1,37 @@ +att.PrintName = "MP5A3 SEF Receiver" +att.AbbrevName = "SEF Receiver" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "PK5-3 SEF Receiver" +end + +att.SortOrder = 201 +att.Icon = Material("entities/att/ur_mp5/sef.png", "smooth mips") +att.Description = "Vintage receiver that lacks the Navy receiver's three-round burst fire mode. Its grooved grip is more comfortable to hold." +att.Desc_Pros = { +} +att.Desc_Cons = { + "ur.mp5.noburst" +} +att.Desc_Neutrals = { +} +att.Slot = "ur_mp5_caliber" + +att.AutoStats = true + +att.Mult_SightTime = .95 + +att.Override_Firemodes_Priority = 0.5 +att.Override_Firemodes = { + { + Mode = 2, + }, + { + Mode = 1, + }, + { + Mode = 0 + } +} + +att.ActivateElements = {"receiver_lower"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_mp5_caliber_semi.lua b/lua/arccw/shared/attachments/ur_mp5_caliber_semi.lua new file mode 100644 index 0000000..dcf9aa8 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_mp5_caliber_semi.lua @@ -0,0 +1,43 @@ +att.PrintName = "PK5-CIV Sporter Receiver" +att.AbbrevName = "Sporter Receiver" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "SP5 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/ur_mp5/grip.png", "smooth mips") +att.Desc_Pros = { +} +att.Desc_Cons = { + "uc.semionly" +} +att.Desc_Neutrals = { +} +att.Slot = "ur_mp5_caliber" + +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 = "Pistol" + +att.ActivateElements = {"receiver_lower_semi"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_mp5_mag_15.lua b/lua/arccw/shared/attachments/ur_mp5_mag_15.lua new file mode 100644 index 0000000..af706b2 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_mp5_mag_15.lua @@ -0,0 +1,35 @@ +att.PrintName = "MP5 15-Round Flush Mag" +att.AbbrevName = "15-Round Flush Mag" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "PK5 15-Round Flush Mag" +end + +att.SortOrder = 30 +att.Icon = Material("entities/att/ur_mp5/mag20.png", "smooth mips") +att.Description = "Low-capacity magazine. The lighter load makes the weapon even more ergonomic." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ur_mp5_mag" + +att.AutoStats = true + +att.Mult_SightTime = 0.9 +att.Mult_ReloadTime = 0.85 +att.Override_ClipSize = 15 +att.Mult_Sway = 0.75 +att.Mult_ShootSpeedMult = 1.1 + +att.Mult_HipDispersion = 0.75 + +att.ActivateElements = {"ur_mp5_mag_15"} + +att.Hook_SelectReloadAnimation = function(wep, anim) + return anim .. "_15" +end + +att.ExcludeFlags = {"ur_mp5_cal_10mm","ur_mp5_cal_40sw"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_mp5_mag_40.lua b/lua/arccw/shared/attachments/ur_mp5_mag_40.lua new file mode 100644 index 0000000..ef5c1e9 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_mp5_mag_40.lua @@ -0,0 +1,31 @@ +att.PrintName = "MP5 40-Round Extended Mag" +att.AbbrevName = "40-Round Ext Mag" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "PK5 40-Round Extended Mag" +end + +att.SortOrder = 20 +att.Icon = Material("entities/att/acwatt_ur_mp5_mag_40.png", "smooth mips") +att.Description = "40-round extended magazine. The extra protruding length is cumbersome, but the magazine maintains high reliability." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ur_mp5_mag" + +att.AutoStats = true + +att.Mult_SightTime = 1.08 +--att.Mult_Recoil = 0.9 +--att.Mult_SpeedMult = 0.9 +att.Override_ClipSize = 50 +att.Mult_Sway = 1.15 + +att.ActivateElements = {"ur_mp5_mag_40"} + +att.ExcludeFlags = {"ur_mp5_cal_10mm","ur_mp5_cal_40sw"} + +att.Ignore = true \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_mp5_mag_50.lua b/lua/arccw/shared/attachments/ur_mp5_mag_50.lua new file mode 100644 index 0000000..5e710ee --- /dev/null +++ b/lua/arccw/shared/attachments/ur_mp5_mag_50.lua @@ -0,0 +1,46 @@ +att.PrintName = "MP5 50-Round Drum Magazine" +att.AbbrevName = "50-Round Drum Mag" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "PK5 50-Round Drum Magazine" +end + + +att.SortOrder = 10 +att.Icon = Material("entities/att/ur_mp5/mag50.png", "smooth mips") +att.Description = "Drum magazine with a 50-round capacity. Compact and reliable as far as drum magazines come, but still prone to jamming and ergonomics problems." +att.Desc_Pros = { +} +att.Desc_Cons = { + "uc.jam" +} +att.Desc_Neutrals = { +} +att.Slot = "ur_mp5_mag" + +att.AutoStats = true + + +att.Override_ClipSize = 50 + +att.Mult_SightTime = 1.25 +--att.Mult_Recoil = 0.9 +att.Mult_ReloadTime = 1.15 +att.Mult_SpeedMult = 0.93 +att.Mult_DrawTime = 1.2 +att.Mult_HolsterTime = 1.2 +att.Mult_Sway = 1.7 +--att.Mult_ShootSpeedMult = 0.85 +--att.Override_Jamming = true +att.Override_Malfunction = true +att.Mult_MalfunctionMean = 0.85 +att.Mult_MalfunctionVariance = 1.5 + +att.Mult_HipDispersion = 1.5 + +att.ActivateElements = {"ur_mp5_50_mag"} +att.ExcludeFlags = {"ur_mp5_cal_10mm","ur_mp5_cal_40sw"} + +att.Hook_SelectReloadAnimation = function(wep, anim) + return anim .. "_drum" +end \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_mp5_optic_alt.lua b/lua/arccw/shared/attachments/ur_mp5_optic_alt.lua new file mode 100644 index 0000000..310891e --- /dev/null +++ b/lua/arccw/shared/attachments/ur_mp5_optic_alt.lua @@ -0,0 +1,23 @@ +att.PrintName = "Closed Irons" + +att.Icon = Material("entities/att/ur_mp5/altirons.png", "smooth mips") +att.Description = "Closed iron sights with a smaller field of view, potentially increasing user precision.\nIn reality, it's all preference." +att.Desc_Neutrals = { + "uc.cosmetic" +} +att.AutoStats = true + +att.Slot = "ur_mp5_optic" +att.SortOrder = 9999 + +att.ActivateElements = {"ur_mp5_precision_irons"} +att.ExcludeFlags = {"barrel_sword"} +att.IgnorePickX = true + +att.Override_IronSightStruct = { + Pos = Vector(-3.17, -4.85, 0.74), + Ang = Angle(0.1, 0, 0), + Magnification = 1, + SwitchToSound = "", + ViewModelFOV = 80, +} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_mp5_optic_mount.lua b/lua/arccw/shared/attachments/ur_mp5_optic_mount.lua new file mode 100644 index 0000000..adac580 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_mp5_optic_mount.lua @@ -0,0 +1,15 @@ +att.PrintName = "M1913 Mount" + +att.Icon = Material("entities/att/ur_mp5/somemount.png", "smooth mips") +att.Description = "An optics mount, hold the optics.\n\"Worry not, my friend, for in the world of video games the weight of picatinny rails cannot hurt you.\"" +att.Desc_Neutrals = { + "uc.cosmetic" +} +att.AutoStats = true + +att.Slot = "mp5_charm" +att.SortOrder = 9999 + +att.ActivateElements = {"ur_mp5_rail_optic"} +att.ExcludeFlags = {"barrel_sword"} +att.IgnorePickX = true diff --git a/lua/arccw/shared/attachments/ur_mp5_stock_a2.lua b/lua/arccw/shared/attachments/ur_mp5_stock_a2.lua new file mode 100644 index 0000000..a7af999 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_mp5_stock_a2.lua @@ -0,0 +1,34 @@ +att.Ignore = true + + + +att.PrintName = "MP5A2 Wooden Stock" +att.AbbrevName = "Wooden Stock" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "K7 Wooden Stock" +end + +att.Icon = Material("entities/att/acwatt_ur_mp5_stock_solid.png", "smooth mips") +att.Description = "A solid, non-foldable stock made of wood. Its weight improves recoil control but harms handling." +att.Desc_Pros = {} +att.Desc_Cons = {} +att.Desc_Neutrals = {} +att.Slot = "ur_mp5_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 + +att.ActivateElements = {"ur_mp5_stock_wood"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_mp5_stock_a3.lua b/lua/arccw/shared/attachments/ur_mp5_stock_a3.lua new file mode 100644 index 0000000..f36f461 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_mp5_stock_a3.lua @@ -0,0 +1,41 @@ +att.PrintName = "MP5A3 Retractable Stock" +att.AbbrevName = "Retractable Stock" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "K7-3 Retractable Stock" +end + +att.Icon = Material("entities/att/ur_mp5/stock_colap.png", "smooth mips") +att.Description = "Retractable skeletal stock, signficantly less massive than solid polymer. It can be collapsed to reduce profile even further at the cost of stability.\n\nToggling the stock modifies performance accordingly." +att.AutoStats = true +att.Slot = "ur_mp5_stock" + +att.ToggleLockDefault = true +att.ToggleSound = "arccw_uc/common/stockslide.ogg" + +att.Mult_RecoilSide = 1.25 +att.Mult_SightTime = 0.90 + +att.Mult_DrawTime = 0.85 +att.Mult_HolsterTime = 0.85 + +att.Mult_HipDispersion = 0.8 + +att.ToggleStats = { + { + PrintName = "Extended", + ActivateElements = {"stock_a3"}, + AutoStats = true, + }, + { + PrintName = "Collapsed", + ActivateElements = {"stock_a3_folded"}, + AutoStats = true, + Add_BarrelLength = -9, + + Mult_Recoil = 1.75, + Mult_Sway = 2, + Mult_ShootSpeedMult = 1.12, + Mult_SightedSpeedMult = 1.12, + } +} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_mp5_stock_future.lua b/lua/arccw/shared/attachments/ur_mp5_stock_future.lua new file mode 100644 index 0000000..b23a105 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_mp5_stock_future.lua @@ -0,0 +1,35 @@ +att.PrintName = "MP5 \"Swordfish\" Futuristic Stock" +att.AbbrevName = "Futuristic Stock" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "PK5-Future Folding Stock" +end + +att.Icon = Material("entities/att/ur_mp5/stock_fish.png", "smooth mips") +att.Description = "Plastic-polymer stock with a telescoping buttstock and adjustable cheek riser. Though these features make for much situational adaptability, recoil control suffers as a result of the light construction.\n\nToggling the stock modifies performance accordingly." +att.AutoStats = true +att.Slot = "ur_mp5_stock" + +att.ToggleLockDefault = true +att.ToggleSound = "arccw_uc/common/stockslide.ogg" + +att.Mult_MoveDispersion = .85 +att.Mult_Sway = 1.5 +att.Mult_SightTime = 1.2 +att.Mult_RecoilSide = 1.15 +att.Mult_HipDispersion = 0.85 + +att.ToggleStats = { + { + PrintName = "Extended", + ActivateElements = {"stock_future"}, + AutoStats = true, + }, + { + PrintName = "Collapsed", + ActivateElements = {"stock_future_folded"}, + AutoStats = true, + Mult_ShootSpeedMult = 1.15, + Add_BarrelLength = -4 + } +} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_mp5_stock_none.lua b/lua/arccw/shared/attachments/ur_mp5_stock_none.lua new file mode 100644 index 0000000..ca013c9 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_mp5_stock_none.lua @@ -0,0 +1,35 @@ +att.PrintName = "MP5A1 Buttcap" +att.AbbrevName = "Buttcap" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "PK5-1 Buttcap" +end + +att.Icon = Material("entities/att/ur_mp5/stock_cap.png", "smooth mips") +att.Description = "Remove your stock. Who needs it, anyway? Not the Germans, that's for sure." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ur_mp5_stock" + +att.AutoStats = true +att.Free = true +att.SortOrder = -1 + +att.Mult_Recoil = 2 +att.Mult_RecoilSide = 1.25 +att.Mult_Sway = 3 + +att.Mult_SightTime = 0.8 +att.Mult_SpeedMult = 1.1 +att.Mult_SightedSpeedMult = 1.25 +att.Mult_ShootSpeedMult = 1.2 + +att.Mult_DrawTime = 0.6 +att.Mult_HolsterTime = 0.6 +att.Add_BarrelLength = -12 + +att.ActivateElements = {"ur_mp5_stock_remove"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_mp5_stock_pdw.lua b/lua/arccw/shared/attachments/ur_mp5_stock_pdw.lua new file mode 100644 index 0000000..1c6256b --- /dev/null +++ b/lua/arccw/shared/attachments/ur_mp5_stock_pdw.lua @@ -0,0 +1,41 @@ +att.PrintName = "MP5K PDW Folding Stock" +att.AbbrevName = "PDW Stock" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "PK5-PDW Folding Stock" +end + +att.Icon = Material("entities/att/ur_mp5/stock_pdw.png", "smooth mips") +att.Description = "Light polymer \"personal defense weapon\" stock. Ideal for point shooting due to its conventional shape. It can be folded to reduce profile even further at the cost of recoil.\n\nToggling the stock modifies performance accordingly." +att.AutoStats = true +att.Slot = "ur_mp5_stock" + +att.ToggleLockDefault = true +att.ToggleSound = "arccw_uc/common/stockslide.ogg" + +att.Mult_MoveDispersion = .85 +att.Mult_Recoil = 1.15 +att.Mult_RecoilSide = 1.25 + + +att.Mult_HipDispersion = 0.75 +att.Mult_DrawTime = 0.85 +att.Mult_HolsterTime = 0.85 + +att.ToggleStats = { + { + PrintName = "Extended", + ActivateElements = {"stock_pdw"}, + AutoStats = true, + }, + { + PrintName = "Folded", + ActivateElements = {"stock_pdw_folded"}, + AutoStats = true, + Add_BarrelLength = -12, + Mult_Recoil = 1.75, + Mult_ShootSpeedMult = 1.20, + Mult_SightedSpeedMult = 1.20, + Mult_Sway = 3, + } +} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_mp5_stock_ump.lua b/lua/arccw/shared/attachments/ur_mp5_stock_ump.lua new file mode 100644 index 0000000..569a94a --- /dev/null +++ b/lua/arccw/shared/attachments/ur_mp5_stock_ump.lua @@ -0,0 +1,37 @@ +att.PrintName = "UMP Style B&T Folding Stock" +att.AbbrevName = "B&T Folding Stock" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "umpa Folding Stock" +end + +att.Icon = Material("entities/att/ur_mp5/stock_ump.png", "smooth mips") +att.Description = "Folding stock derived from a later submachine gun pattern by the same manufacturer. Its wide buttpad reduces horizontal recoil at the cost of mobility and aim speed. \n\nToggling the stock modifies performance accordingly." +att.AutoStats = true +att.Slot = "ur_mp5_stock" + +att.ToggleLockDefault = true +att.ToggleSound = "arccw_uc/common/stockslide.ogg" + +att.Mult_DrawTime = 1.1 +att.Mult_HolsterTime = 1.1 +att.Mult_SightedSpeedMult = 0.85 +att.Mult_ShootSpeedMult = 0.85 +att.Mult_RecoilSide = 0.75 + +att.ToggleStats = { + { + PrintName = "Extended", + ActivateElements = {"stock_ump"}, + AutoStats = true, + Mult_HipDispersion = .75, + }, + { + PrintName = "Folded", + ActivateElements = {"stock_ump_folded"}, + AutoStats = true, + Add_BarrelLength = -12, + Mult_Recoil = 1.75, + Mult_Sway = 2.5, + } +} diff --git a/lua/arccw/shared/attachments/ur_mp5_ub_classic.lua b/lua/arccw/shared/attachments/ur_mp5_ub_classic.lua new file mode 100644 index 0000000..dc259fa --- /dev/null +++ b/lua/arccw/shared/attachments/ur_mp5_ub_classic.lua @@ -0,0 +1,16 @@ +att.PrintName = "Slim Handguard" + +att.Icon = Material("entities/att/ur_mp5/hg_slim.png", "smooth mips") +att.Description = "Early rounded handguard, lighter than the current iteration but more difficult to brace." +att.AutoStats = true + +att.Slot = "ur_mp5_hg" + +att.SortOrder = 999 + +att.Mult_Sway = .75 +att.Mult_SightTime = .95 +att.Mult_Recoil = 1.15 + +att.ActivateElements = {"ur_mp5_ub_classic"} +att.ExcludeFlags = {"barrel_sd","mp5_kurz"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_mp5_ub_kurzgrip.lua b/lua/arccw/shared/attachments/ur_mp5_ub_kurzgrip.lua new file mode 100644 index 0000000..2d763fe --- /dev/null +++ b/lua/arccw/shared/attachments/ur_mp5_ub_kurzgrip.lua @@ -0,0 +1,26 @@ +att.PrintName = "VFG-K Handguard" + +att.Icon = Material("entities/att/ur_mp5/hg_k.png", "smooth mips") +att.Description = "The iconic handguard for the Kurz machine pistol variant, featuring a stubby foregrip and handstop that make the shortened SMG much more comfortable and controllable." +att.Desc_Cons = { + "uc.noubs" +} +att.AutoStats = true + +att.Slot = "ur_mp5_hg" + +att.LHIK = true + +att.ModelOffset = Vector(-1.3, 0, -0) +att.Model = "models/weapons/arccw/atts/ur_kurzlhik.mdl" // stole this pose from the tall troy grip lol!!! +att.Override_HoldtypeActive = "smg" + +att.SortOrder = 2 + +att.Mult_Sway = .75 +att.Mult_SightTime = .95 +att.Mult_Recoil = .85 + +att.ActivateElements = {"ur_mp5_ub_kurzgrip"} +att.GivesFlags = {"mp5_badhg"} +att.RequireFlags = {"mp5_kurz"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_mp5_ub_mlok.lua b/lua/arccw/shared/attachments/ur_mp5_ub_mlok.lua new file mode 100644 index 0000000..0898375 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_mp5_ub_mlok.lua @@ -0,0 +1,24 @@ +att.PrintName = "MP5 M-LOK Handguard" +att.AbbrevName = "M-LOK Handguard" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "PK5 M-LOK Handguard" +end + +att.Icon = Material("entities/att/ur_mp5/hg_moe.png", "smooth mips") +att.Description = "American aftermarket handguard. Lighter than the basic, polymer handguard it replaces, improving handling, but somewhat unwieldy." +att.AutoStats = true + +att.Slot = {"ur_mp5_hg","ur_g3_handguard"} + +att.SortOrder = 1 + +att.Mult_SightTime = .90 +att.Mult_Recoil = 1.15 +att.Mult_Sway = 1.25 + +att.ActivateElements = {"ur_mp5_ub_kurzmlok"} +att.ExcludeFlags = {"g3_not8"} +--att.RequireFlags = {"mp5_kurz"} + +att.HideIfBlocked = true \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_mp5_ub_ris.lua b/lua/arccw/shared/attachments/ur_mp5_ub_ris.lua new file mode 100644 index 0000000..3b974a2 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_mp5_ub_ris.lua @@ -0,0 +1,16 @@ +att.PrintName = "RIS Handguard" + +att.Icon = Material("entities/att/ur_mp5/hg_pica.png", "smooth mips") +att.Description = "Alternative handguard with a tacticool picatinny rail interface. Does not have any tacticool benefits." +att.Desc_Neutrals = { + "uc.cosmetic" +} +att.AutoStats = true + +att.Slot = "ur_mp5_hg" +att.SortOrder = 997 + + +att.IgnorePickX = true +att.ActivateElements = {"ur_mp5_rail_fg"} +att.ExcludeFlags = {"barrel_sd","mp5_kurz"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_mp5_ub_surefire.lua b/lua/arccw/shared/attachments/ur_mp5_ub_surefire.lua new file mode 100644 index 0000000..3e26602 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_mp5_ub_surefire.lua @@ -0,0 +1,52 @@ +att.PrintName = "MP5 Surefire Handguard" +att.AbbrevName = "Surefire Handguard" + +if !GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "PK5 Surefire Handguard" +end + +att.Icon = Material("entities/att/ur_mp5/hg_flash.png", "smooth mips") +att.Description = "Alternative handguard with an integrated flashlight and a wider grip." +att.Desc_Pros = { + "uc.light" +} +att.Desc_Cons = { + "con.light", + "uc.noubs" +} +att.AutoStats = true + +att.Slot = {"ur_mp5_hg","ur_g3_handguard"} +att.SortOrder = 998 + +att.Model = "models/weapons/arccw/atts/ud_flashlight_1.mdl" +att.ModelOffset = Vector(0,0,.1) +att.OffsetAng = Angle(0,0,180) +att.ModelScale = Vector(.01,.01,.01) -- THIS IS TEMPORARY UNTIL THE MODEL GETS THE BONE WE NEED, DO NOT RELEASE WITH A TINY FLASHLIGHT INSIDE THE MODEL + +att.Flashlight = false +att.FlashlightFOV = 50 +att.FlashlightFarZ = 1024 -- how far it goes +att.FlashlightNearZ = 1 -- how far away it starts +att.FlashlightAttenuationType = ArcCW.FLASH_ATT_LINEAR -- LINEAR, CONSTANT, QUADRATIC are available +att.FlashlightColor = Color(255, 242, 229) +att.FlashlightTexture = "effects/flashlight001" +att.FlashlightBrightness = 3 +att.FlashlightBone = "light" + +att.ToggleStats = { + { + PrintName = "On", + Flashlight = true + }, + { + PrintName = "Off", + Flashlight = false, + } +} + +att.Mult_SightTime = 0.9 + +att.GivesFlags = {"hg_surefire","mp5_badhg"} -- badhg flag is temporary until underbarrel rail model is implemented (it disables use of underbarrel atts) +att.ExcludeFlags = {"barrel_sd","mp5_kurz","g3_not8"} +att.HideIfBlocked = true \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_mp5_ub_surefire_mlok.lua b/lua/arccw/shared/attachments/ur_mp5_ub_surefire_mlok.lua new file mode 100644 index 0000000..be9075f --- /dev/null +++ b/lua/arccw/shared/attachments/ur_mp5_ub_surefire_mlok.lua @@ -0,0 +1,47 @@ +att.PrintName = "Sherlock Handguard" + +att.Icon = Material("entities/att/ur_mp5/hg_flash_mlok.png", "smooth mips") +att.Description = "Alternative handguard with an integrated flashlight and M-LOK pattern attachment points.\n\nFunctionally identical to the Surefire Handguard." +att.Desc_Pros = { + "uc.light" +} +att.Desc_Cons = { + "con.light", + "uc.noubs" +} +att.AutoStats = true + +att.Slot = "ur_mp5_hg" +att.SortOrder = 998 + +att.Model = "models/weapons/arccw/atts/ud_flashlight_1.mdl" +att.ModelOffset = Vector(0,0,.1) +att.OffsetAng = Angle(0,0,180) +att.ModelScale = Vector(.01,.01,.01) -- THIS IS TEMPORARY UNTIL THE MODEL GETS THE BONE WE NEED, DO NOT RELEASE WITH A TINY FLASHLIGHT INSIDE THE MODEL + +att.Flashlight = false +att.FlashlightFOV = 50 +att.FlashlightFarZ = 1024 -- how far it goes +att.FlashlightNearZ = 1 -- how far away it starts +att.FlashlightAttenuationType = ArcCW.FLASH_ATT_LINEAR -- LINEAR, CONSTANT, QUADRATIC are available +att.FlashlightColor = Color(255, 242, 229) +att.FlashlightTexture = "effects/flashlight001" +att.FlashlightBrightness = 3 +att.FlashlightBone = "light" + +att.ToggleStats = { + { + PrintName = "On", + Flashlight = true + }, + { + PrintName = "Off", + Flashlight = false, + } +} + +att.Mult_SightTime = 0.9 + +att.ActivateElements = {"ur_mp5_ub_surelock"} +att.GivesFlags = {"hg_surefire","mp5_badhg"} -- badhg flag is temporary until underbarrel rail model is implemented (it disables use of underbarrel atts) +att.ExcludeFlags = {"barrel_sd","mp5_kurz"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_spas12_barrel_hl.lua b/lua/arccw/shared/attachments/ur_spas12_barrel_hl.lua new file mode 100644 index 0000000..912979b --- /dev/null +++ b/lua/arccw/shared/attachments/ur_spas12_barrel_hl.lua @@ -0,0 +1,81 @@ +att.PrintName = "21.5\" Freeman Barrel" +att.Icon = nil +att.Description = [[Futuristic fire control group and barrel accomodation that supports slamfire and a near-instant, gas-powered two-round burst. However, the original dual-mode mechanism is replaced. + +The two-round burst can shred most targets, but depletes ammo quickly. The complicated mechanism also has a heavier pump.]] +att.Desc_Pros = { + "uc.slam", + "ur.ak.burst", +} +att.Desc_Cons = { + "ur.spas12.pump" +} +att.Icon = Material("entities/att/ur_spas/barrel_std.png", "smooth mips") + +att.SortOrder = 21.5 +att.Slot = "ur_spas12_barrel" +att.AutoStats = true + +att.Override_Firemodes = { + { + Mode = 2, + PrintName = "fcg.slam", + Override_ManualAction = true, + Mult_AccuracyMOA = 0.8, + Mult_HipDispersion = 0.8, + }, + { + Mode = 1, + PrintName = "ur.spas12.dbl", + Override_ManualAction = true, + Mult_AccuracyMOA = 1.15, + Mult_HipDispersion = 0.8, + + Mult_Num = 2, + Override_AmmoPerShot = 2, + Mult_Damage = 2, + Mult_DamageMin = 2, + Mult_Recoil = 1.5, + CustomBars = "--___", + --Mult_CycleTime = 1.13 + }, + { + Mode = 0, + }, +} +att.Override_Firemodes_Priority = 1 + +att.Hook_GetShootSound = function(wep,sound) + if wep:GetCurrentFiremode().Override_AmmoPerShot == 2 then + return "arccw_uc/common/gl_fire_buck.ogg" + end +end +att.Hook_GetDistantShootSound = function(wep,sound) + if wep:GetCurrentFiremode().Override_AmmoPerShot == 2 then + --return "arccw_uc/common/gl_fire_buck_dist.ogg" + end +end +-- Overwritten by weapon's hook + +att.Hook_SelectCycleAnimation = function(wep,curanim) + if wep:GetCurrentFiremode().Override_AmmoPerShot == 2 then + return "cycle_2bst" + end +end + +att.Hook_SelectFireAnimation = function(wep,curanim) + if wep:GetCurrentFiremode().Override_AmmoPerShot == 2 then + return "fire_2bst" + end +end + + +att.Mult_CycleTime = 1.15 +att.Override_ActivePos = Vector(0.75, 0.5, -0.2) --Vector(1, -3, 0) +att.Override_ActivePos_Priority = 10 + +att.Override_ReloadPos = Vector(0.75, 0.5, -0.2) --Vector(1, -3, 0) +att.Override_ReloadPos_Priority = 10 + +att.ActivateElements = {"uc_spas_slam"} +att.GivesFlags = {"freeman"} -- only activates if a manual action shell type is used \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_spas12_barrel_short.lua b/lua/arccw/shared/attachments/ur_spas12_barrel_short.lua new file mode 100644 index 0000000..f5ce4ad --- /dev/null +++ b/lua/arccw/shared/attachments/ur_spas12_barrel_short.lua @@ -0,0 +1,21 @@ +att.PrintName = "18\" SPAS-12 Compact Barrel" +att.AbbrevName = "18\" Compact Barrel" +att.Icon = Material("entities/att/acwatt_ud_m1014_barrel_short.png", "smooth mips") +att.Description = "Rare short barrel intended for breaching and close quarters use. Noticeably increases pellet spread, but is easier to manuver." +att.Icon = Material("entities/att/ur_spas/barrel_short.png", "smooth mips") +att.Slot = "ur_spas12_barrel" + +att.SortOrder = 18 + +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.Add_BarrelLength = -4 \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_spas12_barrel_sport.lua b/lua/arccw/shared/attachments/ur_spas12_barrel_sport.lua new file mode 100644 index 0000000..328e277 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_spas12_barrel_sport.lua @@ -0,0 +1,39 @@ +att.PrintName = "22.5\" SPAS-12 Competition Kit" +att.AbbrevName = "22.5\" Competition Kit" +att.Icon = Material("entities/att/acwatt_ud_m1014_barrel.png", "smooth mips") +att.Description = "Aftermarket sporting kit that replaces the stock forend, handguard, and barrel. The removal of the semi-automatic gas system and integrated compensator greatly improves weapon overall performance." +att.Desc_Cons = { + "uc.nomuzzle", + "ur.spas12.pump" +} +att.Icon = Material("entities/att/ur_spas/barrel_comp.png", "smooth mips") + +att.Override_Firemodes = { + { + Mode = 1, + PrintName = "fcg.pump", + Override_ManualAction = true, + }, + +} +att.Override_Firemodes_Priority = 1 + +att.Slot = "ur_spas12_barrel" + +att.SortOrder = 22.5 + +att.AutoStats = true +att.Add_BarrelLength = 1 + +att.Mult_RecoilSide = 0.85 +att.Mult_Recoil = 0.75 +att.Mult_Sway = 1.2 + +att.Mult_AccuracyMOA = 0.85 +att.Mult_RangeMin = 1.5 +att.Mult_CycleTime = 0.9 + +att.ActivateElements = {"ud_autoshotgun_barrel_sport"} +att.GivesFlags = {"nomuzzle"} + +att.Ignore = true \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_spas12_charm_fear.lua b/lua/arccw/shared/attachments/ur_spas12_charm_fear.lua new file mode 100644 index 0000000..c1c7c03 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_spas12_charm_fear.lua @@ -0,0 +1,21 @@ +att.PrintName = "Fear" +att.Icon = Material("entities/att/acwatt_ur_spas12_charm_fear.png", "smooth mips") +att.Description = "You are so cool." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { + "uc.cosmetic" +} +att.Slot = "ur_spas12_charm" + +att.AutoStats = true +att.SortOrder = 999 + +att.Override_ActivePos = Vector(-1, 1, -2) + +att.Free = true +att.IgnorePickX = true + +att.Ignore = false \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_spas12_charm_rail.lua b/lua/arccw/shared/attachments/ur_spas12_charm_rail.lua new file mode 100644 index 0000000..2c1d6da --- /dev/null +++ b/lua/arccw/shared/attachments/ur_spas12_charm_rail.lua @@ -0,0 +1,12 @@ +att.PrintName = "Modern Rail Mount" +--att.Icon = Material("entities/att/aksidemount.png", "smooth mips") +att.Description = "As if this thing wasn't imposing enough." +att.Desc_Neutrals = { + "uc.cosmetic", +} +att.Icon = Material("entities/att/ur_spas/modernmount.png", "smooth mips") +att.Slot = "ur_spas12_charm" + +att.ActivateElements = {"rail_modern"} + +att.SortOrder = 998 \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_spas12_stock_full.lua b/lua/arccw/shared/attachments/ur_spas12_stock_full.lua new file mode 100644 index 0000000..9da1b35 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_spas12_stock_full.lua @@ -0,0 +1,15 @@ +att.PrintName = (GetConVar("arccw_truenames"):GetBool() and "SPAS-12 Fixed Polymer Stock") or "Martello 12/70 Fixed Polymer Stock" +att.AbbrevName = "Fixed Stock" +att.Icon = Material("entities/att/acwatt_ud_m1014_stock_in.png", "smooth mips") +att.Description = "Solid, non-adjustable polymer stock designed specifically for the civilian market. Provides a better brace at the cost of combat mobility." +att.Icon = Material("entities/att/ur_spas/stock_full.png", "smooth mips") +att.Slot = "ur_spas12_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 \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_spas12_stock_in.lua b/lua/arccw/shared/attachments/ur_spas12_stock_in.lua new file mode 100644 index 0000000..584cc58 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_spas12_stock_in.lua @@ -0,0 +1,53 @@ +att.PrintName = "Folded Stock" +att.Icon = Material("entities/att/ur_spas/stock_fold.png", "smooth mips") +att.Description = [[Folding the 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. + +Contrary to some depictions, the stock obstructs iron sights when folded.]] +att.Desc_Pros = { +} +att.Desc_Cons = { + "ur.spas12.folded", +} +att.Desc_Neutrals = { +} +att.Slot = "ur_spas12_stock" +att.AttachSound = "arccw_uc/common/stockslide.ogg" + +att.AutoStats = true +att.Free = true +att.IgnorePickX = true + +att.Mult_Recoil = 1.2 +att.Mult_RecoilSide = 1.5 + +att.Mult_SightedSpeedMult = 1.1 +att.Mult_ShootSpeedMult = 1.1 +att.Mult_SightTime = 0.5 + +att.Mult_Sway = 2 +att.Add_BarrelLength = -12 + +att.Override_IronSightStruct = { + Pos = Vector(-1.1, -2, -1.1), + Ang = Angle(3, 1.5, 0), + Magnification = 1.075, + SwitchToSound = "", + CrosshairInSights = true, +} + +--[[att.Hook_TranslateAnimation = function(wep,anim) + if string.StartWith(anim,"sgreload") then + return anim .. "_fold" + end +end]] + +att.Override_HoldtypeActive = "shotgun" +att.Override_HoldtypeSights = "ar2" + +att.A_Hook_Add_SightsDispersion = function(wep, data) + if data and !wep.Attachments[1].Installed then + data.add = data.add + 75 + end +end + +att.GivesFlags = {"spas12_foldstock"} \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_spas12_stock_none.lua b/lua/arccw/shared/attachments/ur_spas12_stock_none.lua new file mode 100644 index 0000000..58f2648 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_spas12_stock_none.lua @@ -0,0 +1,29 @@ +att.PrintName = "No Stock" +att.Icon = Material("entities/att/ur_spas/grip_std.png", "smooth mips") +att.Description = "A real theoretical physicist won't need this." +att.Desc_Pros = { +} +att.Desc_Cons = { +} +att.Desc_Neutrals = { +} +att.Slot = "ur_spas12_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.4 +att.Mult_RecoilSide = 2 + +att.Mult_SightedSpeedMult = 1.2 +att.Mult_ShootSpeedMult = 1.15 + +att.Add_BarrelLength = -12 +att.Mult_Sway = 3 \ No newline at end of file diff --git a/lua/arccw/shared/attachments/ur_spas12_tube_reduced.lua b/lua/arccw/shared/attachments/ur_spas12_tube_reduced.lua new file mode 100644 index 0000000..416f961 --- /dev/null +++ b/lua/arccw/shared/attachments/ur_spas12_tube_reduced.lua @@ -0,0 +1,21 @@ +att.PrintName = "Martello 12/70 6 Shell Tube" +att.AbbrevName = "6 Shell Tube" + +if GetConVar("arccw_truenames"):GetBool() then + att.PrintName = "SPAS-12 6 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.Icon = Material("entities/att/ur_spas/magsmall.png", "smooth mips") +att.Slot = "ur_spas12_tube" + +att.AutoStats = true + +att.Override_ClipSize = 6 +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/languages/ur_en.lua b/lua/arccw/shared/languages/ur_en.lua new file mode 100644 index 0000000..560cc37 --- /dev/null +++ b/lua/arccw/shared/languages/ur_en.lua @@ -0,0 +1,35 @@ +L = {} + +L["ur.compen"] = "+50% Visual recoil" +L["ur.deagle.410.1"] = "Fires 4 pellets instead of one round" +L["ur.deagle.410.2"] = "35MOA Imprecision" + +L["ur.ak.12g.1"] = "Fires 8 pellets instead of one round" +L["ur.ak.12g.2"] = "40MOA Imprecision" +L["ur.ak.alpha"] = "Optics become mounted on the upper rail instead of a rail adapter." +L["ur.ak.tl.1"] = "Mount tactical lasers on a rail adapter instead of the handguard." +L["ur.ak.tl.2"] = "The sight is changed to a point shooting stance." +L["ur.ak.burst"] = "Two-round burst mode" + +L["ur.ak.userail"] = "Use a railed dust cover for a modern rear sight aperture." + +L["ur.aw.velocity"] = "Increased muzzle velocity" + +L["ur.mp5.noburst"] = "Disables burst mode" +L["ur.mp5.sd"] = "No distant firing sound" + +L["ur.spas12.pump"] = "Manual action only" +L["ur.spas12.dbl"] = "2-round burst" +L["ur.spas12.dbl.abbrev"] = "2-BST" +L["ur.spas12.folded"] = "Cannot use optics or iron sights" + +L["ur.329.sact"] = "Single-action" +L["ur.329.sact.abbrev"] = "SACT" +L["ur.329.dact"] = "Double-action" +L["ur.329.dact.abbrev"] = "DACT" + +L["ur.329.snakeshot.1"] = "Fires 4 pellets instead of one round" +L["ur.329.snakeshot.2"] = "Disables Ammo Type attachments" +L["ur.329.snakeshot.3"] = "65MOA Base imprecision" + +L["ur.g3.8"] = "Accepts MP5 handguards" \ No newline at end of file diff --git a/lua/arccw/shared/sh_1_ur.lua b/lua/arccw/shared/sh_1_ur.lua new file mode 100644 index 0000000..6cba12d --- /dev/null +++ b/lua/arccw/shared/sh_1_ur.lua @@ -0,0 +1,3 @@ +ArcCW.UR = {} + +ArcCW.UR.AKCalFlags = {"cal_545","cal_9mm","cal_12g","cal_366", "cal_308", "cal_556"} \ No newline at end of file diff --git a/lua/weapons/arccw_ur_329.lua b/lua/weapons/arccw_ur_329.lua new file mode 100644 index 0000000..368c510 --- /dev/null +++ b/lua/weapons/arccw_ur_329.lua @@ -0,0 +1,587 @@ +SWEP.Base = "arccw_base" +SWEP.Spawnable = true +SWEP.Category = "ArcCW - Urban Coalition" +SWEP.UC_CategoryPack = "2Urban Renewal" +SWEP.AdminOnly = false +SWEP.UseHands = true + +-- Muzzle and shell effects -- + +SWEP.MuzzleEffect = "muzzleflash_pistol_deagle" +SWEP.ShellEffect = "arccw_uc_shelleffect" +SWEP.ShellModel = "models/weapons/arccw/uc_shells/50ae.mdl" +SWEP.ShellScale = 1 +SWEP.UC_ShellColor = Color(0.7*255, 0.2*255, 0.2*255) + +SWEP.MuzzleEffectAttachment = 1 +SWEP.CaseEffectAttachment = 2 +SWEP.TracerNum = 1 +SWEP.TracerWidth = 1 +SWEP.ShootPitch = 100 + +-- Fake name -- + +SWEP.PrintName = "Enforcement .44" + +-- True name -- + +SWEP.TrueName = "Model 329PD" + +-- Trivia -- + +SWEP.Trivia_Class = "Revolver" +SWEP.Trivia_Desc = [[Though commonly viewed as archaic, revolvers maintain a large following today for their reliability, accuracy, and evocative sentiment. This model was famously "the most powerful handgun in the world" at its time, though its usurpers have not changed the fact that it packs a mean punch. + +Has a heavy trigger pull. Single-action mode removes trigger delay and increases accuracy, but requires manual cocking of the hammer.]] +SWEP.Trivia_Manufacturer = "Sneed & Walwakashi" +SWEP.Trivia_Calibre = ".44 Magnum" +SWEP.Trivia_Mechanism = "Double-Action" +SWEP.Trivia_Country = "USA" +SWEP.Trivia_Year = 1955 + +-- Weapon slot -- + +SWEP.Slot = 1 + +-- Weapon's manufacturer real name -- + +if GetConVar("arccw_truenames"):GetBool() then + SWEP.PrintName = SWEP.TrueName + SWEP.Trivia_Manufacturer = "Smith & Wesson" +end + +-- Viewmodel / Worldmodel / FOV -- + +SWEP.ViewModel = "models/weapons/arccw/c_ur_329pd.mdl" +SWEP.WorldModel = "models/weapons/arccw/c_ur_329pd.mdl" +SWEP.ViewModelFOV = 70 +SWEP.AnimShoot = ACT_HL2MP_GESTURE_RANGE_ATTACK_REVOLVER + +-- Damage parameters -- + +SWEP.Damage = 75 -- 2 shot close range kill +SWEP.DamageMin = 16 -- 7 shot long range kill +SWEP.RangeMin = 10 +SWEP.Range = 160 +SWEP.Penetration = 10 +SWEP.DamageType = DMG_BULLET +SWEP.ShootEntity = nil +SWEP.MuzzleVelocity = 470 +SWEP.PhysBulletMuzzleVelocity = 470 + +SWEP.BodyDamageMults = ArcCW.UC.BodyDamageMults + +-- Jamming -- + +SWEP.MalfunctionTakeRound = false +SWEP.MalfunctionMean = math.huge -- Theoretically it will never malfunction + +-- Mag size -- + +SWEP.ChamberSize = 0 +SWEP.Primary.ClipSize = 6 +SWEP.RejectMagSizeChange = true -- Signals to attachments that mag size shouldn't be changeable; needs to be implemented attachment-side with att.Compatible +SWEP.UC_CanManualAction = true -- In case this ever applies to anything other than shotguns + +-- Recoil -- + +SWEP.Recoil = 3 +SWEP.RecoilSide = 1 + +SWEP.RecoilRise = 0.5 +SWEP.VisualRecoilMult = 1.5 +SWEP.MaxRecoilBlowback = 2 +SWEP.MaxRecoilPunch = 6 + +SWEP.Sway = 1.1 + +-- Firerate / Firemodes -- + +SWEP.TriggerDelay = true + +SWEP.Delay = 0.25 +SWEP.Num = 1 +SWEP.FiremodeSound = false +SWEP.Firemodes = { + { + Mode = 1, + PrintName = "ur.329.dact", + }, + { + Mode = 1, + PrintName = "ur.329.sact", + Override_ManualAction = true, + Mult_AccuracyMOA = 0.5, + Mult_HipDispersion = (1/3), + Mult_MoveDispersion = (1/3), + Mult_ShootSpeedMult = 3, + Override_TriggerDelay = false, + }, + { + Mode = 0, + PrintName = "fcg.safe2", + } +} + +SWEP.ShootPitch = 100 +SWEP.ShootVol = 120 + +SWEP.ProceduralRegularFire = false +SWEP.ProceduralIronFire = false + +SWEP.ReloadInSights = false -- can't in mw and can't here + +-- NPC -- + +SWEP.NPCWeaponType = "weapon_357" +SWEP.NPCWeight = 70 + +-- Accuracy -- + +SWEP.AccuracyMOA = 2 +SWEP.HipDispersion = 500 +SWEP.MoveDispersion = 250 +SWEP.JumpDispersion = 1000 + +SWEP.Primary.Ammo = "357" +SWEP.MagID = "deagle" + +-- Speed multipliers -- + +SWEP.SpeedMult = 0.95 +SWEP.SightedSpeedMult = 0.9 +SWEP.SightTime = 0.25 +SWEP.ShootSpeedMult = 0.8 + +-- Length -- + +SWEP.BarrelLength = 12 +SWEP.ExtraSightDist = 10 + +-- Ironsights / Customization / Poses -- + +SWEP.HoldtypeHolstered = "normal" +SWEP.HoldtypeActive = "revolver" +SWEP.HoldtypeSights = "revolver" + +SWEP.IronSightStruct = { + Pos = Vector(-2.7, 2, 0.733), + Ang = Angle(0, 0, 0), + Magnification = 1, + SwitchToSound = "", + ViewModelFOV = 55, +} + +SWEP.ActivePos = Vector(0, 2, 0.9) +SWEP.ActiveAng = Angle(0, 0, -1) + +SWEP.CustomizePos = Vector(2, 0, -1.5) +SWEP.CustomizeAng = Angle(15, 15, 05) + +SWEP.CrouchPos = Vector(-2.2, 1, 0.6) +SWEP.CrouchAng = Angle(0, 0, -14) + +SWEP.HolsterPos = Vector(-1, 2, 1) +SWEP.HolsterAng = Angle(-15.5, 2, -4) + +SWEP.SprintPos = Vector(0.3, 1, 0) +SWEP.SprintAng = Angle(-3, 9, -12) + +SWEP.MirrorVMWM = true +SWEP.WorldModelOffset = { + pos = Vector(-7.5, 4, -4.5), + ang = Angle(-6, 0, 180), + bone = "ValveBiped.Bip01_R_Hand", +} + +-- Weapon sounds -- + +local path = ")weapons/arccw_ur/sw329/" +local path1 = ")weapons/arccw_ur/sw586/" +local path2 = ")weapons/arccw_ur/1911/" +local common = ")/arccw_uc/common/" +local rottle = {common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"} + +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-01.ogg", + path1 .. "fire-02.ogg", + path1 .. "fire-03.ogg", + path1 .. "fire-04.ogg", + path1 .. "fire-05.ogg", + path1 .. "fire-06.ogg" +} + +SWEP.DistantShootSound = nil +SWEP.DistantShootSoundSilenced = nil +SWEP.ShootDrySound = {common .. "revolver_hammer-01.ogg", common .. "revolver_hammer-02.ogg", common .. "revolver_hammer-03.ogg"} + +local tail = ")/arccw_uc/common/357mag/" + +SWEP.DistantShootSoundOutdoors = { + tail .. "fire-dist-357mag-pistol-ext-01.ogg", + tail .. "fire-dist-357mag-pistol-ext-02.ogg", + tail .. "fire-dist-357mag-pistol-ext-03.ogg", + tail .. "fire-dist-357mag-pistol-ext-04.ogg", + tail .. "fire-dist-357mag-pistol-ext-05.ogg", + tail .. "fire-dist-357mag-pistol-ext-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" +} +SWEP.DistantShootSoundOutdoorsSilenced = { + 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.DistantShootSoundIndoorsSilenced = { + 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" +} +SWEP.DistantShootSoundOutdoorsVolume = 1 +SWEP.DistantShootSoundIndoorsVolume = 0.75 +SWEP.Hook_AddShootSound = ArcCW.UC.InnyOuty + +-- Bodygroups -- + +SWEP.BulletBones = { + [1] = "Bullet1", [2] = "Bullet2", [3] = "Bullet3", [4] = "Bullet4", [5] = "Bullet5", [6] = "Bullet6" +} + +SWEP.DefaultBodygroups = "000000000" + +SWEP.AttachmentElements = { + ["ur_329_barrel_m29"] = { + VMBodygroups = { { ind = 1, bg = 1 } }, + NameChange = "Thunderbolt .44", + TrueNameChange = "Model 29" + }, + ["ur_329_barrel_master"] = { + VMBodygroups = { { ind = 1, bg = 2 } }, + NameChange = "Thunderbolt .44 Master", + TrueNameChange = "Model 29" + }, + ["ur_329_barrel_pocket"] = { + VMBodygroups = { { ind = 1, bg = 3 } }, + NameChange = "Companion .44", + TrueNameChange = "Model 629" + } +} + +-- Animations -- + +SWEP.Hook_Think = ArcCW.UC.ADSReload +SWEP.RevolverReload = true + +SWEP.Hook_TranslateAnimation = function(wep,anim) + if wep:GetCurrentFiremode().Override_ManualAction and anim == "fire_dry" then + return "fire_dry_sact" + end + if wep:GetCurrentFiremode().Override_ManualAction and anim ~= "fire" and (anim ~= "reload" or !wep:GetNeedCycle()) then + return anim .. "_cocked" + end +end + +local hamr = {common .. "revolver_hammer-01.ogg", common .. "revolver_hammer-02.ogg", common .. "revolver_hammer-03.ogg"} + +SWEP.Animations = { + ["idle"] = { + Source = "idle", + Time = 3, + }, + ["idle_cocked"] = { + Source = "idle_cocked", + Time = 3, + }, + ["ready"] = { + Source = "deploy", + Time = 86 / 60, + SoundTable = { + {s = path2 .. "draw.ogg", t = 0}, + { s = path1 .. "cylinder_in.ogg", t = 0.2 }, + {s = common .. "raise.ogg", t = 0.55}, + }, + }, + ["draw"] = { + Source = "draw", + Time = 0.7, + MinProgress = .4, + SoundTable = { + {s = path2 .. "draw.ogg", t = 0}, -- Not Temporary + {s = common .. "raise.ogg", t = 0.05}, + }, + }, + ["draw_cocked"] = { + Source = "draw_cocked", + Time = 0.7, + MinProgress = .4, + SoundTable = { + {s = path2 .. "draw.ogg", t = 0}, -- Not Temporary + {s = common .. "raise.ogg", t = 0.05}, + }, + }, + ["holster"] = { + Source = "holster", + Time = 0.5, + SoundTable = { + {s = common .. "cloth_2.ogg", t = 0}, + {s = path2 .. "holster.ogg", t = 0.12}, -- Not Temporary + }, + }, + ["holster_cocked"] = { + Source = "holster_cocked", + Time = 0.5, + SoundTable = { + {s = common .. "cloth_2.ogg", t = 0}, + {s = path2 .. "holster.ogg", t = 0.12}, -- Not Temporary + }, + }, + + ["fire"] = { + Source = "fire", + SoundTable = { + { s = hamr, t = 0, v = .25 }, + { s = {common .. "revolver_hammer-01.ogg", common .. "revolver_hammer-02.ogg", common .. "revolver_hammer-03.ogg"}, t = 0, v = 0.75 } + }, + MinProgress = .2, + }, + ["fire_iron"] = { + Source = "fire", + SoundTable = { + { s = hamr, t = 0, v = 1 }, + { s = {common .. "revolver_hammer-01.ogg", common .. "revolver_hammer-02.ogg", common .. "revolver_hammer-03.ogg"}, t = 0 } + }, + MinProgress = .2, + }, + ["fire_dry"] = { + Source = "dryfire", + SoundTable = { + { s = hamr, t = 0 } + }, + }, + ["fire_dry_sact"] = { + Source = "dryfire_sact", + SoundTable = { + { s = hamr, t = 0 }, + { s = common .. "revolver_cock.ogg", t = 0.35 } + }, + }, + + ["trigger"] = { + Source = "trigger", + Time = 0.1, + SoundTable = { + { s = { common .. "revolver_trigger-01.ogg", common .. "revolver_trigger-02.ogg", common .. "revolver_trigger-03.ogg" }, t = 0 } + }, + }, + + ["cycle"] = { + Source = "cocking", + Time = 1, + MinProgress = 0.25, + SoundTable = { + { s = common .. "revolver_cock.ogg", t = 0.1 } + } + }, + + ["fix"] = { + Source = "cocking", + Time = 1, + MinProgress = 0.5, + SoundTable = { + { s = common .. "revolver_cock.ogg", t = 0.1 } + } + }, + + ["1_to_2"] = { + Source = "cocking", + Time = 1, + SoundTable = { + { s = common .. "revolver_cock.ogg", t = 0.1 } + } + }, + ["2_to_1"] = { + Source = "decocking", + SoundTable = { + { s = common .. "revolver_trigger-02.ogg", t = 0.1 } + } + }, + ["2_to_3"] = { + Source = "decocking", + Time = 0.8, + SoundTable = { + { s = common .. "revolver_trigger-02.ogg", t = 0.1 } + } + }, + + ["reload"] = { + Source = "reload", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_REVOLVER, + Time = 3.0, + MinProgress = 1.8, + ShellEjectAt = 1, + LHIK = true, + LHIKIn = 0.2, + LHIKEaseIn = 0.2, + LHIKEaseOut = 0.6, + LHIKOut = 0.62, + SoundTable = { + { s = rottle, t = 0 }, + { s = path .. "cyl_latch.ogg", t = 0.1 }, + { s = path1 .. "cylinder_out.ogg", t = 0.2 }, + { s = path1 .. "extractor1.ogg", t = 0.65 }, + { s = path1 .. "extract1.ogg", t = 0.65, p = 110, v = 0.25 }, + { s = path1 .. "extractor2.ogg", t = 0.75, p = 110 }, + { s = path1 .. "cylinder_extract.ogg", t = 0.75 }, + { s = path1 .. "extractor2.ogg", t = 0.825 }, + { s = common .. "magpouch_pull_small.ogg", t = 1.2, v = 0.2 }, + { s = path1 .. "speedloader.ogg", t = 1.65 }, + { s = path1 .. "cylinder_in.ogg", t = 2.15 }, + { s = rottle, t = 2.4 }, + }, + }, + ["reload_cocked"] = { + Source = "reload_cocked", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_REVOLVER, + Time = 3.0, + MinProgress = 1.8, + ShellEjectAt = 1, + LHIK = true, + LHIKIn = 0.2, + LHIKEaseIn = 0.2, + LHIKEaseOut = 0.6, + LHIKOut = 0.62, + SoundTable = { + { s = rottle, t = 0 }, + { s = path .. "cyl_latch.ogg", t = 0.1 }, + { s = path1 .. "cylinder_out.ogg", t = 0.2 }, + { s = path1 .. "extractor1.ogg", t = 0.65 }, + { s = path1 .. "extract1.ogg", t = 0.65, p = 110, v = 0.25 }, + { s = path1 .. "extractor2.ogg", t = 0.75, p = 110 }, + { s = path1 .. "cylinder_extract.ogg", t = 0.75 }, + { s = path1 .. "extractor2.ogg", t = 0.825 }, + { s = common .. "magpouch_pull_small.ogg", t = 1.2, v = 0.2 }, + { s = path1 .. "speedloader.ogg", t = 1.65 }, + { s = path1 .. "cylinder_in.ogg", t = 2.15 }, + { s = rottle, t = 2.4 }, + }, + }, +} + +-- Attachments -- + +SWEP.CamAttachment = 3 + +SWEP.Attachments = { + { + PrintName = "Optic", + Slot = {"optic_lp"}, + DefaultAttName = "Iron Sights", + Bone = "Body", + Offset = { + vpos = Vector(3, -3.6, 0), + vang = Angle(0, 0, -90), + }, + }, + { + PrintName = "Barrel", + Slot = {"ur_329_barrel"}, + DefaultAttIcon = Material("entities/att/acwatt_ur_329_barrel.png","mips smooth"), + DefaultAttName = "4\" Snubnose Barrel", + Bone = "Body", + Offset = { + vpos = Vector(3.07, -3.8, -27), + vang = Angle(90, 0, -90), + }, + }, + { + PrintName = "Caliber", + Slot = {"ur_329_caliber"}, + DefaultAttIcon = Material("entities/att/uc_bullets/44magnum.png","mips smooth"), + DefaultAttName = ".44 Magnum", + Bone = "Body", + Offset = { + vpos = Vector(3.07, -3.8, -27), + vang = Angle(90, 0, -90), + }, + }, + { + PrintName = "Tactical", + InstalledEles = {"tac_rail"}, + Slot = {"tac_pistol"}, + Bone = "Body", + Offset = { + vpos = Vector(6.75, -2.5, 0), + vang = Angle(0, 0, -90), + }, + }, + { + PrintName = "Grip", + Slot = {"ur_329_grip", "uc_stock", "go_stock_pistol_bt"}, + Bone = "Body", + Offset = { + vpos = Vector(-2, 2, 0), + vang = Angle(0, 0, -90), + }, + }, + --[[] + { + PrintName = "Grip", + DefaultAttName = "Factory Grip", + DefaultAttIcon = Material("entities/att/acwatt_ur_329_grip.png","mips smooth"), + Slot = "ur_329_grip" + }, + ]] + { + PrintName = "Ammo Type", + DefaultAttName = "\"FMJ\" Full Metal Jacket", + DefaultAttIcon = Material("entities/att/arccw_uc_ammo_generic.png", "mips smooth"), + Slot = "uc_ammo", + ExcludeFlags = {"329_ss"} + }, + { + 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 = "Body", + Offset = { + vpos = Vector(7.1, -2.4, -0.1), + vang = Angle(0, 0, -90), + }, + VMScale = Vector(.75,.75,.75), + }, +} \ No newline at end of file diff --git a/lua/weapons/arccw_ur_ak.lua b/lua/weapons/arccw_ur_ak.lua new file mode 100644 index 0000000..7ae3621 --- /dev/null +++ b/lua/weapons/arccw_ur_ak.lua @@ -0,0 +1,1561 @@ +SWEP.Base = "arccw_base" +SWEP.Spawnable = true -- this obviously has to be set to true +SWEP.Category = "ArcCW - Urban Coalition" -- edit this if you like +SWEP.UC_CategoryPack = "2Urban Renewal" +SWEP.AdminOnly = false + +SWEP.PrintName = "KF-67" +SWEP.TrueName = "AKM" + +if GetConVar("arccw_truenames"):GetBool() then + SWEP.PrintName = SWEP.TrueName +end + +local descStart = "One of the first assault rifles, wielded around the world to this day for its cheap price, quick production, ease of maintenance, and infallible reliability. Consequently, it has become the most popular rifle ever; a constant of freedom fighters and third-world armies virtually everywhere. One fifth of all small arms in existence can be traced to this design.\n\n" +local desc_762 = "The default pattern is well-rounded and hard-hitting, but kicks harder than other weapons of its class." +local desc_545 = "With a heavier frame than other service rifles, the AK-74 platform is accurate and easy to control." +local desc_74u = "This PDW variant sacrifices range and control to fit the power of a rifle into a very compact form." +local desc_9mm = "Well-rounded submachine gun that shares common parts with AK rifles. For its widespread use by a variety of security divisions, it can be described as a Russian counterpart to the MP5.\n\nThe moniker \"Vityaz\" translates to \"knight.\"" +local desc_12g = "Magazine-fed semi automatic shotgun based on the Kalashnikov pattern. It is a popular civilian weapon due to the comparative simplicity of Russia's smoothbore gun licenses, but it has also been used by security firms around the world.\n\nIts low accuracy is compensated for by a much faster reload time than tube-fed designs." +local desc_556 = "This international variant has a lower damage output than the Russian cartridges, but boasts substantially lower recoil." +local desc_366 = "AK-pattern shotgun chambered in .366 TKM, a sporting cartridge that uses reshaped M43 casings. It is considered a shotgun because of its smoothbore barrel, a change made to circumvent Russian rifle laws. Despite the lack of rifling, it achieves similar ballistics to a proper AK-47." + +SWEP.Trivia_Class = "Assault Rifle" +SWEP.Trivia_Desc = descStart .. desc_762 +SWEP.Trivia_Manufacturer = "Izhmash" +SWEP.Trivia_Calibre = "7.62x39mm Soviet" +SWEP.Trivia_Mechanism = "Gas-Operated Rotating Bolt" +SWEP.Trivia_Country = "Soviet Union" +SWEP.Trivia_Year = 1959 + +SWEP.Slot = 2 +SWEP.CamAttachment = 3 + +SWEP.UseHands = true + +SWEP.ViewModel = "models/weapons/arccw/c_ur_ak.mdl" +SWEP.WorldModel = "models/weapons/arccw/c_ur_ak.mdl" +SWEP.ViewModelFOV = 70 + +SWEP.DefaultBodygroups = "010000800120" + +-- Damage -- + +SWEP.Damage = 50 -- 2 shot close range kill +SWEP.DamageMin = 25 -- 4 shot long range kill +SWEP.RangeMin = 30 +SWEP.Range = 300 -- 3 shot until ~170m +SWEP.Penetration = 16 +SWEP.DamageType = DMG_BULLET +SWEP.ShootEntity = nil +SWEP.MuzzleVelocity = 715 +SWEP.PhysBulletMuzzleVelocity = 715 + +SWEP.BodyDamageMults = ArcCW.UC.BodyDamageMults + +-- Mag size -- + +SWEP.ChamberSize = 1 +SWEP.Primary.ClipSize = 30 +SWEP.ExtendedClipSize = 40 +SWEP.ReducedClipSize = 15 + +-- Recoil -- + +SWEP.Recoil = 0.75 +SWEP.RecoilSide = 0.3 + +SWEP.RecoilRise = 0.6 +SWEP.RecoilPunch = 1 +SWEP.VisualRecoilMult = 1 +SWEP.MaxRecoilBlowback = 1 +SWEP.MaxRecoilPunch = 1 +SWEP.RecoilPunchBack = 2 + +SWEP.Sway = 0.6 + +-- Firerate / Firemodes -- + +SWEP.Delay = 60 / 600 +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 = 5 +SWEP.HipDispersion = 800 +SWEP.MoveDispersion = 250 +SWEP.JumpDispersion = 1000 + +SWEP.Primary.Ammo = "ar2" +SWEP.MagID = "ak" + +SWEP.HeatCapacity = 75 +SWEP.HeatDissipation = 15 +SWEP.HeatDelayTime = 3 + +-- SWEP.Malfunction = true +SWEP.MalfunctionMean = 200 +--SWEP.MeleeTime = 1.5 + +-- Speed multipliers -- + +SWEP.SpeedMult = 0.9 +SWEP.SightedSpeedMult = 0.75 +SWEP.SightTime = 0.35 +SWEP.ShootSpeedMult = 0.75 + +local path = ")weapons/arccw_ur/ak/" +local path1 = ")weapons/arccw_ur/mp5/" +local common = ")/arccw_uc/common/" +local rottle = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"} +local ratel = {common .. "rattle1.ogg", common .. "rattle2.ogg", common .. "rattle3.ogg"} +local rutle = {common .. "movement-rifle-01.ogg",common .. "movement-rifle-02.ogg",common .. "movement-rifle-03.ogg",common .. "movement-rifle-04.ogg"} +--SWEP.FirstShootSound = path .. "fire_first.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" +} +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/762x39/" + +SWEP.DistantShootSoundOutdoors = { + 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" +} +SWEP.DistantShootSoundIndoors = { + tail .. "fire-dist-762x39-rif-int-01.ogg", + tail .. "fire-dist-762x39-rif-int-02.ogg", + tail .. "fire-dist-762x39-rif-int-03.ogg", + tail .. "fire-dist-762x39-rif-int-04.ogg", + tail .. "fire-dist-762x39-rif-int-05.ogg", + tail .. "fire-dist-762x39-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 + +SWEP.MuzzleEffect = "muzzleflash_6" +SWEP.ShellEffect = "arccw_uc_shelleffect" +SWEP.ShellModel = "models/weapons/arccw/uc_shells/762x39.mdl" +SWEP.ShellPitch = 90 +SWEP.ShellScale = .666 +SWEP.ShellRotateAngle = Angle(0, 0, 0) +SWEP.UC_ShellColor = Color(0.7 * 255, 0.2 * 255, 0.2 * 255) + +SWEP.MuzzleEffectAttachment = 1 -- which attachment to put the muzzle on +SWEP.CaseEffectAttachment = 2 -- which attachment to put the case effect on + +SWEP.BulletBones = { + [1] = "tag_mag2", +} + +SWEP.IronSightStruct = { + Pos = Vector(-2.61, -2, 0.45), + Ang = Angle(0.60, 0.274, 5.53), + Magnification = 1.1, + SwitchToSound = "", -- sound that plays when switching to this sight + CrosshairInSights = false +} +SWEP.LaserOffsetAngle = Angle(0, 0, 0) +SWEP.LaserIronsAngle = Angle(0, 0, 0) + +SWEP.HoldtypeHolstered = "passive" +SWEP.HoldtypeActive = "ar2" +SWEP.HoldtypeSights = "rpg" + +SWEP.AnimShoot = ACT_HL2MP_GESTURE_RANGE_ATTACK_AR2 + +SWEP.ActivePos = Vector(0.5, 0, 0) +SWEP.ActiveAng = Angle(0, 0, 0) + +SWEP.SprintPos = Vector(0, 0, 0) +SWEP.SprintAng = Angle(0, 0, 0) + +SWEP.CrouchPos = Vector(-2, -2, -0.6) +SWEP.CrouchAng = Angle(0, 0, -14) + +SWEP.HolsterPos = Vector(-1, -1, 1.2) +SWEP.HolsterAng = Angle(-15, 8, -10) + +SWEP.BarrelOffsetSighted = Vector(0, 0, 0) +SWEP.BarrelOffsetHip = Vector(0, 0, 0) + +-- SWEP.CustomizePos = Vector(6.5, 0.8, -0.2) +-- SWEP.CustomizeAng = Angle(8, 22, 15) + +SWEP.CustomizePos = Vector(0, 0, 0) +SWEP.CustomizeAng = Angle(0, 0, 0) + +SWEP.BarrelLength = 24 + +SWEP.AttachmentElements = { + ["barrel_74m"] = { + VMBodygroups = {{ind = 1, bg = 3}} + }, + ["barrel_74m_red"] = { + VMBodygroups = {{ind = 1, bg = 10}} + }, + ["barrel_74m_green"] = { + VMBodygroups = {{ind = 1, bg = 11}} + }, + ["barrel_akm"] = { + VMBodygroups = {{ind = 1, bg = 0}} + }, + ["barrel_alpha"] = { + VMBodygroups = { + {ind = 1, bg = 7}, + -- {ind = 7, bg = 6}, + -- {ind = 8, bg = 2}, + }, + }, + ["barrel_rpk"] = { + VMBodygroups = { + {ind = 7, bg = 1}, + {ind = 8, bg = 2} + }, + AttPosMods = {[4] = { + vpos = Vector(0, 32.2, 2.6), + vang = Angle(0, 270, 0), + }}, + Override_IronSightStruct = { + Pos = Vector(-2.625, -2, 0.68), + Ang = Angle(-0.1, 0.274, 5.53), + Magnification = 1, + } + }, + ["barrel_rpk74m"] = { + VMBodygroups = { + {ind = 1, bg = 5}, + -- {ind = 7, bg = 1}, + -- {ind = 8, bg = 2} + }, + -- AttPosMods = {[4] = { + -- vpos = Vector(0, 32.2, 2.6), + -- vang = Angle(0, 270, 0), + -- }}, + -- Override_IronSightStruct = { + -- Pos = Vector(-2.625, -2, 0.68), + -- Ang = Angle(-0.1, 0.274, 5.53), + -- Magnification = 1, + -- } + }, + ["barrel_krinkov"] = { + VMBodygroups = { + {ind = 1, bg = 6}, + {ind = 7, bg = 5}, + {ind = 8, bg = 2}, + {ind = 4, bg = 1}, + {ind = 5, bg = 1} + }, + AttPosMods = { + [4] = { + vpos = Vector(0, 15, 2.85), + vang = Angle(0, 270, 0), + }, + [7] = { + vpos = Vector(0,10,1.7), + vang = Angle(90, -90, -90), + SlideAmount = { + vmin = Vector(0,10,1.7), + vmax = Vector(0,10,1.7) + }, + }, + [8] = { + vpos = Vector(-0.8, 11.75, 2.9), + vang = Angle(-90, 270, 0), + wang = Angle(-90, 270, 0), + } + }, + Override_IronSightStruct = { + Pos = Vector(-2.638, -2, 0.9), + Ang = Angle(-1, 0.12, 5.53), + Magnification = 1, + } + }, + ["barrel_vityaz"] = { + VMBodygroups = { + {ind = 1, bg = 8}, + {ind = 7, bg = 5}, + {ind = 8, bg = 2}, + {ind = 5, bg = 1} + }, + AttPosMods = { + [4] = { + vpos = Vector(0, 16.5, 2.85), + vang = Angle(0, 270, 0), + }, + [7] = { + vpos = Vector(0,11,1.7), + vang = Angle(90, -90, -90), + SlideAmount = { + vmin = Vector(0,10,1.7), + vmax = Vector(0,11,1.7) + }, + }, + [8] = { + vpos = Vector(-0.8, 11.75, 2.9), + vang = Angle(-90, 270, 0), + wang = Angle(-90, 270, 0), + } + }, + Override_IronSightStruct = { + Pos = Vector(-2.62, -2, 0.75), + Ang = Angle(-0.42, 0.2, 5.53), + Magnification = 1, + } + }, + ["barrel_t56"] = { + VMBodygroups = { + {ind = 7, bg = 3}, + {ind = 11, bg = 2}, + {ind = 8, bg = 2} + }, + }, + ["barrel_t56_ext"] = { + VMBodygroups = { + {ind = 7, bg = 3}, + {ind = 11, bg = 3}, + {ind = 8, bg = 2} + }, + }, + ["barrel_vepr"] = { + VMBodygroups = { + --{ind = 1, bg = 9}, + {ind = 7, bg = 4}, + {ind = 8, bg = 2} + }, + AttPosMods = {[4] = { + vpos = Vector(0, 28.5, 2.7), + vang = Angle(0, 270, -0), + }}, + Override_IronSightStruct = { + Pos = Vector(-2.63, -2, 0.76), + Ang = Angle(-0.3, 0.18, 5.53), + Magnification = 1, + } + }, + + ["ur_ak_hg_vepr"] = { + VMBodygroups = { + {ind = 1, bg = 9}, + }, + }, + + ["barrel_105"] = { + VMBodygroups = { + --{ind = 1, bg = 3}, + {ind = 7, bg = 2}, + {ind = 8, bg = 2} + }, + AttPosMods = {[4] = { + vpos = Vector(0, 19.9, 2.7), + vang = Angle(0, 270, 0), + }}, + Override_IronSightStruct = { + Pos = Vector(-2.6, -2, 0.48), + Ang = Angle(0.6, 0.265, 5.53), + Magnification = 1, + } + }, + ["barrel_dong"] = { + VMBodygroups = {{ind = 1, bg = 2}}, -- This will show up regardless of barrel selection because underbarrel atts are always processed after barrel atts + AttPosMods = {[6] = { + SlideAmount = { + vmin = Vector(0,12,1.9), + vmax = Vector(0,12,1.9) + }, + }} + }, + + ["muzzle_akm"] = { + VMBodygroups = {{ind = 8, bg = 1}} + }, + ["muzzle_ak74"] = { + VMBodygroups = {{ind = 8, bg = 3}} + }, + ["muzzle_aku"] = { + VMBodygroups = {{ind = 8, bg = 6}} + }, + ["muzzle_bayonet"] = { + VMBodygroups = {{ind = 11, bg = 1}} + }, + + ["stock_alpha"] = { + VMBodygroups = { + {ind = 6, bg = 4}, + {ind = 3, bg = 1}, + } + + }, + ["stock_aks"] = { + VMBodygroups = { + {ind = 6, bg = 3}, + {ind = 3, bg = 1}, + } + }, + ["stock_aks_folded"] = { + VMBodygroups = { + {ind = 6, bg = 10}, + {ind = 3, bg = 1}, + } + + }, + ["stock_underfolder"] = { + VMBodygroups = {{ind = 6, bg = 2}} + }, + ["stock_underfolder_folded"] = { + VMBodygroups = {{ind = 6, bg = 1}} + }, + ["stock_ak74m"] = { + VMBodygroups = { + {ind = 3, bg = 1}, + {ind = 6, bg = 12} + } + }, + ["stock_ak74m_folded"] = { + VMBodygroups = { + {ind = 3, bg = 1}, + {ind = 6, bg = 13} + } + }, + ["stock_rpk"] = { + VMBodygroups = {{ind = 6, bg = 5}} + }, + ["stock_akn"] = { + VMBodygroups = {{ind = 6, bg = 0}} + }, + ["stock_skeletal"] = { + VMBodygroups = { + {ind = 6, bg = 6}, + {ind = 3, bg = 1}, + } + }, + ["stock_vepr"] = { + VMBodygroups = { + {ind = 6, bg = 7}, + {ind = 9, bg = 4} + } + }, + ["stock_none"] = { + VMBodygroups = { + {ind = 6, bg = 9}, + {ind = 3, bg = 1}, + } + }, + + ["mag_762_75"] = { + VMBodygroups = {{ind = 2, bg = 1}} + }, + ["mag_762_bakelite"] = { + VMBodygroups = {{ind = 2, bg = 11}} + }, + ["mag_762_pmag"] = { + VMBodygroups = {{ind = 2, bg = 12}} + }, + ["mag_545_30"] = { + VMBodygroups = {{ind = 2, bg = 2}} + }, + ["mag_556_30"] = { + VMBodygroups = {{ind = 2, bg = 10}} + }, + ["mag_545_45"] = { + VMBodygroups = {{ind = 2, bg = 3}} + }, + ["mag_9mm"] = { + VMBodygroups = {{ind = 2, bg = 4}} + }, + ["mag_12g"] = { + VMBodygroups = {{ind = 2, bg = 5}} + }, + ["mag_366"] = { + VMBodygroups = {{ind = 2, bg = 6}} + }, + + ["grip_akm"] = { + VMBodygroups = {{ind = 9, bg = 0}} + }, + ["grip_alpha"] = { + VMBodygroups = {{ind = 9, bg = 2}} + }, + ["grip_saiga"] = { + VMBodygroups = {{ind = 9, bg = 3}} + }, + + ["cover_ribbed"] = { + VMBodygroups = {{ind = 10, bg = 0}} + }, + ["cover_alpha"] = { + VMBodygroups = {{ind = 10, bg = 1}}, + AttPosMods = {[1] = { + vpos = Vector(0, 3.5, 4.68), + vang = Angle(0, -90, 0), + }} + }, + ["optic_raillaser"] = { + AttPosMods = { + [8] = { + vpos = Vector(0.95, 2.5, 4.05), + vang = Angle(0, -90, 125), + }, + }, + }, + ["cover_ak12"] = { + VMBodygroups = {{ind = 10, bg = 4}}, + AttPosMods = {[1] = { + vpos = Vector(0, 3.5, 4.67), + vang = Angle(0, -90, 0), + }} + }, + + ["grip_ak12"] = { + VMBodygroups = {{ind = 9, bg = 5}} + }, + ["stock_ak12"] = { + VMBodygroups = {{ind = 6, bg = 11}}, + }, + ["handguard_ak12"] = { + VMBodygroups = {{ind = 1, bg = 12}}, + --[[AttPosMods = {[6] = { + vpos = Vector(0, 11.75, 2.2), + vang = Angle(90, -90, -90), + }}]] + AttPosMods = { + [8] = { + vpos = Vector(-0.7, 13.5, 3.8), + vang = Angle(-90, 270, 0), + wang = Angle(-90, 270, 0), + }, + [7] = { + vpos = Vector(0, 11.75, 2.2), + vang = Angle(90, -90, -90), + } + }, + }, + ["barrel_ak12"] = { + VMBodygroups = { + {ind = 7, bg = 6}, + {ind = 8, bg = 2} + }, + AttPosMods = {[4] = { + vpos = Vector(0, 23.5, 2.8), + vang = Angle(0, 270, 0), + }}, + Override_IronSightStruct = { + Pos = Vector(-2.68, 0, 1.3), + Ang = Angle(-2.02, 0.028, 5.53), + Magnification = 1, + } + --RequireFlags = {"cover_rail"}, + }, + ["muzzle_ak12"] = { + VMBodygroups = {{ind = 8, bg = 2}}, + }, + ["reciever_ak12"] = { + VMBodygroups = {{ind = 0, bg = 1}} + }, + ["sight_ak12"] = { + VMBodygroups = {{ind = 4, bg = 3}}, + RequireFlags = {"cover_rail", "ak_railedguard"}, + Override_IronSightStruct = { + Pos = Vector(-2.63, 0, 0.79), + Ang = Angle(-1.12, 0.116, 5.53), + Magnification = 1, + }, + Override_IronSightStruct_Priority = 2, + }, + ["mag_545_ak12"] = { + VMBodygroups = {{ind = 2, bg = 7}} + }, + ["mag_545_black"] = { + VMBodygroups = {{ind = 2, bg = 9}} + }, + ["mag_308"] = { + VMBodygroups = {{ind = 2, bg = 8}} + }, + + ["cover_trail"] = { + VMBodygroups = {{ind = 4, bg = 4}}, + AttPosMods = {[1] = { + vpos = Vector(0, 8.2, 5.20), + vang = Angle(0, -90, 0), + }} + }, +} + +SWEP.Hook_ModifyBodygroups = function(wep, data) + local akOptics = {["uc_optic_pso1"] = true, ["uc_optic_kobra"] = true} -- Will need to update this list if more AK optics get added + local railHgs = {["default"] = true, ["type3"] = true} + local bipodBarrs = {["rpk"] = true} + local shortBarrs = {["krinkov"] = true, ["vityaz"] = true} + local intCals = {["545"] = true, ["556"] = true, ["545_ak12"] = true} + + local optic = wep.Attachments[1].Installed + local barr = string.Replace(wep.Attachments[2].Installed or "default","ur_ak_barrel_","") + local hg = string.Replace(wep.Attachments[3].Installed or "default","ur_ak_hg_","") + local muzz = wep.Attachments[4].Installed + local cal = string.Replace(wep.Attachments[5].Installed or "default","ur_ak_cal_","") + local ub = wep.Attachments[7].Installed-- or wep.Attachments[17].Installed + local upper = wep.Attachments[15].Installed + local alpha = (upper == "ur_ak_cover_alpha" or upper == "ur_ak_cover_ak12" or upper == "ur_ak_cover_truniun_rail") + local taclaser = (wep.Attachments[16].Installed == "ur_ak_charm_tl") + + local vm = data.vm + if !IsValid(vm) then return end + + -- Default muzzle devices + if !muzz or muzz == "ur_ak_muzzle_bayonet" then + if barr == "ak12" and (cal == "default" or intCals[cal]) then + vm:SetBodygroup(8,3) + elseif barr == "krinkov" then + vm:SetBodygroup(8,4) + elseif barr == "default" or barr == "t56" then + if cal == "default" then + vm:SetBodygroup(8,1) + elseif intCals[cal] then + vm:SetBodygroup(8,3) + else + vm:SetBodygroup(8,0) + end + end + elseif muzz == "ur_ak_muzzle_ak74" then + vm:SetBodygroup(8,3) + elseif barr == "default" then + vm:SetBodygroup(8,0) + else + vm:SetBodygroup(8,2) + end + + -- + if taclaser and !akOptics[optic] then + vm:SetBodygroup(12,2) + else + if optic and !alpha and !akOptics[optic] then + vm:SetBodygroup(12,1) + else + vm:SetBodygroup(12,0) + end + end + + -- Railed underbarrel + if ub and hg != "ur_ak_hg_dong" and barr != "vityaz" then + if barr == "krinkov" then + vm:SetBodygroup(13,2) + elseif railHgs[hg] then + vm:SetBodygroup(1,13) + else + vm:SetBodygroup(13,1) + end + else + vm:SetBodygroup(13,0) + end + + -- RPK bipod + if bipodBarrs[barr] then + vm:SetBodygroup(7, (wep:GetInBipod() and (wep.LastAnimKey ~= "enter_bipod" or wep.LastAnimFinishTime < CurTime())) and 7 or 1) + end +end + +SWEP.ExtraSightDist = 2 +SWEP.GuaranteeLaser = false + +SWEP.WorldModelOffset = { + pos = Vector(-7, 4, -4), + ang = Angle(-12, 0, 180) +} + +SWEP.MirrorVMWM = true + +SWEP.Attachments = { + { + PrintName = "Optic", + DefaultAttName = "Iron Sights", + Slot = {"optic","optic_sniper","ur_ak_optic"}, + Bone = "tag_weapon", + Offset = { + vpos = Vector(0, 2, 4.92), + vang = Angle(0, -90, 0), + }, + CorrectivePos = Vector(0, 0, -0.0), + CorrectiveAng = Angle(-1.9, 180.15, 0), + VMScale = Vector(1, 1, 1), + -- SlideAmount = { + -- vmin = Vector(0, 2-1, 4.55), + -- vmax = Vector(0, 2+0.5, 4.55), + -- }, +-- RequireFlags = {"cover_rail"}, +-- HideIfBlocked = true, + -- InstalledEles = {"optic_rail"}, + }, + { + PrintName = "Barrel", + DefaultAttName = "16\" Standard Barrel", + DefaultAttIcon = Material("entities/att/ur_ak/barrel/std.png", "mips smooth"), + Slot = "ur_ak_barrel", + Bone = "tag_weapon", + Offset = { + vpos = Vector(0,12, 1.9), + vang = Angle(90, -90, -90), + }, + }, + { + PrintName = "Handguard", + DefaultAttName = "Factory Handguard", + DefaultAttIcon = Material("entities/att/ur_ak/handguards/std.png", "mips smooth"), + Bone = "tag_weapon", + Offset = { + vpos = Vector(0,12, 1.9), + vang = Angle(90, -90, -90), + }, + Slot = "ur_ak_hg", + ExcludeFlags = {"barrel_carbine"}, + }, + { + PrintName = "Muzzle", + DefaultAttName = "Standard Muzzle", + Slot = {"muzzle","ur_ak_muzzle"}, + Bone = "tag_weapon", + Offset = { + vpos = Vector(0, 24.1, 2.7), + vang = Angle(0, 270, 0), + }, + ExcludeFlags = {"ur_ak_nomuzzle"}, + --Installed = "ur_ak_muzzle_akm" + }, + { + PrintName = "Receiver", + DefaultAttName = "7.62x39mm Reciever", + DefaultAttIcon = Material("entities/att/uc_bullets/762x39.png", "mips smooth"), + Slot = {"ur_ak_cal"}, + Bone = "tag_weapon", + Offset = { + vpos = Vector(2.8, -4.2, -11.5), + vang = Angle(90, 0, -90), + }, + DefaultFlags = {"cal_default"} + }, + { + PrintName = "Magazine", + Slot = {"ur_ak_mag"}, + DefaultAttName = "30-Round Mag", + DefaultAttIcon = Material("entities/att/ur_ak/magazines/762_30.png", "mips smooth"), + }, + { + PrintName = "Underbarrel", + Slot = {"foregrip","ur_ak_ub"}, + Bone = "tag_weapon", + Offset = { + vpos = Vector(0,12, 1.9), + vang = Angle(90, -90, -90), + }, + VMScale = Vector(1, 1, 1), + SlideAmount = { + vmin = Vector(0,10.5,1.8), + vmax = Vector(0,13.5,1.8) + }, + InstalledEles = {"rail_fg"}, + ExcludeFlags = {"ak_noubs"}, + MergeSlots = {17}, + }, + { + PrintName = "Tactical", + Slot = {"tac"}, + Bone = "tag_weapon", + Offset = { + vpos = Vector(0, 19.6, 2.1), + vang = Angle(0, 270, 0), + }, + GivesFlags = {"tac"}, + --InstalledEles = {"ud_m16_clamp_fullsize"} + }, + { + PrintName = "Grip Type", + Slot = {"ur_ak_grip"}, + DefaultAttName = "Factory Grip", + DefaultAttIcon = Material("entities/att/ur_ak/grip_modern.png", "mips smooth"), + ExcludeFlags = {"stock_vepr"}, + }, + { + PrintName = "Stock", + Slot = {"ur_ak_stock"}, + DefaultAttName = "Factory Stock", + DefaultAttIcon = Material("entities/att/ur_ak/stock/n.png", "mips smooth"), + }, + { + 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 = "Dust Cover", + DefaultAttName = "Ribbed Dust Cover", + DefaultAttIcon = Material("entities/att/ur_ak/dustcover_stock.png", "mips smooth"), + Slot = {"ur_ak_cover"}, + FreeSlot = true, + }, + { + PrintName = "Charm", + Slot = {"charm", "fml_charm", "ur_ak_charm"}, + FreeSlot = true, + Bone = "tag_weapon", + Offset = { + vpos = Vector(0.6, 6.7, 2.2), + vang = Angle(90, -90, -90), + }, + }, + { + PrintName = "M203 slot", + Slot = "uc_ubgl", + Bone = "tag_weapon", + Offset = { + vpos = Vector(0, 9.9, 2.9), + vang = Angle(90, -90, -90), + }, + InstalledEles = {"rail_fg"}, + ExcludeFlags = {"ak_noubs","barrel_rpk"}, + Hidden = true, + } +} + +function SWEP:Hook_TranslateAnimation(anim) + if anim == "fire_iron" then + if self:GetBuff_Override("NoStock") then return "fire" end + elseif anim == "fire_iron_empty" then + if self:GetBuff_Override("NoStock") then return "fire_empty" end + end +end + +SWEP.Hook_NameChange = function(wep,name) + local foldStocks = {["underfolder"] = true,["aks"] = true} + local akCals = {["762"] = true,["545"] = true} + local shortBarrs = {["krinkov"] = true,["vityaz"] = true} + local fakeNames = !GetConVar("arccw_truenames"):GetBool() + + local start = "AK" + local mid = "" + local post = "M" + local noN = false + + if fakeNames then + start = "KF" + post = "-67" + end + + local atts = wep.Attachments + local barr = string.Replace(atts[2].Installed or "default", "ur_ak_barrel_", "") + local hg = string.Replace(atts[3].Installed or "default", "ur_ak_hg_", "") + local cal = string.Replace(atts[5].Installed or "762", "ur_ak_cal_", "") + local stock = string.Replace(atts[10].Installed or "default", "ur_ak_stock_", "") + local upper = atts[11].Installed + local alpha = (upper == "ur_ak_cover_alpha" or upper == "ur_ak_cover_ak12" or upper == "ur_ak_cover_truniun_rail") + -- local ak12 = alpha and barr == "ak12" + + wep.Trivia_Desc = descStart .. desc_762 + wep.Trivia_Mechanism = "Gas-Operated Rotating Bolt" + + if alpha then noN = true end + + if atts[14].Installed == "uc_fg_civvy" then + start = (fakeNames and "Amur") or "Vepr" + if cal == "12g" then + post = "-12" + wep.Trivia_Desc = desc_12g + elseif cal == "545_ak12" or cal == "545" then + post = " 5.45" + wep.Trivia_Desc = descStart .. desc_545 + elseif cal == "762" then + post = " 7.62" + elseif cal == "9mm" then + start = "Saiga" + post = "-9" + wep.Trivia_Desc = desc_9mm + wep.Trivia_Mechanism = "Blowback" + else + post = " ." .. cal + end + return start .. post + end + + if cal == "9mm" then + if fakeNames then + start = "Bogatyr" + post = " SMG" + else + start = "PP" + post = "-19 Vityaz" + end + wep.Trivia_Desc = desc_9mm + wep.Trivia_Mechanism = "Blowback" + -- elseif cal == "12g" then + -- start = "Saiga" + -- if shortBarrs[barr] then + -- post = "-12K" + -- else + -- post = "-12" + -- end + -- wep.Trivia_Desc = desc_12g -- Obsolete + elseif cal == "366" then + if barr == "vepr" or string.find(atts[14].Installed or "","rifling") then + start = (fakeNames and "Amur") or "Vepr" + post = " .366" + else + start = (fakeNames and "KFN") or "VPO" + post = "-209" + wep.Trivia_Desc = desc_366 + end + elseif cal == "308" then + post = "-308" + -- elseif cal == "545_ak12" or ak12 then + -- noN = true + -- if string.StartWith(cal,"545") then + -- post = "-12" + -- wep.Trivia_Desc = descStart .. desc_545 + -- elseif cal == "762" then + -- post = "-15" + -- elseif cal == "556" then + -- post = "-18" + -- end + -- if string.EndsWith(barr,"105") or shortBarrs[barr] then + -- post = post .. "K" + -- end -- Obsolete + elseif barr == "rpk" or barr == "rpk74m" then + start = (fakeNames and "PKF") or "RPK" + if !fakeNames and barr == "rpk" and cal == "762" then + if hg == "74m" or hg == "rpk74m" then + post = "-203" + noN = true + else + post = "" + end + elseif !fakeNames and cal == "556" then + noN = true + post = "-201" + end + elseif cal == "762" then + if barr == "t56" then + noN = true + if fakeNames then + start = "Yucha" + post = " 7" + else + start = "Type " + post = "56" + end + elseif (hg == "74m" or hg == "rpk74m" or hg == "ak12") and stock == "ak74m" then + noN = true + post = "-103" + end + elseif cal == "556" then + if fakeNames then + post = "-45" + elseif string.EndsWith(barr,"105") then + post = "-102" + else + post = "-101" + end + wep.Trivia_Desc = descStart .. desc_556 + end + + if foldStocks[stock] and akCals[cal] and !string.StartWith(barr,"105") then + if cal == "762" then + if barr == "t56" then + post = post .. "-1" + elseif !fakeNames then + post = "MS" + else + mid = "S" + end + else + mid = "S" + end + end + + if cal == "545" then + wep.Trivia_Desc = descStart .. desc_545 + if (hg == "74m" or hg == "rpk74m" or hg == "ak12") and (stock == "ak74m" or barr == "rpk") then + noN = true + post = (fakeNames and "-76M") or "-74M" + elseif shortBarrs[barr] then + if fakeNames then + post = "-76" + mid = mid .. "U" + else + post = "-74U" + end + wep.Trivia_Desc = descStart .. desc_74u + else + post = (fakeNames and "-76") or "-74" + end + end + + if akCals[cal] then + if string.EndsWith(barr,"105") then + noN = true + if cal == "545" then + post = "-105" + elseif cal == "762" then + post = "-104" + elseif cal == "556" then + post = "-102" + end + else + -- if shortBarrs[barr] then + -- post = post .. "U" -- I know I said the AK-47U doesn't exist, but we have fucking Glock 44 Autos so I warmed up to it + -- wep.Trivia_Desc = descStart .. desc_74u + -- end + if !noN and atts[1].Installed then + post = post .. "N" + end + end + + end + + return start .. mid .. post +end + +SWEP.Animations = { + ["idle"] = { + Source = "idle" + }, + ["draw"] = { + Source = "draw", + LHIK = false, + LHIKIn = 0, + LHIKOut = 0.5, + SoundTable = { + {s = ratel, t = 0}, + {s = common .. "raise.ogg", t = 0.2}, + {s = common .. "shoulder.ogg", t = 0.2}, + }, + }, + ["holster"] = { + Source = "holster", + LHIK = false, + LHIKIn = 0, + LHIKOut = 0.5, + SoundTable = { + {s = ratel, t = 0}, + -- {s = common .. "raise.ogg", t = 0.2}, + -- {s = common .. "shoulder.ogg", t = 0.2}, + }, + }, + ["ready"] = { + Source = "ready", + LHIK = true, + LHIKIn = 0, + LHIKOut = 0.6, + LHIKEaseOut = 0.25, + SoundTable = { + {s = ratel, t = 0}, + {s = path .. "chback.ogg", t = 0.2}, + {s = path .. "chamber.ogg", t = 0.3}, + {s = common .. "shoulder.ogg", t = .6}, + }, + }, + ["fire"] = { + Source = {"fire"}, + Time = 0.5, + ShellEjectAt = 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 = 0.5, + ShellEjectAt = 0, + SoundTable = { + {s = common .. "common_mech_light.ogg", t = 0, v = 0.5}, + { 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", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + LHIK = true, + LHIKIn = 0.3, + LHIKOut = 0.65, + LHIKEaseOut = 0.25, + MinProgress = 1.3, + SoundTable = { + {s = common .. "magpouch.ogg", t = 0.0, v = 0.45}, + {s = path .. "reload_start.ogg", t = 0.025}, + {s = rottle, t = 0.05}, + {s = ratel, t = 0.25}, + {s = path .. "magrelease.ogg", t = 0.4}, + {s = path .. "magout.ogg", t = 0.45}, + {s = ratel, t = 0.5}, + {s = rottle, t = 0.75}, + {s = path .. "magin.ogg", t = 0.95}, + {s = ratel, t = 1.1}, + {s = rottle, t = 1.15}, + {s = path .. "scrape.ogg", t = 1.35}, + {s = common .. "magpouchin.ogg", t = 1.38}, + {s = path .. "grab.ogg", t = 1.9, v = 0.45}, + {s = common .. "shoulder.ogg", t = 2.0}, + {s = path .. "shoulder.ogg", t = 2.15}, + }, + }, + ["reload_empty"] = { + Source = "reload_empty", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + LHIK = true, + LHIKIn = 0.3, + LHIKOut = 0.5, + LHIKEaseOut = 0.25, + MinProgress = 2.1, + LastClip1OutTime = 2, + SoundTable = { + {s = rottle, t = 0.0}, + {s = common .. "magpouch.ogg", t = 0.1}, + {s = ratel, t = 0.25}, + {s = path .. "magrelease.ogg", t = 0.4}, + {s = path .. "magout.ogg", t = 0.45}, + {s = path .. "bonk.ogg", t = 0.5}, + {s = ratel, t = 0.6}, + {s = rottle, t = 0.75}, + {s = path .. "magin.ogg", t = 0.97}, + {s = ratel, t = 1.1}, + {s = common .. "rifle_magdrop.ogg", t = 1.16, v = 0.5}, + {s = rottle, t = 1.16}, + {s = path .. "chback.ogg", t = 1.9}, + {s = path .. "chamber.ogg", t = 2.0}, + {s = path .. "grab.ogg", t = 2.3, v = 0.45}, + {s = common .. "shoulder.ogg", t = 2.4}, + {s = path .. "shoulder.ogg", t = 2.5}, + }, + }, + ["reload_75"] = { + Source = "reload_drum", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + LHIK = true, + LHIKIn = 0.3, + LHIKOut = 0.9, + LHIKEaseOut = 0.25, + MinProgress = 1.6, + SoundTable = { + {s = rottle, t = 0.0}, + {s = common .. "magpouch.ogg", t = 0.1}, + {s = ratel, t = 0.25}, + {s = path .. "magrelease.ogg", t = 0.1}, + {s = path .. "magout_drum.ogg", t = 0.25}, + {s = ratel, t = 0.5}, + {s = rottle, t = 0.75}, + {s = ratel, t = 1.0}, + {s = path .. "magin_drum.ogg", t = 1.1}, + {s = rottle, t = 1.75}, + {s = path .. "grab.ogg", t = 2.0, v = 0.45}, + {s = common .. "shoulder.ogg", t = 2.1}, + {s = path .. "shoulder.ogg", t = 2.25}, + }, + }, + ["reload_empty_75"] = { + Source = "reload_drum_empty", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + LHIK = true, + LHIKIn = 0.3, + LHIKOut = 1.5, + LHIKEaseOut = 0.25, + MinProgress = 2.6, + LastClip1OutTime = 2, + SoundTable = { + {s = rottle, t = 0.0}, + {s = common .. "magpouch.ogg", t = 0.1}, + {s = ratel, t = 0.25}, + {s = path .. "magrelease.ogg", t = 0.1}, + {s = path .. "magout_drum.ogg", t = 0.25}, + {s = ratel, t = 0.5}, + {s = rottle, t = 0.75}, + {s = ratel, t = 1.0}, + {s = path .. "magin_drum.ogg", t = 1.1}, + {s = path .. "grab.ogg", t = 2.0, v = 0.45}, + {s = rottle, t = 1.9}, + {s = path .. "chback.ogg", t = 2.37}, + {s = path .. "chamber.ogg", t = 2.48}, + {s = common .. "shoulder.ogg", t = 2.78}, + {s = path .. "shoulder.ogg", t = 2.93}, + }, + }, + ["reload_9mm"] = { + Source = "reload_9mm", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + LHIK = true, + LHIKIn = 0.3, + LHIKOut = 0.9, + LHIKEaseOut = 0.25, + MinProgress = 1.3, + SoundTable = { + {s = rottle, t = 0.0}, + {s = common .. "magpouch.ogg", t = 0.1}, + {s = ratel, t = 0.25}, + {s = path1 .. "magout.ogg", t = 0.45}, + {s = ratel, t = 0.5}, + {s = rottle, t = 0.75}, + {s = path1 .. "magin.ogg", t = 0.73}, + {s = ratel, t = 1.1}, + {s = rottle, t = 1.15}, + {s = path .. "scrape.ogg", t = 1.4}, + {s = common .. "magpouchin.ogg", t = 1.35}, + {s = common .. "shoulder.ogg", t = 2.05}, + {s = common .. "grab.ogg", t = 2.1}, + }, + }, + ["reload_empty_9mm"] = { + Source = "reload_9mm_empty", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + LHIK = true, + LHIKIn = 0.3, + LHIKOut = 0.55, + LHIKEaseOut = 0.25, + MinProgress = 2.1, + LastClip1OutTime = 2, + SoundTable = { + {s = rottle, t = 0.0}, + {s = common .. "magpouch.ogg", t = 0.1}, + {s = ratel, t = 0.25}, + {s = path1 .. "magout.ogg", t = 0.45}, + {s = ratel, t = 0.5}, + {s = rottle, t = 0.75}, + {s = path1 .. "magin.ogg", t = 0.85}, + {s = ratel, t = 1.1}, + {s = common .. "pistol_magdrop.ogg", t = 1.15}, + {s = rottle, t = 1.15}, + {s = path .. "chback_9.ogg", t = 1.8}, + {s = path .. "chamber_9.ogg", t = 2.05}, + {s = common .. "grab.ogg", t = 2.4}, + {s = common .. "shoulder.ogg", t = 2.5}, + }, + }, + ["reload_10rnd"] = { + Source = "reload_10rnd", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + LHIK = true, + LHIKIn = 0.3, + LHIKOut = 0.9, + LHIKEaseOut = 0.25, + MinProgress = 1.3, + SoundTable = { + {s = rottle, t = 0.0}, + {s = common .. "magpouch.ogg", t = 0.1}, + {s = ratel, t = 0.25}, + {s = path .. "magout.ogg", t = 0.45}, + {s = ratel, t = 0.5}, + {s = rottle, t = 0.75}, + {s = path .. "magin.ogg", t = 0.95}, + {s = ratel, t = 1.1}, + {s = rottle, t = 1.15}, + {s = path .. "scrape.ogg", t = 1.35}, + {s = common .. "magpouchin.ogg", t = 1.35}, + {s = common .. "shoulder.ogg", t = 2.05}, + {s = common .. "grab.ogg", t = 2.1}, + }, + }, + ["reload_empty_10rnd"] = { + Source = "reload_10rnd_empty", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + LHIK = true, + LHIKIn = 0.3, + LHIKOut = 0.55, + LHIKEaseOut = 0.25, + MinProgress = 2.1, + LastClip1OutTime = 2, + SoundTable = { + {s = rottle, t = 0.0}, + {s = common .. "magpouch.ogg", t = 0.1}, + {s = ratel, t = 0.25}, + {s = path .. "magout.ogg", t = 0.45}, + {s = path .. "bonk.ogg", t = 0.5}, + {s = ratel, t = 0.5}, + {s = rottle, t = 0.75}, + {s = path .. "magin.ogg", t = 0.97}, + {s = ratel, t = 1.1}, + {s = common .. "rifle_magdrop.ogg", t = 1.15}, + {s = rottle, t = 1.15}, + {s = path .. "chback.ogg", t = 1.9}, + {s = path .. "chamber.ogg", t = 2.0}, + {s = common .. "grab.ogg", t = 2.4}, + {s = common .. "shoulder.ogg", t = 2.5}, + }, + }, + ["reload_308"] = { + Source = "reload_308", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + LHIK = true, + LHIKIn = 0.3, + LHIKOut = 0.9, + LHIKEaseOut = 0.25, + MinProgress = 1.3, + SoundTable = { + {s = rottle, t = 0.0}, + {s = common .. "magpouch.ogg", t = 0.1}, + {s = ratel, t = 0.25}, + {s = path .. "magout.ogg", t = 0.45}, + {s = ratel, t = 0.5}, + {s = rottle, t = 0.75}, + {s = path .. "magin_308.ogg", t = 0.95}, + {s = ratel, t = 1.1}, + {s = rottle, t = 1.15}, + {s = path .. "scrape.ogg", t = 1.35}, + {s = common .. "magpouchin.ogg", t = 1.35}, + {s = common .. "shoulder.ogg", t = 2.05}, + {s = common .. "grab.ogg", t = 2.1}, + }, + }, + ["reload_empty_308"] = { + Source = "reload_308_empty", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + LHIK = true, + LHIKIn = 0.3, + LHIKOut = 0.55, + LHIKEaseOut = 0.25, + MinProgress = 2.1, + LastClip1OutTime = 2, + SoundTable = { + {s = rottle, t = 0.0}, + {s = common .. "magpouch.ogg", t = 0.1}, + {s = ratel, t = 0.25}, + {s = path .. "magout.ogg", t = 0.45}, + {s = path .. "bonk.ogg", t = 0.5}, + {s = ratel, t = 0.5}, + {s = rottle, t = 0.75}, + {s = path .. "magin_308.ogg", t = 1.0}, + {s = ratel, t = 1.1}, + {s = common .. "rifle_magdrop.ogg", t = 1.15}, + {s = rottle, t = 1.15}, + {s = path .. "chback_308.ogg", t = 1.85}, + {s = path .. "chamber_308.ogg", t = 2.0}, + {s = common .. "grab.ogg", t = 2.4}, + {s = common .. "shoulder.ogg", t = 2.5}, + }, + }, + ["reload_12g"] = { + Source = "reload", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + LHIK = true, + LHIKIn = 0.3, + LHIKOut = 0.65, + LHIKEaseOut = 0.25, + MinProgress = 1.3, + SoundTable = { + {s = rottle, t = 0.0}, + {s = common .. "magpouch.ogg", t = 0.1}, + {s = ratel, t = 0.25}, + {s = path .. "12ga/magout.ogg", t = 0.45}, + {s = ratel, t = 0.5}, + {s = rottle, t = 0.75}, + {s = path .. "12ga/magin.ogg", t = 0.95}, + {s = ratel, t = 1.1}, + {s = rottle, t = 1.15}, + {s = path .. "scrape.ogg", t = 1.35}, + {s = common .. "magpouchin.ogg", t = 1.35}, + {s = common .. "shoulder.ogg", t = 2.05}, + {s = common .. "grab.ogg", t = 2.1}, + }, + }, + ["reload_empty_12g"] = { + Source = "reload_empty", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + LHIK = true, + LHIKIn = 0.3, + LHIKOut = 0.5, + LHIKEaseOut = 0.25, + MinProgress = 2.1, + LastClip1OutTime = 2, + SoundTable = { + {s = rottle, t = 0.0}, + {s = common .. "magpouch.ogg", t = 0.1}, + {s = ratel, t = 0.25}, + {s = path .. "12ga/magout.ogg", t = 0.45}, + {s = path .. "bonk.ogg", t = 0.5, v = 0.25}, + {s = ratel, t = 0.55}, + {s = rottle, t = 0.75}, + {s = path .. "12ga/magin.ogg", t = 0.97}, + {s = ratel, t = 1.1}, + {s = common .. "rifle_magdrop.ogg", t = 1.15}, + {s = rottle, t = 1.75}, + {s = path .. "12ga/chback.ogg", t = 1.85}, + {s = path .. "12ga/chamber.ogg", t = 2.0}, + {s = common .. "grab.ogg", t = 2.4}, + {s = common .. "shoulder.ogg", t = 2.5}, + }, + }, + ["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_sprint"] = { + Source = "sprint_start", + Time = 0.9, + }, + ["idle_sprint"] = { + Source = "sprint_idle", + }, + ["exit_sprint"] = { + Source = "sprint_end", + Time = 1.25, + }, + ["unjam"] = { + Source = "jamfix", + -- Time = 45 / 30, + ShellEjectAt = 0.65, + -- LHIK = true, + -- LHIKIn = 0.3, + -- LHIKEaseIn = 0.4, + -- LHIKEaseOut = 0.15, + -- LHIKOut = 0.4, + -- SoundTable = { zenith do noises here + -- {s = path .. "chback.ogg", t = 0.15}, + -- {s = common .. "cloth_4.ogg", t = 0.5}, + -- {s = path .. "chamber.ogg", t = 0.5}, + -- }, + SoundTable = { + {s = common .. "cloth_4.ogg", t = 0.1}, + {s = path .. "presscheck_1.ogg", t = 0.2}, + {s = path .. "chback.ogg", t = 0.6}, + {s = path .. "chamber.ogg", t = 0.7}, + {s = common .. "grab.ogg", t = 1.1}, + {s = common .. "shoulder.ogg", t = 1.15}, + } + }, + ["bash_bayonet"] = { + Source = "bayonet", + --Time = 1.2, + --MinProgress = .7, + SoundTable = { + {s = "weapons/arccw/melee_lift.wav", t = 0} + } + }, + + ["exit_bipod"] = { + Source = "bipod_undeploy", + LHIK = true, + LHIKIn = 0.3, + LHIKOut = 0.55, + LHIKEaseOut = 0.25, + --Time = 1.2, + --MinProgress = .7, + Mult = .8, + SoundTable = { + -- {s = "weapons/arccw/melee_lift.wav", t = 0} + } + }, + ["enter_bipod"] = { + Source = "bipod_deploy", + LHIK = true, + LHIKIn = 0.3, + LHIKOut = 0.55, + LHIKEaseOut = 0.25, + --Time = 1.2, + --MinProgress = .7, + Mult = .8, + SoundTable = { + -- {s = "weapons/arccw/melee_lift.wav", t = 0} -- yeah here too + } + }, +} + +SWEP.Hook_Think = ArcCW.UC.ADSReload \ No newline at end of file diff --git a/lua/weapons/arccw_ur_aw.lua b/lua/weapons/arccw_ur_aw.lua new file mode 100644 index 0000000..17a0eae --- /dev/null +++ b/lua/weapons/arccw_ur_aw.lua @@ -0,0 +1,931 @@ +SWEP.Base = "arccw_base" +SWEP.Spawnable = true -- this obviously has to be set to true +SWEP.Category = "ArcCW - Urban Coalition" -- edit this if you like +SWEP.UC_CategoryPack = "2Urban Renewal" +SWEP.AdminOnly = false + +SWEP.PrintName = "AWP" + +SWEP.Trivia_Class = "Sniper Rifle" +SWEP.Trivia_Desc = "A heavy rifle purpose-built for extreme range combat under extreme climates, first developed for the British military but quickly adopted by many more. Iconic for its appearance among military and police marksmen, this rifle is a symbol of discipline and order.\n\nOffers outstanding precision and kill potential, but its long bolt pull and reload time can become a hinderance outside its ideal engagement range.\n\nOne shot. One kill. You know the routine." +SWEP.Trivia_Manufacturer = "Accuracy International" +SWEP.Trivia_Calibre = "7.62x51mm NATO" +SWEP.Trivia_Mechanism = "Bolt Action" +SWEP.Trivia_Country = "United Kingdom" +SWEP.Trivia_Year = 1982 + +if !GetConVar("arccw_truenames"):GetBool() then + SWEP.PrintName = "Apex Precision" + SWEP.Trivia_Manufacturer = "Marksman Institute" +end + + +SWEP.Slot = 3 +SWEP.CamAttachment = 3 + +SWEP.UseHands = true + +SWEP.ViewModel = "models/weapons/arccw/c_ur_aw.mdl" +SWEP.WorldModel = "models/weapons/arccw/c_ur_aw.mdl" +SWEP.ViewModelFOV = 70 + +SWEP.DefaultBodygroups = "000000000000" + +SWEP.BulletBones = { + --[1] = "top_round", + [2] = "mag_round", +} + +-- Damage -- + +SWEP.Damage = 80 -- 2 shot close range +SWEP.DamageMin = 50 -- 2 shot long range +SWEP.RangeMin = 100 +SWEP.Range = 400 -- 2 shot at ~300m + +SWEP.Penetration = 18 +SWEP.DamageType = DMG_BULLET +SWEP.ShootEntity = nil +SWEP.MuzzleVelocity = 850 +SWEP.PhysBulletMuzzleVelocity = 850 + +SWEP.BodyDamageMults = ArcCW.UC.BodyDamageMults + +-- Mag size -- + +SWEP.ChamberSize = 1 +SWEP.Primary.ClipSize = 5 +SWEP.ExtendedClipSize = 10 +SWEP.ReducedClipSize = 5 + +-- Recoil -- + +SWEP.Recoil = 1.75 +SWEP.RecoilSide = 0.75 + +SWEP.RecoilRise = 0.6 +SWEP.RecoilPunch = 0.3 +SWEP.VisualRecoilMult = 5 +SWEP.MaxRecoilBlowback = 4 +SWEP.MaxRecoilPunch = 4 +SWEP.RecoilPunchBack = 3 +SWEP.RecoilPunchBackMax = 3.5 +SWEP.RecoilPunchBackMaxSights = 2.5 + +SWEP.Sway = 0.2 + +-- Firerate / Firemodes -- + +SWEP.Delay = 60 / 80 +SWEP.Num = 1 +SWEP.Firemodes = { + { + PrintName = "fcg.bolt", + Mode = 1, + }, + { + Mode = 0, + }, +} + +SWEP.ShootPitch = 100 +SWEP.ShootVol = 120 + +SWEP.ProceduralRegularFire = false +SWEP.ProceduralIronFire = false + +SWEP.ReloadInSights = true + +-- NPC -- + +SWEP.NPCWeaponType = "weapon_crossbow" +SWEP.NPCWeight = 60 + +-- Accuracy -- + +SWEP.AccuracyMOA = .25 +SWEP.HipDispersion = 1250 +SWEP.MoveDispersion = 500 +SWEP.JumpDispersion = 700 -- tactical unrealism set to 700 later + +SWEP.Primary.Ammo = "ar2" +SWEP.MagID = "awp" + +SWEP.HeatCapacity = 75 +SWEP.HeatDissipation = 15 +SWEP.HeatDelayTime = 3 + +-- SWEP.Malfunction = true +SWEP.MalfunctionMean = 200 +--SWEP.MeleeTime = 1.5 + +-- Speed multipliers -- + +SWEP.SpeedMult = 0.8 +SWEP.SightedSpeedMult = 0.625 +SWEP.SightTime = 0.35 +SWEP.ShootSpeedMult = 0.625 + +local path = ")weapons/arccw_ur/ak/" + +local testpath = ")weapons/arccw_ur/aw_placeholders/" +local path1 = ")weapons/arccw_ur/aw_placeholders/338/" + +local path1 = ")weapons/arccw_ur/mp5/" +local common = ")/arccw_uc/common/" +local rottle = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"} +local ratel = {common .. "rattle1.ogg", common .. "rattle2.ogg", common .. "rattle3.ogg"} +local rutle = {common .. "movement-sniper-01.ogg", common .. "movement-sniper-02.ogg", common .. "movement-sniper-03.ogg", common .. "movement-sniper-04.ogg"} + +SWEP.ShootSound = { + testpath .. "fire-01.ogg", + testpath .. "fire-02.ogg", + testpath .. "fire-03.ogg", + testpath .. "fire-04.ogg", + testpath .. "fire-05.ogg", + testpath .. "fire-06.ogg" +} +SWEP.ShootSoundSilenced = { + testpath .. "fire-sup-01.ogg", + testpath .. "fire-sup-02.ogg", + testpath .. "fire-sup-03.ogg", + testpath .. "fire-sup-04.ogg", + testpath .. "fire-sup-05.ogg", + testpath .. "fire-sup-06.ogg" +} +SWEP.DistantShootSound = nil +SWEP.DistantShootSoundSilenced = nil +SWEP.ShootDrySound = testpath .. "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 .. "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.MuzzleEffect = "muzzleflash_ak47" +SWEP.ShellEffect = "arccw_uc_shelleffect" +SWEP.ShellModel = "models/weapons/arccw/uc_shells/556x45.mdl" +SWEP.ShellPitch = 90 +SWEP.ShellScale = 1.145 +SWEP.ShellRotateAngle = Angle(0, 0, 0) + +SWEP.ManualAction = true +-- SWEP.ManualAction = false +SWEP.NoLastCycle = true + +SWEP.MuzzleEffectAttachment = 1 -- which attachment to put the muzzle on +SWEP.CaseEffectAttachment = 2 -- which attachment to put the case effect on + +SWEP.IronSightStruct = { + Pos = Vector(-3.37, -5, 0.68), + Ang = Angle(0, 0, 2), + Magnification = 1.1, + SwitchToSound = "", -- sound that plays when switching to this sight + CrosshairInSights = false +} +SWEP.LaserOffsetAngle = Angle(0, 0, 0) +SWEP.LaserIronsAngle = Angle(0, 1.5, 0) + +SWEP.HoldtypeHolstered = "passive" +SWEP.HoldtypeActive = "ar2" +SWEP.HoldtypeSights = "rpg" + +SWEP.AnimShoot = ACT_HL2MP_GESTURE_RANGE_ATTACK_AR2 + +SWEP.ActivePos = Vector(-0.1, 0.1, 0.2) +SWEP.ActiveAng = Angle(0, 0, -1) + +SWEP.SprintPos = Vector(-1, -1, 1.2) +SWEP.SprintAng = Angle(-15, 8, -10) + +SWEP.CrouchPos = Vector(-2, -2, -0.8) +SWEP.CrouchAng = Angle(0, 0, -14) + +SWEP.HolsterPos = Vector(-1, -1, 1.2) +SWEP.HolsterAng = Angle(-15, 8, -10) + +SWEP.BarrelOffsetSighted = Vector(0, 0, 0) +SWEP.BarrelOffsetHip = Vector(0, 0, 0) + +SWEP.CustomizePos = Vector(0, 0, 0) +SWEP.CustomizeAng = Angle(0, 0, 0) + +-- SWEP.CustomizePos = Vector(6.5, 0.8, -0.2) +-- SWEP.CustomizeAng = Angle(8, 18, 15) + +SWEP.BarrelLength = 54 + +SWEP.AttachmentElements = { + ["barrel_long"] = { + VMBodygroups = {{ind = 2, bg = 1}}, + AttPosMods = {[3] = { + vpos = Vector(0, 40, 1.75), + vang = Angle(0, 270, 0), + }} + }, + ["barrel_short"] = { + VMBodygroups = {{ind = 2, bg = 2}}, + AttPosMods = {[3] = { + vpos = Vector(0, 28, 1.75), + vang = Angle(0, 270, 0), + }} + }, + ["barrel_sd"] = { + VMBodygroups = {{ind = 2, bg = 3}} + }, + + ["mag_338"] = { + --VMBodygroups = {{ind = 3, bg = 2}} + }, + ["mag_300"] = { + --VMBodygroups = {{ind = 3, bg = 2}} + }, + ["mag_ext"] = { + --VMBodygroups = {{ind = 3, bg = 1}} + }, + ["mag_ext_magnum"] = { + --VMBodygroups = {{ind = 3, bg = 3}} + }, + + ["rail_bottom"] = { + VMBodygroups = {{ind = 6, bg = 1}} + }, + ["rail_top"] = { + VMBodygroups = {{ind = 7, bg = 1}} + }, + ["sights_compact"] = { + VMBodygroups = {{ind = 8, bg = 2}}, + Override_IronSightStruct = { + Pos = Vector(-3.395, -5, 1.35), + Ang = Angle(0, 0, 2), + Magnification = 1, + } + }, + ["sights_flipped"] = { + VMBodygroups = {{ind = 8, bg = 1}} + }, + + ["skin_black"] = { + VMSkin = 1 + }, + ["skin_tan"] = { + VMSkin = 2 + }, + ["skin_cust"] = { + VMSkin = 3 + }, + + ["stock_at"] = { + VMBodygroups = {{ind = 4, bg = 1}} + }, + ["stock_ru"] = { + VMBodygroups = {{ind = 4, bg = 2}} + }, + ["stock_ru_rubber"] = { + VMBodygroups = {{ind = 4, bg = 3}} + }, + ["stock_fixed"] = { + VMBodygroups = { + {ind = 4, bg = 4}, + {ind = 5, bg = 1}, + } + }, + ["stock_none"] = { + VMBodygroups = { + {ind = 4, bg = 5}, + } + }, +} + +SWEP.ExtraSightDist = 2 +SWEP.GuaranteeLaser = true + +SWEP.WorldModelOffset = { + pos = Vector(-7, 5, -4.8), + ang = Angle(-12, 0, 180) +} + +SWEP.MirrorVMWM = true + +SWEP.Attachments = { + { + PrintName = "Optic", + DefaultAttName = "Iron Sights", + DefaultAttIcon = Material("entities/att/ur_aw/ironsights.png", "mips smooth"), + Slot = {"optic","optic_lp","optic_sniper"}, + Bone = "tag_weapon", + Offset = { + vpos = Vector(0, 6, 2.65), + vang = Angle(0, -90, 0), + }, + CorrectivePos = Vector(0, 0, 0), + CorrectiveAng = Angle(0, 180, 0), + VMScale = Vector(1.05, 1.05, 1.05), + SlideAmount = { + vmin = Vector(0, 5.5, 2.65), + vmax = Vector(0, 7, 2.65), + }, + }, + { + PrintName = "Barrel", + DefaultAttName = "24\" Police Barrel", + DefaultAttIcon = Material("entities/att/ur_aw/bar_def.png", "mips smooth"), + Slot = "ur_aw_barrel", + }, + { + PrintName = "Muzzle", + DefaultAttName = "Standard Muzzle", + Slot = {"muzzle","ur_aw_muzzle"}, + Bone = "tag_weapon", + VMScale = Vector(1.5, 1.5, 1.5), + WMScale = VMScale, + Offset = { + vpos = Vector(0, 35.2, 1.675), + vang = Angle(0, 270, 0), + }, + ExcludeFlags = {"barrel_sd"}, + Installed = "ur_aw_muzzle_brake", + }, + { + PrintName = "Caliber", + DefaultAttName = "7.62x51mm NATO", + DefaultAttIcon = Material("entities/att/uc_bullets/762x51.png", "mips smooth"), + Slot = {"ur_aw_cal"}, + Bone = "tag_weapon", + Offset = { + vpos = Vector(2.8, -4.2, -11.5), + vang = Angle(90, 0, -90), + }, + }, + { + PrintName = "Magazine", + Slot = {"ur_aw_mag"}, + DefaultAttName = "5-Round Mag", + DefaultAttIcon = Material("entities/att/ur_aw/mag308_5.png", "mips smooth"), + ExcludeFlags = {"mag_338"} + }, + { + PrintName = "Underbarrel", + Slot = {"foregrip"}, + Bone = "tag_weapon", + Offset = { + vpos = Vector(0,16, -.6), + vang = Angle(90, -90, -90), + }, + VMScale = Vector(1, 1, 1), + InstalledEles = {"rail_bottom"}, + }, + { + PrintName = "Tactical", + Slot = {"tac"}, + Bone = "tag_weapon", + Offset = { + vpos = Vector(-1.2, 16, 1.1), + vang = Angle(-90, 270, 0), + }, + GivesFlags = {"tac"}, + InstalledEles = {"rail_top"} + }, + { + PrintName = "Stock", + Slot = {"ur_aw_stock"}, + DefaultAttName = "Factory Stock", + DefaultAttIcon = Material("entities/att/ur_aw/stock_def.png", "mips smooth"), + }, + { + PrintName = "Ammo Type", + DefaultAttName = "\"FMJ\" Full Metal Jacket", + DefaultAttIcon = Material("entities/att/arccw_uc_ammo_generic.png", "mips smooth"), + Slot = "uc_ammo", + HideIfBlocked = true + }, + { + 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 = "tag_weapon", + Offset = { + vpos = Vector(.85, 4.6, 0.5), + vang = Angle(90, -90, -90), + }, + }, + { + PrintName = "Finish", + Slot = {"ur_aw_skin"}, + FreeSlot = true, + DefaultAttName = "Olive Drab", + DefaultAttIcon = Material("entities/att/ur_aw/skin_green.png", "mips smooth"), + } +} + + +function SWEP:Hook_TranslateAnimation(anim) + +end + +SWEP.Hook_NameChange = function(wep,name) + local atts = wep.Attachments + local barr = string.Replace(atts[2].Installed or "default", "ur_aw_barrel_", "") + local cal = string.Replace(atts[4].Installed or "default", "ur_aw_cal_", "") + local stock = string.Replace(atts[8].Installed or "default", "ur_aw_stock_", "") + + if GetConVar("arccw_truenames"):GetBool() then + if cal ~= "default" then + return "AWM" + elseif barr == "sd" then + return "AWS" + elseif stock == "at" then + return "AT" + end + else + if cal == "338" then + return "Apex Magnum" + elseif barr == "sd" then + return "Apex Spectre" + elseif stock == "at" then + return "Apex Tactical" + end + end +end + +SWEP.Hook_ModifyBodygroups = function(wep, data) + local vm = data.vm + if !IsValid(vm) then return end + + local atts = wep.Attachments + local cal = string.Replace(atts[4].Installed or "default", "ur_aw_cal_", "") + local mag = string.Replace(atts[5].Installed or "default", "ur_aw_mag_", "") + local flags = wep:GetWeaponFlags() + + local pistolGrip = table.HasValue(flags,"pistolgrip") + + if cal ~= "default" then + if pistolGrip then + vm:SetBodygroup(1,3) + else + vm:SetBodygroup(1,1) + end + elseif pistolGrip then + vm:SetBodygroup(1,2) + else + vm:SetBodygroup(1,0) + end + + if atts[1].Installed then + if table.HasValue(flags,"sights_compact") then + vm:SetBodygroup(8,3) + else + vm:SetBodygroup(8,1) + end + end + + if mag == "10" then + vm:SetBodygroup(3,1) + elseif mag == "10m" then + vm:SetBodygroup(3,3) + elseif cal ~= "default" then + vm:SetBodygroup(3,2) + end +end + +SWEP.Animations = { + ["ready"] = { + Source = "cycle", + Time = 1.47, + MinProgress = 1.3, + SoundTable = { + {s = ratel, t = 0.07}, + {s = testpath .. "boltup.ogg", t = 0.1}, + {s = testpath .. "boltback.ogg", t = 0.2}, + {s = testpath .. "boltforward.ogg", t = 0.32}, + {s = testpath .. "boltdown.ogg", t = 0.6}, + }, + ProcDraw = true, + }, + ["idle"] = { + Source = "idle" + }, + ["idle_empty"] = { + Source = "idle_empty" + }, + ["draw"] = { + Source = "draw", + LHIK = false, + LHIKIn = 0, + LHIKOut = 0.5, + Time = 35 / 30, + MinProgess = .5, + SoundTable = { + {s = ratel, t = 0}, + {s = common .. "raise.ogg", t = 0.2}, + }, + }, + ["holster"] = { + Source = "holster", + LHIK = false, + LHIKIn = 0, + LHIKOut = 0.5, + Time = .75, + SoundTable = { + {s = ratel, t = 0}, + }, + }, + ["draw_empty"] = { + Source = "draw_empty", + LHIK = false, + LHIKIn = 0, + LHIKOut = 35 / 30, + SoundTable = { + {s = ratel, t = 0}, + {s = common .. "raise.ogg", t = 0.2}, + }, + }, + ["holster_empty"] = { + Source = "holster_empty", + LHIK = false, + LHIKIn = 0, + LHIKOut = 0.5, + SoundTable = { + {s = ratel, t = 0}, + }, + }, + ["fire"] = { + Source = {"fire"}, + Time = 27 / 30, + MinProgress = 0.2, + SoundTable = {{ s = {testpath .. "mech-01.ogg", testpath .. "mech-02.ogg", testpath .. "mech-03.ogg", testpath .. "mech-04.ogg", testpath .. "mech-05.ogg", testpath .. "mech-06.ogg"}, t = 0, v = 0.25 }}, + }, + + ["fire_iron"] = { + Source = {"fire_iron"}, + Time = 27 / 30, + MinProgress = 0.2, + SoundTable = { + { s = common .. "common_mech_heavy.ogg", t = 0 }, + { s = {testpath .. "mech-01.ogg", testpath .. "mech-02.ogg", testpath .. "mech-03.ogg", testpath .. "mech-04.ogg", testpath .. "mech-05.ogg", testpath .. "mech-06.ogg"}, t = 0, v = 0.25 } + }, + }, + + ["reload"] = { + Source = "reload", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + LHIK = true, + LHIKIn = 0.3, + LHIKOut = 1, + Time = 85 / 30, + LHIKEaseOut = 0.25, + MinProgress = 1.5, + SoundTable = { + {s = rottle, t = 0.1}, + {s = testpath .. "magrel.ogg", t = 0.2}, + {s = testpath .. "magout.ogg", t = 0.3}, + {s = rottle, t = 0.75}, + {s = common .. "magpouch.ogg", t = 0.8, v = 0.4}, + {s = testpath .. "struggle.ogg", t = 0.9}, + {s = testpath .. "magin.ogg", t = 1.2}, + {s = rottle, t = 1.4}, + {s = ratel, t = 1.5}, + }, + }, + ["reload_10"] = { + Source = "reload_exte", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + LHIK = true, + LHIKIn = 0.3, + LHIKOut = 1.15, + LHIKEaseOut = 0.25, + MinProgress = 2.5, + SoundTable = { + {s = rottle, t = 0.1}, + {s = testpath .. "magrel.ogg", t = 0.2}, + {s = testpath .. "magout.ogg", t = 0.3}, + {s = rottle, t = 0.75}, + {s = common .. "magpouch.ogg", t = 0.8, v = 0.4}, + {s = testpath .. "struggle.ogg", t = 0.9}, + {s = testpath .. "magin.ogg", t = 1.2}, + {s = rottle, t = 1.4}, + {s = ratel, t = 1.5}, + }, + }, + ["reload_338"] = { + Source = "reload_magnum", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + LHIK = true, + LHIKIn = 0.3, + LHIKOut = 1.15, + LHIKEaseOut = 0.25, + MinProgress = 2.5, + Time = 3.4, + SoundTable = { + {s = rottle, t = 0.1}, + {s = testpath .. "magrel.ogg", t = 0.2}, + {s = testpath .. "magout.ogg", t = 0.4}, + {s = rottle, t = 0.75}, + {s = common .. "magpouch.ogg", t = 0.8, v = 0.4}, + {s = testpath .. "struggle.ogg", t = 1.1, v = 1.1}, + {s = testpath .. "magin.ogg", t = 1.3}, + {s = testpath .. "magtap.ogg", t = 1.95}, + {s = rottle, t = 2.3, v = 0.6}, + {s = ratel, t = 2.35, v = 0.6}, + }, + }, + ["reload_empty"] = { + Source = "reload_empty", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + LHIK = false, + LHIKIn = 0.9, + LHIKOut = 1.25, + LHIKEaseIn = 0.1, + LHIKEaseOut = 0.5, + MinProgress = 3.0, + ShellEjectAt = .45, + LastClip1OutTime = 1.8, + Time = 4.5, + SoundTable = { + {s = ratel, t = 0.05}, + {s = testpath .. "boltup.ogg", t = 0.15}, + {s = testpath .. "boltback_reload.ogg", t = 0.18}, + {s = testpath .. "eject.ogg", t = 0.45}, + {s = rottle, t = 0.6}, + {s = testpath .. "magrel.ogg", t = 1.0}, + {s = testpath .. "magout_empty.ogg", t = 1.2}, + {s = rottle, t = 1.25}, + {s = testpath .. "magdrop_metal.ogg", t = 1.5, v = 0.4}, + {s = common .. "magpouch.ogg", t = 1.6, v = 0.4}, + {s = rottle, t = 1.65}, + {s = testpath .. "struggle.ogg", t = 2}, + {s = testpath .. "magin.ogg", t = 2.1}, + {s = rottle, t = 2.4}, + {s = ratel, t = 2.6}, + {s = testpath .. "boltforward_reload.ogg", t = 2.7}, + {s = testpath .. "boltdown.ogg", t = 3.1}, + {s = common .. "shoulder.ogg", t = 3.15}, + }, + }, + ["reload_empty_10"] = { + Source = "reload_empty_exte", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + LHIK = false, + LHIKIn = 0.9, + LHIKOut = 1.25, + LHIKEaseIn = 0.1, + LHIKEaseOut = 0.5, + ShellEjectAt = .5, + MinProgress = 3.5, + LastClip1OutTime = 1.8, + Time = 4.5, + SoundTable = { + {s = ratel, t = 0.05}, + {s = testpath .. "boltup.ogg", t = 0.15}, + {s = testpath .. "boltback_reload.ogg", t = 0.18}, + {s = testpath .. "eject.ogg", t = 0.45}, + {s = rottle, t = .6}, + {s = testpath .. "magrel.ogg", t = 1.0}, + {s = testpath .. "magout_empty.ogg", t = 1.2}, + {s = rottle, t = 1.25}, + {s = testpath .. "magdrop_metal.ogg", t = 1.6, v = 0.4}, + {s = common .. "magpouch.ogg", t = 1.6, v = 0.4}, + {s = rottle, t = 1.65}, + {s = testpath .. "struggle.ogg", t = 2.1}, + {s = testpath .. "magin.ogg", t = 2.2}, + {s = rottle, t = 2.5}, + {s = testpath .. "boltforward_reload.ogg", t = 2.8}, + {s = ratel, t = 2.7}, + {s = testpath .. "boltdown.ogg", t = 3.2}, + {s = common .. "shoulder.ogg", t = 3.2}, + }, + }, + ["reload_empty_338"] = { + Source = "reload_empty_magnum", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + LHIK = false, + LHIKIn = 0.9, + LHIKOut = 1.25, + LHIKEaseIn = 0.1, + LHIKEaseOut = 0.5, + ShellEjectAt = .5, + LastClip1OutTime = 1.5, + MinProgress = 4, + Time = 4.25, + SoundTable = { + {s = ratel, t = 0.05}, + {s = testpath .. "boltup.ogg", t = 0.15}, + {s = testpath .. "boltback_reload.ogg", t = 0.18}, + {s = testpath .. "eject.ogg", t = 0.45}, + {s = rottle, t = 0.6}, + {s = testpath .. "magrel.ogg", t = 1.0}, + {s = testpath .. "magout_empty.ogg", t = 1.1}, + {s = rottle, t = 1.25}, + {s = testpath .. "magdrop_metal.ogg", t = 1.5, v = 0.4}, + {s = common .. "magpouch.ogg", t = 1.6, v = 0.4}, + {s = rottle, t = 1.65}, + {s = testpath .. "struggle.ogg", t = 1.8}, + {s = testpath .. "magin.ogg", t = 1.9}, + {s = rottle, t = 2.4}, + {s = testpath .. "magtap.ogg", t = 2.5}, + {s = ratel, t = 2.6}, + {s = testpath .. "boltforward_reload.ogg", t = 2.7}, + {s = testpath .. "boltdown.ogg", t = 3.1}, + {s = common .. "shoulder.ogg", t = 3.15}, + }, + }, + ["reload_empty_10_338"] = { + Source = "reload_empty_exte_magnum", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + LHIK = true, + LHIKIn = 0.9, + LHIKOut = 1.25, + LHIKEaseIn = 0.1, + LHIKEaseOut = 0.5, + MinProgress = 4, + LastClip1OutTime = 2.3, + Time = 4.5, + ShellEjectAt = .5, + SoundTable = { + {s = ratel, t = 0.05}, + {s = testpath .. "boltup.ogg", t = 0.15}, + {s = testpath .. "boltback_reload.ogg", t = 0.18}, + {s = testpath .. "eject.ogg", t = 0.45}, + {s = rottle, t = 0.6}, + {s = testpath .. "magrel.ogg", t = 1.0}, + {s = testpath .. "magout_empty.ogg", t = 1.1}, + {s = rottle, t = 1.25}, + {s = testpath .. "magdrop_metal.ogg", t = 1.5, v = 0.4}, + {s = common .. "magpouch.ogg", t = 1.6, v = 0.4}, + {s = rottle, t = 1.65}, + {s = testpath .. "struggle.ogg", t = 1.85}, + {s = testpath .. "magin.ogg", t = 2.0}, + {s = rottle, t = 2.4}, + {s = testpath .. "magtap.ogg", t = 2.6}, + {s = ratel, t = 2.6}, + {s = testpath .. "boltforward_reload.ogg", t = 2.9}, + {s = testpath .. "boltdown.ogg", t = 3.3}, + {s = common .. "shoulder.ogg", t = 3.35}, + }, + }, + ["reload_10_338"] = { + Source = "reload_exte_magnum", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + LHIK = true, + LHIKIn = 0.3, + LHIKOut = 0.65, + LHIKEaseOut = 0.25, + MinProgress = 3, + Time = 3.5, + SoundTable = { + {s = rottle, t = 0.1}, + {s = testpath .. "magrel.ogg", t = 0.2}, + {s = testpath .. "magout.ogg", t = 0.4}, + {s = rottle, t = 0.75}, + {s = common .. "magpouch.ogg", t = 0.8, v = 0.4}, + {s = testpath .. "struggle.ogg", t = 1.1, v = 1}, + {s = testpath .. "magin.ogg", t = 1.4}, + {s = testpath .. "magtap.ogg", t = 2.0}, + {s = rottle, t = 2.3, v = 0.6}, + {s = ratel, t = 2.35, v = 0.6}, + }, + }, + ["cycle"] = { + Source = "cycle", + Time = 1.47, + ShellEjectAt = 0.4, + MinProgress = 0.9, + SoundTable = { + {s = ratel, t = 0.07}, + {s = testpath .. "boltup.ogg", t = 0.1}, + {s = testpath .. "boltback.ogg", t = 0.25}, + {s = testpath .. "boltforward.ogg", t = 0.32}, + {s = testpath .. "eject.ogg", t = 0.4}, + {s = testpath .. "boltdown.ogg", t = 0.55}, + + --{s = common .. "shoulder.ogg", t = 0.7}, + }, + }, + + ["enter_inspect"] = { + Source = "inspect_enter", + -- time = 35 / 60, + LHIK = false, + LHIKIn = 0, + LHIKOut = 2.5, + SoundTable = { + {s = rottle, t = 0}, + {s = common .. "movement-sniper-03.ogg", t = 0.05}, + }, + }, + ["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-sniper-01.ogg", t = 0}, + {s = rottle, t = 0.25}, + {s = testpath .. "boltup_inspect.ogg", t = 1.2}, + {s = common .. "movement-sniper-03.ogg", t = 1.25}, + {s = testpath .. "boltback_inspect.ogg", t = 1.35}, + {s = testpath .. "boltforward_inspect.ogg", t = 1.8}, + {s = testpath .. "boltdown_inspect.ogg", t = 1.9}, + {s = rottle, t = 2.0}, + {s = common .. "movement-sniper-04.ogg", t = 2.2}, + }, + }, + ["enter_inspect_empty"] = { -- Animations needed! + Source = "inspect_enter", + -- time = 35 / 60, + LHIK = false, + LHIKIn = 0, + LHIKOut = 2.5, + SoundTable = { + {s = rottle, t = 0}, + {s = rutle, t = 0.1}, + }, + }, + ["idle_inspect_empty"] = { + Source = "inspect_loop", + -- time = 72 / 60, + LHIK = false, + LHIKIn = 0, + LHIKOut = 999, -- maybe im dumb + }, + ["exit_inspect_empty"] = { + Source = "inspect_exit", + -- time = 66 / 60, + LHIK = false, + LHIKIn = 0, + LHIKOut = 999, -- maybe im dumb + SoundTable = { + {s = common .. "movement-sniper-01.ogg", t = 0.05}, + {s = rottle, t = 0.25}, + {s = testpath .. "boltup_inspect.ogg", t = 1.2}, + {s = common .. "movement-sniper-03.ogg", t = 1.25}, + {s = testpath .. "boltback_inspect.ogg", t = 1.35}, + {s = testpath .. "boltforward_inspect.ogg", t = 1.8}, + {s = testpath .. "boltdown_inspect.ogg", t = 1.9}, + {s = rottle, t = 2.0}, + {s = common .. "movement-sniper-04.ogg", t = 2.2}, + }, + }, +} + +SWEP.Hook_Think = ArcCW.UC.ADSReload diff --git a/lua/weapons/arccw_ur_db.lua b/lua/weapons/arccw_ur_db.lua new file mode 100644 index 0000000..6a48352 --- /dev/null +++ b/lua/weapons/arccw_ur_db.lua @@ -0,0 +1,521 @@ +SWEP.Base = "arccw_base" +SWEP.Spawnable = true +SWEP.Category = "ArcCW - Urban Coalition" +SWEP.UC_CategoryPack = "2Urban Renewal" +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 = 1 +SWEP.UC_ShellColor = Color(0.7*255, 0.2*255, 0.2*255) + +SWEP.MuzzleEffectAttachment = 1 +SWEP.CaseEffectAttachment = 6 +SWEP.CamAttachment = 7 + +-- Fake name -- + +SWEP.PrintName = "Volga Super" -- it's marketed to Americans + +-- True name -- + +SWEP.TrueName = "IZh-58" + +-- Trivia -- + +SWEP.Trivia_Class = "Shotgun" +SWEP.Trivia_Desc = [[The design of the double-barrel shotgun is so ubiquitous that it is usually referred to by weapon class instead of model name. These traditional shotguns are very popular in both rural and urban communities around the world for their simplicity and reliability. + +Both barrels can be fired back-to-back in quick, deadly succession, but they must be reloaded frequently. Switch to burst firemode to pull both triggers at once.]] +SWEP.Trivia_Manufacturer = "Sikov Machining Plant" +SWEP.Trivia_Calibre = "12 Gauge" +SWEP.Trivia_Mechanism = "Break Action" +SWEP.Trivia_Country = "Soviet Union" +SWEP.Trivia_Year = 1958 + +-- Weapon slot -- + +SWEP.Slot = 3 + +-- Weapon's manufacturer real name -- + +if GetConVar("arccw_truenames"):GetBool() then + SWEP.PrintName = SWEP.TrueName + SWEP.Trivia_Manufacturer = "Izhevsk Mechanical Plant" +end + +-- Viewmodel / Worldmodel / FOV -- + +SWEP.ViewModel = "models/weapons/arccw/c_ur_dbs.mdl" +SWEP.WorldModel = "models/weapons/arccw/c_ur_dbs.mdl" +SWEP.ViewModelFOV = 60 +SWEP.AnimShoot = ACT_HL2MP_GESTURE_RANGE_ATTACK_SHOTGUN + +SWEP.MirrorVMWM = true +SWEP.WorldModelOffset = { + pos = Vector(-3, 3, -5), + ang = Angle(-12, 0, 180), + bone = "ValveBiped.Bip01_R_Hand", + scale = 1 +} + +-- Damage parameters -- + +SWEP.Damage = 18 -- 6 pellets to kill +SWEP.DamageMin = 10 -- 10 pellets to kill +SWEP.Range = 40 +SWEP.RangeMin = 6 +SWEP.Num = 8 +SWEP.Penetration = 2 +SWEP.DamageType = DMG_BUCKSHOT +SWEP.ShootEntity = nil +SWEP.MuzzleVelocity = 365 +SWEP.PhysBulletMuzzleVelocity = 365 + +SWEP.HullSize = 0.25 + +SWEP.BodyDamageMults = ArcCW.UC.BodyDamageMults_Shotgun + +-- Mag size -- + +SWEP.ChamberSize = 0 +SWEP.Primary.ClipSize = 2 +SWEP.RejectMagSizeChange = true -- Signals to attachments that mag size shouldn't be changeable; needs to be implemented attachment-side with att.Compatible + +-- Recoil -- + +SWEP.Recoil = 2.8 +SWEP.RecoilSide = 2 + +SWEP.RecoilRise = 0.24 +SWEP.VisualRecoilMult = 0 +SWEP.MaxRecoilBlowback = 1 +SWEP.MaxRecoilPunch = 1 + +SWEP.Sway = 0.5 + +-- Firerate / Firemodes -- + +SWEP.Delay = 60 / 350 +SWEP.Firemodes = { + { + Mode = 1, + PrintName = "fcg.break", + }, + { + Mode = 1, + PrintName = "ur.spas12.dbl", + Mult_AccuracyMOA = 1.15, + Mult_HipDispersion = 0.8, + Mult_Num = 2, + Override_AmmoPerShot = 2, + Mult_Damage = 2, + Mult_DamageMin = 2, + Mult_VisualRecoilMult = 2, + + CustomBars = "--___", + }, + { + PrintName = "fcg.safe2", + Mode = 0, + } +} + +SWEP.UC_CanManualAction = true + +SWEP.MalfunctionTakeRound = false +SWEP.MalfunctionMean = math.huge -- Theoretically it will never malfunction + +SWEP.ShootVol = 160 +SWEP.ShootPitch = 100 + +SWEP.ProceduralRegularFire = false +SWEP.ProceduralIronFire = false + +SWEP.ReloadInSights = false +SWEP.RevolverReload = true + +-- NPC -- + +SWEP.NPCWeaponType = "weapon_shotgun" +SWEP.NPCWeight = 210 + +-- Accuracy -- + +SWEP.AccuracyMOA = 25 +SWEP.HipDispersion = 400 +SWEP.MoveDispersion = 125 +SWEP.JumpDispersion = 1000 + +SWEP.Primary.Ammo = "buckshot" + +-- Speed multipliers -- + +SWEP.SpeedMult = 0.91 +SWEP.SightedSpeedMult = 0.75 +SWEP.SightTime = 0.25 +SWEP.ShootSpeedMult = 0.75 + +-- Length -- + +SWEP.BarrelLength = 49 +SWEP.ExtraSightDist = 2 + +-- Ironsights / Customization / Poses -- + +SWEP.HoldtypeHolstered = "passive" +SWEP.HoldtypeActive = "ar2" +SWEP.HoldtypeSights = "rpg" + +SWEP.IronSightStruct = { + Pos = Vector(-1.5, 0, 2.5), + Ang = Angle(0, 0, 3), + Magnification = 1.05, + SwitchToSound = "", +} + +SWEP.SprintPos = Vector(7, 0, 0) +SWEP.SprintAng = Angle(-10, 40, -10) + +SWEP.HolsterPos = Vector(7, 0, 0) +SWEP.HolsterAng = Angle(-10, 40, -10) + +SWEP.ActivePos = Vector(1, 1.5, 1.5) +SWEP.ActiveAng = Angle(0, 0, 0) + +SWEP.CrouchPos = Vector(-1, 2, 1) +SWEP.CrouchAng = Angle(0, 0, -20) + +SWEP.CustomizePos = Vector(10, 1, 2) +SWEP.CustomizeAng = Angle(10, 40, 20) + +SWEP.BarrelOffsetSighted = Vector(0, 0, -1) +SWEP.BarrelOffsetHip = Vector(3, 0, -4.5) + +-- Firing sounds -- + +local path = ")weapons/arccw_ur/dbs/" +local common = ")/arccw_uc/common/" +SWEP.ShootSoundSilenced = path .. "fire_supp.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"} +SWEP.DistantShootSoundSilenced = common .. "sup_tail.ogg"]] +SWEP.ShootDrySound = common .. "manual_trigger.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/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 = function(wep,data) + ArcCW.UC.InnyOuty(wep) + + if wep:GetCurrentFiremode().Override_AmmoPerShot == 2 then + timer.Simple(0.05, function() + if IsValid(wep) then + wep:EmitSound(wep.ShootSound[math.random(1,#wep.ShootSound)], data.volume * .4, data.pitch, 1, CHAN_WEAPON - 1) + end + end) + end +end + +-- Animations -- + +local ratel = {common .. "rattle1.ogg", common .. "rattle2.ogg", common .. "rattle3.ogg"} +local rottle = {common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"} +local shellin = {common .. "dbs-shell-insert-01.ogg", common .. "dbs-shell-insert-02.ogg", common .. "dbs-shell-insert-03.ogg", common .. "dbs-shell-insert-04.ogg", common .. "dbs-shell-insert-05.ogg", common .. "dbs-shell-insert-06.ogg", common .. "dbs-shell-insert-07.ogg", common .. "dbs-shell-insert-08.ogg", common .. "dbs-shell-insert-09.ogg", common .. "dbs-shell-insert-10.ogg", common .. "dbs-shell-insert-11.ogg", common .. "dbs-shell-insert-12.ogg"} +local shellfall = {path .. "shell-fall-01.ogg", path .. "shell-fall-02.ogg", path .. "shell-fall-03.ogg", path .. "shell-fall-04.ogg"} + +SWEP.Animations = { + ["idle"] = { + Source = "idle", + }, + ["draw"] = { + Source = "draw", + --Time = 20 / 30, + SoundTable = { + {s = rottle, t = 0}, + {s = path .. "grab.ogg", t = 0.2}, + {s = path .. "shoulder.ogg", t = 0.5}, + }, + }, + ["ready"] = { + Source = "deploy", + Time = 26 / 30, + SoundTable = { + {s = path .. "close.ogg", t = 0.1}, + {s = common .. "shoulder.ogg", t = 0.2}, + {s = path .. "shoulder.ogg", t = 0.455}, + }, + }, + ["holster"] = { + Source = "holster", + Time = 20 / 30, + SoundTable = ArcCW.UC.HolsterSounds, + }, + + ["fire"] = { -- first barrel + Source = "fire", + -- Time = 23 / 25,--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 = 23 / 25,--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 } + }, + }, + + ["fire_empty"] = { -- second barrel + Source = "fire_empty", -- fire_empty + -- Time = 23 / 25,--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_empty"] = { + Source = "fire_empty", -- fire_empty + -- Time = 23 / 25,--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 } + }, + }, + + ["fire_2bst"] = { -- both + Source = "fireboth", + -- Time = 35 / 25,--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 }}, + MinProgress = 0.3 + }, + + ["reload"] = { + Source = "reload", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + ShellEjectAt = 0.91, + SoundTable = { + {s = common .. "cloth_4.ogg", t = 0}, + {s = path .. "open.ogg", t = 0.2}, + {s = path .. "eject.ogg", t = 0.8}, + {s = common .. "magpouch_pull_small.ogg", t = 1.0}, + {s = shellfall, t = 1.0}, + {s = common .. "cloth_2.ogg", t = 1.1}, + {s = path .. "struggle.ogg", t = 1.5, v = 0.5}, + {s = shellin, t = 1.8}, + {s = path .. "grab.ogg", t = 2.15, v = 0.5}, + {s = path .. "close.ogg", t = 2.3}, + {s = common .. "shoulder.ogg", t = 2.4}, + {s = path .. "shoulder.ogg", t = 2.675}, + }, + LHIK = true, + LHIKIn = 0.5, + LHIKOut = 0.5, + MinProgress = 2.05, + }, + ["reload_empty"] = { + Source = "reload_empty", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + ShellEjectAt = 1.0, + SoundTable = { + {s = common .. "cloth_4.ogg", t = 0}, + {s = path .. "open.ogg", t = 0.3}, + {s = path .. "eject.ogg", t = 0.8}, + {s = shellfall, t = 0.9}, + {s = shellfall, t = 0.95}, + {s = common .. "cloth_2.ogg", t = 1.1}, + {s = common .. "magpouch_pull_small.ogg", t = 1.2}, + {s = path .. "struggle.ogg", t = 1.7, v = 0.5}, + {s = shellin, t = 1.85}, + {s = shellin, t = 1.9}, + {s = path .. "grab.ogg", t = 2.17, v = 0.5}, + {s = path .. "close.ogg", t = 2.3}, + {s = common .. "shoulder.ogg", t = 2.44}, + {s = path .. "shoulder.ogg", t = 2.6}, + }, + LHIK = true, + LHIKIn = 0.5, + LHIKOut = 0.5, + MinProgress = 2.05, + }, + + ["reload_extractor"] = { + Source = "reload2", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + ShellEjectAt = 0.4, + SoundTable = { + {s = common .. "cloth_4.ogg", t = 0}, + {s = path .. "open.ogg", t = 0.2}, + {s = common .. "magpouch_pull_small.ogg", t = 0.5}, + {s = shellfall, t = 0.4}, + {s = common .. "cloth_2.ogg", t = 0.6}, + {s = path .. "struggle.ogg", t = 1.0, v = 0.5}, + {s = shellin, t = 1.2}, + {s = path .. "grab.ogg", t = 1.5, v = 0.5}, + {s = path .. "close.ogg", t = 1.7}, + {s = common .. "shoulder.ogg", t = 1.8}, + {s = path .. "shoulder.ogg", t = 2.2}, + }, + LHIK = true, + LHIKIn = 0.5, + LHIKOut = 0.5, + MinProgress = 1.3, + }, + ["reload_empty_extractor"] = { + Source = "reload2_empty", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + ShellEjectAt = 0.4, + SoundTable = { + {s = common .. "cloth_4.ogg", t = 0}, + {s = path .. "open.ogg", t = 0.2}, + {s = common .. "magpouch_pull_small.ogg", t = 0.5}, + {s = shellfall, t = 0.4}, + {s = shellfall, t = 0.45}, + {s = common .. "cloth_2.ogg", t = 0.6}, + {s = path .. "struggle.ogg", t = 1.0, v = 0.5}, + {s = shellin, t = 1.2}, + {s = shellin, t = 1.25}, + {s = path .. "grab.ogg", t = 1.5, v = 0.5}, + {s = path .. "close.ogg", t = 1.7}, + {s = common .. "shoulder.ogg", t = 1.8}, + {s = path .. "shoulder.ogg", t = 2.2}, + }, + LHIK = true, + LHIKIn = 0.5, + LHIKOut = 0.5, + MinProgress = 1.3, + }, +} + +SWEP.BulletBones = { + --[1] = "1014_shell1", +} + +-- Bodygroups -- + +SWEP.AttachmentElements = { + ["barrel_mid"] = { VMBodygroups = { {ind = 1, bg = 1} } }, + ["barrel_compact"] = { VMBodygroups = { {ind = 1, bg = 4} } }, + ["barrel_sw"] = { VMBodygroups = { {ind = 1, bg = 2} } }, + ["barrel_swplus"] = { VMBodygroups = { {ind = 1, bg = 3}, {ind = 3, bg = 1} } }, + + ["stock_sw"] = { VMBodygroups = { {ind = 2, bg = 1} } }, +} + +SWEP.DefaultBodygroups = "00000000" + +SWEP.Attachments = { + -- { + -- PrintName = "Optic", + -- DefaultAttName = "Iron Sights", + -- Slot = {"optic_lp","optic"}, + -- Bone = "barrels", + -- Offset = { + -- vpos = Vector(0.5, -1.75, 1.5), + -- vang = Angle(0, 90, 0), + -- }, + -- VMScale = Vector(1,1,1), + -- CorrectivePos = Vector(0, 0, -0.0), + -- CorrectiveAng = Angle(0, 180, 0), + -- }, + { + PrintName = "Barrel", + DefaultAttName = "26\" Factory Barrel", + DefaultAttIcon = Material("entities/att/ur_dbs/blong.png", "smooth mips"), + Slot = "ur_db_barrel", + Bone = "body", + Offset = { + vpos = Vector(-0.4, -5, -6), + vang = Angle(0, 90, 0), + }, + }, + { + PrintName = "Muzzle", + Slot = "choke", + }, + { + PrintName = "Stock", + Slot = {"ur_db_stock"}, + DefaultAttName = "Wooden Stock", + DefaultAttIcon = Material("entities/att/ur_dbs/s.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 = "Powder Load", + Slot = "uc_powder", + DefaultAttName = "Standard Load" + }, + { + PrintName = "Training Package", + Slot = "uc_tp", + DefaultAttName = "Basic Training" + }, + { + PrintName = "Internals", + Slot = {"uc_fg_singleshot", "uc_db_fg"}, -- Fire group + DefaultAttName = "Standard Internals" + }, + { + PrintName = "Charm", + Slot = {"charm", "fml_charm", "uc_db_tp"}, + FreeSlot = true, + Bone = "body", + Offset = { + vpos = Vector(-0.55, 1, -0.5), + vang = Angle(0, 90, 0), + }, + }, +} \ No newline at end of file diff --git a/lua/weapons/arccw_ur_deagle.lua b/lua/weapons/arccw_ur_deagle.lua new file mode 100644 index 0000000..ff180dc --- /dev/null +++ b/lua/weapons/arccw_ur_deagle.lua @@ -0,0 +1,880 @@ +SWEP.Base = "arccw_base" +SWEP.Spawnable = true +SWEP.Category = "ArcCW - Urban Coalition" +SWEP.UC_CategoryPack = "2Urban Renewal" +SWEP.AdminOnly = false +SWEP.UseHands = true + +-- Muzzle and shell effects -- + +SWEP.MuzzleEffect = "muzzleflash_pistol_deagle" +SWEP.ShellEffect = "arccw_uc_shelleffect" +SWEP.ShellModel = "models/weapons/arccw/uc_shells/50ae.mdl" +SWEP.ShellScale = 1 +--SWEP.ShellMaterial = "models/weapons/arcticcw/shell_9mm" +SWEP.ShellPitch = 90 +SWEP.UC_ShellColor = Color(0.7*255, 0.2*255, 0.2*255) + +SWEP.MuzzleEffectAttachment = 1 +SWEP.CaseEffectAttachment = 2 +SWEP.TracerNum = 1 +SWEP.TracerWidth = 1 +SWEP.ShootPitch = 100 + +-- Fake name -- + +SWEP.PrintName = "Predator .50" + +-- True name -- + +SWEP.TrueName = "Desert Eagle" + +-- Trivia -- + +SWEP.Trivia_Class = "Pistol" +SWEP.Trivia_Desc = "Unorthodox pistol in both weight and design, marketed as an alternative to high-caliber revolvers. Its huge rounds, unrivaled in power for a handgun cartridge, can easily blast a human skull apart.\nDespite being one of the most famous weapons in action culture, it rarely sees practical use because of its massive, bulky frame and pointlessly large caliber.\n\nWe both know that won't stop you." +SWEP.Trivia_Manufacturer = "ISM" +SWEP.Trivia_Calibre = ".50 Action Express" +SWEP.Trivia_Mechanism = "Gas-Operated Rotating Bolt" +SWEP.Trivia_Country = "Israel" +SWEP.Trivia_Year = 1983 + +-- Weapon slot -- + +SWEP.Slot = 1 + +-- Weapon's manufacturer real name -- + +if GetConVar("arccw_truenames"):GetBool() then + SWEP.PrintName = SWEP.TrueName + SWEP.Trivia_Manufacturer = "Magnum Research" +end + +-- Viewmodel / Worldmodel / FOV -- + +SWEP.ViewModel = "models/weapons/arccw/c_ud_deagle.mdl" +SWEP.WorldModel = "models/weapons/arccw/c_ud_deagle.mdl" +SWEP.ViewModelFOV = 60 +SWEP.AnimShoot = ACT_HL2MP_GESTURE_RANGE_ATTACK_REVOLVER + +-- Damage parameters -- + +SWEP.Damage = 80 -- 2 shot close range kill +SWEP.DamageMin = 12 -- 9 shot long range kill (big bullet falls off quickly) +SWEP.RangeMin = 10 +SWEP.Range = 120 -- 2 shot until ~50m +SWEP.Penetration = 9 +SWEP.DamageType = DMG_BULLET +SWEP.ShootEntity = nil +SWEP.MuzzleVelocity = 470 +SWEP.PhysBulletMuzzleVelocity = 470 + +SWEP.BodyDamageMults = ArcCW.UC.BodyDamageMults + +-- Jamming -- + +--SWEP.Malfunction = true +SWEP.MalfunctionJam = true +--SWEP.MalfunctionMean = 21 +SWEP.MalfunctionPostFire = true +SWEP.MalfunctionTakeRound = false + +-- Mag size -- + +SWEP.ChamberSize = 1 +SWEP.Primary.ClipSize = 7 +SWEP.ExtendedClipSize = 14 +SWEP.ReducedClipSize = 5 + +-- Recoil -- + +SWEP.Recoil = 3.95 +SWEP.RecoilSide = 1 + +SWEP.RecoilRise = 0.5 +SWEP.VisualRecoilMult = 1.5 +SWEP.MaxRecoilBlowback = 2 +SWEP.MaxRecoilPunch = 6 + +SWEP.Sway = 1.1 + +-- Firerate / Firemodes -- + +SWEP.Delay = 60 / 200 +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_357" +SWEP.NPCWeight = 70 + +-- Accuracy -- + +SWEP.AccuracyMOA = 5 +SWEP.HipDispersion = 600 +SWEP.MoveDispersion = 200 +SWEP.JumpDispersion = 1000 + +SWEP.Primary.Ammo = "357" +SWEP.MagID = "deagle" + +-- Speed multipliers -- + +SWEP.SpeedMult = 0.925 +SWEP.SightedSpeedMult = 0.75 +SWEP.SightTime = 0.25 +SWEP.ShootSpeedMult = 0.8 + +-- Length -- + +SWEP.BarrelLength = 12 +SWEP.ExtraSightDist = 10 + +-- Ironsights / Customization / Poses -- + +SWEP.HolsterPos = Vector(0.3, 3, 1) +SWEP.HolsterAng = Angle(-5, 15, -20) + +SWEP.HoldtypeHolstered = "normal" +SWEP.HoldtypeActive = "revolver" +SWEP.HoldtypeSights = "revolver" + +SWEP.IronSightStruct = { + Pos = Vector(-2.549, 1, 1.505), + Ang = Angle(0, 0, 0), + Magnification = 1.1, + SwitchToSound = "", + ViewModelFOV = 55, +} + +SWEP.ActivePos = Vector(-0.5, 1.5, 1.15) +SWEP.ActiveAng = Angle(0.5, 0.5, -2) + +SWEP.CustomizePos = Vector(-1, -2, 2) +SWEP.CustomizeAng = Angle(0, 0, 0) + +SWEP.CrouchPos = Vector(-2.2, 1, 0.6) +SWEP.CrouchAng = Angle(0, 0, -14) + +SWEP.MirrorVMWM = true +SWEP.WorldModelOffset = { + pos = Vector(-10.5, 4, -4), + ang = Angle(-6, 0, 180), + bone = "ValveBiped.Bip01_R_Hand", +} + +-- Weapon sounds -- + +local path = ")weapons/arccw_ur/deagle/" +local common = ")/arccw_uc/common/" +local rottle = {common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"} +local rutle = {common .. "movement-smg-03.ogg",common .. "movement-smg-04.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" +} + +SWEP.ShootSoundSilenced = path .. "fire_sup.ogg" +SWEP.DistantShootSound = nil +SWEP.DistantShootSoundSilenced = common .. "sup_tail.ogg" +SWEP.ShootDrySound = path .. "dryfire.ogg" + +local tail = ")/arccw_uc/common/50ae/" + +SWEP.DistantShootSoundOutdoors = { + tail .. "fire-dist-50ae-pistol-ext-01.ogg", + tail .. "fire-dist-50ae-pistol-ext-02.ogg", + tail .. "fire-dist-50ae-pistol-ext-03.ogg", + tail .. "fire-dist-50ae-pistol-ext-04.ogg", + tail .. "fire-dist-50ae-pistol-ext-05.ogg", + tail .. "fire-dist-50ae-pistol-ext-06.ogg" +} +SWEP.DistantShootSoundIndoors = { + tail .. "fire-dist-50ae-pistol-int-01.ogg", + tail .. "fire-dist-50ae-pistol-int-02.ogg", + tail .. "fire-dist-50ae-pistol-int-03.ogg", + tail .. "fire-dist-50ae-pistol-int-04.ogg", + tail .. "fire-dist-50ae-pistol-int-05.ogg", + tail .. "fire-dist-50ae-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.75 +SWEP.Hook_AddShootSound = ArcCW.UC.InnyOuty + +-- Bodygroups -- + +SWEP.BulletBones = { + [1] = "Bullet1", [2] = "Bullet2", [3] = "Bullet3", [4] = "Bullet4", [5] = "Bullet5", [6] = "Bullet6", [7] = "Bullet7" +} + +SWEP.DefaultBodygroups = "000000000" + +SWEP.AttachmentElements = { + ["ur_deagle_barrel_modern"] = { + VMBodygroups = {{ind = 1, bg = 1}}, + }, + ["ur_deagle_barrel_compact"] = { + VMBodygroups = {{ind = 1, bg = 5}}, + AttPosMods = { + [4] = { + vpos = Vector(0, 0, .15), + vang = Angle(90, 0, -90), + }, + } + }, + ["ur_deagle_barrel_compen"] = { + VMBodygroups = {{ind = 1, bg = 4}}, + }, + ["ur_deagle_barrel_ext"] = { + VMBodygroups = {{ind = 1, bg = 2}}, + AttPosMods = { + [4] = { + vpos = Vector(0, 0, 1.95), + vang = Angle(90, 0, -90), + }, + }, + }, + ["ur_deagle_barrel_marksman"] = { + VMBodygroups = {{ind = 1, bg = 3}}, + AttPosMods = { + [4] = { + vpos = Vector(0, -0.05, 5.1), + vang = Angle(90, 0, -90), + }, + }, + }, + ["ur_deagle_barrel_annihilator"] = { + VMBodygroups = {{ind = 1, bg = 6}}, + AttPosMods = { + [4] = { + vpos = Vector(0, -0.05, 1.25), + vang = Angle(90, 0, -90), + }, + }, + }, + + ["ur_deagle_mag_ext"] = { + VMBodygroups = {{ind = 2, bg = 1}} + }, + + ["ur_deagle_grip_wooden"] = { + VMBodygroups = {{ind = 4, bg = 1}} + }, + ["ur_deagle_grip_rubber"] = { + VMBodygroups = {{ind = 4, bg = 2}} + }, + + ["tac_rail"] = { + VMBodygroups = {{ind = 5, bg = 1}} + }, + ["ur_deagle_caliber_44"] = { + VMBodygroups = {{ind = 6, bg = 1}} + }, + ["ur_deagle_caliber_357"] = { + VMBodygroups = {{ind = 6, bg = 2}} + }, + ["ur_deagle_caliber_410"] = { + VMBodygroups = {{ind = 6, bg = 3}} + }, + + ["ur_deagle_skin_black"] = { + VMSkin = 1, + }, + ["ur_deagle_skin_gold"] = { + VMSkin = 2, + }, + ["ur_deagle_skin_chrome"] = { + VMSkin = 3, + }, + ["ur_deagle_skin_modern"] = { + VMBodygroups = {{ind = 0, bg = 1}}, + VMSkin = 3, + }, + ["ur_deagle_skin_sex"] = { + VMBodygroups = {{ind = 0, bg = 1}}, + VMSkin = 4, + }, +} + +SWEP.Hook_ModifyBodygroups = function(wep,data) + local vm = data.vm + if !IsValid(vm) then return end + local optic = wep.Attachments[1].Installed + local tritium = (optic == "ur_deagle_tritium") + local barrel = wep.Attachments[2].Installed or 0 + + if tritium then + -- Setup for when we introduce new barrel options + if barrel == "ur_deagle_barrel_marksman" then + vm:SetBodygroup(3,3) + elseif barrel == "ur_deagle_barrel_ext" then + vm:SetBodygroup(3,2) + elseif barrel == "ur_deagle_barrel_compact" then + vm:SetBodygroup(3,4) + elseif barrel == "ur_deagle_barrel_annihilator" then + vm:SetBodygroup(3,5) + else + vm:SetBodygroup(3,1) + end + -- elseif optic and barrel == 0 then + -- vm:SetBodygroup(1,1) + end + + if barrel == "ur_deagle_barrel_annihilator" then + if vm:GetBodygroup(5) == 1 then + vm:SetBodygroup(5,2) + end + end +end + +SWEP.Hook_NameChange = function(wep, name) + if wep.Attachments[2].Installed == "ur_deagle_barrel_annihilator" then + return "Annihilator" + elseif !GetConVar("arccw_truenames"):GetBool() then + local add = ".50" + local cal = wep.Attachments[3].Installed + + if cal == "ur_deagle_caliber_357" then + add = ".357" + elseif cal == "ur_deagle_caliber_44" then + add = ".44" + elseif cal == "ur_deagle_caliber_410" then + add = ".410" + end + + return "Predator " .. add + else + return "Desert Eagle" + end +end + +-- Animations -- + +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 = { + ["idle_empty"] = { + Source = "idle_empty", + Time = 120 / 60, + }, + ["idle_jammed"] = { -- pistol-like malfucntions not implemented yet in arccw + Source = "idle_jammed", + Time = 120 / 60, + }, + ["idle"] = { + Source = "idle", + Time = 120 / 60, + }, + ["ready"] = { + Source = "ready", + Time = 73 / 60, + LHIK = true, + LHIKIn = 0, + LHIKEaseOut = 0.3, + LHIKOut = 0.6, + SoundTable = { + { s = rottle, t = 0 / 60, c = ca }, + { s = path .. "slidepull.ogg", t = 12 / 60, c = ca }, + { s = path .. "chamber.ogg", t = 20 / 60, c = ca }, + }, + }, + + ["draw"] = { + Source = "draw", + SoundTable = { + {s = common .. "raise.ogg", t = 0.05}, + }, + }, + ["draw_empty"] = { + Source = "draw_empty", + Time = 20 / 30, + SoundTable = { + {s = common .. "raise.ogg", t = 0.05}, + }, + }, + ["holster"] = { + Source = "holster", + LHIK = true, + LHIKIn = 0.3, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.4, + SoundTable = { + {s = common .. "raise.ogg", t = 0.05}, + }, + }, + ["holster_empty"] = { + Source = "holster_empty", + LHIK = true, + LHIKIn = 0.3, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.4, + SoundTable = { + {s = common .. "raise.ogg", t = 0.05}, + }, + }, + + ["fire"] = { + Source = {"fire_01", "fire_02", "fire_03"}, + Time = 0.9, + ShellEjectAt = 0.05, + SoundTable = { + { s = mech, t = 0, v = 0.5 } + }, + }, + ["fire_iron"] = { + Source = {"fire_01", "fire_02", "fire_03"}, + Time = 0.9, + ShellEjectAt = 0.05, + SoundTable = { + { s = common .. "common_mech_heavy.ogg", t = 0 }, + { s = mech, t = 0 } + }, + }, + ["fire_jammed"] = { + Source = "fire_jammed", + SoundTable = { + { s = mech, t = 0 } + }, + }, + ["fire_empty"] = { + Source = "fire_empty", + Time = 0.9, + ShellEjectAt = 0.05, + SoundTable = { + { s = path .. "mech_last.ogg", t = 0 } + }, + }, + ["fire_iron_empty"] = { + Source = "fire_empty", + Time = 0.9, + ShellEjectAt = 0.05, + SoundTable = { + { s = common .. "common_mech_heavy.ogg", t = 0 }, + { s = path .. "mech-last.ogg", t = 0 } + }, + }, + + -- 7-R Reloads -- + + ["reload"] = { + Source = "reload", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_PISTOL, + MinProgress = 1.3525, + Time = 2.2, + LastClip1OutTime = 0.9, + LHIK = true, + LHIKIn = 0.2, + LHIKEaseIn = 0.2, + LHIKEaseOut = 0.6, + LHIKOut = 0.62, + SoundTable = { + { s = rottle, t = 0 / 60, c = ca }, + { s = common .. "magrelease.ogg", t = 7 / 60, c = ca }, + { s = path .. "magout.ogg", t = 6 / 60, c = ca }, + { s = rottle, t = 10 / 60, c = ca }, + { s = common .. "magpouch_pull_small.ogg", t = 30 / 60, c = ca }, + { s = rottle, t = 55 / 60, c = ca }, + { s = path .. "magin_miss.ogg", t = 61 / 60, c = ca }, + { s = path .. "magin_old.ogg", t = 66 / 60, c = ca }, + }, + }, + ["reload_empty"] = { + Source = "reload_empty", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_PISTOL, + MinProgress = 1.75, + Time = 2.55, + LastClip1OutTime = 0.76, + LHIK = true, + LHIKIn = 0.1, + LHIKEaseIn = 0.1, + LHIKEaseOut = 0.55, + LHIKOut = 0.7, + SoundTable = { + { s = rottle, t = 0 / 60, c = ca }, + { s = common .. "magrelease.ogg", t = 7 / 60, c = ca }, + { s = path .. "magout_old.ogg", t = 8 / 60, c = ca }, + { s = rottle, t = 10 / 60, c = ca }, + { s = common .. "magpouch_pull_small.ogg", t = 26 / 60, c = ca }, + { s = common .. "pistol_magdrop.ogg", t = 40 / 60, c = ca }, + { s = rottle, t = 55 / 60, c = ca }, + { s = path .. "magin_miss.ogg", t = 58 / 60, c = ca }, + { s = path .. "magin_old.ogg", t = 62 / 60, c = ca }, + { s = path .. "chamber.ogg", t = 90 / 60, c = ca }, + { s = rottle, t = 75 / 60, c = ca }, + }, + }, + + -- 10-R Reloads -- + + ["reload_10"] = { + Source = "reload_exte", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_PISTOL, + MinProgress = 1.3525, + Time = 139 / 60, + LastClip1OutTime = 0.9, + LHIK = true, + LHIKIn = 0.2, + LHIKEaseIn = 0.2, + LHIKEaseOut = 0.6, + LHIKOut = 0.62, + SoundTable = { + { s = rottle, t = 0 / 60, c = ca }, + { s = common .. "magrelease.ogg", t = 7 / 60, c = ca }, + { s = path .. "magout.ogg", t = 6 / 60, c = ca }, + { s = rottle, t = 10 / 60, c = ca }, + { s = common .. "magpouch.ogg", t = 30 / 60, c = ca }, + { s = rottle, t = 55 / 60, c = ca }, + { s = path .. "magin_miss.ogg", t = 64 / 60, c = ca }, + { s = path .. "magin_old.ogg", t = 71 / 60, c = ca }, + }, + }, + ["reload_empty_10"] = { + Source = "reload_empty_exte", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_PISTOL, + MinProgress = 1.75, + Time = 160 / 60, + LastClip1OutTime = 0.76, + LHIK = true, + LHIKIn = 0.1, + LHIKEaseIn = 0.1, + LHIKEaseOut = 0.55, + LHIKOut = 0.7, + SoundTable = { + { s = rottle, t = 0 / 60, c = ca }, + { s = common .. "magrelease.ogg", t = 7 / 60, c = ca }, + { s = path .. "magout_old.ogg", t = 8 / 60, c = ca }, + { s = rottle, t = 10 / 60, c = ca }, + { s = common .. "magpouch.ogg", t = 26 / 60, c = ca }, + { s = common .. "pistol_magdrop.ogg", t = 40 / 60, c = ca }, + { s = rottle, t = 55 / 60, c = ca }, + { s = path .. "magin_miss.ogg", t = 60 / 60, c = ca }, + { s = path .. "magin_old.ogg", t = 66 / 60, c = ca }, + { s = path .. "chamber.ogg", t = 94 / 60, c = ca }, + { s = rottle, t = 75 / 60, c = ca }, + }, + }, + + ["unjam"] = { + Source = "unjam", + Time = 0.9, + -- ShellEjectAt = 0.65, + SoundTable = { + {s = rottle, t = 0}, + {s = path .. "unjam.ogg", t = .4} + }, + LHIK = true, + LHIKIn = .2, + LHIKOut = .2, + LHIKEaseOut = .75, + }, + -- Inspecc -- + ["enter_inspect"] = { + Source = "enter_inspect", + time = 35 / 60, + LHIK = true, + LHIKIn = 0.3, + LHIKOut = 0, + SoundTable = { + {s = rottle, t = 0}, + {s = rutle, t = 0.1}, + }, + }, + ["idle_inspect"] = { + Source = "idle_inspect", + time = 72 / 60, + LHIK = true, + LHIKIn = 0, + LHIKOut = 0, + }, + ["exit_inspect"] = { + Source = "exit_inspect", + time = 66 / 60, + LHIK = true, + LHIKIn = 0, + LHIKEaseOut = 0.3, + LHIKOut = 0.84, + SoundTable = { + { s = rottle, t = 0 / 60, c = ca }, + { s = common .. "magrelease.ogg", t = 7 / 60, c = ca }, + { s = path .. "magout.ogg", t = 8 / 60, c = ca }, + { s = rottle, t = 100 / 60, c = ca }, + { s = path .. "magin_miss.ogg", t = 106 / 60, c = ca }, + { s = path .. "magin_old.ogg", t = 114 / 60, c = ca }, + { s = path .. "rack1.ogg", t = 155 / 60, c = ca }, + { s = rottle, t = 160 / 60, c = ca }, + { s = path .. "rack2.ogg", t = 178 / 60, c = ca }, + { s = rottle, t = 180 / 60, c = ca }, + }, + }, + + ["enter_inspect_empty"] = { + Source = "enter_inspect_empty", + time = 35 / 60, + LHIK = true, + LHIKIn = 0.1, + LHIKOut = 0, + SoundTable = { + }, + }, + ["idle_inspect_empty"] = { + Source = "idle_inspect_empty", + time = 72 / 60, + LHIK = true, + LHIKIn = 0, + LHIKOut = 0, + }, + ["exit_inspect_empty"] = { + Source = "exit_inspect_empty", + time = 66 / 60, + LHIK = true, + LHIKIn = 0, + LHIKEaseOut = 0.3, + LHIKOut = 0.84, + SoundTable = { + { s = rottle, t = 0 / 60, c = ca }, + { s = common .. "magrelease.ogg", t = 7 / 60, c = ca }, + { s = path .. "magout.ogg", t = 8 / 60, c = ca }, + { s = rottle, t = 100 / 60, c = ca }, + { s = path .. "magin_miss.ogg", t = 106 / 60, c = ca }, + { s = path .. "magin_old.ogg", t = 114 / 60, c = ca }, + { s = rottle, t = 160 / 60, c = ca }, + }, + }, + + ["enter_inspect_jammed"] = { + Source = "enter_inspect_jammed", + time = 35 / 60, + LHIK = true, + LHIKIn = 0.1, + LHIKOut = 0, + SoundTable = { + }, + }, + ["idle_inspect_jammed"] = { + Source = "idle_inspect_jammed", + time = 72 / 60, + LHIK = true, + LHIKIn = 0, + LHIKOut = 0, + }, + ["exit_inspect_jammed"] = { + Source = "exit_inspect_jammed", + time = 66 / 60, + LHIK = true, + LHIKIn = 0, + LHIKEaseOut = 0.3, + LHIKOut = 0.84, + SoundTable = { + { s = rottle, t = 0 / 60, c = ca }, + { s = common .. "magrelease.ogg", t = 7 / 60, c = ca }, + { s = path .. "magout.ogg", t = 8 / 60, c = ca }, + { s = rottle, t = 100 / 60, c = ca }, + { s = path .. "magin_miss.ogg", t = 106 / 60, c = ca }, + { s = path .. "magin_old.ogg", t = 114 / 60, c = ca }, + { s = rottle, t = 160 / 60, c = ca }, + }, + }, +} + +-- ADS animation blending, thanks fesiug -- + +SWEP.Hook_Think = function(wep) + if IsValid(wep) and wep.ArcCW then + local vm = wep:GetOwner():GetViewModel() + + local delta = 1-wep:GetSightDelta() + + local bipoded = wep:GetInBipod() + wep.ADSBipodAnims = math.Approach(wep.ADSBipodAnims or 0, bipoded and 1 or 0, FrameTime() / 0.5) + + vm:SetPoseParameter("sights", Lerp( math.ease.InOutCubic(math.max(delta, wep.ADSBipodAnims)), 0, 1)) -- thanks fesiug + + local slot = wep.Attachments[3].Installed + if wep.Attachments[7].Installed or slot == "ur_deagle_caliber_357" then + vm:SetPoseParameter("light", 1) + elseif slot == "ur_deagle_caliber_44" then + vm:SetPoseParameter("light", .5) + else + vm:SetPoseParameter("light", 0) + end + end +end + + +-- Attachments -- + +SWEP.CamAttachment = 3 + +SWEP.Attachments = { + { + PrintName = "Optic", + Slot = {"optic_lp","ur_deagle_tritium","optic"}, + DefaultAttName = "Iron Sights", + Bone = "Body", + Offset = { + vpos = Vector(0, -5.15, 6.4), + vang = Angle(90, 0, -90), + }, + }, + { + PrintName = "Barrel", + Slot = {"ur_deagle_barrel"}, + DefaultAttIcon = Material("entities/att/acwatt_ur_deagle_barrel.png","mips smooth"), + DefaultAttName = "6\" Standard Barrel", + Bone = "Body", + Offset = { + vpos = Vector(3.07, -3.8, -27), + vang = Angle(90, 0, -90), + }, + }, + { + PrintName = "Caliber", + Slot = {"ur_deagle_caliber"}, + DefaultAttIcon = Material("entities/att/uc_bullets/50ae.png","mips smooth"), + DefaultAttName = ".50 Action Express", + Bone = "Body", + Offset = { + vpos = Vector(3.07, -3.8, -27), + vang = Angle(90, 0, -90), + }, + }, + { + PrintName = "Muzzle", + DefaultAttName = "Standard Muzzle", + Slot = {"muzzle"}, + Bone = "Barrel", + Offset = { + vpos = Vector(0, 0, 0.75), + vang = Angle(90, 0, -90), + }, + InstalledEles = {"nofh"}, + ExcludeFlags = {"barrel_annihilator"}, + Hidden = true, + Integral = true, + }, + { + PrintName = "Tactical", + InstalledEles = {"tac_rail"}, + Slot = {"tac_pistol"}, + Bone = "Body", + Offset = { + vpos = Vector(0, -3.5, 7), + vang = Angle(90, 0, -90), + }, + MergeSlots = {15}, + }, + { + PrintName = "Magazine", + Slot = {"ur_deagle_mag"}, + DefaultAttIcon = Material("entities/att/acwatt_ur_deagle_mag_7.png","mips smooth"), + DefaultAttName = "7-Round Mag", + }, + { + PrintName = "Stock", + Slot = {"uc_stock", "go_stock_pistol_bt"}, + VMScale = Vector(1.1, 1.1, 1.1), + Bone = "Body", + Offset = { + vpos = Vector(0, -0.25, -1), + vang = Angle(90, 0, -90), + }, + }, + { + PrintName = "Grip", + DefaultAttName = "Factory Grip", + DefaultAttIcon = Material("entities/att/acwatt_ur_deagle_grip_plastic.png","mips smooth"), + Slot = "ur_deagle_grip" + }, + { + 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 = "Body", + Offset = { + vpos = Vector(0.55, -3.4, 4.2), + vang = Angle(90, 0, -90), + }, + VMScale = Vector(.65,.65,.65), + }, + { + PrintName = "Finish", + Slot = {"ur_deagle_skin"}, + DefaultAttName = "Stainless Steel", + DefaultAttIcon = Material("entities/att/acwatt_ur_deagle_finish_default.png","mips smooth"), + FreeSlot = true, + }, + { + PrintName = "M203 slot", + Slot = "uc_ubgl", + Bone = "Body", + Offset = { + vpos = Vector(0, -4.8, 6.0), + vang = Angle(90, 0, -90), + }, + Hidden = true, + } +} \ No newline at end of file diff --git a/lua/weapons/arccw_ur_g3.lua b/lua/weapons/arccw_ur_g3.lua new file mode 100644 index 0000000..7c43e7a --- /dev/null +++ b/lua/weapons/arccw_ur_g3.lua @@ -0,0 +1,1168 @@ +SWEP.Base = "arccw_base" +SWEP.Spawnable = true -- this obviously has to be set to true +SWEP.Category = "ArcCW - Urban Coalition" -- edit this if you like +SWEP.UC_CategoryPack = "2Urban Renewal" +SWEP.AdminOnly = false + +SWEP.PrintName = "AG58" +SWEP.TrueName = "G3A3" + +SWEP.Trivia_Class = "Battle Rifle" +SWEP.Trivia_Desc = [[Heckler & Koch's earliest major weapon design, conceived in collaboration with Spanish research group CETME. As a pioneer of the roller-delay system, its success within the Bundeswehr inspired HK to derive subsequent designs from its layout, including the MP5 submachine gun. + +Well known for its excellent accuracy and range, but its powerful cartridge makes sustained fire difficult.]] +SWEP.Trivia_Manufacturer = "Crowdley & Nelson" +SWEP.Trivia_Calibre = "7.62x51mm NATO" +SWEP.Trivia_Mechanism = "Roller-Delayed Blowback" +SWEP.Trivia_Country = "Germany" +SWEP.Trivia_Year = 1958 + +if GetConVar("arccw_truenames"):GetBool() then + SWEP.PrintName = SWEP.TrueName + SWEP.Trivia_Manufacturer = "Heckler & Koch" +end + +SWEP.Slot = 2 +SWEP.CamAttachment = 3 + +SWEP.UseHands = true + +SWEP.ViewModel = "models/weapons/arccw/c_ur_g3.mdl" +SWEP.WorldModel = "models/weapons/arccw/c_ur_g3.mdl" +SWEP.ViewModelFOV = 70 + +SWEP.DefaultBodygroups = "000000000000" + +-- Damage -- + +SWEP.Damage = 65 +SWEP.DamageMin = 35 +SWEP.RangeMin = 50 +SWEP.Range = 400 +SWEP.Penetration = 20 +SWEP.DamageType = DMG_BULLET +SWEP.ShootEntity = nil +SWEP.MuzzleVelocity = 715 +SWEP.PhysBulletMuzzleVelocity = 715 + +SWEP.BodyDamageMults = ArcCW.UC.BodyDamageMults + +-- Mag size -- + +SWEP.ChamberSize = 1 +SWEP.Primary.ClipSize = 20 + +-- Recoil -- + +SWEP.Recoil = 1.4 +SWEP.RecoilSide = 0.6 + +SWEP.RecoilRise = 0.6 +SWEP.RecoilPunch = 1 +SWEP.VisualRecoilMult = 1 +SWEP.MaxRecoilBlowback = 1 +SWEP.MaxRecoilPunch = 1 +SWEP.RecoilPunchBack = 2 + +SWEP.Sway = 0.4 + +-- Firerate / Firemodes -- + +SWEP.Delay = 60 / 520 +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 = 900 +SWEP.MoveDispersion = 200 +SWEP.JumpDispersion = 1000 + +SWEP.Primary.Ammo = "ar2" +SWEP.MagID = "ak" + +SWEP.HeatCapacity = 75 +SWEP.HeatDissipation = 15 +SWEP.HeatDelayTime = 3 + +-- SWEP.Malfunction = true +SWEP.MalfunctionMean = 200 +--SWEP.MeleeTime = 1.5 + +-- Speed multipliers -- + +SWEP.SpeedMult = 0.9 +SWEP.SightedSpeedMult = 0.75 +SWEP.SightTime = 0.35 +SWEP.ShootSpeedMult = 0.75 + +local path = ")weapons/arccw_ur/g3/" +local path1 = ")weapons/arccw_ur/mp5/" +local common = ")/arccw_uc/common/" +local rottle = {common .. "cloth_1.ogg", common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"} +local ratel = {common .. "rattle1.ogg", common .. "rattle2.ogg", common .. "rattle3.ogg"} +--SWEP.FirstShootSound = path .. "fire_first.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" +} +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/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 + +SWEP.MuzzleEffect = "muzzleflash_6" +SWEP.ShellEffect = "arccw_uc_shelleffect" +SWEP.ShellModel = "models/weapons/arccw/uc_shells/556x45.mdl" +SWEP.ShellScale = 1.145 +SWEP.ShellPitch = 90 +SWEP.ShellScale = 1 +SWEP.ShellRotateAngle = Angle(0, 0, 0) +SWEP.UC_ShellColor = Color(0.7*255, 0.2*255, 0.2*255) + +SWEP.MuzzleEffectAttachment = 1 -- which attachment to put the muzzle on +SWEP.CaseEffectAttachment = 2 -- which attachment to put the case effect on + +SWEP.BulletBones = { + --[1] = "tag_mag2", +} + +SWEP.IronSightStruct = { + Pos = Vector(-2.3, -1, 0.9), + Ang = Angle(0, 0.02, 0), + Magnification = 1.1, + ViewModelFOV = 65, + SwitchToSound = "", -- sound that plays when switching to this sight + CrosshairInSights = false +} +SWEP.LaserOffsetAngle = Angle(0, 0, 0) +SWEP.LaserIronsAngle = Angle(0, 0, 0) + +SWEP.HoldtypeHolstered = "passive" +SWEP.HoldtypeActive = "ar2" +SWEP.HoldtypeSights = "rpg" + +SWEP.AnimShoot = ACT_HL2MP_GESTURE_RANGE_ATTACK_AR2 + +SWEP.ActivePos = Vector(0.3, 1, 0.8) +SWEP.ActiveAng = Angle(0, 0, 0) + +SWEP.SprintPos = Vector(0.5, 1, 0.5) +SWEP.SprintAng = Angle(-8.5, 15, -10) + +SWEP.CrouchPos = Vector(-0.7, 0.6, 0) +SWEP.CrouchAng = Angle(0, 0, -14) + +SWEP.HolsterPos = Vector(-1, -1, 1.2) +SWEP.HolsterAng = Angle(-15, 8, -10) + +SWEP.BarrelOffsetSighted = Vector(0, 0, 0) +SWEP.BarrelOffsetHip = Vector(0, 0, 0) + +-- SWEP.CustomizePos = Vector(10.5, 4, 1) +-- SWEP.CustomizeAng = Angle(8, 30, 15) +SWEP.CustomizePos = Vector(0, 0, 0) +SWEP.CustomizeAng = Angle(0, 0, 0) + +SWEP.BarrelLength = 24 + +SWEP.AttachmentElements = { + ["ur_g3_skin_wood"] = { VMSkin = 1 }, + ["ur_g3_skin_olive"] = { VMSkin = 2 }, + ["ur_g3_skin_tan"] = { VMSkin = 3 }, + ["ur_g3_skin_custom"] = { VMSkin = 4 }, + + ["stock_g3_collapsible"] = { + VMBodygroups = { + {ind = 5, bg = 2}, + } + }, + ["stock_g3_collapsed"] = { + VMBodygroups = { + {ind = 5, bg = 3}, + } + }, + ["ur_g3_stock_psg"] = { + VMBodygroups = { + {ind = 5, bg = 4}, + } + }, + ["ur_g3_stock_sg"] = { + VMBodygroups = { + {ind = 5, bg = 1}, + } + }, + ["ur_g3_stock_rucar"] = { + VMBodygroups = { + {ind = 5, bg = 5}, + } + }, + + ["ur_g3_rec_hk33"] = { + VMBodygroups = { + {ind = 0, bg = 1}, + {ind = 3, bg = 1}, + {ind = 4, bg = 4}, + }, + }, + ["ur_g3_rec_psg"] = { + VMBodygroups = { + -- {ind = 1, bg = 1}, + {ind = 3, bg = 2}, + }, + NameChange = "PMR-2", + TrueNameChange = "PSG1", + }, + + ["ur_g3_mag_10"] = { + VMBodygroups = { + {ind = 4, bg = 1}, + } + }, + ["ur_g3_mag_50"] = { + VMBodygroups = { + {ind = 4, bg = 2}, + } + }, + ["ur_g3_mag_20_556"] = { + VMBodygroups = { + {ind = 4, bg = 3}, + } + }, + ["ur_g3_mag_40_556"] = { + VMBodygroups = { + {ind = 4, bg = 5}, + } + }, + + ["ur_g3_barrel_12"] = { + VMBodygroups = { + {ind = 2, bg = 1}, + }, + AttPosMods = { + [5] = { + vpos = Vector(0, 0.06, 17.7), + vang = Angle(90, 0, -90), + }, + [7] = { + vpos = Vector(-0.94, 0.2, 14), + vang = Angle(90, 0, 180), + }, + } + }, + ["ur_g3_barrel_15"] = { + VMBodygroups = { + {ind = 2, bg = 4}, + }, + AttPosMods = { + [5] = { + vpos = Vector(0, 0.06, 20), + vang = Angle(90, 0, -90), + }, + [7] = { + vpos = Vector(-0.94, 0.2, 14), + vang = Angle(90, 0, 180), + }, + } + }, + ["ur_g3_barrel_8"] = { + VMBodygroups = { + {ind = 2, bg = 2}, + }, + AttPosMods = { + [5] = { + vpos = Vector(0, 0.06, 13.7), + vang = Angle(90, 0, -90), + }, + [7] = { + vpos = Vector(-0.94, 0.2, 11), + vang = Angle(90, 0, 180), + }, + } + }, + ["ur_g3_barrel_26"] = { + VMBodygroups = { + {ind = 2, bg = 3}, + }, + AttPosMods = { + [5] = { + vpos = Vector(0, 0.06, 29.7), + vang = Angle(90, 0, -90), + }, + [7] = { + vpos = Vector(-0.94, 0.2, 17), + vang = Angle(90, 0, 180), + }, + } + }, + + ["ur_g3_hg_slim"] = { + AttPosMods = { + [6] = { + vpos = Vector(0, 0.66, 9), + vang = Angle(90, 0, -90), + }, + } + }, + ["ur_g3_hg_pica"] = { + AttPosMods = { + [6] = { + vpos = Vector(0, 0.75, 9.2), + vang = Angle(90, 0, -90), + }, + } + }, +} + +local hgbg = { + ["ur_g3_hg_slim"] = 1, + ["ur_g3_hg_pica"] = 2, + ["ur_mp5_ub_mlok"] = 3, + ["ur_mp5_ub_surefire"] = 4, +} +local muzzlebg = { + ["ur_g3_barrel_8"] = 2, + ["ur_g3_barrel_12"] = 1, + ["ur_g3_barrel_15"] = 4, + ["ur_g3_barrel_26"] = 3, + ["default"] = 0, +} +local opticbg = { + ["ur_g3_optic_psg1"] = 2, + ["ur_g3_optic_sg1"] = 3, +} +local ubmountbg = { + ["ur_g3_hg_slim"] = 2, + ["ur_g3_hg_pica"] = 0, +} + +SWEP.Hook_ModifyBodygroups = function(wep,data) + local vm = data.vm + if !IsValid(vm) then return end + + local atts = wep.Attachments + local barrel = atts[2].Installed or "default" + local hg = atts[4].Installed + local muzzle = atts[5].Installed + local ub = atts[6].Installed or atts[15].Installed + local optic = atts[1].Installed + local charm = atts[14].Installed + local bayobipod = atts[17].Installed + + local hgind = hgbg[hg] or 0 + + if barrel == "ur_g3_barrel_12" or barrel == "ur_g3_barrel_15" then + vm:SetBodygroup(6, hgind + 3) + + if ub == "ur_g3_ub_bayonet" then + vm:SetBodygroup(7, 2) + elseif ub == "ur_g3_ub_bipod" then + vm:SetBodygroup(7, 4) + end + elseif barrel == "ur_g3_barrel_8" then + vm:SetBodygroup(6, hgind + 6) + elseif barrel == "ur_g3_barrel_26" then + vm:SetBodygroup(6, 11) + else + vm:SetBodygroup(6, hgind) + end + + if (barrel == "default" or barrel == "ur_g3_barrel_12" or barrel == "ur_g3_barrel_15" or barrel == "ur_g3_barrel_8") and ub == "uc_ubgl_hk79" then + vm:SetBodygroup(6, 11) + atts[15].Offset.vpos = Vector(0, -0.7, 7.3) + else + atts[15].Offset.vpos = Vector(0, 0.1, 6.9) + end + + if barrel == "ur_g3_barrel_26" then + vm:SetBodygroup(1, 1) + end + + vm:SetBodygroup(9, !muzzle and muzzlebg[barrel] or 3) + + vm:SetBodygroup(10, (optic or charm == "ur_mp5_optic_mount") and (opticbg[optic] and 0 or 1) or 0) + + vm:SetBodygroup(8, ub and (ubmountbg[hg] or 1) or 0) + + local todo = 0 + local short = barrel == "ur_g3_barrel_12" or barrel == "ur_g3_barrel_15" + if bayobipod == "ur_g3_bayobipod_bayonet" then + todo = short and 2 or 1 + elseif bayobipod == "ur_g3_bayobipod_bipod" then + todo = short and 4 or 3 + end + vm:SetBodygroup(7, todo) +end + +SWEP.Hook_NameChange = function(wep) + local atts = wep.Attachments + local barr = string.Replace(atts[2].Installed or "default","ur_g3_barrel_","") + local rec = string.Replace(atts[3].Installed or "default","ur_g3_rec_","") + local stock = string.Replace(atts[8].Installed or "default","ur_g3_stock_","") + local trueNames = GetConVar("arccw_truenames"):GetBool() + + + if rec == "hk33" then + if trueNames then + local bLookup = { + ["8"] = "HK53", + ["12"] = "HK33KA3", + } + + if bLookup[barr] then + return bLookup[barr] + elseif atts[1].Installed == "ur_g3_optic_sg1" then + return "HK33SG/1" + else + return (stock == "collapsible" and "HK33A3") or "HK33A2" + end + else + local bLookup = { + ["8"] = "CN109", + ["12"] = "CN66K", + } + + if bLookup[barr] then + return bLookup[barr] + elseif atts[1].Installed == "ur_g3_optic_sg1" then + return "CN66-SSR" + else + return "CN66" + end + end + elseif rec == "default" then -- not "else" here to allow the base's PSG1 namechange to happen + if trueNames then + if atts[13].Installed == "uc_fg_civvy" then return "HK91" end + + local bLookup = { + ["8"] = "HK51", + ["12"] = "G3KA4", + } + + if bLookup[barr] then + return bLookup[barr] + elseif atts[1].Installed == "ur_g3_optic_sg1" then + return "G3SG/1" + else + return (stock == "collapsible" and "G3A4") or wep.TrueName + end + else + local bLookup = { + ["8"] = "CN102", + ["12"] = "AG58K", + } + if bLookup[barr] then + return bLookup[barr] + elseif atts[1].Installed == "ur_g3_optic_sg1" then + return "AG-SSR" + else + return "AG58" + end + end + end +end + +SWEP.O_Hook_UC_UseClassicHK79Mount = function(wep, data) + local atts = wep.Attachments + local barrel = atts[2].Installed or "default" + local ub = atts[6].Installed or atts[15].Installed + + if ub == "uc_ubgl_hk79" and (barrel == "default" or barrel == "ur_g3_barrel_12" or barrel == "ur_g3_barrel_15" or barrel == "ur_g3_barrel_8") then + data.current = true + end +end + +SWEP.ExtraSightDist = 2 +SWEP.GuaranteeLaser = false + +SWEP.WorldModelOffset = { + pos = Vector(-5, 3, -5), + ang = Angle(-12, 0, 180) +} + +SWEP.MirrorVMWM = true + + +SWEP.Attachments = { + { + PrintName = "Optic", + Slot = {"ur_g3_optic", "optic"}, + Bone = "body", + Offset = { + vpos = Vector(0, -1.6, -0.55), + vang = Angle(90, 0, -90), + }, + InstalledEles = {"mount_optic"}, + CorrectivePos = Vector(0.018, 0, -0.0), + CorrectiveAng = Angle(0, 0.3, 0.45), + }, + { + PrintName = "Barrel", + Slot = "ur_g3_barrel", + DefaultAttName = "18\" Standard Barrel", + DefaultAttIcon = Material("entities/att/ur_g3/barrel_std.png", "smooth mips"), + DefaultFlags = {"g3_not8"} + }, + { + PrintName = "Reciever", + Slot = "ur_g3_rec", + DefaultAttName = "Standard Reciever", + DefaultAttIcon = Material("entities/att/ur_g3/rec_std.png", "smooth mips"), + }, + { + PrintName = "Handguard", + Slot = "ur_g3_handguard", + Bone = "body", + Offset = { + vpos = Vector(0, 1.5, 10), + vang = Angle(90, 0, -90), + }, + DefaultAttName = "Standard Handguard", + DefaultAttIcon = Material("entities/att/ur_g3/hg_std.png", "smooth mips"), + ExcludeFlags = {"hk79_pro","g3_nohg"}, + }, + { + PrintName = "Muzzle", + Slot = "muzzle", + Bone = "body", + Offset = { + vpos = Vector(0, 0.06, 22.5), + vang = Angle(90, 0, -90), + }, + MergeSlots = {17}, + }, + { + PrintName = "Underbarrel", + Slot = "foregrip", + Bone = "body", + Offset = { + vpos = Vector(0, 1.17, 8.6), + vang = Angle(90, 0, -90), + }, + InstalledEles = {"mount_underbarrel"}, + ExcludeFlags = {"g3_noub"}, + MergeSlots = {15}, + }, + { + PrintName = "Tactical", + Slot = "tac", + Bone = "body", + Offset = { + vpos = Vector(-0.8, 0, 17), + vang = Angle(90, 0, 180), + }, + InstalledEles = {"mount_tactical"}, + }, + { + PrintName = "Stock", + Slot = "ur_g3_stock", + DefaultAttName = "Factory Stock", + DefaultAttIcon = Material("entities/att/ur_g3/stock_std.png", "smooth mips"), + }, + { + PrintName = "Magazine", + Slot = "ur_g3_mag", + DefaultAttName = "20-Round Mag", + DefaultAttIcon = Material("entities/att/ur_g3/mag20.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", + DefaultAttName = "Standard Internals" + }, + { + PrintName = "Charm", + Slot = {"charm", "fml_charm", "mp5_charm"}, + FreeSlot = true, + Bone = "body", + Offset = { + vpos = Vector(0.5, 1.3, 3), + vang = Angle(90, 0, -90), + }, + }, + { + PrintName = "M203 slot", + Slot = "uc_ubgl", + Bone = "body", + Offset = { + vpos = Vector(0, 0.1, 6.9), -- this is also changed by ModifyBodygroups + vang = Angle(90, 0, -90), + }, + Hidden = true, + InstalledEles = {"mount_underbarrel"}, + }, + { + PrintName = "Furniture", + Slot = "ur_g3_skin", + DefaultAttName = "Gray", + DefaultAttIcon = Material("entities/att/ur_g3/skin_gray.png", "smooth mips"), + }, + { + PrintName = "UR G3 bayobipod slot", + Slot = "ur_g3_bayobipod", + ExcludeFlags = {"g3_hk51hg"}, + Hidden = true, + }, +} + +SWEP.Animations = { + ["idle"] = { + Source = "idle" + }, + ["draw"] = { + Source = "draw", + LHIK = false, + LHIKIn = 0, + LHIKOut = 0.5, + SoundTable = { + {s = ratel, t = 0}, + {s = common .. "raise.ogg", t = 0.2}, + {s = common .. "shoulder.ogg", t = 0.2}, + }, + }, + ["holster"] = { + Source = "holster", + LHIK = false, + LHIKIn = 0, + LHIKOut = 0.5, + SoundTable = { + {s = ratel, t = 0}, + -- {s = common .. "raise.ogg", t = 0.2}, + -- {s = common .. "shoulder.ogg", t = 0.2}, + }, + }, + ["ready"] = { + Source = "ready", + LHIK = true, + LHIKIn = 0, + LHIKOut = 0.6, + LHIKEaseOut = 0.25, + SoundTable = { + {s = ratel, t = 0}, + {s = path .. "chback.ogg", t = 0.2}, + {s = path .. "chamber.ogg", t = 0.3}, + {s = common .. "shoulder.ogg", t = .6}, + }, + }, + + ["fire"] = { + Source = {"fire_01","fire_02","fire_03"}, + ShellEjectAt = 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_01","fire_02","fire_03"}, + ShellEjectAt = 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 } + }, + }, + + ["reload"] = { + Source = "reload", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + LHIK = true, + LHIKIn = 0.3, + LHIKOut = 0.65, + LHIKEaseOut = 0.25, + MinProgress = 1.3, + SoundTable = { + {s = rottle, t = 0.0}, + {s = ratel, t = 3/30}, + {s = common .. "magpouch_gear.ogg", t = 9/30}, + {s = path .. "magout.ogg", t = 11/30}, + {s = ratel, t = 0.5}, + {s = rottle, t = 0.75}, + {s = path .. "struggle.ogg", t = 36/30}, + {s = path .. "magin.ogg", t = 42/30}, + {s = ratel, t = 1.1}, + {s = rottle, t = 1.15}, + {s = common .. "grab.ogg", t = 52/30}, + {s = common .. "shoulder.ogg", t = 54/30}, + }, + }, + ["reload_empty"] = { + Source = "reload_empty", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + LHIK = true, + LHIKIn = 0.3, + LHIKOut = 0.5, + LHIKEaseOut = 0.25, + MinProgress = 2.1, + LastClip1OutTime = 50/30, + SoundTable = { + {s = rottle, t = 0.0}, + {s = path .. "chback.ogg", t = 5/30, v = 1.95}, + {s = path .. "chlock.ogg", t = 13/30, v = 1.95}, + {s = ratel, t = 23/30}, + {s = rottle, t = 24/30}, + {s = common .. "magpouch_gear.ogg", t = 25/30}, + {s = path .. "magrel.ogg", t = 27/30}, + {s = path .. "magout.ogg", t = 30/30}, + {s = rottle, t = 49/30}, + {s = rottle, t = 55/30}, + {s = {common .. "rifle_magdrop_1.ogg",common .. "rifle_magdrop_2.ogg",common .. "rifle_magdrop_3.ogg",common .. "rifle_magdrop_4.ogg",common .. "rifle_magdrop.ogg"}, t = 51/30, v = 0.25}, + {s = path .. "struggle.ogg", t = 57/30}, + {s = path .. "magin.ogg", t = 62/30}, + {s = rottle, t = 75/30}, + {s = path .. "chslap.ogg", t = 80/30}, + {s = ratel, t = 81/30}, + {s = common .. "grab.ogg", t = 87/30}, + {s = common .. "shoulder.ogg", t = 88/30}, + }, + }, + ["reload_empty_scope"] = { + Source = "reload_empty_scope", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + LHIK = true, + LHIKIn = 0.3, + LHIKOut = 0.5, + LHIKEaseOut = 0.25, + MinProgress = 2.1, + LastClip1OutTime = 50/30, + SoundTable = { + {s = rottle, t = 0.0}, + {s = path .. "chback.ogg", t = 6/30, v = 1.95}, + {s = path .. "chlock.ogg", t = 13/30, v = 1.95}, + {s = ratel, t = 23/30}, + {s = rottle, t = 24/30}, + {s = common .. "magpouch.ogg", t = 26/30}, + {s = path .. "magrel.ogg", t = 27/30}, + {s = path .. "magout.ogg", t = 30/30}, + {s = rottle, t = 49/30}, + {s = rottle, t = 55/30}, + {s = {common .. "rifle_magdrop_1.ogg",common .. "rifle_magdrop_2.ogg",common .. "rifle_magdrop_3.ogg",common .. "rifle_magdrop_4.ogg",common .. "rifle_magdrop.ogg"}, t = 51/30, v = 0.25}, + {s = path .. "struggle.ogg", t = 57/30}, + {s = path .. "magin.ogg", t = 62/30}, + {s = rottle, t = 75/30}, + {s = path .. "chlock.ogg", t = 75/30, v = 1.95}, + {s = path .. "chamber.ogg", t = 80/30}, + {s = ratel, t = 81/30}, + {s = common .. "grab.ogg", t = 92/30}, + {s = common .. "shoulder.ogg", t = 93/30}, + }, + }, + ["reload_30rnd"] = { + Source = "reload_30rnd", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + LHIK = true, + LHIKIn = 0.3, + LHIKOut = 0.65, + LHIKEaseOut = 0.25, + MinProgress = 1.3, + SoundTable = { + {s = rottle, t = 0.0}, + {s = ratel, t = 3/30}, + {s = path .. "magout.ogg", t = 11/30}, + {s = common .. "magpouch.ogg", t = 26/30}, + {s = ratel, t = 0.5}, + {s = rottle, t = 0.75}, + {s = path .. "struggle.ogg", t = 39/30}, + {s = path .. "magin.ogg", t = 44/30}, + {s = ratel, t = 1.1}, + {s = rottle, t = 1.15}, + {s = common .. "grab.ogg", t = 56/30}, + {s = common .. "shoulder.ogg", t = 61/30}, + }, + }, + ["reload_empty_30rnd"] = { + Source = "reload_empty_30rnd", + RareSource = "reload_empty_30rnd_rare", + RareSourceChance = 100, + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + LHIK = true, + LHIKIn = 0.3, + LHIKOut = 0.5, + LHIKEaseOut = 0.25, + MinProgress = 2.1, + LastClip1OutTime = 50/30, + SoundTable = { + {s = rottle, t = 0.0}, + {s = path .. "chback.ogg", t = 6/30, v = 1.95}, + {s = path .. "chlock.ogg", t = 13/30, v = 1.95}, + {s = ratel, t = 22/30}, + {s = rottle, t = 23/30}, + {s = path .. "magrel.ogg", t = 27/30}, + {s = path .. "magout.ogg", t = 30/30}, + {s = common .. "magpouch.ogg", t = 47/30}, + {s = rottle, t = 49/30}, + {s = rottle, t = 55/30}, + {s = {common .. "rifle_magdrop_1.ogg",common .. "rifle_magdrop_2.ogg",common .. "rifle_magdrop_3.ogg",common .. "rifle_magdrop_4.ogg",common .. "rifle_magdrop.ogg"}, t = 51/30, v = 0.25}, + {s = path .. "struggle.ogg", t = 57/30}, + {s = path .. "magin.ogg", t = 62/30}, + {s = rottle, t = 75/30}, + {s = path .. "chslap.ogg", t = 80/30}, + {s = ratel, t = 81/30}, + {s = common .. "grab.ogg", t = 92/30}, + {s = common .. "shoulder.ogg", t = 93/30}, + }, + }, + ["reload_empty_30rnd_scope"] = { + Source = "reload_empty_scope_30rnd", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + LHIK = true, + LHIKIn = 0.3, + LHIKOut = 0.5, + LHIKEaseOut = 0.25, + MinProgress = 2.1, + LastClip1OutTime = 50/30, + SoundTable = { + {s = rottle, t = 0.0}, + {s = path .. "chback.ogg", t = 6/30, v = 1.95}, + {s = path .. "chlock.ogg", t = 13/30, v = 1.95}, + {s = ratel, t = 22/30}, + {s = rottle, t = 23/30}, + {s = path .. "magrel.ogg", t = 27/30}, + {s = path .. "magout.ogg", t = 30/30}, + {s = common .. "magpouch.ogg", t = 47/30}, + {s = rottle, t = 49/30}, + {s = rottle, t = 55/30}, + {s = {common .. "rifle_magdrop_1.ogg",common .. "rifle_magdrop_2.ogg",common .. "rifle_magdrop_3.ogg",common .. "rifle_magdrop_4.ogg",common .. "rifle_magdrop.ogg"}, t = 51/30, v = 0.25}, + {s = path .. "struggle.ogg", t = 57/30}, + {s = path .. "magin.ogg", t = 62/30}, + {s = rottle, t = 75/30}, + {s = path .. "chlock.ogg", t = 75/30, v = 1.95}, + {s = path .. "chamber.ogg", t = 80/30}, + {s = ratel, t = 81/30}, + {s = common .. "grab.ogg", t = 92/30}, + {s = common .. "shoulder.ogg", t = 93/30}, + }, + }, + ["reload_10rnd"] = { + Source = "reload_10rnd", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + LHIK = true, + LHIKIn = 0.3, + LHIKOut = 0.65, + LHIKEaseOut = 0.25, + MinProgress = 1.3, + SoundTable = { + {s = rottle, t = 0.0}, + {s = ratel, t = 3/30}, + {s = path .. "magout.ogg", t = 10/30}, + {s = common .. "magpouch.ogg", t = 26/30}, + {s = ratel, t = 0.5}, + {s = rottle, t = 0.75}, + {s = path .. "struggle.ogg", t = 36/30}, + {s = path .. "magin.ogg", t = 42/30}, + {s = ratel, t = 1.1}, + {s = rottle, t = 1.15}, + {s = common .. "grab.ogg", t = 52/30}, + {s = common .. "shoulder.ogg", t = 56/30}, + }, + }, + ["reload_empty_10rnd"] = { + Source = "reload_empty_10rnd", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + LHIK = true, + LHIKIn = 0.3, + LHIKOut = 0.5, + LHIKEaseOut = 0.25, + MinProgress = 2.1, + LastClip1OutTime = 50/30, + SoundTable = { + {s = rottle, t = 0.0}, + {s = path .. "chback.ogg", t = 6/30, v = 1.95}, + {s = path .. "chlock.ogg", t = 13/30, v = 1.95}, + {s = ratel, t = 22/30}, + {s = rottle, t = 23/30}, + {s = path .. "magrel.ogg", t = 27/30}, + {s = path .. "magout.ogg", t = 30/30}, + {s = common .. "magpouch.ogg", t = 47/30}, + {s = rottle, t = 49/30}, + {s = rottle, t = 55/30}, + {s = {common .. "rifle_magdrop_1.ogg",common .. "rifle_magdrop_2.ogg",common .. "rifle_magdrop_3.ogg",common .. "rifle_magdrop_4.ogg",common .. "rifle_magdrop.ogg"}, t = 51/30, v = 0.25}, + {s = path .. "struggle.ogg", t = 57/30}, + {s = path .. "magin.ogg", t = 62/30}, + {s = rottle, t = 75/30}, + {s = path .. "chslap.ogg", t = 80/30}, + {s = ratel, t = 81/30}, + {s = common .. "grab.ogg", t = 92/30}, + {s = common .. "shoulder.ogg", t = 93/30}, + }, + }, + ["reload_empty_10rnd_scope"] = { + Source = "reload_empty_scope_10rnd", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + LHIK = true, + LHIKIn = 0.3, + LHIKOut = 0.5, + LHIKEaseOut = 0.25, + MinProgress = 2.1, + LastClip1OutTime = 50/30, + SoundTable = { + {s = rottle, t = 0.0}, + {s = path .. "chback.ogg", t = 6/30, v = 1.95}, + {s = path .. "chlock.ogg", t = 13/30, v = 1.95}, + {s = ratel, t = 22/30}, + {s = rottle, t = 23/30}, + {s = path .. "magrel.ogg", t = 27/30}, + {s = path .. "magout.ogg", t = 30/30}, + {s = common .. "magpouch.ogg", t = 47/30}, + {s = rottle, t = 49/30}, + {s = rottle, t = 55/30}, + {s = {common .. "rifle_magdrop_1.ogg",common .. "rifle_magdrop_2.ogg",common .. "rifle_magdrop_3.ogg",common .. "rifle_magdrop_4.ogg",common .. "rifle_magdrop.ogg"}, t = 51/30, v = 0.25}, + {s = path .. "struggle.ogg", t = 57/30}, + {s = path .. "magin.ogg", t = 62/30}, + {s = rottle, t = 74/30}, + {s = path .. "chlock.ogg", t = 75/30, v = 1.95}, + {s = path .. "chamber.ogg", t = 80/30}, + {s = ratel, t = 81/30}, + {s = common .. "grab.ogg", t = 92/30}, + {s = common .. "shoulder.ogg", t = 93/30}, + }, + }, + ["reload_50rnd"] = { + Source = "reload_50rnd", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + LHIK = true, + LHIKIn = 0.3, + LHIKOut = 0.65, + LHIKEaseOut = 0.25, + MinProgress = 1.3, + SoundTable = { + {s = rottle, t = 0.0}, + {s = ratel, t = 3/30}, + {s = path .. "magout.ogg", t = 11/30}, + {s = common .. "magpouch.ogg", t = 26/30}, + {s = ratel, t = 0.5}, + {s = rottle, t = 0.75}, + {s = path .. "struggle.ogg", t = 42/30}, + {s = path .. "magin.ogg", t = 48/30}, + {s = ratel, t = 1.1+5/30}, + {s = rottle, t = 1.15+5/30}, + {s = common .. "grab.ogg", t = 58/30}, + {s = common .. "shoulder.ogg", t = 62/30}, + }, + }, + ["reload_empty_50rnd"] = { + Source = "reload_empty_50rnd", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + LHIK = true, + LHIKIn = 0.3, + LHIKOut = 0.5, + LHIKEaseOut = 0.25, + MinProgress = 2.1, + LastClip1OutTime = 50/30, + SoundTable = { + {s = rottle, t = 0.0}, + {s = path .. "chback.ogg", t = 6/30, v = 1.95}, + {s = path .. "chlock.ogg", t = 13/30, v = 1.95}, + {s = ratel, t = 22/30}, + {s = rottle, t = 23/30}, + {s = path .. "magrel.ogg", t = 27/30}, + {s = path .. "magout.ogg", t = 30/30}, + {s = common .. "magpouch.ogg", t = 47/30}, + {s = rottle, t = 49/30}, + {s = rottle, t = 55/30}, + {s = {common .. "rifle_magdrop_1.ogg",common .. "rifle_magdrop_2.ogg",common .. "rifle_magdrop_3.ogg",common .. "rifle_magdrop_4.ogg",common .. "rifle_magdrop.ogg"}, t = 51/30, v = 0.25}, + {s = path .. "struggle.ogg", t = 62/30}, + {s = path .. "magin.ogg", t = 67/30}, + {s = rottle, t = 80/30}, + {s = path .. "chslap.ogg", t = 85/30}, + {s = ratel, t = 86/30}, + {s = common .. "grab.ogg", t = 97/30}, + {s = common .. "shoulder.ogg", t = 98/30}, + }, + }, + ["reload_empty_50rnd_scope"] = { + Source = "reload_empty_scope_50rnd", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_AR2, + LHIK = true, + LHIKIn = 0.3, + LHIKOut = 0.5, + LHIKEaseOut = 0.25, + MinProgress = 2.1, + LastClip1OutTime = 50/30, + SoundTable = { + {s = rottle, t = 0.0}, + {s = path .. "chback.ogg", t = 6/30, v = 1.95}, + {s = path .. "chlock.ogg", t = 13/30, v = 1.95}, + {s = ratel, t = 22/30}, + {s = rottle, t = 23/30}, + {s = path .. "magrel.ogg", t = 27/30}, + {s = path .. "magout.ogg", t = 30/30}, + {s = common .. "magpouch.ogg", t = 47/30}, + {s = rottle, t = 49/30}, + {s = rottle, t = 55/30}, + {s = {common .. "rifle_magdrop_1.ogg",common .. "rifle_magdrop_2.ogg",common .. "rifle_magdrop_3.ogg",common .. "rifle_magdrop_4.ogg",common .. "rifle_magdrop.ogg"}, t = 51/30, v = 0.25}, + {s = path .. "struggle.ogg", t = 62/30}, + {s = path .. "magin.ogg", t = 67/30}, + {s = rottle, t = 80/30}, + {s = path .. "chlock.ogg", t = 75/30, v = 1.95}, + {s = path .. "chamber.ogg", t = 85/30}, + {s = ratel, t = 86/30}, + {s = common .. "grab.ogg", t = 97/30}, + {s = common .. "shoulder.ogg", t = 98/30}, + }, + }, + ["unjam"] = { + Source = "jamfix", + ShellEjectAt = 0.5, + SoundTable = { + {s = common .. "cloth_4.ogg", t = 0.1}, + {s = path .. "chback.ogg", t = 0.3}, + {s = path .. "chamber.ogg", t = 0.6}, + {s = common .. "grab.ogg", t = 0.9}, + {s = common .. "shoulder.ogg", t = 0.95}, + }, + LHIK = true, + LHIKIn = 0.2, + LHIKEaseOut = 0.3, + LHIKOut = 0.6, + }, + + ["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 = true, + LHIKIn = 0, + LHIKEaseOut = 0.3, + LHIKOut = 0.6, + 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 = 100/30}, + {s = common .. "shoulder.ogg", t = 40/30}, + {s = path .. "chback.ogg", t = 78/30, v = 1.25}, + {s = path .. "chlock.ogg", t = 85/30, v = 1.25}, + {s = path .. "chamber.ogg", t = 103/30}, + }, + }, +} + +-- SWEP.Hook_Think = ArcCW.UC.ADSReload + +SWEP.Hook_Think = function(wep) + local vm = wep:GetOwner():GetViewModel() + + vm:SetPoseParameter("short", wep.Attachments[2].Installed == "ur_g3_barrel_8" and 1 or 0) + + ArcCW.UC.ADSReload(wep) +end + +SWEP.Hook_SelectReloadAnimation = function(wep, anim) -- not in atts cause _scope wont work + local seq = anim + + if wep.Attachments[9].Installed == "ur_g3_mag_50" then + seq = seq .. "_50rnd" + elseif wep.Attachments[9].Installed == "ur_g3_mag_10" then + seq = seq .. "_10rnd" + elseif wep.Attachments[9].Installed == "ur_g3_mag_40_556" or wep.Attachments[3].Installed == "ur_g3_rec_hk33" and !wep.Attachments[9].Installed then + seq = seq .. "_30rnd" + end + if anim == "reload_empty" and wep.Attachments[1].Installed then + seq = seq .. "_scope" + end + + return seq +end \ No newline at end of file diff --git a/lua/weapons/arccw_ur_m1911.lua b/lua/weapons/arccw_ur_m1911.lua new file mode 100644 index 0000000..5484c72 --- /dev/null +++ b/lua/weapons/arccw_ur_m1911.lua @@ -0,0 +1,871 @@ +SWEP.Base = "arccw_base" +SWEP.Spawnable = true +SWEP.Category = "ArcCW - Urban Coalition" +SWEP.UC_CategoryPack = "2Urban Renewal" +SWEP.AdminOnly = false +SWEP.UseHands = true + +-- Muzzle and shell effects -- + +SWEP.MuzzleEffect = "muzzleflash_pistol" +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 = 90 + +SWEP.MuzzleEffectAttachment = 1 +SWEP.CaseEffectAttachment = 2 +SWEP.CamAttachment = 5 +SWEP.TracerNum = 0 -- subsonic by default +SWEP.TracerWidth = 1 +SWEP.ShootPitch = 100 + +-- Fake name -- + +SWEP.PrintName = "AMAS" -- American Automatic Sidearm + +-- True name -- + +SWEP.TrueName = "M1911" + +-- Trivia -- + +SWEP.Trivia_Class = "Pistol" +SWEP.Trivia_Desc = [[Venerable semi-automatic pistol issued by the US Army throughout both World Wars and then some. Even after more than a century of service, it is rarely considered an obsolete design, and its short recoil mechanism has been inherited by most modern pistols. + +Easy to handle and packing respectable stopping power, the antiquated single-stack magazine is its only notable downside.]] +SWEP.Trivia_Manufacturer = "Stoner's Legacy Ltd." +SWEP.Trivia_Calibre = ".45 ACP" +SWEP.Trivia_Mechanism = "Short Recoil" +SWEP.Trivia_Country = "USA" +SWEP.Trivia_Year = 1911 + +-- Weapon slot -- + +SWEP.Slot = 1 + +-- 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_ur_m1911.mdl" +SWEP.WorldModel = "models/weapons/arccw/c_ur_m1911.mdl" +SWEP.ViewModelFOV = 66 +SWEP.AnimShoot = ACT_HL2MP_GESTURE_RANGE_ATTACK_REVOLVER + +-- Damage parameters -- + +SWEP.Damage = 45 -- 3 shot short range kill (2 shot chest point-blank) +SWEP.DamageMin = 15 -- 7 shot long range kill +SWEP.RangeMin = 10 +SWEP.Range = 80 -- 3 shot until ~40m +SWEP.Penetration = 9 +SWEP.DamageType = DMG_BULLET +SWEP.ShootEntity = nil + +SWEP.PhysBulletMuzzleVelocity = 253 + +SWEP.BodyDamageMults = ArcCW.UC.BodyDamageMults + +-- Jamming -- + +--SWEP.Malfunction = true +SWEP.MalfunctionJam = true +--SWEP.MalfunctionMean = 21 +SWEP.MalfunctionPostFire = false +SWEP.MalfunctionTakeRound = true + +-- Mag size -- + +SWEP.ChamberSize = 1 +SWEP.Primary.ClipSize = 7 + +-- Recoil -- + +SWEP.Recoil = 1.25 +SWEP.RecoilSide = 0.75 + +SWEP.RecoilRise = 0.25 +SWEP.VisualRecoilMult = 1.0 +SWEP.MaxRecoilBlowback = .5 +SWEP.MaxRecoilPunch = .8 + +SWEP.Sway = 1 + +-- Firerate / Firemodes -- + +SWEP.Delay = 60 / 400 +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_pistol" +SWEP.NPCWeight = 70 + +-- Accuracy -- + +SWEP.AccuracyMOA = 5 +SWEP.HipDispersion = 400 +SWEP.MoveDispersion = 150 +SWEP.JumpDispersion = 1000 + +SWEP.Primary.Ammo = "pistol" + +-- Speed multipliers -- + +SWEP.SpeedMult = 0.97 +SWEP.SightedSpeedMult = 0.875 +SWEP.SightTime = 0.25 +SWEP.ShootSpeedMult = 1 + +-- Length -- + +SWEP.BarrelLength = 8 +SWEP.ExtraSightDist = 10 + +-- Ironsights / Customization / Poses -- + +SWEP.HolsterPos = Vector(0.3, 3, 1.6) +SWEP.HolsterAng = Angle(-14, 0, -0.5) + +SWEP.SprintPos = Vector(0.3, 3, 1) +SWEP.SprintAng = Angle(-5, 15, -20) + +SWEP.HoldtypeHolstered = "normal" +SWEP.HoldtypeActive = "pistol" +SWEP.HoldtypeSights = "revolver" + +SWEP.IronSightStruct = { + Pos = Vector(-2.33, 10, 1.5), + Ang = Angle(0.2, 0.02, 5.5), + Magnification = 1, + SwitchToSound = "", +} + +SWEP.ActivePos = Vector(0.3, 3, 1.3) +SWEP.ActiveAng = Angle(0, 0, -0.5) + +SWEP.CustomizePos = Vector(0, 0, 0) +SWEP.CustomizeAng = Angle(0, 0, 0) + +SWEP.CrouchPos = Vector(-2, 0, 0) +SWEP.CrouchAng = Angle(0, 0, -8) + +SWEP.MirrorVMWM = true +SWEP.WorldModelOffset = { + pos = Vector(-9, 4, -4.25), + ang = Angle(-6, 0, 180), + bone = "ValveBiped.Bip01_R_Hand", +} + +-- Weapon sounds -- + +local path = ")weapons/arccw_ur/1911/" +local common = ")/arccw_uc/common/" +local rottle = {common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"} +local rutle = {common .. "movement-pistol-01.ogg",common .. "movement-pistol-02.ogg",common .. "movement-pistol-03.ogg",common .. "movement-pistol-04.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" +} +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/45acp/" + +SWEP.DistantShootSoundOutdoors = { + 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" +} +SWEP.DistantShootSoundIndoors = { + tail .. "fire-dist-45acp-pistol-int-01.ogg", + tail .. "fire-dist-45acp-pistol-int-02.ogg", + tail .. "fire-dist-45acp-pistol-int-03.ogg", + tail .. "fire-dist-45acp-pistol-int-04.ogg", + tail .. "fire-dist-45acp-pistol-int-05.ogg", + tail .. "fire-dist-45acp-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 + +-- Bodygroups -- +SWEP.BulletBones = { + [1] = "mag_round1", + [2] = "mag_round2", + [3] = "mag_round3", + [4] = "mag_round4", + [5] = "mag_round5", + [6] = "mag_round6", + [7] = "mag_round7" +} +SWEP.DefaultBodygroups = "000000000" + +SWEP.AttachmentElements = { + ["ur_1911_slide_compact"] = { + VMBodygroups = { + {ind = 0, bg = 1}, + {ind = 1, bg = 1} + }, + AttPosMods = { + [4] = { + vpos = Vector(0, -3.58, .22), + vang = Angle(0, 90, 0), + } + }, + NameChange = "AMAD", + TrueNameChange = "Colt Officer's ACP", + }, + + ["ur_1911_slide_compact_custom"] = { + VMBodygroups = { + {ind = 0, bg = 1}, + {ind = 1, bg = 5} + }, + AttPosMods = { + [4] = { + vpos = Vector(0, -3.58, .22), + vang = Angle(0, 90, 0), + } + }, + NameChange = "AMAD", + TrueNameChange = "Colt Officer's ACP", + }, + + ["ur_1911_slide_custom"] = { + VMBodygroups = { + {ind = 1, bg = 4} + }, + }, + + ["ur_1911_slide_m45"] = { + VMBodygroups = { + {ind = 1, bg = 2}, + {ind = 4, bg = 1}, + {ind = 5, bg = 1}, + }, + --VMSkin = 1, + NameChange = "AMASIN", + TrueNameChange = "M45", + Override_IronSightStruct = { + Pos = Vector(-2.3, 10, 1.4), + Ang = Angle(0.275, 0.07, 5.5), + }, + }, + + ["ur_1911_slide_m45_custom"] = { + VMBodygroups = { + {ind = 1, bg = 3}, + {ind = 4, bg = 1}, + {ind = 5, bg = 1}, + }, + --VMSkin = 1, + NameChange = "AMASIN", + TrueNameChange = "M45", + Override_IronSightStruct = { + Pos = Vector(-2.3, 10, 1.4), + Ang = Angle(0.275, 0.07, 5.5), + }, + }, + + ["ur_1911_mag_ext"] = { + VMBodygroups = { + {ind = 3, bg = 1} + } + }, + + ["ur_1911_grip_snake"] = { + VMBodygroups = { + {ind = 6, bg = 1} + } + }, + ["ur_1911_grip_pachmayr"] = { + VMBodygroups = { + {ind = 6, bg = 2} + } + }, + + ["ur_1911_skin_silver"] = { + VMSkin = 1 + }, + ["ur_1911_skin_tan"] = { + VMSkin = 2 + }, + ["ur_1911_skin_custom"] = { + VMSkin = 3 + }, + + ["ur_1911_cal_9mm"] = { + NameChange = "AMAS-9", + TrueNameChange = "SR1911", + }, + ["ur_1911_cal_10auto"] = { + NameChange = "AMAS Elite", + TrueNameChange = "Delta Elite", + }, + + ["optic_rail"] = { + VMBodygroups = { + {ind = 7, bg = 1} + } + }, + ["tac_rail"] = { + VMBodygroups = { + {ind = 8, bg = 1} + } + }, +} + +-- Animations -- + +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 = { + ["idle"] = { + Source = "idle", + Time = 10 / 30, + }, + ["idle_empty"] = { + Source = "idle_empty", + Time = 10 / 30, + }, + ["ready"] = { + Source = "fix", + Time = 1.6, + MinProgress = 1.2, + LHIK = true, + LHIKIn = 0.3, + LHIKOut = 0, + ShellEjectAt = false, + ProcDraw = true, + SoundTable = { + { s = rottle, t = 0 / 60 }, + {s = path .. "draw.ogg", t = 0.05}, + { s = path .. "mech.ogg",t = 28 / 60}, -- Temporary + { s = path .. "slidedrop.ogg",t = 35 / 60}, + }, + }, + ["draw"] = { + Source = "draw", + Time = .75, + MinProgress = .4, + --ProcDraw = true, + SoundTable = { + {s = rottle, t = 0}, + {s = path .. "draw.ogg", t = 0.05}, -- Not Temporary + {s = rutle, t = 0.1}, + --{s = common .. "raise.ogg", t = 0.05}, + }, + }, + ["draw_empty"] = { + Source = "draw_empty", + Time = .75, + MinProgress = .4, + --ProcDraw = true, + SoundTable = { + {s = rottle, t = 0}, + {s = path .. "draw.ogg", t = 0.05}, -- Not Temporary + {s = rutle, t = 0.1}, + --{s = common .. "raise.ogg", t = 0.05}, + }, + }, + ["draw_jam"] = { + Source = "draw_jam", + Time = .75, + MinProgress = .4, + SoundTable = { + {s = rottle, t = 0}, + {s = path .. "draw.ogg", t = 0.05}, -- Not Temporary + {s = rutle, t = 0.1}, + --{s = common .. "raise.ogg", t = 0.05}, + }, + }, + ["holster"] = { + Source = "holster", + Time = .75, + SoundTable = { + {s = rutle, t = 0.05}, + {s = path .. "holster.ogg", t = 0.2}, -- Not Temporary + }, + }, + ["holster_empty"] = { + Source = "holster_empty", + Time = .75, + SoundTable = { + {s = rutle, t = 0.05}, + {s = path .. "holster.ogg", t = 0.2}, -- Not Temporary + }, + }, + ["holster_jam"] = { + Source = "holster_jam", + Time = 18 / 30, + SoundTable = { + {s = rutle, t = 0.05}, + {s = path .. "holster.ogg", t = 0.2}, -- Not Temporary + }, + }, + + ["fire"] = { + Source = "fire", + Time = 30 / 30, + ShellEjectAt = 0, + SoundTable = { + { s = mech, t = 0, v = 0.25 } + }, + }, + ["fire_iron"] = { + Source = "fire", + Time = 30 / 30, + ShellEjectAt = 0, + SoundTable = { + { s = common .. "common_mech_light.ogg", t = 0 }, + { s = mech, t = 0 } + }, + }, + ["fire_empty"] = { + Source = "fire_empty", + Time = 24 / 30, + ShellEjectAt = 0, + SoundTable = { + { s = path .. "mech_last.ogg", t = 0 }, + }, + }, + ["fire_iron_empty"] = { + Source = "fire_empty", + Time = 24 / 30, + ShellEjectAt = 0, + SoundTable = { + { s = common .. "common_mech_light.ogg", t = 0 }, + { s = path .. "mech_last.ogg", t = 0 } + }, + }, + ["fire_jammed"] = { + Source = "fire_jam", + Time = 30 / 30, + MinProgress = 0.5, + 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 } + }, + }, + + -- 7-R Reloads -- + + ["reload_10"] = { + Source = "reload_ext", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_PISTOL, + MinProgress = 1.3525, + Time = 65 / 30, + LastClip1OutTime = 0.9, + LHIK = true, + LHIKIn = 0.2, + LHIKEaseIn = 0.2, + LHIKEaseOut = 0.2, + LHIKOut = 0.62, + SoundTable = { + { s = rottle, t = 0 / 60 }, + { s = common .. "magpouch_pull_small.ogg", t = 0 / 60 }, + { s = common .. "magrelease.ogg", t = 17 / 60 }, + { s = path .. "magout.ogg", t = 26 / 60 }, + { s = rottle, t = 10 / 60 }, + { s = rottle, t = 55 / 60 }, + { s = common .. "magpouch_replace_small.ogg", t = 80 / 60 }, + { s = path .. "magin.ogg", t = 50 / 60 }, + }, + }, + ["reload_empty_10"] = { + Source = "reload_empty_ext", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_PISTOL, + MinProgress = 1.75, + Time = 75 / 30, + LastClip1OutTime = 0.76, + LHIK = true, + LHIKIn = 0.1, + LHIKEaseIn = 0.1, + LHIKEaseOut = 0.55, + LHIKOut = 0.7, + SoundTable = { + { s = rottle, t = 0 / 60 }, + { s = common .. "magrelease.ogg", t = 7 / 60 }, + { s = path .. "magout.ogg", t = 16 / 60 }, + { s = rottle, t = 10 / 60 }, + { s = common .. "magpouch_pull_small.ogg", t = 29 / 60 }, + { s = common .. "pistol_magdrop.ogg", t = 40 / 60 }, + { s = rottle, t = 55 / 60 }, + { s = path .. "magin.ogg", t = 64 / 60 }, + { s = rottle, t = 90 / 60 }, + { s = path .. "slidedrop.ogg", t = 94 / 60 }, + }, + }, + + ["reload"] = { + Source = "reload", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_PISTOL, + MinProgress = 1.3525, + Time = 65 / 30, + LastClip1OutTime = 0.9, + LHIK = true, + LHIKIn = 0.2, + LHIKEaseIn = 0.2, + LHIKEaseOut = 0.2, + LHIKOut = 0.62, + SoundTable = { + { s = rottle, t = 0 / 60 }, + { s = common .. "magpouch_pull_small.ogg", t = 5 / 60 }, + { s = rottle, t = 10 / 60 }, + { s = common .. "magrelease.ogg", t = 17 / 60 }, + { s = path .. "magout.ogg", t = 26 / 60 }, + { s = path .. "magin.ogg", t = 45 / 60 }, + { s = rottle, t = 55 / 60 }, + { s = common .. "magpouch_replace_small.ogg", t = 80 / 60 }, + { s = path .. "grab.ogg", t = 110 / 60 }, + }, + }, + ["reload_empty"] = { + Source = "reload_empty", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_PISTOL, + MinProgress = 1.75, + Time = 75 / 30, + LastClip1OutTime = 0.76, + LHIK = true, + LHIKIn = 0.1, + LHIKEaseIn = 0.1, + LHIKEaseOut = 0.55, + LHIKOut = 0.7, + SoundTable = { + { s = rottle, t = 0 / 60 }, + { s = common .. "magrelease.ogg", t = 7 / 60 }, + { s = path .. "magout.ogg", t = 16 / 60 }, + { s = rottle, t = 10 / 60 }, + { s = common .. "magpouch_pull_small.ogg", t = 29 / 60 }, + { s = common .. "pistol_magdrop.ogg", t = 40 / 60 }, + { s = rottle, t = 55 / 60 }, + { s = path .. "magin.ogg", t = 64 / 60 }, + { s = rottle, t = 90 / 60 }, + { s = path .. "slidedrop.ogg", t = 94 / 60 }, + { s = path .. "grab.ogg", t = 125 / 60 }, + }, + }, + + -- Jam Animations -- + + ["fix"] = { + Source = "fix", + --Time = 40 / 30, + LHIK = true, + LHIKIn = 0.3, + LHIKOut = 0, + ShellEjectAt = 30 / 60, + SoundTable = { + { s = rottle, t = 0 / 60 }, + { s = path .. "mech.ogg", t = 28 / 60}, -- Temporary + { s = path .. "slidedrop.ogg", t = 35 / 60}, + }, + }, + + ["fix_empty"] = { + Source = "fix_empty", + --Time = 40 / 30, + LHIK = true, + LHIKIn = 0.3, + LHIKOut = 0, + ShellEjectAt = 30 / 60, + SoundTable = { + { s = rottle, t = 0 / 60 }, + { s = path .. "mech.ogg",t = 28 / 60}, + }, + }, + + ["idle_jammed"] = { + Source = "idle_jam", + -- time = 35 / 60, + LHIK = true, + LHIKIn = 0.3, + LHIKOut = 0, + -- SoundTable = { + -- }, + }, + + -- -- Inspecc -- + + ["enter_inspect"] = { + Source = "enter_inspect", + time = 35 / 60, + LHIK = true, + LHIKIn = 0.3, + LHIKOut = 0, + SoundTable = { + {s = rottle, t = 0}, + {s = common .. "movement-pistol-04.ogg", t = 0}, + }, + }, + ["idle_inspect"] = { + Source = "idle_inspect", + time = 72 / 60, + LHIK = true, + LHIKIn = 0, + LHIKOut = 0, + }, + ["exit_inspect"] = { + Source = "exit_inspect", + time = 66 / 60, + LHIK = true, + LHIKIn = 0, + LHIKEaseOut = 0.3, + LHIKOut = 0.84, + SoundTable = { + {s = rottle, t = 0.05}, + {s = common .. "movement-pistol-03.ogg", t = 0.1}, + {s = common .. "movement-pistol-01.ogg", t = 1}, + {s = rottle, t = 1}, + }, + }, + + ["enter_inspect_empty"] = { + Source = "enter_inspect_empty", + time = 35 / 60, + LHIK = true, + LHIKIn = 0.1, + LHIKOut = 0, + SoundTable = { + {s = rottle, t = 0}, + {s = common .. "movement-pistol-04.ogg", t = 0}, + }, + }, + ["idle_inspect_empty"] = { + Source = "idle_inspect_empty", + time = 72 / 60, + LHIK = true, + LHIKIn = 0, + LHIKOut = 0, + }, + ["exit_inspect_empty"] = { + Source = "exit_inspect_empty", + time = 66 / 60, + LHIK = true, + LHIKIn = 0, + LHIKEaseOut = 0.3, + LHIKOut = 0.84, + SoundTable = { + {s = rottle, t = 0.05}, + {s = common .. "movement-pistol-03.ogg", t = 0.1}, + {s = common .. "movement-pistol-01.ogg", t = 1}, + {s = rottle, t = 1}, + }, + }, + ["enter_inspect_jammed"] = { + Source = "enter_inspect_jam", + time = 35 / 60, + LHIK = true, + LHIKIn = 0.1, + LHIKOut = 0, + SoundTable = { + {s = rottle, t = 0}, + {s = common .. "movement-pistol-04.ogg", t = 0}, + }, + }, + ["idle_inspect_jammed"] = { + Source = "idle_inspect_jam", + time = 72 / 60, + LHIK = true, + LHIKIn = 0, + LHIKOut = 0, + }, + ["exit_inspect_jammed"] = { + Source = "exit_inspect_jam", + time = 66 / 60, + LHIK = true, + LHIKIn = 0, + LHIKEaseOut = 0.3, + LHIKOut = 0.84, + SoundTable = { + {s = rottle, t = 0.05}, + {s = common .. "movement-pistol-03.ogg", t = 0.1}, + {s = common .. "movement-pistol-01.ogg", t = 1}, + {s = rottle, t = 1}, + }, + }, +} + +-- ADS animation blending, thanks fesiug -- + +SWEP.Hook_Think = ArcCW.UC.ADSReload + + +-- Attachments -- + +SWEP.Attachments = { + { + PrintName = "Optic", + Slot = {"optic_lp"}, + DefaultAttName = "Iron Sights", + Bone = "vm_pivot", + Offset = { + vpos = Vector(-0.01, -2.3, 1.6), + vang = Angle(90, 0, -90), + }, + InstalledEles = {"optic_rail"}, + }, + { + PrintName = "Slide", + Slot = {"ur_m1911_slide"}, + DefaultAttIcon = Material("entities/att/ur_1911/slide_std.png","mips smooth"), + DefaultAttName = "5\" Government Slide", + }, + { + PrintName = "Caliber", + Slot = {"ur_m1911_caliber"}, + DefaultAttIcon = Material("entities/att/uc_bullets/45acp.png","mips smooth"), + DefaultAttName = ".45 ACP", + Bone = "vm_pivot", + Offset = { + vpos = Vector(3.07, -3.8, -27), + vang = Angle(90, 0, -90), + }, + DefaultFlags = {"cal_subsonic"}, + }, + { + PrintName = "Muzzle", + DefaultAttName = "Standard Muzzle", + Slot = {"muzzle"}, + Bone = "vm_barrel", + Offset = { + vpos = Vector(0.02, -4.4, 0.12), + vang = Angle(0, 90, 0), + }, + InstalledEles = {"nofh"}, + ExcludeFlags = {"barrel_annihilator"}, + }, + { + PrintName = "Tactical", + Slot = {"tac_pistol"}, + Bone = "vm_pivot", + Offset = { + vpos = Vector(0, 0, 4), + vang = Angle(90, 0, -90), + }, + InstalledEles = {"tac_rail"}, + }, + { + PrintName = "Magazine", + Slot = {"ur_m1911_mag"}, + DefaultAttIcon = Material("entities/att/ur_1911/mag7.png","mips smooth"), + DefaultAttName = "7-Round Mag", + }, + { + PrintName = "Stock", + Slot = {"uc_stock", "go_stock_pistol_bt"}, + VMScale = Vector(1, 1, 1), + Bone = "vm_pivot", + Offset = { + vpos = Vector(0, 3, -3), + vang = Angle(90, 0, -90), + }, + }, + { + PrintName = "Grip", + DefaultAttName = "Factory Grip", + DefaultAttIcon = Material("entities/att/ur_1911/grip.png","mips smooth"), + Slot = "ur_m1911_grip" + }, + { + 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 = "vm_pivot", + Offset = { + vpos = Vector(0.35, -0.5, 3), + vang = Angle(90, 0, -90), + }, + VMScale = Vector(.75,.75,.75), + }, + { + PrintName = "Finish", + Slot = {"ur_m1911_skin"}, + DefaultAttName = "Grey", + DefaultAttIcon = Material("entities/att/ur_1911/skin.png","mips smooth"), + FreeSlot = true, + }, +} diff --git a/lua/weapons/arccw_ur_mp5.lua b/lua/weapons/arccw_ur_mp5.lua new file mode 100644 index 0000000..4e82952 --- /dev/null +++ b/lua/weapons/arccw_ur_mp5.lua @@ -0,0 +1,1231 @@ +SWEP.Base = "arccw_base" +SWEP.Spawnable = true +SWEP.Category = "ArcCW - Urban Coalition" +SWEP.UC_CategoryPack = "2Urban Renewal" +SWEP.AdminOnly = false +SWEP.UseHands = true + +-- Effects -- + +SWEP.MuzzleEffect = "muzzleflash_mp5" +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 = "PK5-4" + +-- True name -- + +SWEP.TrueName = "MP5A4" + +-- Trivia -- + +SWEP.Trivia_Class = "Submachine Gun" +SWEP.Trivia_Desc = [[Versatile submachine gun known for its use by high profile police units around the world, most famously by the British SAS during the Iranian embassy siege. Its reliable closed-bolt design and craftsmanship allowed it to remain relevant among new generations of submachine guns. + +If accurate, sophisticated close-combat performance is what you're looking for, no weapon has a better track record. + +Switch to burst fire mode to reduce dispersion from moving and hipfiring.]] +SWEP.Trivia_Manufacturer = "Crowdley & Nelson" +SWEP.Trivia_Calibre = "9x19mm Parabellum" +SWEP.Trivia_Mechanism = "Roller-Delayed Blowback" +SWEP.Trivia_Country = "Germany" +SWEP.Trivia_Year = 1966 + +-- Weapon slot -- + +SWEP.Slot = 2 + +-- Weapon's manufacturer real name -- + +if GetConVar("arccw_truenames"):GetBool() then + SWEP.PrintName = SWEP.TrueName + SWEP.Trivia_Manufacturer = "Heckler & Koch" +end + +-- Viewmodel / Worldmodel / FOV -- + +SWEP.ViewModel = "models/weapons/arccw/c_ur_mp5.mdl" +SWEP.WorldModel = "models/weapons/arccw/c_ur_mp5.mdl" +SWEP.ViewModelFOV = 70 +SWEP.AnimShoot = ACT_HL2MP_GESTURE_RANGE_ATTACK_AR2 +SWEP.ProceduralIronFire = true + +-- Damage -- + +SWEP.Damage = ArcCW.UC.StdDmg["9mm"].max +SWEP.DamageMin = ArcCW.UC.StdDmg["9mm"].min +SWEP.Penetration = ArcCW.UC.StdDmg["9mm"].pen +SWEP.RangeMin = 20 +SWEP.Range = 100 + +SWEP.DamageType = DMG_BULLET +SWEP.ShootEntity = nil +SWEP.MuzzleVelocity = 400 +SWEP.PhysBulletMuzzleVelocity = 400 + +SWEP.BodyDamageMults = ArcCW.UC.BodyDamageMults + +-- Mag size -- + +SWEP.ChamberSize = 1 +SWEP.Primary.ClipSize = 30 +SWEP.ExtendedClipSize = 40 +SWEP.ReducedClipSize = 15 + +-- Recoil -- + +SWEP.Recoil = 0.22 +SWEP.RecoilSide = 0.17 + +SWEP.RecoilRise = 0.6 +SWEP.RecoilPunch = 1 +SWEP.VisualRecoilMult = 1.25 +SWEP.MaxRecoilBlowback = 1 +SWEP.MaxRecoilPunch = 0.6 +SWEP.RecoilPunchBack = 1.5 + +SWEP.Sway = 0.25 + +-- Firerate / Firemodes -- + +SWEP.Delay = 60 / 800 +SWEP.Num = 1 +SWEP.Firemodes = { + { + Mode = 2, + }, + { + Mode = -3, + Mult_MoveDispersion = 0.75, + Mult_HipDispersion = 0.9, + }, + { + Mode = 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 = 3 +SWEP.HipDispersion = 500 +SWEP.MoveDispersion = 150 +SWEP.JumpDispersion = 1000 + +SWEP.Primary.Ammo = "pistol" +SWEP.MagID = "mp5" + +SWEP.HeatCapacity = 75 +SWEP.HeatDissipation = 15 +SWEP.HeatDelayTime = 3 + +SWEP.MalfunctionMean = 200 + +-- Speed multipliers -- + +SWEP.SpeedMult = 0.925 +SWEP.SightedSpeedMult = 0.75 +SWEP.SightTime = 0.3 +SWEP.ShootSpeedMult = 0.95 + +-- Length -- + +SWEP.BarrelLength = 24 +SWEP.ExtraSightDist = 2 + +-- Ironsights / Customization / Poses -- + +SWEP.HolsterPos = Vector(0.5, -2, 1) +SWEP.HolsterAng = Angle(-8.5, 8, -10) + +SWEP.HoldtypeHolstered = "passive" +SWEP.HoldtypeActive = "ar2" +SWEP.HoldtypeSights = "rpg" + +SWEP.IronSightStruct = { + Pos = Vector(-3.17, -1, 0.6), + Ang = Angle(0.45, 0, 0), + Magnification = 1, + SwitchToSound = "", + ViewModelFOV = 60, +} + +SWEP.ActivePos = Vector(-0.3, 1.1, 0.6) +SWEP.ActiveAng = Angle(0, 0, -1) + +-- SWEP.SprintPos = Vector(-0.5, 3, 1.5) +-- SWEP.SprintAng = Angle(-12, 15, -15) + +SWEP.SprintPos = Vector(0, -3, 0) +SWEP.SprintAng = Angle(0, 0, 0) +-- SWEP.CustomizePos = Vector(6, -2, -1.5) +-- SWEP.CustomizeAng = Angle(16, 28, 0) +SWEP.CustomizePos = Vector(0, 0, 0) +SWEP.CustomizeAng = Angle(0, 0, 0) + +SWEP.CrouchPos = Vector(-2, 0.5, 0) +SWEP.CrouchAng = Angle(0, 0, -14) + +SWEP.BarrelOffsetHip = Vector(4, 0, -4) + +SWEP.MirrorVMWM = true +SWEP.WorldModelOffset = { + pos = Vector(-8, 4, -5), + ang = Angle(-12, 0, 180), + bone = "ValveBiped.Bip01_R_Hand", + scale = 1 +} + +-- Firing sounds -- +local path = ")weapons/arccw_ur/mp5/" +local common = ")/arccw_uc/common/" + +SWEP.ShootSound = { + path .. "fire-01.ogg", + path .. "fire-02.ogg", + path .. "fire-03.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 = { + 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 = { + 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.6 +SWEP.Hook_AddShootSound = ArcCW.UC.InnyOuty + +-- Bodygroups -- + +SWEP.BulletBones = { + -- [1] = "uzi_b1", [2] = "uzi_b2", [3] = "uzi_b3", [4] = "uzi_b4" +} + +--[[ + +1 --- id: 0 + [ name: iron + num: 1 + submodels: + 0 --- ironSIGHT.smd +2 --- id: 1 + [ name: 1 + num: 4 + submodels: + 0 --- mp5UPPER.smd + 1 --- mp5sdUPPER.smd + 2 --- mp5kUPPER.smd + 3 --- swordUPPER.smd +3 --- id: 2 + [ name: 2 + num: 2 + submodels: + 0 --- fourLOWER.smd + 1 --- sefLOWER.smd +4 --- id: 3 + [ name: 3 + num: 11 + submodels: + 0 --- fixedSTOCK.smd + 1 --- collapseSTOCK.smd + 2 --- collapseSTOCKcoll.smd + 3 --- pdwSTOCK.smd + 4 --- pdwSTOCKfold.smd + 5 --- tacticSTOCK.smd + 6 --- tacticSTOCKfold.smd + 7 --- futureSTOCK.smd + 8 --- futureSTOCKcoll.smd + 9 --- futureSTOCKfold.smd + 10 --- buttSTOCK.smd +5 --- id: 4 + [ name: 4 + num: 10 + submodels: + 0 --- standardHG.smd + 1 --- flashHG.smd + 2 --- flashmlokHG.smd + 3 --- slimHG.smd + 4 --- picaHG.smd + 5 --- mlokHG.smd + 6 --- kurzgripHG.smd + 7 --- kurzslimHG.smd + 8 --- kurzmlokHG.smd + 9 --- +6 --- id: 5 + [ name: 5 + num: 4 + submodels: + 0 --- standardMAG.smd + 1 --- smallMAG.smd + 2 --- straightMAG.smd + 3 --- drumMAG.smd +7 --- id: 6 + [ name: 6 + num: 2 + submodels: + 0 --- + 1 --- mp5RAIL.smd + +]] + +SWEP.AttachmentElements = { + ["ur_mp5_barrel_sd"] = { + VMBodygroups = { + {ind = 1, bg = 1}, + {ind = 4, bg = 9}, + //{ind = 8, bg = 1}, + }, + AttPosMods = { + [6] = { + vpos = Vector(0, 1.3, 10), + vang = Angle(90, 0, -90), + }, + [7] = { + vpos = Vector(-1.15, 0.3, 8), + vang = Angle(90, 0, 180), + }, + }, + }, + ["ur_mp5_barrel_eod"] = { + VMBodygroups = { + {ind = 4, bg = 10}, + //{ind = 8, bg = 2}, + }, + AttPosMods = { + [6] = { + vpos = Vector(0, 1.5, 10), + vang = Angle(90, 0, -90), + }, + [7] = { + vpos = Vector(-0.95, 0.3, 8), + vang = Angle(90, 0, 180), + }, + } + }, + ["ur_mp5_barrel_kurz"] = { + VMBodygroups = { + {ind = 1, bg = 2}, + {ind = 4, bg = 7}, + }, + AttPosMods = {[4] = { + vpos = Vector(-0.1, 0.3, 11.5), + vang = Angle(90, 0, -90), + }} + }, + ["ur_mp5_barrel_swordfish"] = { + VMBodygroups = { + --{ind = 0, bg = 1}, + {ind = 1, bg = 3}, + {ind = 6, bg = 0}, + }, + }, + + ["ur_mp5_rail_fg"] = { + VMBodygroups = {{ind = 4, bg = 4}}, + }, + ["ur_mp5_ub_classic"] = { + VMBodygroups = {{ind = 4, bg = 3}}, + }, + ["ur_mp5_ub_surefire"] = { + VMBodygroups = {{ind = 4, bg = 1}}, + }, + ["ur_mp5_ub_surelock"] = { + VMBodygroups = {{ind = 4, bg = 2}}, + }, + ["ur_mp5_ub_kurzgrip"] = { + VMBodygroups = {{ind = 4, bg = 6}}, + }, + ["ur_mp5_ub_kurzmlok"] = { + VMBodygroups = {{ind = 4, bg = 8}}, + }, + ["ur_mp5_ub_wood"] = { + VMBodygroups = {{ind = 4, bg = 3}}, -- insert wood handguard here + }, + + ["ur_mp5_mag_15"] = { + VMBodygroups = {{ind = 5, bg = 1}}, + }, + ["ur_mp5_mag_40"] = { + VMBodygroups = {{ind = 5, bg = 3}}, + }, + ["ur_mp5_mag_50"] = { + VMBodygroups = {{ind = 5, bg = 3}}, + }, + ["ur_mp5_mag_waffle"] = { + VMBodygroups = {{ind = 5, bg = 2}}, + }, + + ["ur_mp5_rail_optic"] = { + VMBodygroups = {{ind = 6, bg = 1}}, + }, + + ["ur_mp5_clamp"] = { + VMBodygroups = {{ind = 5, bg = 1}}, + }, + + ["receiver_lower"] = { + VMBodygroups = {{ind = 2, bg = 1}}, + }, + ["receiver_lower_semi"] = { + VMBodygroups = {{ind = 2, bg = 2}}, + }, + ["receiver_lower_0"] = { + VMBodygroups = {{ind = 2, bg = 0}}, + }, + ["receiver_upper_0"] = { + VMBodygroups = {{ind = 7, bg = 0}}, + }, + + ["stock_a3"] = { + VMBodygroups = { + {ind = 3, bg = 1}, + }, + }, + ["stock_a3_folded"] = { + VMBodygroups = { + {ind = 3, bg = 2}, + }, + }, + ["ur_mp5_stock_remove"] = { + VMBodygroups = {{ind = 3, bg = 10}}, + }, + ["ur_mp5_stock_wood"] = { + -- VMBodygroups = {{ind = 0, bg = 4}}, + -- Make this part of the VMSkin + }, + ["stock_pdw"] = { + VMBodygroups = {{ind = 3, bg = 3}}, + }, + ["stock_pdw_folded"] = { + VMBodygroups = {{ind = 3, bg = 4}}, + }, + ["stock_ump"] = { + VMBodygroups = {{ind = 3, bg = 5}}, + }, + ["stock_ump_folded"] = { + VMBodygroups = {{ind = 3, bg = 6}}, + }, + ["stock_future"] = { + VMBodygroups = {{ind = 3, bg = 7}}, + }, + ["stock_future_folded"] = { + VMBodygroups = {{ind = 3, bg = 8}}, + }, + ["ur_mp5_precision_irons"] = { + VMBodygroups = { + {ind = 0, bg = 2}, + {ind = 6, bg = 0}, + }, + }, +} + +SWEP.Hook_ModifyBodygroups = function(wep, data) + local atts = wep.Attachments + local vm = data.vm + if IsValid(vm) then + local barr = string.Replace(atts[2].Installed or "default","ur_mp5_barrel_","") + local hg = string.Replace(atts[5].Installed or "default","ur_mp5_ub_","") + + if atts[6].Installed or atts[7].Installed then + if barr == "sd" then + vm:SetBodygroup(8, 1) + elseif barr == "eod" then + vm:SetBodygroup(8, 2) + elseif hg == "default" or hg == "classic" then + vm:SetBodygroup(4, 4) + vm:SetBodygroup(8, 0) + else + vm:SetBodygroup(8, 0) + end + else + vm:SetBodygroup(8, 0) + end + + if hg == "mlok" then + if barr == "kurz" then + vm:SetBodygroup(4,8) + else + vm:SetBodygroup(4,5) + end + end + + if barr == "sword" then + vm:SetBodygroup(0,(atts[1].Installed and 3) or 1) + end + end +end + +SWEP.Hook_NameChange = function(wep,name) + local atts = wep.Attachments + local barr = string.Replace(atts[2].Installed or "default","ur_mp5_barrel_","") + local cal = string.Replace(atts[3].Installed or "default","ur_mp5_caliber_","") + local stock = string.Replace(atts[8].Installed or "default","ur_mp5_stock_","") + local fakeNames = !GetConVar("arccw_truenames"):GetBool() + local defaultCals = { + ["default"] = true, + ["noburst"] = true, + ["semi"] = true + } + + local start = "MP5" + local mid = "A" + local num = "4" + if fakeNames then + start = "PK5" + mid = "-" + end + + if cal == "semi" or atts[12].Installed == "uc_fg_civvy" then + if fakeNames then + return "PK5-CIV" + else + if barr == "long" or barr == "sd" then + start = "HK94" -- I know how prolific civies can get with their gunbuilds, so the nonsensical names will continue + else + return "SP5" .. ((barr == "kurz" and "K-PDW") or "") + end + end + end + + if !defaultCals[cal] then + if barr == "sd" then + num = "SD" + else + num = "" + end + if cal == "10auto" then + mid = "/10" + elseif cal == "40sw" then + mid = "/40" + elseif cal == "22lr" then + if barr == "sd" then + mid = "SD" + num = " .22 LR" + else + mid = " .22 LR" + end + end + else + if barr == "kurz" then + if fakeNames then + mid = "C" + else + mid = "K" + end + if stock == "pdw" then + num = "-PDW" + elseif cal == "default" then + if fakeNames then + num = "-4" + else + num = "A4" + end + else + num = "" + end + else + if barr == "sd" then + mid = "SD" + end + + if cal == "noburst" or cal == "semi" then + if stock == "a3" then + num = "3" + elseif stock == "none" then + num = "1" + else + num = "2" + end + else + if stock == "a3" then + if barr == "sd" then + num = "6" + else + num = "5" + end + elseif stock == "none" then + if barr == "sd" then + num = "4" + end + else + if barr == "sd" then + num = "5" + end + end + end + end + end + + return start .. mid .. num +end + +-- Animations -- + +SWEP.Hook_Think = ArcCW.UC.ADSReload + +local ratel = {common .. "rattle1.ogg", common .. "rattle2.ogg", common .. "rattle3.ogg"} +local rottle = {common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"} +local rutle = {common .. "movement-smg-03.ogg",common .. "movement-smg-04.ogg"} + +SWEP.Animations = { + ["idle"] = { + Source = "idle", + }, + -- ["idle_empty"] = { + -- Source = "idle", + -- }, + ["ready"] = { + Source = "ready", + LHIK = true, + LHIKIn = 0.4, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.6, + SoundTable = { + {s = rottle, t = 0.15}, + {s = path .. "rack1.ogg", t = 0.15, c = ci}, + {s = path .. "rack2.ogg", t = 0.38, c = ci}, + {s = ratel, t = 0.75}, + } + }, + ["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_empty"] = { + -- 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 }}, + -- }, + ["fire_iron"] = { + Source = "idle", + 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_iron"] = { + -- Source = "idle", + -- 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 }}, + -- }, + + ["fix"] = { + Source = "fix", + Time = 40 / 30, + LHIK = true, + LHIKIn = 0.4, + LHIKEaseIn = 0.4, + LHIKEaseOut = 0.15, + LHIKOut = 0.4, + ShellEjectAt = 0.36, + SoundTable = { + {s = rottle, t = 0.15}, + {s = path .. "rack1.ogg", t = 0.27, c = ci}, + {s = path .. "rack2.ogg", t = 0.5, c = ci}, + }, + }, + + -- 30 Round Reloads -- + + ["reload"] = { + Source = "reload", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_SMG1, + -- Time = 2, + MinProgress = 1.2, + LastClip1OutTime = 2, + LHIK = true, + LHIKIn = 0.2, + LHIKEaseIn = 0.2, + LHIKEaseOut = 0.15, + LHIKOut = 0.6, + SoundTable = { + {s = rottle, t = 0}, + {s = common .. "magpouch.ogg", t = 0.05}, + {s = path .. "magout.ogg", t = 0.4, c = ci}, + {s = rottle, t = 0.25}, + {s = path .. "magin.ogg", t = 0.61, c = ci}, + {s = common .. "magpouchin.ogg", t = 1.25}, + {s = ratel, t = 1.55}, + {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 = rottle, t = 0}, + {s = path .. "chback.ogg", t = 0.045, c = ci}, + {s = path .. "chlock.ogg", t = 0.18, c = ci}, + {s = common .. "magpouch.ogg", t = 0.4}, + {s = path .. "magout.ogg", t = 0.86, c = ci}, + {s = rottle, t = 0.25}, + {s = path .. "magin.ogg", t = 1.13, c = ci}, + {s = common .. "magdrop_smg.ogg", t = 1.5}, + {s = rottle, t = 1.25}, + {s = path .. "chamber.ogg", t = 2.05, c = ci}, + {s = ratel, t = 2.3}, + {s = common .. "shoulder.ogg", t = 2.45}, + }, + }, + ["reload_kurz"] = { + Source = "reload", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_SMG1, + -- Time = 2, + MinProgress = 1.2, + LastClip1OutTime = 2, + LHIK = true, + LHIKIn = 0.2, + LHIKEaseIn = 0.2, + LHIKEaseOut = 0.15, + LHIKOut = 0.6, + SoundTable = { + {s = rottle, t = 0}, + {s = common .. "magpouch.ogg", t = 0.05}, + {s = path .. "magout.ogg", t = 0.4, c = ci}, + {s = rottle, t = 0.25}, + {s = path .. "magin.ogg", t = 0.63, c = ci}, + {s = common .. "magpouchin.ogg", t = 1.25}, + {s = ratel, t = 1.55}, + {s = common .. "shoulder.ogg", t = 1.5}, + }, + }, + ["reload_empty_kurz"] = { + Source = "reload_empty_kurz", + 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 = rottle, t = 0}, + {s = path .. "chback.ogg", t = 0.066, c = ci}, + {s = path .. "chlock.ogg", t = 0.2, c = ci}, + {s = common .. "magpouch.ogg", t = 0.4}, + {s = path .. "magout.ogg", t = 0.86, c = ci}, + {s = rottle, t = 0.25}, + {s = path .. "magin.ogg", t = 1.13, c = ci}, + {s = common .. "magdrop_smg.ogg", t = 1.5}, + {s = rottle, t = 1.25}, + {s = path .. "chamber.ogg", t = 2.1, c = ci}, + {s = ratel, t = 2.4}, + {s = common .. "shoulder.ogg", t = 2.6}, + }, + }, + + -- 15 Round Reloads -- + + ["reload_15"] = { + Source = "reload",--"reload_15", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_SMG1, + -- Time = 67 / 30, + MinProgress = 1.2, + LastClip1OutTime = 67 / 30, + LHIK = true, + LHIKIn = 0.2, + LHIKEaseIn = 0.2, + LHIKEaseOut = 0.15, + LHIKOut = 0.6, + SoundTable = { + {s = rottle, t = 0}, + {s = common .. "magpouch.ogg", t = 0.05}, + {s = path .. "magout.ogg", t = 0.25, c = ci}, + {s = rottle, t = 0.25}, + {s = path .. "magin.ogg", t = 0.5, c = ci}, + {s = common .. "magpouchin.ogg", t = 1.25}, + {s = ratel, t = 1.55}, + {s = common .. "shoulder.ogg", t = 1.75}, + }, + }, + ["reload_empty_15"] = { + Source = "reload_empty",--"reload_empty_15", + 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 = rottle, t = 0}, + {s = path .. "chback.ogg", t = 0.1, c = ci}, + {s = path .. "chlock.ogg", t = 0.19, c = ci}, + {s = common .. "magpouch.ogg", t = 0.4}, + {s = path .. "magout.ogg", t = .9, c = ci}, + {s = rottle, t = 0.25}, + {s = path .. "magin.ogg", t = 1.2, c = ci}, + {s = common .. "magdrop_smg.ogg", t = 1.5}, + {s = rottle, t = 1.25}, + {s = path .. "chamber.ogg", t = 2.13, c = ci}, + {s = ratel, t = 2.4}, + {s = common .. "shoulder.ogg", t = 2.45}, + }, + }, + ["reload_empty_kurz_15"] = { + Source = "reload_empty_kurz",--"reload_empty_15", + 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 = rottle, t = 0}, + {s = path .. "chback.ogg", t = 0.1, c = ci}, + {s = path .. "chlock.ogg", t = 0.19, c = ci}, + {s = common .. "magpouch.ogg", t = 0.4}, + {s = path .. "magout.ogg", t = .9, c = ci}, + {s = rottle, t = 0.25}, + {s = path .. "magin.ogg", t = 1.2, c = ci}, + {s = common .. "magdrop_smg.ogg", t = 1.5}, + {s = rottle, t = 1.25}, + {s = path .. "chamber.ogg", t = 2.13, c = ci}, + {s = ratel, t = 2.4}, + {s = common .. "shoulder.ogg", t = 2.6}, + }, + }, + + -- 40 Round Reloads -- + + ["reload_40"] = { + Source = "reload",--"reload_40", + 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 = rottle, t = 0}, + {s = common .. "magpouch.ogg", t = 0.05}, + {s = path .. "magout.ogg", t = 0.25, c = ci}, + {s = rottle, t = 0.25}, + {s = path .. "magin.ogg", t = 0.5, c = ci}, + {s = common .. "magpouchin.ogg", t = 1.25}, + {s = ratel, t = 1.55}, + {s = common .. "shoulder.ogg", t = 1.5}, + }, + }, + ["reload_empty_40"] = { + Source = "reload_empty",--"reload_empty_40", + 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 = rottle, t = 0}, + {s = path .. "chback.ogg", t = 0.1, c = ci}, + {s = path .. "chlock.ogg", t = 0.19, c = ci}, + {s = common .. "magpouch.ogg", t = 0.4}, + {s = path .. "magout.ogg", t = .9, c = ci}, + {s = rottle, t = 0.25}, + {s = path .. "magin.ogg", t = 1.2, c = ci}, + {s = common .. "magdrop_smg.ogg", t = 1.5}, + {s = rottle, t = 1.25}, + {s = path .. "chamber.ogg", t = 2.13, c = ci}, + {s = ratel, t = 2.4}, + {s = common .. "shoulder.ogg", t = 2.6}, + }, + }, + ["reload_empty_kurz_40"] = { + Source = "reload_empty_kurz",--"reload_empty_40", + 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 = rottle, t = 0}, + {s = path .. "chback.ogg", t = 0.1, c = ci}, + {s = path .. "chlock.ogg", t = 0.19, c = ci}, + {s = common .. "magpouch.ogg", t = 0.4}, + {s = path .. "magout.ogg", t = .9, c = ci}, + {s = rottle, t = 0.25}, + {s = path .. "magin.ogg", t = 1.2, c = ci}, + {s = common .. "magdrop_smg.ogg", t = 1.5}, + {s = rottle, t = 1.25}, + {s = path .. "chamber.ogg", t = 2.13, c = ci}, + {s = ratel, t = 2.4}, + {s = common .. "shoulder.ogg", t = 2.6}, + }, + }, + + -- 100 Round Reloads -- + + ["reload_drum"] = { + Source = "reload_drum",--"reload_50", + 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.9, + SoundTable = { + {s = rottle, t = 0}, + {s = path .. "magout.ogg", t = 0.32, c = ci}, + {s = rottle, t = 0.25}, + {s = rottle, t = 0.75}, + {s = path .. "magin.ogg", t = 1.05, c = ci}, + {s = common .. "cloth_4.ogg", t = 1.65}, + {s = path .. "magtap.ogg", t = 1.755, c = ci}, + {s = common .. "shoulder.ogg", t = 2.25}, + }, + }, + ["reload_empty_drum"] = { + Source = "reload_empty_drum",--"reload_empty_50", + 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 = 1, + SoundTable = { + {s = rottle, t = 0}, + {s = path .. "magout.ogg", t = 0.3, c = ci}, + {s = rottle, t = 0.25}, + {s = rottle, t = 0.75}, + {s = common .. "magdrop.ogg", t = 1.0}, + {s = path .. "magin.ogg", t = 1.05, c = ci}, + {s = common .. "cloth_4.ogg", t = 1.65}, + {s = path .. "magtap.ogg", t = 1.755, c = ci}, + {s = path .. "rack1.ogg", t = 2.3, c = ci}, + {s = path .. "rack2.ogg", t = 2.5, c = ci}, + {s = common .. "shoulder.ogg", t = 3.0}, + }, + }, + + ["enter_inspect"] = { + Source = "inspect_enter", + -- time = 35 / 60, + LHIK = false, + LHIKIn = 0, + LHIKOut = 2.5, + SoundTable = { + {s = rottle, t = 0}, + {s = common .. "movement-smg-03.ogg", t = 0}, + }, + }, + ["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-smg-01.ogg", t = 0.2}, + {s = rottle, t = 0.25}, + {s = rottle, t = 1.2}, + {s = common .. "movement-smg-04.ogg", t = 1.25}, + }, + }, + + ["enter_sprint"] = { + Source = "sprint_enter", + LHIK = true, + LHIKIn = 0.2, + LHIKEaseIn = 0.2, + LHIKOut = 0, + Time = .5, + }, + ["idle_sprint"] = { + Source = "sprint_loop", + LHIK = true, + LHIKIn = 0, + LHIKOut = 0, + }, + ["exit_sprint"] = { + Source = "sprint_exit", + LHIK = true, + LHIKIn = 0, + LHIKEaseOut = 0.4, + LHIKOut = 0.5, + Time = .5, + }, +} + +SWEP.AutosolveSourceSeq = "idle" + +SWEP.Attachments = { + { + PrintName = "Optic", + DefaultAttName = "Iron Sights", + Slot = {"optic_lp","optic","ur_mp5_optic"}, -- ,"optic" + Bone = "body", + Offset = { + vpos = Vector(-0.1, -1.6, 3), + vang = Angle(90, 0, -90), + }, + CorrectivePos = Vector(-0.09, 0, 0), + CorrectiveAng = Angle(1, 0.6, -4.0), + InstalledEles = {"ur_mp5_rail_optic"} + }, + { + PrintName = "Upper Receiver", + DefaultAttName = "9\" Standard Upper", + DefaultAttIcon = Material("entities/att/ur_mp5/upper_std.png", "smooth mips"), + Slot = "ur_mp5_barrel", + Bone = "body", + Offset = { + vpos = Vector(2.6, -3.7, -17.3), + vang = Angle(90, 0, -90), + }, + }, + { + PrintName = "Lower Receiver", + DefaultAttName = "Navy Lower", + DefaultAttIcon = Material("entities/att/ur_mp5/grip.png", "smooth mips"), + Slot = "ur_mp5_caliber", + DefaultEles = {"receiver_lower_0"} + }, + { + PrintName = "Muzzle", + DefaultAttName = "Standard Muzzle", + Slot = {"muzzle"}, + Bone = "body", + Offset = { + vpos = Vector(0, 0.3, 14.8), + vang = Angle(90, 0, -90), + }, + ExcludeFlags = {"barrel_sd","barrel_eod","barrel_sword"} + }, + { + PrintName = "Handguard", + DefaultAttName = "Tropical Handguard", + DefaultAttIcon = Material("entities/att/ur_mp5/hg_std.png", "smooth mips"), + Slot = {"ur_mp5_hg"}, + ExcludeFlags = {"barrel_sd", "barrel_eod"}, + Bone = "body", + Offset = { + vpos = Vector(0, .9, 10), + vang = Angle(90, 0, -90), + }, + --VMScale = Vector(.8, .8, .8), + }, + { + PrintName = "Underbarrel", + Slot = {"foregrip"}, + Bone = "body", + Offset = { + vpos = Vector(0, .9, 10), + vang = Angle(90, 0, -90), + }, + --VMScale = Vector(.8, .8, .8), + --InstalledEles = {"ur_mp5_rail_fg"}, + GivesFlags = {"mp5_rail"}, + ExcludeFlags = {"mp5_badhg","mp5_kurz"}, + MergeSlots = {15}, + }, + { + PrintName = "Tactical", + Slot = "tac", + Bone = "body", + Offset = { + vpos = Vector(-0.9, 0.2, 8), + vang = Angle(90, 0, 180), + }, + VMScale = Vector(.8,.8,.8), + --InstalledEles = {"ur_mp5_clamp"} + GivesFlags = {"mp5_rail"}, + }, + { + PrintName = "Stock", + Slot = {"ur_mp5_stock"}, + DefaultAttName = "Full Stock", + DefaultAttIcon = Material("entities/att/ur_mp5/stock_std.png", "smooth mips"), + }, + { + PrintName = "Magazine", + Slot = {"ur_mp5_mag"}, + DefaultAttName = "30-Round Mag", + DefaultAttIcon = Material("entities/att/ur_mp5/mag30.png", "smooth mips"), + ExcludeFlags = {"ur_mp5_cal_40sw","ur_mp5_cal_10mm"} + }, + { + 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", + ExcludeFlags = {"barrel_sd"} + }, + { + 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", "mp5_charm"}, + FreeSlot = true, + Bone = "Body", + Offset = { + vpos = Vector(0.6, 1.1, 2.5), + vang = Angle(90, 0, -90), + }, + }, + { + PrintName = "M203 slot", + Slot = "uc_ubgl", + Bone = "Body", + Offset = { + vpos = Vector(0, 0, 7.9), + vang = Angle(90, 0, -90), + }, + Hidden = true, + --RequireFlags = {"barrel_eod"}, + ExcludeFlags = {"mp5_badhg","mp5_kurz"}, + } +} + +-- SWEP.AttachmentOverrides = { +-- ["uc_grip_handstop"] = { +-- LHIK = false +-- } +-- } -- THIS SHIT DOESN'T WORK diff --git a/lua/weapons/arccw_ur_spas12.lua b/lua/weapons/arccw_ur_spas12.lua new file mode 100644 index 0000000..6056dc9 --- /dev/null +++ b/lua/weapons/arccw_ur_spas12.lua @@ -0,0 +1,923 @@ +SWEP.Base = "arccw_base" +SWEP.Spawnable = true +SWEP.Category = "ArcCW - Urban Coalition" +SWEP.UC_CategoryPack = "2Urban Renewal" +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 = "Martello 12/70" -- Italian for "hammer" + +-- True name -- + +SWEP.TrueName = "SPAS-12" + +-- Trivia -- + +SWEP.Trivia_Class = "Shotgun" +SWEP.Trivia_Desc = [[Flexible combat shotgun with the ability to toggle between manual and semi-automatic action. This "dual-mode operation" allows the weapon to cycle low pressure, less-lethal rounds that lack the energy to extract themselves. +The weapon's attempts to reach the American civilian market may have been slowed by legal challenges, but it remains prominent in popular culture for its intimidating and tactical appearance. + +Highly versatile, but encumbering to carry and difficult to reload. Switch to pump-action mode to tighten spread and conserve ammo.]] +SWEP.Trivia_Manufacturer = "Iscapelli Armaments" +SWEP.Trivia_Calibre = "12 Gauge" +SWEP.Trivia_Mechanism = "Hybrid" +SWEP.Trivia_Country = "Italy" +SWEP.Trivia_Year = 1979 + +-- Weapon slot -- + +SWEP.Slot = 3 + +-- Weapon's manufacturer real name -- + +if GetConVar("arccw_truenames"):GetBool() then + SWEP.PrintName = SWEP.TrueName + SWEP.Trivia_Manufacturer = "Luigi Franchi SpA" +end + +-- Viewmodel / Worldmodel / FOV -- + +SWEP.ViewModel = "models/weapons/arccw/c_ur_spas12.mdl" +SWEP.WorldModel = "models/weapons/arccw/c_ur_spas12.mdl" +SWEP.ViewModelFOV = 60 +SWEP.AnimShoot = ACT_HL2MP_GESTURE_RANGE_ATTACK_SHOTGUN + +SWEP.MirrorVMWM = true +SWEP.WorldModelOffset = { + pos = Vector(-5.8, 5, -4.5), + ang = Angle(-12, 0, 180), + bone = "ValveBiped.Bip01_R_Hand", + scale = 1 +} + +-- Damage parameters -- + +SWEP.Damage = 18 -- 6 pellets to kill +SWEP.DamageMin = 10 -- 10 pellets to kill +SWEP.Range = 40 +SWEP.RangeMin = 6 +SWEP.Num = 8 +SWEP.Penetration = 2 +SWEP.DamageType = DMG_BUCKSHOT +SWEP.ShootEntity = nil +SWEP.MuzzleVelocity = 365 +SWEP.PhysBulletMuzzleVelocity = 365 + +SWEP.HullSize = 0.25 + +SWEP.BodyDamageMults = ArcCW.UC.BodyDamageMults_Shotgun + +-- Mag size -- + +SWEP.ChamberSize = 1 +SWEP.Primary.ClipSize = 8 +SWEP.ChamberLoadEmpty = 1 + +-- Recoil -- + +SWEP.Recoil = 2.5 +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 = 1, + PrintName = "fcg.pump", + Override_ManualAction = true, + Mult_AccuracyMOA = 0.8, + Mult_HipDispersion = 0.8, + }, + { + Mode = 0 + } +} + +SWEP.UC_CanManualAction = true +SWEP.ShotgunReload = true +SWEP.NoLastCycle = 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 = 25 +SWEP.HipDispersion = 400 +SWEP.MoveDispersion = 125 +SWEP.JumpDispersion = 1000 + +SWEP.Primary.Ammo = "buckshot" + +-- Speed multipliers -- + +SWEP.SpeedMult = 0.88 +SWEP.SightedSpeedMult = 0.5 +SWEP.SightTime = 0.4 +SWEP.ShootSpeedMult = 0.75 + +-- Length -- + +SWEP.BarrelLength = 46 +SWEP.ExtraSightDist = 2 + +-- Ironsights / Customization / Poses -- + +SWEP.HoldtypeHolstered = "passive" +SWEP.HoldtypeActive = "ar2" +SWEP.HoldtypeSights = "rpg" + +SWEP.IronSightStruct = { + Pos = Vector(-3.835, -4, 1.55), + Ang = Angle(0.2, 0, 1), + Magnification = 1.05, + SwitchToSound = "", +} + +SWEP.SprintPos = Vector(-0.5, -4, -3) +SWEP.SprintAng = Angle(3.5, 7, -20) + +SWEP.HolsterPos = Vector(2.5, -1, -3) +SWEP.HolsterAng = Angle(-3.5, 20, -20) + +SWEP.ActivePos = Vector(0, 0.5, 1) +SWEP.ActiveAng = Angle(0, 0, 0) + +SWEP.CrouchPos = Vector(-4, -2, 0) +SWEP.CrouchAng = Angle(0, 0, -30) + +SWEP.CustomizePos = Vector(0, 0, 0) +SWEP.CustomizeAng = Angle(0, 0, 0) + +SWEP.BarrelOffsetSighted = Vector(0, 0, -1) +SWEP.BarrelOffsetHip = Vector(3, 0, -4.5) + +-- Firing sounds -- + +local path1 = ")weapons/arccw_ud/870/" +local path = ")weapons/arccw_ur/spas12/" +local common = ")/arccw_uc/common/" +SWEP.ShootSoundSilenced = path .. "fire_supp.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"} +SWEP.DistantShootSoundSilenced = common .. "sup_tail.ogg"]] +SWEP.ShootDrySound = common .. "manual_trigger.ogg" + +local tail = ")/arccw_uc/common/12ga/" + +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.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", +} +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.ShootSoundSilenced = { + tail .. "fire-sup-01.ogg", + tail .. "fire-sup-02.ogg", + tail .. "fire-sup-03.ogg", + tail .. "fire-sup-04.ogg", + tail .. "fire-sup-05.ogg", + tail .. "fire-sup-06.ogg" +} +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.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 + +-- Animations -- + +SWEP.Hook_Think = ArcCW.UC.ADSReload + +SWEP.Hook_TranslateAnimation = function(wep,anim) + if wep:GetCurrentFiremode().Override_ManualAction then + if anim == "idle_empty" then + return "idle_empty_manual" + end + if anim == "exit_inspect_empty" then + return "exit_inspect_pump_empty" + end + end +end + +SWEP.Hook_SelectFireAnimation = function(wep,data) + if wep:GetCurrentFiremode().Override_AmmoPerShot == 2 then + return "fire_2bst" + elseif wep:GetCurrentFiremode().Override_ManualAction then + return "fire_manual" + end +end +SWEP.Hook_SelectReloadAnimation = function(wep,curanim) + local pump_rng = math.Truncate(util.SharedRandom("ik hou van u", 1,100)) -- nombre aleatoire, d'un a cent + + if wep:GetCurrentFiremode().Override_ManualAction and pump_rng >= 50 and curanim == "sgreload_start_empty" then -- lol? how does else work again? + return "sgreload_start_empty_manual" + end + if wep:GetCurrentFiremode().Override_ManualAction and pump_rng < 50 and curanim == "sgreload_start_empty" then + return "sgreload_start_empty_manual_alt" + end +end + +local ratel = {common .. "rattle1.ogg", common .. "rattle2.ogg", common .. "rattle3.ogg"} +local rottle = {common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"} +local rutle = {common .. "movement-shotgun-01.ogg",common .. "movement-shotgun-02.ogg",common .. "movement-shotgun-03.ogg",common .. "movement-shotgun-04.ogg"} +local shellin = {path .. "shell-insert-01.ogg", path .. "shell-insert-02.ogg", path .. "shell-insert-03.ogg", path .. "shell-insert-04.ogg", path .. "shell-insert-05.ogg", path .. "shell-insert-06.ogg", path .. "shell-insert-07.ogg", path .. "shell-insert-08.ogg", path .. "shell-insert-09.ogg", path .. "shell-insert-10.ogg", path .. "shell-insert-11.ogg", path .. "shell-insert-12.ogg"} + +SWEP.Animations = { + ["idle"] = { + Source = "idle", + }, + ["idle_empty"] = { + Source = "idle_empty_semi", + }, + ["idle_empty_manual"] = { + Source = "idle_empty", + }, + ["draw"] = { + Source = "draw", + --Time = 20 / 30, + SoundTable = ArcCW.UC.DrawSounds, + }, + ["ready"] = { + Source = "deploy", + SoundTable = { + ArcCW.UC.DrawSounds, + {s = path .. "forearm_back.ogg", t = 8/30}, + {s = path .. "forearm_forward.ogg", t = 15/30}, -- Not temporary + }, + }, + ["draw_empty"] = { + Source = "draw", -- draw_empty + --Time = 20 / 30, + SoundTable = ArcCW.UC.DrawSounds, + }, + ["holster"] = { + Source = {"holster","holster2"}, + --Time = 20 / 30, + SoundTable = ArcCW.UC.HolsterSounds, + }, + ["holster_empty"] = { + Source = {"holster","holster2"}, -- holster_empty + --Time = 20 / 30, + SoundTable = ArcCW.UC.HolsterSounds, + }, + ["fire"] = { + Source = "fire_semi", + 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 }, + {s = path1 .. "eject.ogg", t = 0.01}, + }, + }, + ["fire_iron"] = { + Source = "fire_semi", + 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}, + }, + }, + ["fire_2bst"] = { + Source = "fire_freeman", + LHIK = true, + LHIKIn = 0.05, + LHIKEaseOut = 0.175, + LHIKOut = 0.65, + 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 }, + {s = common .. "common_mech_heavy.ogg", t = 0}, + {s = path1 .. "eject.ogg", t = 0.01}, + }, + MinProgress = 0.175 + }, + ["fire_manual"] = { -- No bolt cycling + Source = "fire_pump", + MinProgress = 0.1, + ShellEjectAt = false, + SoundTable = { + { s = common .. "manual_trigger.ogg", t = 0}, + {s = common .. "common_mech_heavy.ogg", t = 0}, + }, + }, + ["cycle"] = { + Source = {"cycle", "cycle2"}, + ShellEjectAt = 0.1, + MinProgress = 0.4, + Time = 25 / 30, + SoundTable = { + {s = path .. "forearm_back.ogg", t = 0}, + {s = path1 .. "eject.ogg", t = 0.1}, + {s = path .. "forearm_forward.ogg", t = 0.2}, -- Not temporary + }, + }, + ["cycle_2bst"] = { + Source = {"cycle_freeman", "cycle_freeman2"}, + ShellEjectAt = 0.42, + MinProgress = 0.8, + --Time = 25 / 30, + SoundTable = { + {s = path .. "forearm_back_2bst.ogg", t = 0.3}, + {s = path1 .. "eject.ogg", t = 0.37}, + {s = path .. "forearm_forward_2bst.ogg", t = 0.5}, -- Not temporary + }, + }, + ["unjam"] = { + Source = "cycle", + ShellEjectAt = 0.01, + MinProgress = .25, + SoundTable = { + {s = path .. "forearm_back.ogg", t = 0}, + {s = path1 .. "eject.ogg", t = 0.1}, + {s = path .. "forearm_forward.ogg", t = 0.2}, -- Not temporary + }, + }, + ["fire_empty"] = { + Source = "fire_semi_empty", -- fire_empty + ShellEjectAt = 0.01, + SoundTable = { + {s = path1 .. "eject.ogg", t = 0}, -- Not temporary + }, + }, + ["fire_iron_empty"] = { + Source = "fire_semi_empty", -- fire_empty + ShellEjectAt = 0.01, + SoundTable = { + {s = path1 .. "eject.ogg", t = 0}, -- Not temporary + }, + }, + ["sgreload_start"] = { + Source = "sgreload_start", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_SHOTGUN, + RestoreAmmo = 1, + LHIK = true, + LHIKIn = 0.2, + LHIKEaseIn = 0.2, + LHIKOut = 0, + SoundTable = { + {s = path .. "turn.ogg", t = 0}, -- Temporary + {s = rottle, t = 0.1}, + {s = path .. "grab.ogg", t = 0.15}, + {s = shellin, t = 31/30}, + {s = {common .. "cloth_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = (31/30 + 0.05), v = 0.5}, + } + }, + ["sgreload_start_fold"] = { + Source = "sgreload_start_fold", + TPAnim = ACT_HL2MP_GESTURE_RELOAD_SHOTGUN, + LHIK = true, + LHIKIn = 0.2, + LHIKEaseIn = 0.2, + LHIKOut = 0, + SoundTable = { + {s = path .. "turn.ogg", t = 0}, -- Temporary + {s = rottle, t = 0.1}, + {s = path .. "grab.ogg", t = 0.15}, + } + }, + ["sgreload_start_empty"] = { + Source = "sgreload_start_empty_semi", + -- MinProgress = 1, + LHIK = true, + LHIKIn = 0.2, + LHIKOut = 0, + TPAnimStartTime = 0.5, + ShellEjectAt = false, + TPAnim = ACT_HL2MP_GESTURE_RELOAD_SHOTGUN, + SoundTable = { + {s = rottle, t = 0}, + {s = path .. "breechload.ogg", t = .2}, + {s = path .. "breechclose.ogg", t = 0.9}, -- Temporary + {s = path .. "turn.ogg", t = 1.0}, -- Temporary + {s = rottle, t = 1.2}, + {s = path .. "grab.ogg", t = 1.4}, + }, + ForceEmpty = true, + }, + ["sgreload_start_empty_fold"] = { + Source = "sgreload_start_empty_semi_fold", + -- MinProgress = 1, + LHIK = true, + LHIKIn = 0.2, + LHIKOut = 0, + TPAnimStartTime = 0.5, + ShellEjectAt = false, + TPAnim = ACT_HL2MP_GESTURE_RELOAD_SHOTGUN, + SoundTable = { + {s = rottle, t = 0}, + {s = path .. "breechload.ogg", t = .2}, + {s = path .. "breechclose.ogg", t = 0.9}, -- Temporary + {s = path .. "turn.ogg", t = 1.0}, -- Temporary + {s = rottle, t = 1.2}, + {s = path .. "grab.ogg", t = 1.4}, + }, + ForceEmpty = true, + }, + ["sgreload_start_empty_manual"] = { + Source = "sgreload_start_empty", + MinProgress = 1, + LHIK = true, + LHIKIn = 1.7, + LHIKEaseIn = 0.2, + LHIKOut = 0, + TPAnimStartTime = 0.5, + ShellEjectAt = 15/30, + TPAnim = ACT_HL2MP_GESTURE_RELOAD_SHOTGUN, + SoundTable = { + {s = path .. "forearm_back.ogg", t = 10/30}, + {s = path1 .. "eject.ogg", t = 11/30}, + {s = path .. "breechload.ogg", t = 15/30}, + {s = path .. "forearm_forward.ogg", t = 33/30}, -- Not temporary + {s = rottle, t = 0.2}, + {s = path .. "turn.ogg", t = 1.1}, -- Temporary + {s = rottle, t = 1.2}, + {s = path .. "grab.ogg", t = 1.5}, + }, + ForceEmpty = true, + }, + ["sgreload_start_empty_manual_alt"] = { + Source = "sgreload_start_empty_alt", + MinProgress = 1, + LHIK = true, + LHIKIn = 1.6, + LHIKEaseIn = 0.2, + LHIKOut = 0, + TPAnimStartTime = 0.5, + ShellEjectAt = .1, + TPAnim = ACT_HL2MP_GESTURE_RELOAD_SHOTGUN, + SoundTable = { + {s = path .. "forearm_back.ogg", t = 16/30}, + {s = path1 .. "eject.ogg", t = 18/30}, + {s = path .. "breechload.ogg", t = 15/30}, + {s = path .. "forearm_forward.ogg", t = 33/30}, -- Not temporary + {s = rottle, t = 0.2}, + {s = path .. "turn.ogg", t = 1.1}, -- Temporary + {s = rottle, t = 1.2}, + {s = path .. "grab.ogg", t = 1.4}, + }, + ForceEmpty = true, + }, + ["sgreload_start_empty_manual_fold"] = { + Source = "sgreload_start_empty_fold", + Time = 85 / 30, + MinProgress = 1, + LHIK = true, + LHIKIn = 0.2, + LHIKOut = 0, + TPAnimStartTime = 0.5, + ShellEjectAt = .1, + TPAnim = ACT_HL2MP_GESTURE_RELOAD_SHOTGUN, + SoundTable = { + {s = path .. "forearm_back.ogg", t = 10/30}, + {s = path1 .. "eject.ogg", t = 11/30}, + {s = path .. "breechload.ogg", t = 15/30}, + {s = path .. "forearm_forward.ogg", t = 33/30}, -- Not temporary + {s = rottle, t = 0.2}, + {s = path .. "turn.ogg", t = 1.1}, -- Temporary + {s = rottle, t = 1.2}, + {s = path .. "grab.ogg", t = 1.5}, + }, + ForceEmpty = true, + }, + ["sgreload_insert"] = { + Source = "sgreload_insert", + LastClip1OutTime = 20/40, + 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_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.05, v = 0.5}, + }, + }, + ["sgreload_insert_fold"] = { + Source = "sgreload_insert_fold", + 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_2.ogg", common .. "cloth_3.ogg", common .. "cloth_4.ogg", common .. "cloth_6.ogg", common .. "rattle.ogg"}, t = 0.05}, + }, + }, + ["sgreload_finish"] = { + Source = "sgreload_finish", + LHIK = true, + LHIKIn = 0, + LHIKEaseOut = 0.3, + LHIKOut = 0.6, + MinProgress = 0.7, + TPAnim = ACT_HL2MP_GESTURE_RELOAD_SHOTGUN, + TPAnimStartTime = 0.8, + SoundTable = { + {s = rottle, t = 0.2}, + {s = path .. "return.ogg", t = 0.475}, -- Temporary + {s = common .. "shoulder.ogg", t = 0.55}, + }, + }, + ["sgreload_finish_fold"] = { + Source = "sgreload_finish_fold", + Time = 45 / 30, + LHIK = true, + LHIKIn = 0, + LHIKEaseOut = 0.3, + LHIKOut = 0.6, + TPAnim = ACT_HL2MP_GESTURE_RELOAD_SHOTGUN, + TPAnimStartTime = 0.8, + SoundTable = { + {s = rottle, t = 0.2}, + {s = path .. "return.ogg", t = 0.475}, -- Temporary + {s = common .. "shoulder.ogg", t = 0.55}, + }, + }, + + ["enter_inspect"] = { + Source = "inspect_enter", + -- time = 35 / 60, + LHIK = true, + LHIKIn = 0, + LHIKOut = 2.5, + SoundTable = { + {s = rottle, t = 0}, + {s = common .. "movement-shotgun-01.ogg", t = 0.1}, + }, + }, + ["idle_inspect"] = { + Source = "inspect_loop", + -- time = 72 / 60, + LHIK = true, + LHIKIn = 0, + LHIKOut = 999, -- maybe im dumb + }, + ["exit_inspect"] = { + Source = "inspect_exit", + -- time = 66 / 60, + LHIK = true, + LHIKIn = 0, + LHIKOut = 999, -- maybe im dumb + SoundTable = { + {s = common .. "movement-shotgun-02.ogg", t = 0.3}, + {s = rottle, t = 0.18}, + {s = rottle, t = 1.0}, + {s = common .. "movement-shotgun-03.ogg", t = 1.3}, + {s = path .. "presscheck1.ogg", t = 1.6}, + {s = path .. "presscheck2.ogg", t = 2.1}, + {s = rottle, t = 2.2}, + {s = common .. "movement-shotgun-04.ogg", t = 2.25}, + }, + }, + ["exit_inspect_pump_empty"] = { + Source = "inspect_exit_pump_empty", + -- time = 66 / 60, + LHIK = true, + LHIKIn = 0, + LHIKOut = 999, -- maybe im dumb + SoundTable = { + {s = common .. "movement-shotgun-02.ogg", t = 0.3}, + {s = rottle, t = 0.18}, + {s = rottle, t = 1.0}, + {s = common .. "movement-shotgun-03.ogg", t = 1.3}, + {s = path .. "presscheck1.ogg", t = 1.6}, + {s = path .. "presscheck2.ogg", t = 2.1}, + {s = rottle, t = 2.2}, + {s = common .. "movement-shotgun-04.ogg", t = 2.25}, + }, + }, + ["enter_inspect_empty"] = { -- Animations needed! + Source = "inspect_enter", + -- time = 35 / 60, + LHIK = false, + LHIKIn = 0, + LHIKOut = 2.5, + SoundTable = { + {s = rottle, t = 0}, + {s = common .. "movement-shotgun-01.ogg", t = 0.1}, + }, + }, + ["idle_inspect_empty"] = { + Source = "inspect_loop", + -- time = 72 / 60, + LHIK = false, + LHIKIn = 0, + LHIKOut = 999, -- maybe im dumb + }, + ["exit_inspect_empty"] = { + Source = "inspect_exit_empty", + -- time = 66 / 60, + LHIK = false, + LHIKIn = 0, + LHIKOut = 999, -- maybe im dumb + SoundTable = { + {s = common .. "movement-shotgun-02.ogg", t = 0.3}, + {s = rottle, t = 0.18}, + {s = rottle, t = 1.0}, + {s = common .. "movement-shotgun-03.ogg", t = 1.3}, + {s = rottle, t = 2.2}, + {s = common .. "movement-shotgun-04.ogg", t = 2.25}, + }, + }, +} +SWEP.NoHideLeftHandInCustomization = true + +SWEP.BulletBones = { + [2] = "Shell_Extra", +} + +-- Bodygroups -- + +SWEP.AttachmentElements = { + ["uc_manualonly"] = { + Override_Firemodes = { + { + Mode = 1, + PrintName = "fcg.pump", + Override_ManualAction = true, + Mult_AccuracyMOA = 0.8, + Mult_HipDispersion = 0.8, + }, + { + Mode = 0, + }, + }, + Override_Firemodes_Priority = 10, + }, + ["uc_spas_slam"] = { + RequireFlags = {"freeman", "needsmanual"}, + Override_Firemodes = { + { + Mode = 2, + PrintName = "fcg.slam", + Override_ManualAction = true, + Mult_AccuracyMOA = 0.8, + Mult_HipDispersion = 0.8, + }, + { + Mode = 0, + }, + }, + Override_Firemodes_Priority = 15, + }, + ["ur_spas12_barrel_short"] = { + VMBodygroups = {{ind = 1, bg = 1}}, + AttPosMods = {[3] = { + vpos = Vector(0, 19, 0.4), + }} + }, + + ["ur_spas12_stock_full"] = { + VMBodygroups = { + {ind = 3, bg = 1}, + } + }, + ["ur_spas12_stock_in"] = { + VMBodygroups = {{ind = 3, bg = 2}} + }, + ["ur_spas12_stock_none"] = { + VMBodygroups = {{ind = 3, bg = 3}} + }, + + ["ur_spas12_tube_reduced"] = { + VMBodygroups = {{ind = 2, bg = 1}} + }, + + ["rail_classic"] = { + VMBodygroups = {{ind = 4, bg = 2}} + }, + ["rail_pump"] = { + VMBodygroups = {{ind = 6, bg = 1}} + }, + ["rail_modern"] = { + VMBodygroups = {{ind = 4, bg = 1}}, + AttPosMods = {[1] = { + SlideAmount = { + vmin = Vector(0, -2.5, 1.8), + vmax = Vector(0, 0, 1.8) + }, + }} + }, + ["rail_none_fix"] = { + VMBodygroups = {{ind = 8, bg = 0}} + }, +} + +SWEP.DefaultBodygroups = "00000100" + +SWEP.Attachments = { + { + PrintName = "Optic", + DefaultAttName = "Iron Sights", + Slot = {"optic_lp", "optic"}, + Bone = "spas_parent", + Offset = { + vpos = Vector(0, -1, 1.6), + vang = Angle(90, -90, -90), + }, + CorrectiveAng = Angle(180,0,0), + SlideAmount = { + vmin = Vector(0, -4.5, 1.6), + vmax = Vector(0, -1.5, 1.6) + }, + InstalledEles = {"rail_classic"}, + DefaultEles = {"rail_none_fix"}, + ExcludeFlags = {"spas12_foldstock"} + }, + { + PrintName = "Barrel", + DefaultAttName = "21.5\" Special Purpose Barrel", --16\" M4 Super 90 SBS Barrel + DefaultAttIcon = Material("entities/att/ur_spas/barrel_std.png", "smooth mips"), + Slot = "ur_spas12_barrel", + }, + { + PrintName = "Muzzle", + DefaultAttName = "Standard Muzzle", + Slot = {"choke", "muzzle_shotgun"}, + Bone = "spas_parent", + Offset = { + vpos = Vector(0, 23.5, 0.4), + vang = Angle(90, -90, -90), + }, + ExcludeFlags = {"nomuzzle"} + }, + { + PrintName = "Underbarrel", + Slot = {"foregrip"}, + Bone = "pump", + --MergeSlots = {13}, + Offset = { + vpos = Vector(0, -5, -0.075), + vang = Angle(90, -90, -90), + }, + InstalledEles = {"rail_pump"}, + }, + { + PrintName = "Tactical", + Slot = {"tac_pistol"}, + Bone = "spas_parent", + Offset = { + vpos = Vector(0, 20, -2.3), + vang = Angle(90, -90, -90), + }, + }, + { + PrintName = "Stock", + Slot = {"ur_spas12_stock"}, + DefaultAttName = "Extended Stock", + DefaultAttIcon = Material("entities/att/ur_spas/stock_std.png", "smooth mips"), + }, + { + PrintName = "Tube Type", + Slot = {"ur_spas12_tube"}, + DefaultAttName = "8 Shell Tube", + DefaultAttIcon = Material("entities/att/ur_spas/magbig.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 = "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", "ur_spas12_charm"}, + FreeSlot = true, + Bone = "spas_parent", + Offset = { + vpos = Vector(0.6, .5, -1.5), + vang = Angle(90, -90, -90), + }, + }, + { + PrintName = "M203 slot", + Slot = "uc_ubgl", + Bone = "pump", + Offset = { + vpos = Vector(0, -5, 1.25), + vang = Angle(90, -90, -90), + }, + Hidden = true, + }, +} + +local lookup_barrel = { + default = 1, + ur_spas12_comp = 1, + ur_spas12_barrel_short = 0, +} + +local lookup_tube = { + default = 1, + ur_spas12_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[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