mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-16 21:33:46 +03:00
63 lines
1.6 KiB
Lua
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
|