Files
wnsrc/addons/tfa_base/lua/tfa/att/fas2tfa_sks_30rnd.lua
lifestorm ba1fc01b16 Upload
2024-08-04 23:12:27 +03:00

63 lines
1.6 KiB
Lua

--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
if not ATTACHMENT then
ATTACHMENT = {}
end
ATTACHMENT.Name = "Detachable 30rnd"
ATTACHMENT.Description = {}
ATTACHMENT.Icon = "entities/tfafas2sks30rnd.png" --Revers to label, please give it an icon though! This should be the path to a png, like "entities/tfa_ammo_match.png"
ATTACHMENT.ShortName = "30DM"
ATTACHMENT.WeaponTable = {
["Bodygroups_V"] = {[2] = 3},
["Bodygroups_W"] = {[1] = 2},
["Animations"] = {
["reload"] = function(wep, _val)
local val = table.Copy(_val)
if val.type == TFA.Enum.ANIMATION_SEQ then
val.value = val.value .. "_stanag"
else
val.type = TFA.Enum.ANIMATION_SEQ --Sequence or act
val.value = "Reload_30_nmc"
end
return (wep:CheckVMSequence(val.value) and val or _val), true, true
end,
["reload_empty"] = function(wep, _val)
local val = table.Copy(_val)
if val.type == TFA.Enum.ANIMATION_SEQ then
val.value = val.value .. "_stanag"
else
val.type = TFA.Enum.ANIMATION_SEQ --Sequence or act
val.value = "Reload_30_empty_nmc"
end
return (wep:CheckVMSequence(val.value) and val or _val), true, true
end,
},
["Primary"] = {
["ClipSize"] = function(wep, val)
return wep.Primary.ClipSize_ExtRifle or 30
end,
},
}
function ATTACHMENT:Attach(wep)
wep:Unload()
end
function ATTACHMENT:Detach(wep)
wep:Unload()
end
if not TFA_ATTACHMENT_ISUPDATING then
TFAUpdateAttachments()
end