Preset install sound

This commit is contained in:
Haodong Mo 2022-01-21 22:13:42 +10:00
parent 76c5e5addb
commit 0b793baba9
3 changed files with 5 additions and 1 deletions

View File

@ -78,6 +78,7 @@ function SWEP:CreateHUD_Presets(scroll)
end
btn.DoClick = function(self2)
self:LoadPreset(preset)
surface.PlaySound("arc9/preset_install.ogg")
end
btn.DoRightClick = function(self2)
self:DeletePreset(preset)

View File

@ -62,7 +62,10 @@ function SWEP:LoadPreset(filename)
for i, k in pairs(self.Attachments) do
local slottbl = tbl[i]
if !slottbl.Installed then continue end
if !slottbl.Installed then
k.Installed = nil
continue
end
self.Attachments[i].Installed = slottbl.Installed
self.Attachments[i].ToggleNum = slottbl.ToggleNum
self.Attachments[i].SubAttachments = slottbl.SubAttachments

Binary file not shown.