Decay/lua/arccw/shared/attachments/ud_m16_receiver_50beo.lua

130 lines
4.1 KiB
Lua
Raw Normal View History

2024-02-29 20:47:24 -05:00
att.PrintName = "AMCAR-NG .50 Beowulf Upper Receiver"
att.AbbrevName = ".50 Beowulf Upper"
if GetConVar("arccw_truenames"):GetBool() then
att.PrintName = "AR-15 .50 Beowulf Upper Receiver"
end
att.SortOrder = -1
att.Icon = Material("entities/att/uc_bullets/50beowulf.png", "smooth mips")
att.Description = "Semi-automatic receiver chambered in .50 Beowulf, a gigantic short-range cartridge with terrible ballistic performance. It can load single-stack into standard AR-15 magazines at a lower capacity.\nThe rifle is unable to handle the massive pressure at anything more than semi-automatic fire."
att.Desc_Pros = {}
att.Desc_Cons = {
"ud.m16.50beo",
"uc.semionly",
}
att.Desc_Neutrals = {}
att.Slot = "ud_m16_receiver"
att.AutoStats = true
att.HideIfBlocked = true
att.SortOrder = 1
att.Override_ClipSize = 7
att.Override_ClipSize_Priority = 0.5
att.BaseClipSize = 7
att.Mult_Damage = ArcCW.UC.CalConv("556", "50beo", "max")
att.Mult_DamageMin = ArcCW.UC.CalConv("556", "50beo", "min")
att.Mult_Penetration = ArcCW.UC.CalConv("556", "50beo", "pen")
att.Mult_Recoil = 3
att.Mult_RecoilSide = 2
att.Mult_VisualRecoilMult = 2
att.Mult_RPM = 0.5
att.Mult_Range = 0.25
att.Mult_ShootVol = 1.2
att.Mult_SightTime = 0.91
att.Mult_ReloadTime = 0.87
att.Mult_Sway = 0.667
att.Mult_SpeedMult = 1.025
att.Override_PhysBulletMuzzleVelocity = 550
-- att.Mult_HeatCapacity = 0.25
-- att.Mult_HeatDissipation = 0.25
-- yes, .50 beowulf is more of an huge magnum bullet than it is a rifle bullet
att.Override_Ammo = "357"
att.Override_Trivia_Calibre = ".50 Beowulf"
att.AddSuffix = " .50"
att.Override_ShellModel = "models/weapons/arccw/uc_shells/50beo.mdl"
att.Override_ShellScale = 1
att.Override_ShellSounds = ArcCW.PistolShellSoundsTable
att.Override_Firemodes_Priority = 0.5
att.Override_Firemodes = {
{
Mode = 1,
},
{
Mode = 0
}
}
local path = "weapons/arccw_ud/m16/"
local common = ")/arccw_uc/common/"
local tail = common .. "50beo/"
local tail1 = common .. "308/"
local fire50 = {path .. "fire-50-01.ogg",path .. "fire-50-02.ogg",path .. "fire-50-03.ogg",path .. "fire-50-04.ogg",path .. "fire-50-05.ogg",path .. "fire-50-06.ogg"}
local fire50dist = {tail .. "fire-dist-50beo-rif-ext-01.ogg", tail .. "fire-dist-50beo-rif-ext-02.ogg", tail .. "fire-dist-50beo-rif-ext-03.ogg", tail .. "fire-dist-50beo-rif-ext-04.ogg", tail .. "fire-dist-50beo-rif-ext-05.ogg", tail .. "fire-dist-50beo-rif-ext-06.ogg"}
local fire50distint = {tail1 .. "fire-dist-308-rif-int-01.ogg", tail1 .. "fire-dist-308-rif-int-02.ogg", tail1 .. "fire-dist-308-rif-int-03.ogg", tail1 .. "fire-dist-308-rif-int-04.ogg", tail1 .. "fire-dist-308-rif-int-05.ogg",tail .. "fire-dist-308-rif-int-06.ogg"}
att.Hook_GetShootSound = function(wep, sound)
if wep:GetBuff_Override("Silencer") then
return fire50sup
else
return fire50
end
end
att.Hook_GetDistantShootSoundOutdoors = function(wep, distancesound)
if wep:GetBuff_Override("Silencer") then
-- fallback to script
else
return fire50dist
end
end
att.Hook_GetDistantShootSoundIndoors = function(wep, distancesound)
if wep:GetBuff_Override("Silencer") then
-- fallback to script
else
return fire50distint
end
end
-- can't be handled here
--att.ActivateElements = {"ud_m16_mag_50beo"}
att.Hook_SelectReloadAnimation = function(wep, anim)
if wep.Attachments[9].Installed == nil then
return anim .. "_20"
end
end
local slotinfo = {
[6] = {".50 Beowulf Lower", ".50 Beowulf Lower", Material("entities/att/acwatt_ud_m16_receiver_semi.png", "smooth mips")},
[11] = {"7-Round Mag", "7-Round Mag", Material("entities/att/acwatt_ud_m16_mag_15.png", "smooth mips")},
}
att.Hook_GetDefaultAttName = function(wep, slot)
if slotinfo[slot] then
return GetConVar("arccw_truenames"):GetBool() and slotinfo[slot][2] or slotinfo[slot][1]
end
end
att.Hook_GetDefaultAttIcon = function(wep, slot)
if slotinfo[slot] then
return slotinfo[slot][3]
end
end
att.Override_Trivia_Class = "Semi-Automatic Rifle"
att.GivesFlags = {"m16_50beo", "m16_nolower"}