Merge branch 'main' into think-optimization

This commit is contained in:
Артем 2023-01-05 06:24:27 +03:00
commit 38c6f58e94
48 changed files with 288 additions and 338 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
out/linecounter.json
out/linecounter.txt

View File

@ -34,16 +34,26 @@ hook.Add("PlayerBindPress", "ARC9_Binds", function(ply, bind, pressed, code)
return ARC9.AttemptGiveNPCWeapon()
end
if bind == "+showscores" then
if wpn:GetCustomize() then
if ply:KeyDown(IN_USE) then
wpn:CycleSelectedAtt(-1)
else
wpn:CycleSelectedAtt(1)
end
return true
if bind == "+showscores" and wpn:GetCustomize() then
if ply:KeyDown(IN_USE) then
wpn:CycleSelectedAtt(-1)
else
wpn:CycleSelectedAtt(1)
end
return true
end
if bind == "impulse 100" and wpn:GetCustomize() then
if wpn.CustomizeLastHovered and wpn.CustomizeLastHovered:IsHovered() then
local att = wpn.CustomizeLastHovered.att
ARC9:ToggleFavorite(att)
if ARC9.Favorites[att] and wpn.BottomBarFolders["!favorites"] then
wpn.BottomBarFolders["!favorites"][att] = true
elseif wpn.BottomBarFolders["!favorites"] then
wpn.BottomBarFolders["!favorites"][att] = nil
end
end
return true
end
if wpn:GetInSights() then

View File

@ -0,0 +1,55 @@
ARC9.Favorites = {}
ARC9.FavoritesWeight = 9999
function ARC9:LoadFavorites()
local f = file.Open("arc9_favorites.txt", "r", "DATA")
if !f then return end
ARC9.Favorites = {}
while !f:EndOfFile() do
local line = f:ReadLine()
line = string.Trim(line, "\n")
ARC9.Favorites[line] = true
end
f:Close()
end
function ARC9:SaveFavorites()
local f = file.Open("arc9_favorites.txt", "w", "DATA")
for i, k in pairs(ARC9.Favorites) do
f:Write(i)
f:Write("\n")
end
f:Close()
end
function ARC9:AddAttToFavorites(att)
ARC9.Favorites[att] = true
ARC9:SaveFavorites()
end
function ARC9:RemoveAttFromFavorites(att)
ARC9.Favorites[att] = nil
ARC9:SaveFavorites()
end
function ARC9:ToggleFavorite(att)
if ARC9.Favorites[att] then
ARC9.Favorites[att] = nil
surface.PlaySound("arc9/newui/ui_part_favourite2.ogg")
else
ARC9.Favorites[att] = true
surface.PlaySound("arc9/newui/ui_part_favourite1.ogg")
end
ARC9:SaveFavorites()
end
hook.Add("PreGamemodeLoaded", "ARC9_PreGamemodeLoaded_LoadFavorites", function()
ARC9:LoadFavorites()
end)

View File

@ -75,7 +75,7 @@ local function generatefonts()
font = unscaled_font,
size = i,
weight = 500,
antialias = false,
antialias = true,
extended = true,
} )
@ -83,7 +83,7 @@ local function generatefonts()
font = unscaled_font,
size = i,
weight = 500,
antialias = false,
antialias = true,
blursize = i * 0.2,
extended = false,
} )

View File

@ -120,7 +120,7 @@ local settingstable = {
{ type = "label", text = "settings.hud_cust.customization" },
-- { type = "bool", text = "Background Blur", convar = "cust_blur", desc = "Blurs customization background.\n\nRequires DX9."},
{ type = "bool", text = "settings.hud_cust.cust_hints.title", convar = "cust_hints", desc = "settings.hud_cust.cust_hints.desc"},
{ type = "bool", text = "settings.hud_cust.cust_roll_unlock.title", convar = "cust_roll_unlock", desc = "settings.hud_cust.cust_roll_unlock.desc"},
-- { type = "bool", text = "settings.hud_cust.cust_roll_unlock.title", convar = "cust_roll_unlock", desc = "settings.hud_cust.cust_roll_unlock.desc"},
{ type = "bool", text = "settings.hud_cust.cust_exit_reset_sel.title", convar = "cust_exit_reset_sel", desc = "settings.hud_cust.cust_exit_reset_sel.desc"}
},
{
@ -169,6 +169,7 @@ local settingstable = {
{ type = "bool", text = "settings.gameplay.mod_bodydamagecancel.title", convar = "mod_bodydamagecancel", desc = "settings.gameplay.mod_bodydamagecancel.desc" },
{ type = "bool", text = "settings.gameplay.breath_slowmo.title", convar = "breath_slowmo", desc = "settings.gameplay.breath_slowmo.desc" },
{ type = "bool", text = "settings.gameplay.manualbolt.title", convar = "manualbolt", desc = "settings.gameplay.manualbolt.desc" },
{ type = "bool", text = "settings.gameplay.never_ready.title", convar = "never_ready", desc = "settings.gameplay.never_ready.desc" },
-- { type = "bool", text = "", convar = "nearwall", desc = "" },
-- random jams
-- overheating
@ -287,9 +288,9 @@ local function DrawSettings(bg, page)
local sheet = vgui.Create("ARC9ColumnSheet", bg)
sheet:Dock(FILL)
sheet:DockMargin(0, 0, ARC9ScreenScale(77), ARC9ScreenScale(1.7))
sheet:DockMargin(0, 0, ARC9ScreenScale(100), ARC9ScreenScale(1.7))
sheet.Navigation:DockMargin(-120, 0, 0, ARC9ScreenScale(5)) -- idk why -120
sheet.Navigation:SetWidth(ARC9ScreenScale(77))
sheet.Navigation:SetWidth(ARC9ScreenScale(100))
for k, v in pairs(settingstable) do
local newpanel = vgui.Create("DPanel", sheet)
@ -320,8 +321,8 @@ local function DrawSettings(bg, page)
if bg.desc then bg.desc:Remove() end
local desc = vgui.Create("ARC9ScrollPanel", bg)
desc:SetPos(bg:GetWide() - ARC9ScreenScale(74.5), ARC9ScreenScale(35))
desc:SetSize(ARC9ScreenScale(70), bg:GetTall() - ARC9ScreenScale(40))
desc:SetPos(bg:GetWide() - ARC9ScreenScale(97.5), ARC9ScreenScale(35))
desc:SetSize(ARC9ScreenScale(93), bg:GetTall() - ARC9ScreenScale(40))
desc.Paint = function(self2, w, h)
-- surface.SetDrawColor(144, 0, 0, 100)
-- surface.DrawRect(0, 0, w, h)
@ -357,11 +358,11 @@ local function DrawSettings(bg, page)
-- woopsie
elseif v2.type == "bool" then
local newel = vgui.Create("ARC9Checkbox", elpanel)
newel:SetPos(elpw-ARC9ScreenScale(4+13), ARC9ScreenScale(4))
newel:SetPos(elpw+ARC9ScreenScale(5), ARC9ScreenScale(4))
if v2.convar then newel:SetConVar("arc9_" .. v2.convar) end
elseif v2.type == "slider" then
local newel = vgui.Create("ARC9NumSlider", elpanel)
newel:SetPos(0, ARC9ScreenScale(6))
newel:SetPos(ARC9ScreenScale(23), ARC9ScreenScale(6))
newel:SetSize(elpw, 30)
newel:SetDecimals(v2.decimals or 0)
newel:SetMin(v2.min or 0)
@ -376,7 +377,7 @@ local function DrawSettings(bg, page)
end
elseif v2.type == "color" then
local newel = vgui.Create("ARC9ColorButton", elpanel)
newel:SetPos(elpw-ARC9ScreenScale(88), ARC9ScreenScale(6))
newel:SetPos(elpw-ARC9ScreenScale(65), ARC9ScreenScale(6))
local cvar = "arc9_" .. (v2.convar or "ya_dumbass")
newel:CustomSetConvar(cvar)
@ -390,7 +391,7 @@ local function DrawSettings(bg, page)
elseif v2.type == "coloralpha" then
local newel = vgui.Create("ARC9ColorButton", elpanel)
newel:SetPos(elpw-ARC9ScreenScale(88), ARC9ScreenScale(6))
newel:SetPos(elpw-ARC9ScreenScale(65), ARC9ScreenScale(6))
newel:EnableAlpha()
local cvar = "arc9_" .. (v2.convar or "ya_dumbass")
@ -405,11 +406,11 @@ local function DrawSettings(bg, page)
elseif v2.type == "input" then
local newel = vgui.Create("DTextEntry", elpanel)
newel:SetPos(elpw-ARC9ScreenScale(88), ARC9ScreenScale(6))
newel:SetPos(elpw-ARC9ScreenScale(65), ARC9ScreenScale(6))
newel:SetText(v2.text)
elseif v2.type == "combo" then
local newel = vgui.Create("ARC9ComboBox", elpanel)
newel:SetPos(elpw-ARC9ScreenScale(88), ARC9ScreenScale(6))
newel:SetPos(elpw-ARC9ScreenScale(65), ARC9ScreenScale(6))
newel:CustomSetConvar("arc9_" .. v2.convar)
local cvdata = GetConVar("arc9_" .. v2.convar):GetString()
@ -423,7 +424,7 @@ local function DrawSettings(bg, page)
end
elseif v2.type == "button" then
local newel = vgui.Create("ARC9Button", elpanel)
newel:SetPos(elpw-ARC9ScreenScale(88), ARC9ScreenScale(6))
newel:SetPos(elpw-ARC9ScreenScale(65), ARC9ScreenScale(6))
newel.text = ARC9:GetPhrase(v2.content)
local oldmousepressed = newel.OnMousePressed
@ -476,8 +477,8 @@ local function DrawSettings(bg, page)
surface.SetDrawColor(ARC9.GetHUDColor("bg"))
local talll = sheet.Navigation:GetTall() + ARC9ScreenScale(6.7)
surface.DrawPoly({{x = cornercut, y = h}, {x = 0, y = h-cornercut}, {x = 0, y = h-math.max(ARC9ScreenScale(5), talll-buttontalling)}, {x = ARC9ScreenScale(75.4), y = h-math.max(ARC9ScreenScale(5), talll-buttontalling)}, {x = ARC9ScreenScale(75.4), y = h}}) -- left bottom panel
surface.DrawPoly({{x = w-ARC9ScreenScale(75.4), y = h}, {x = w-ARC9ScreenScale(75.4), y = ARC9ScreenScale(25.7)}, {x = w, y = ARC9ScreenScale(25.7)}, {x = w, y = h-cornercut}, {x = w-cornercut, y = h}}) -- right panel
surface.DrawPoly({{x = cornercut, y = h}, {x = 0, y = h-cornercut}, {x = 0, y = h-math.max(ARC9ScreenScale(5), talll-buttontalling)}, {x = ARC9ScreenScale(98,4), y = h-math.max(ARC9ScreenScale(5), talll-buttontalling)}, {x = ARC9ScreenScale(98,4), y = h}}) -- left bottom panel
surface.DrawPoly({{x = w-ARC9ScreenScale(98,4), y = h}, {x = w-ARC9ScreenScale(98,4), y = ARC9ScreenScale(25.7)}, {x = w, y = ARC9ScreenScale(25.7)}, {x = w, y = h-cornercut}, {x = w-cornercut, y = h}}) -- right panel
surface.DrawPoly({{x = 0, y = ARC9ScreenScale(24)},{x = 0, y = cornercut},{x = cornercut, y = 0}, {x = w-cornercut, y = 0}, {x = w, y = cornercut}, {x = w, y = ARC9ScreenScale(24)}}) -- top panel
surface.SetDrawColor(ARC9.GetHUDColor("hi"))
@ -494,7 +495,7 @@ local function DrawSettings(bg, page)
surface.SetFont("ARC9_8_Slim")
surface.SetTextColor(ARC9.GetHUDColor("fg"))
surface.SetTextPos(w-ARC9ScreenScale(73), ARC9ScreenScale(26))
surface.SetTextPos(w-ARC9ScreenScale(96), ARC9ScreenScale(26))
surface.DrawText(activedesc != "" and ARC9:GetPhrase("settings.desc") or "") -- no title if no desc
surface.SetFont("ARC9_16")
@ -536,7 +537,8 @@ function ARC9_OpenSettings(page)
end
local panel = vgui.Create("DFrame", bg)
panel:SetSize(ARC9ScreenScale(330), ARC9ScreenScale(242))
-- panel:SetSize(ARC9ScreenScale(330), ARC9ScreenScale(242))
panel:SetSize(ARC9ScreenScale(400), ARC9ScreenScale(242))
panel:MakePopup()
panel:SetAlpha(0)
panel:AlphaTo(255, 0.2, 0, nil)
@ -549,8 +551,22 @@ function ARC9_OpenSettings(page)
panel.OnRemove = function() bg:Remove() end
-- do only if april fools
local day = tonumber(os.date("%d"))
local month = tonumber(os.date("%m"))
if month == 4 and day == 1 then
local m9k = vgui.Create("ARC9TopButton", panel)
m9k:SetPos(panel:GetWide() - ARC9ScreenScale(21*4 + 11), ARC9ScreenScale(2))
m9k:SetIcon(Material("arc9/ui/w9k.png", "mips smooth"))
m9k.DoClick = function(self2)
surface.PlaySound(clicksound)
gui.OpenURL("https://steamcommunity.com/sharedfiles/filedetails/?id=128089118")
end
end
local discord = vgui.Create("ARC9TopButton", panel)
discord:SetPos(panel:GetWide() - ARC9ScreenScale(21*3 + 12), ARC9ScreenScale(2))
discord:SetPos(panel:GetWide() - ARC9ScreenScale(21*3 + 8), ARC9ScreenScale(2))
discord:SetIcon(Material("arc9/ui/discord.png", "mips smooth"))
discord.DoClick = function(self2)
surface.PlaySound(clicksound)
@ -558,11 +574,11 @@ function ARC9_OpenSettings(page)
end
local steam = vgui.Create("ARC9TopButton", panel)
steam:SetPos(panel:GetWide() - ARC9ScreenScale(21*2 + 7), ARC9ScreenScale(2))
steam:SetPos(panel:GetWide() - ARC9ScreenScale(21*2 + 5), ARC9ScreenScale(2))
steam:SetIcon(Material("arc9/ui/steam.png", "mips smooth"))
steam.DoClick = function(self2)
surface.PlaySound(clicksound)
gui.OpenURL("https://steamcommunity.com/sharedfiles/filedetails/?id=2910505837") -- dont forget to change to arc9 page when it release
gui.OpenURL("https://steamcommunity.com/sharedfiles/filedetails/?id=2910505837")
end
local close = vgui.Create("ARC9TopButton", panel)

View File

@ -35,6 +35,9 @@ ARC9.IncompatibleAddons = {
-- TFA's Tactical Lean
["TacticalLean"] = "Mod is old, buggy, laggy, and interferes with ARC9 lean.",
-- SLVBase 2
["1516699044"] = "Causes black screen",
}
local ScreenScaleMulti = ARC9.ScreenScale

View File

@ -493,11 +493,26 @@ L["customize.presets.cancel"] = "Abbrechen"
L["customize.presets.dumb"] = "Bist du dumm"
L["customize.presets.invalid"] = "Ungültiger String!"
L["settings.gameplay.togglelean.title"] = "Lehnen umschalten"
L["settings.gameplay.togglelean.desc"] = "Das Drücken der Lehnen-Tasten schaltet die Lehn-Richtung um, anstatt gedrückt gehalten werden zu müssen."
L["settings.gameplay.togglepeek.title"] = "Spähen umschalten"
L["settings.gameplay.togglepeek.desc"] = "Das Drücken der Spähen-Taste schaltet das Spähen um, anstatt gedrückt gehalten werden zu müssen."
L["settings.npc.npc_spread.title"] = "NPC-Streuung"
L["settings.npc.npc_spread.desc"] = "Multiplikator für wie ungenau NPCs beim Feuern sein sollen."
L["settings.npc.npc_spread.desc"] = "Multiplikator für wie ungenau NPCs beim Feuern sein sollen."
L["settings.gameplay.togglelean.title"] = "Lehnen umschalten"
L["settings.gameplay.togglelean.desc"] = "Das Drücken der Lehnen-Tasten schaltet die Lehn-Richtung um, anstatt gedrückt gehalten werden zu müssen.\n\nFunktioniert nicht perfekt zusammen mit Auto-Lehnen. Du solltest Auto-Lehnen deaktivieren, solange du \"Lehnen umschalten\" benutzt."
L["settings.developer.presets_clear.title"] = "Waffen-Daten löschen"
L["settings.developer.presets_clear.desc"] = "Lösche Voreinstellungen, alle Icons und Standardvoreinstellungen für Waffen, die du gerade hältst.\n\nWarnung: Wenn das Menü ohne eine ARC9-Waffe in den Händen geöffnet wird, werden alle vorhandenen ARC9-Voreinstellungen und -Icons gelöscht!"
L["settings.developer.clear"] = "Löschen"
L["atts.favourites"] = "Favoriten"
L["atts.filter"] = "Filter"
L["customize.hint.favorite"] = "Favorisieren"
L["customize.hint.unfavorite"] = "Entfavorisieren"
L["customize.presets.unnamed"] = "Unbenannt"
L["folder.favorites"] = "Favoriten"
L["settings.gameplay.never_ready.title"] = "Keine \"Ready\"-Animationen."
L["settings.gameplay.never_ready.desc"] = "Deaktiviere \"Ready\"-Animationen beim zücken einer Waffe."

View File

@ -366,8 +366,8 @@ L["settings.hud_cust.cust_light_brightness.title"] = "Light Brightness"
L["settings.hud_cust.cust_light_brightness.desc"] = "How bright that light in the customization panel will be.\n\nDon't forget to turn it on first though!"
L["settings.hud_cust.cust_hints.title"] = "Hints"
L["settings.hud_cust.cust_hints.desc"] = "Enable hints in the customization menu."
L["settings.hud_cust.cust_roll_unlock.title"] = "Unlock Roll"
L["settings.hud_cust.cust_roll_unlock.desc"] = "Allow weapon roll in the customization menu.\n\nMight look and control not the best way."
L["settings.hud_cust.cust_roll_unlock.title"] = "Unlock Roll" -- NOT USED ANYMORE
L["settings.hud_cust.cust_roll_unlock.desc"] = "Allow weapon roll in the customization menu.\n\nMight look and control not the best way." -- NOT USED ANYMORE
L["settings.hud_cust.cust_exit_reset_sel.title"] = "Exit Resets Selection"
L["settings.hud_cust.cust_exit_reset_sel.desc"] = "Exiting customization menu resets the active slot selection."
@ -554,4 +554,10 @@ L["atts.filter"] = "Filter"
L["customize.hint.favorite"] = "Favorite"
L["customize.hint.unfavorite"] = "Remove Favorite"
L["customize.presets.unnamed"] = "Unnamed"
L["customize.presets.unnamed"] = "Unnamed"
L["folder.favorites"] = "Favorites"
-- Added 04-JAN-2023
L["settings.gameplay.never_ready.title"] = "No Ready Anims"
L["settings.gameplay.never_ready.desc"] = "Disable ready animations when deploying a weapon.\n\nThis is a server variable."

View File

@ -539,4 +539,6 @@ L["settings.developer.clear"] = "Limpiar"
L["atts.favourites"] = "Favoritos"
L["atts.filter"] = "Filtrar"
L["customize.hint.favorite"] = "Favorito"
L["customize.hint.unfavorite"] = "Remover favorito"
L["customize.hint.unfavorite"] = "Remover favorito"
L["folder.favourites"] = "Favoritos"

View File

@ -223,7 +223,7 @@ L["customize.bench.precision"] = "ИСПЫТАНИЕ ТОЧНОСТИ"
L["settings.title"] = "Настройки ARC9"
L["settings.desc"] = "Описание"
L["settings.tabname.performance"] = "Производ-сть"
L["settings.tabname.performance"] = "Производительность"
L["settings.tabname.optics"] = "Оптика"
L["settings.tabname.crosshair"] = "Перекрестие"
L["settings.tabname.hud_cust"] = "Кастомизация"
@ -235,14 +235,14 @@ L["settings.tabname.bullets"] = "Физика пуль"
L["settings.tabname.attachments"] = "Обвесы"
L["settings.tabname.modifiers"] = "Модификаторы"
L["settings.tabname.controller"] = "Контроллер"
L["settings.tabname.developer"] = "Для разраб."
L["settings.tabname.developer"] = "Для разработчиков"
L["settings.cheapscopes.title"] = "Производительные прицелы"
L["settings.cheapscopes.desc"] = "Более производельный вариант рендеринга прицелов путём приближения всей камеры, вместо рендеринга второй сцены. Сильно улучшает производительность на больших картах и не только."
L["settings.allflash.title"] = "Фонарики у всех"
L["settings.allflash.title"] = "Фонарики у всех игроков"
L["settings.allflash.desc"] = "Показывать фонарики у всех игроков на сервере.\n\nЗначительно снижает производительность на серверах."
L["settings.tpik.title"] = "Включить TPIK"
L["settings.tpik.desc"] = "TPIK (Инверсивная Кинематика для третьего лица) это система для анимации оружия и рук у игроков от третьего лица.\n\nВы можете настроить эту систему во вкладке Визуал."
@ -293,7 +293,7 @@ L["settings.optics.compensate_sens.title"] = "Компенсировать чу
L["settings.optics.compensate_sens.desc"] = "Компенсировать чувствительность мыши в оптических прицелах."
L["settings.optics.toggleads.title"] = "Прицеливание по нажатию"
L["settings.optics.toggleads.desc"] = "Вместо удерживания кнопки прицеливания достаточно нажать один раз."
L["settings.optics.reflex.title"] = "Коллим. прицелов"
L["settings.optics.reflex.title"] = "Коллиматорных прицелов"
L["settings.optics.reflex.desc"] = "Цвет сетки у коллиматорных/ голографических прицелов.\n\nНе все прицелы поддерживают смену цвета."
L["settings.optics.scope.title"] = "Оптики"
L["settings.optics.scope.desc"] = "Цвет сетки у оптических прицелов.\n\nНе все прицелы поддерживают смену цвета."
@ -321,7 +321,7 @@ L["settings.hud_cust.language_id.title"] = "Язык"
L["settings.hud_cust.language_id.desc"] = "Языковой пакет для использования с ARC9."
L["settings.hud_cust.cust_light.title"] = "Включить подсветку"
L["settings.hud_cust.cust_light.desc"] = "Включает подсветку оружия в меню кастомизации.\n\nТо же самое, что и кнопка рядом с настройками."
L["settings.hud_cust.cust_light_brightness.title"] = "Яркость"
L["settings.hud_cust.cust_light_brightness.title"] = "Яркость подсветки"
L["settings.hud_cust.cust_light_brightness.desc"] = "Яркость подсветки оружия.\n\nНе забудьте включить её сперва!"
L["settings.hud_cust.cust_hints.title"] = "Подсказки"
L["settings.hud_cust.cust_hints.desc"] = "Включает подсказки в меню кастомизации."
@ -406,7 +406,7 @@ L["settings.bullets.bullet_physics.title"] = "Физические пули"
L["settings.bullets.bullet_physics.desc"] = "Физические пули имеют физику. Падение на расстоянии, требуется некоторое время до приземления и всё в этом роде. Некоторое оружие может не поддерживать такое.\n\nЭто серверная переменная."
L["settings.bullets.bullet_gravity.title"] = "Гравитация"
L["settings.bullets.bullet_gravity.desc"] = "Множитель гравитации пуль.\n\nЭто серверная переменная."
L["settings.bullets.bullet_drag.title"] = "Сопротивление"
L["settings.bullets.bullet_drag.title"] = "Сопротивлен. воздуха"
L["settings.bullets.bullet_drag.desc"] = "Множитель сопротивления воздуха у пуль.\n\nЭто серверная переменная."
L["settings.bullets.ricochet.title"] = "Рикошеты"
L["settings.bullets.ricochet.desc"] = "Некоторые пули смогут отскакивать от поверхностей и наносить урон.\n\nЭто серверная переменная."
@ -451,7 +451,7 @@ L["settings.controller.controller_config.desc"] = "Открывает панел
L["settings.developer.dev_always_ready.title"] = "Всегда Ready"
L["settings.developer.dev_always_ready.desc"] = "Всегда проигрывать анимацию \"ready\" при доставании оружия.\n\nЭто серверная переменная."
L["settings.developer.dev_benchgun.title"] = "Benchgun"
L["settings.developer.dev_benchgun.desc"] = "Оставлять оружие где оно находится в данный момент."
L["settings.developer.dev_benchgun.desc"] = "Оставить вьюмодель оружия там же, где оно и находится прямо сейчас."
L["settings.developer.dev_show_shield.title"] = "Показывать щиты"
L["settings.developer.dev_show_shield.desc"] = "Показывать модель щитов у игроков."
@ -463,7 +463,7 @@ L["settings.developer.reloadlangs.title"] = "Языки"
L["settings.developer.dev_listanims.title"] = "Список анимаций"
L["settings.developer.dev_listbones.title"] = "Список костей"
L["settings.developer.dev_listbgs.title"] = "Список бодигрупп"
L["settings.developer.dev_listatts.title"] = "Список QCAttach."
L["settings.developer.dev_listatts.title"] = "Список QCAttachaments"
L["settings.developer.dev_export.title"] = "Код экспорта"
L["settings.developer.dev_getjson.title"] = "JSON оружия"
@ -512,4 +512,12 @@ L["settings.developer.clear"] = "Очистить"
L["atts.favourites"] = "Избранное"
L["atts.filter"] = "Фильтр"
L["customize.hint.favorite"] = "Добавить в избранное"
L["customize.hint.unfavorite"] = "Убрать из избранного"
L["customize.hint.unfavorite"] = "Убрать из избранного"
L["folder.favourites"] = "Избранное"
L["customize.presets.unnamed"] = "Без названия"
-- Added 04-JAN-2023
L["settings.gameplay.never_ready.title"] = "Отключить Ready анимации"
L["settings.gameplay.never_ready.desc"] = "Никогда не проигрывать \"ready\" анимации при доставании любого оружия.\n\nЭто серверная переменная."

View File

@ -545,4 +545,11 @@ L["settings.developer.clear"] = "Rensa"
L["atts.favourites"] = "Favoriter"
L["atts.filter"] = "Filtrera"
L["customize.hint.favorite"] = "Favorit"
L["customize.hint.unfavorite"] = "Ta bort Favorit"
L["customize.hint.unfavorite"] = "Ta bort Favorit"
L["folder.favourites"] = "Favoriter"
L["customize.presets.unnamed"] = "Namnlös"
L["settings.gameplay.never_ready.title"] = "Inga \"Redo\" Anim."
L["settings.gameplay.never_ready.desc"] = "Avaktivera \"Redo\" animationer när du tar fram ett vapen.\n\nDetta är en servervariabel."

View File

@ -512,4 +512,5 @@ L["atts.filter"] = "筛选"
L["customize.hint.favorite"] = "加入收藏"
L["customize.hint.unfavorite"] = "取消收藏"
L["customize.presets.unnamed"] = "未命名"
L["customize.presets.unnamed"] = "未命名"
L["folder.favorites"] = "收藏夹"

View File

@ -79,7 +79,7 @@ ARC9.RicochetSounds = {
"arc9/fx/ricochet_15.ogg"
}
ARC9.PresetPath = "ARC9_presets/"
ARC9.PresetPath = "arc9_presets/"
ARC9.PresetIconFormat = "arc9.png"
ARC9.OverDraw = false

View File

@ -249,6 +249,10 @@ local conVars = {
default = "1",
replicated = true
},
{
name = "never_ready",
default = "0",
},
{
name = "dev_always_ready",
default = "0",
@ -548,6 +552,11 @@ local conVars = {
default = "0",
client = true
},
{
name = "never_ready",
default = "0",
replicated = true
}
}
local prefix = "arc9_"

View File

@ -3,13 +3,7 @@ game.AddParticles( "particles/muzzleflashes_test.pcf" )
game.AddParticles( "particles/muzzleflashes_test_b.pcf" )
game.AddParticles( "particles/cs_weapon_fx.pcf" )
PrecacheParticleSystem( "muzzleflashes_test" )
PrecacheParticleSystem( "new_muzzle_center_b" )
PrecacheParticleSystem( "new_muzzle_center_ak" )
PrecacheParticleSystem( "muzzle_smoke_shot_b" )
PrecacheParticleSystem( "new_muzzle_center_bizon" )
PrecacheParticleSystem( "muzzleflash_m14" )
PrecacheParticleSystem( "muzzle_center_heavy_lmg" )
PrecacheParticleSystem( "muzzleflash_5" )
PrecacheParticleSystem( "muzzleflash_6" )
PrecacheParticleSystem( "muzzleflash_m79" )
@ -17,257 +11,32 @@ PrecacheParticleSystem( "muzzleflash_pistol_deagle" )
PrecacheParticleSystem( "muzzleflash_slug" )
PrecacheParticleSystem( "muzzleflash_mp5" )
PrecacheParticleSystem( "muzzleflash_g3" )
PrecacheParticleSystem( "muzzleflash_6_break_d1" )
PrecacheParticleSystem( "muzzle_center_smg" )
PrecacheParticleSystem( "muzzle_center_smg_b" )
PrecacheParticleSystem( "new_muzzle_center_blue" )
PrecacheParticleSystem( "muzzleflash_pistol_red" )
PrecacheParticleSystem( "muzzleflash_M3" )
PrecacheParticleSystem( "muzzleflash_suppressed" )
PrecacheParticleSystem( "muzzleflash_4" )
PrecacheParticleSystem( "muzzleflash_ak74" )
PrecacheParticleSystem( "muzzleflash_ak47" )
PrecacheParticleSystem( "new_muzzle_center_blue_b" )
PrecacheParticleSystem( "muzzle_glow_ak" )
PrecacheParticleSystem( "muzzleflash_3" )
PrecacheParticleSystem( "muzzleflash_1" )
PrecacheParticleSystem( "muzzleflash_M82" )
PrecacheParticleSystem( "muzzleflash_MINIMI" )
PrecacheParticleSystem( "port_smoke_heavy" )
PrecacheParticleSystem( "port_shellsmoke" )
PrecacheParticleSystem( "port_shellsmoke_b" )
PrecacheParticleSystem( "port_smoke" )
PrecacheParticleSystem( "muzzleflash_smg_bizon" )
PrecacheParticleSystem( "muzzle_center_bizon" )
PrecacheParticleSystem( "new_muzzle_center" )
PrecacheParticleSystem( "muzzleflash_pistol_cleric" )
PrecacheParticleSystem( "muzzleflash_6_break_a2" )
PrecacheParticleSystem( "muzzleflash_6_break_b2" )
PrecacheParticleSystem( "muzzleflash_6_break_c2" )
PrecacheParticleSystem( "muzzleflash_6_break_d2" )
PrecacheParticleSystem( "muzzleflash_6_break_e2" )
PrecacheParticleSystem( "muzzleflash_6_break_f2" )
PrecacheParticleSystem( "muzzleflash_OTS" )
PrecacheParticleSystem( "muzzleflash_shotgun" )
PrecacheParticleSystem( "muzzleflash_none" )
PrecacheParticleSystem( "test" )
PrecacheParticleSystem( "muzzleflash_smg" )
PrecacheParticleSystem( "muzzleflash_FAMAS" )
PrecacheParticleSystem( "party_spark" )
PrecacheParticleSystem( "muzzle_glow_pistol_blue" )
PrecacheParticleSystem( "m82_shocksmoke_trace" )
PrecacheParticleSystem( "m82_shocksmoke" )
PrecacheParticleSystem( "muzzle_glow_small" )
PrecacheParticleSystem( "muzzle_sparks_ar" )
PrecacheParticleSystem( "muzzle_trace" )
PrecacheParticleSystem( "muzzleflash_m14_break_a" )
PrecacheParticleSystem( "muzzleflash_m14_break_b" )
PrecacheParticleSystem( "muzzleflash_m14_break_c" )
PrecacheParticleSystem( "muzzleflash_m14_break_d" )
PrecacheParticleSystem( "muzzleflash_m14_break_e" )
PrecacheParticleSystem( "muzzleflash_none_red" )
PrecacheParticleSystem( "muzzle_smoke_d" )
PrecacheParticleSystem( "testd_red" )
PrecacheParticleSystem( "muzzle_flame" )
PrecacheParticleSystem( "muzzleflash_5_lmg_break_e" )
PrecacheParticleSystem( "muzzleflash_5_lmg_break_a" )
PrecacheParticleSystem( "muzzleflash_5_lmg_break_b" )
PrecacheParticleSystem( "muzzleflash_5_lmg_break_c" )
PrecacheParticleSystem( "muzzleflash_5_lmg_break_d" )
PrecacheParticleSystem( "muzzle_glow_lmg" )
PrecacheParticleSystem( "muzzle_sparks_lmg" )
PrecacheParticleSystem( "muzzle_center_heavy" )
PrecacheParticleSystem( "muzzle_smoke_c" )
PrecacheParticleSystem( "muzzleflash_none_smoke" )
PrecacheParticleSystem( "muzzle_glow_distant" )
PrecacheParticleSystem( "muzzle_heavy_flame" )
PrecacheParticleSystem( "muzzle_center_flamering" )
PrecacheParticleSystem( "muzzleflash_6_break_a" )
PrecacheParticleSystem( "muzzleflash_6_break_b" )
PrecacheParticleSystem( "muzzleflash_6_break_c" )
PrecacheParticleSystem( "muzzleflash_6_break_d" )
PrecacheParticleSystem( "muzzleflash_6_break_e" )
PrecacheParticleSystem( "muzzleflash_6_break_f" )
PrecacheParticleSystem( "muzzle_heatwave" )
PrecacheParticleSystem( "muzzle_center_big" )
PrecacheParticleSystem( "muzzle_glow_b" )
PrecacheParticleSystem( "muzzle_glow" )
PrecacheParticleSystem( "muzzle_sparks_spray" )
PrecacheParticleSystem( "muzzleflash_pistol" )
PrecacheParticleSystem( "muzzle_smoke_b" )
PrecacheParticleSystem( "muzzle_center_pistol_blue" )
PrecacheParticleSystem( "muzzle_sparks_big" )
PrecacheParticleSystem( "muzzleflash_slug_flame" )
PrecacheParticleSystem( "muzzle_center_medium" )
PrecacheParticleSystem( "muzzle_sparks_thin" )
PrecacheParticleSystem( "barrel_smoke_plume" )
PrecacheParticleSystem( "muzzle_trace_blue" )
PrecacheParticleSystem( "muzzle_bullet_trail_shotgun" )
PrecacheParticleSystem( "muzzle_glow_blue" )
PrecacheParticleSystem( "test_mp5" )
PrecacheParticleSystem( "muzzleflash_6_break_a1" )
PrecacheParticleSystem( "muzzleflash_6_break_b1" )
PrecacheParticleSystem( "muzzleflash_6_break_c1" )
PrecacheParticleSystem( "muzzleflash_6_break_e1" )
PrecacheParticleSystem( "muzzleflash_6_break_f1" )
PrecacheParticleSystem( "muzzle_glow_small_b" )
PrecacheParticleSystem( "muzzle_center_M82" )
PrecacheParticleSystem( "muzzle_center_pistol" )
PrecacheParticleSystem( "muzzle_glow_pistol" )
PrecacheParticleSystem( "muzzle_lmg_heavy_flame" )
PrecacheParticleSystem( "muzzle_supressed_smoke_b" )
PrecacheParticleSystem( "muzzle_supressed_smoke_d" )
PrecacheParticleSystem( "muzzle_supressed_trace" )
PrecacheParticleSystem( "muzzle_sparks_supressed" )
PrecacheParticleSystem( "muzzle_glow_M82" )
PrecacheParticleSystem( "muzzleflash_4_break_a" )
PrecacheParticleSystem( "muzzleflash_4_break_b" )
PrecacheParticleSystem( "muzzleflash_4_break_c" )
PrecacheParticleSystem( "muzzleflash_4_break_d" )
PrecacheParticleSystem( "muzzleflash_ak74_break_a" )
PrecacheParticleSystem( "muzzleflash_ak74_break_b" )
PrecacheParticleSystem( "testd" )
PrecacheParticleSystem( "muzzle_center_ak" )
PrecacheParticleSystem( "shellsmoke" )
PrecacheParticleSystem( "muzzle_glow_big" )
PrecacheParticleSystem( "muzzleflash_3_break_a" )
PrecacheParticleSystem( "muzzleflash_3_break_b" )
PrecacheParticleSystem( "muzzleflash_3_break_c" )
PrecacheParticleSystem( "muzzle_center_lmg_d" )
PrecacheParticleSystem( "muzzle_m82_flame" )
PrecacheParticleSystem( "muzzle_m82_flame_b" )
PrecacheParticleSystem( "muzzle_m82_flame_c" )
PrecacheParticleSystem( "barrel_smoke" )
PrecacheParticleSystem( "barrel_smoke_trail" )
PrecacheParticleSystem( "barrel_smoke_trail_b" )
PrecacheParticleSystem( "muzzleflash_lmg_break" )
PrecacheParticleSystem( "port_sparks" )
PrecacheParticleSystem( "port_flames" )
PrecacheParticleSystem( "port_glow" )
PrecacheParticleSystem( "muzzleflash_bizon_break_a" )
PrecacheParticleSystem( "muzzleflash_bizon_break_b" )
PrecacheParticleSystem( "test_bizon" )
PrecacheParticleSystem( "muzzle_center_pistol_cleric" )
PrecacheParticleSystem( "muzzleflash_pistol_cleric_break_a" )
PrecacheParticleSystem( "muzzleflash_pistol_cleric_flame_a" )
PrecacheParticleSystem( "muzzleflash_pistol_cleric_break_c" )
PrecacheParticleSystem( "muzzleflash_pistol_cleric_flame_d" )
PrecacheParticleSystem( "muzzleflash_pistol_cleric_break_b" )
PrecacheParticleSystem( "muzzleflash_pistol_cleric_flame_c" )
PrecacheParticleSystem( "muzzleflash_pistol_cleric_break_d" )
PrecacheParticleSystem( "muzzleflash_pistol_cleric_flame_b" )
PrecacheParticleSystem( "muzzle_center_pistol_OTS" )
PrecacheParticleSystem( "testb" )
PrecacheParticleSystem( "testc" )
PrecacheParticleSystem( "party_sparkles" )
PrecacheParticleSystem( "party_glow" )
PrecacheParticleSystem( "muzzleflashes_test_b" )
PrecacheParticleSystem( "muzzleflash_6_lmg_break_eb" )
PrecacheParticleSystem( "muzzleflash_6_lmg_break_fb" )
PrecacheParticleSystem( "muzzleflash_5_lmg_break_eb" )
PrecacheParticleSystem( "muzzleflash_5_lmg_break_ab" )
PrecacheParticleSystem( "muzzleflash_5_lmg_break_bb" )
PrecacheParticleSystem( "muzzleflash_5_lmg_break_cb" )
PrecacheParticleSystem( "muzzleflash_5_lmg_break_db" )
PrecacheParticleSystem( "muzzleflash_6b" )
PrecacheParticleSystem( "muzzle_heatwaveb" )
PrecacheParticleSystem( "muzzle_glowb" )
PrecacheParticleSystem( "barrel_smokeb" )
PrecacheParticleSystem( "muzzle_center_M82b" )
PrecacheParticleSystem( "muzzleflash_slug_flameb" )
PrecacheParticleSystem( "muzzle_center_mediumb" )
PrecacheParticleSystem( "muzzle_center_heavy_lmgb" )
PrecacheParticleSystem( "muzzle_sparks_thinb" )
PrecacheParticleSystem( "muzzle_bullet_trailb" )
PrecacheParticleSystem( "muzzle_bullet_trail_shotgunb" )
PrecacheParticleSystem( "new_muzzle_center_b" )
PrecacheParticleSystem( "muzzleflash_6_break_a1b" )
PrecacheParticleSystem( "muzzleflash_6_break_b1b" )
PrecacheParticleSystem( "muzzleflash_6_break_c1b" )
PrecacheParticleSystem( "muzzleflash_6_break_d1b" )
PrecacheParticleSystem( "muzzleflash_6_break_e1b" )
PrecacheParticleSystem( "muzzleflash_6_break_f1b" )
PrecacheParticleSystem( "muzzle_heavy_flameb" )
PrecacheParticleSystem( "muzzle_center_pistol_blueb" )
PrecacheParticleSystem( "muzzle_smoke_shotb" )
PrecacheParticleSystem( "barrel_smoke_plumeb" )
PrecacheParticleSystem( "muzzleflash_svd" )
PrecacheParticleSystem( "muzzle_smokeb" )
PrecacheParticleSystem( "muzzle_glow_M82b" )
PrecacheParticleSystem( "muzzle_center_pistolb" )
PrecacheParticleSystem( "muzzle_glow_pistolb" )
PrecacheParticleSystem( "muzzle_supressed_smoke_bb" )
PrecacheParticleSystem( "muzzle_supressed_smoke_cb" )
PrecacheParticleSystem( "muzzle_supressed_smoke_db" )
PrecacheParticleSystem( "muzzle_supressed_traceb" )
PrecacheParticleSystem( "muzzle_sparks_supressedb" )
PrecacheParticleSystem( "muzzleflash_4bb" )
PrecacheParticleSystem( "muzzleflash_bizon_break_bb" )
PrecacheParticleSystem( "muzzleflash_bizon_break_ab" )
PrecacheParticleSystem( "muzzle_center_bizonb" )
PrecacheParticleSystem( "muzzle_center_akb" )
PrecacheParticleSystem( "muzzle_glow_bigb" )
PrecacheParticleSystem( "new_muzzle_center_blue_bb" )
PrecacheParticleSystem( "muzzle_trace_blueb" )
PrecacheParticleSystem( "muzzle_center_heavyb" )
PrecacheParticleSystem( "muzzleflash_3bb" )
PrecacheParticleSystem( "muzzle_center_lmg_db" )
PrecacheParticleSystem( "muzzleflash_1bb" )
PrecacheParticleSystem( "m82_shocksmoke_traceb" )
PrecacheParticleSystem( "muzzle_m82_flameb" )
PrecacheParticleSystem( "muzzle_m82_flame_bb" )
PrecacheParticleSystem( "muzzleflash_lmg_breakb" )
PrecacheParticleSystem( "muzzle_glow_bb" )
PrecacheParticleSystem( "muzzleflash_SR25" )
PrecacheParticleSystem( "muzzleflash_pistol_rbull" )
PrecacheParticleSystem( "muzzle_center_smg_blue" )
PrecacheParticleSystem( "muzzleflash_m24" )
PrecacheParticleSystem( "muzzle_glow_white" )
PrecacheParticleSystem( "muzzleflash_vollmer" )
PrecacheParticleSystem( "muzzle_center_smg" )
PrecacheParticleSystem( "muzzle_glow_pistol_blueb" )
PrecacheParticleSystem( "muzzleflash_m14_break_eb" )
PrecacheParticleSystem( "muzzleflash_m14_break_db" )
PrecacheParticleSystem( "muzzleflash_m14_break_cb" )
PrecacheParticleSystem( "muzzleflash_m14_break_bb" )
PrecacheParticleSystem( "barrel_smoke_trailb" )
PrecacheParticleSystem( "muzzleflash_m14_break_ab" )
PrecacheParticleSystem( "muzzleflash_6_break_ab" )
PrecacheParticleSystem( "muzzleflash_6_break_bb" )
PrecacheParticleSystem( "muzzleflash_6_break_cb" )
PrecacheParticleSystem( "muzzleflash_6_break_db" )
PrecacheParticleSystem( "muzzleflash_6_break_eb" )
PrecacheParticleSystem( "muzzleflash_6_break_fb" )
PrecacheParticleSystem( "muzzle_bullet_trail_ARb" )
PrecacheParticleSystem( "muzzle_glow_smallb" )
PrecacheParticleSystem( "muzzle_sparks_arb" )
PrecacheParticleSystem( "new_muzzle_centerbb" )
PrecacheParticleSystem( "muzzle_center_rbull" )
PrecacheParticleSystem( "muzzle_sparks_bigb" )
PrecacheParticleSystem( "muzzle_smoke_shot_bb" )
PrecacheParticleSystem( "muzzle_smoke_bb" )
PrecacheParticleSystem( "muzzle_glow_small_bb" )
PrecacheParticleSystem( "muzzle_traceb" )
PrecacheParticleSystem( "muzzle_smoke_cb" )
PrecacheParticleSystem( "muzzle_glow_lmgb" )
PrecacheParticleSystem( "new_muzzle_center_blueb" )
PrecacheParticleSystem( "muzzle_sparks_lmgb" )
PrecacheParticleSystem( "muzzleflash_4_break_ab" )
PrecacheParticleSystem( "muzzleflash_4_break_bb" )
PrecacheParticleSystem( "muzzleflash_4_break_cb" )
PrecacheParticleSystem( "muzzleflash_4_break_db" )
PrecacheParticleSystem( "muzzle_glow_blueb" )
PrecacheParticleSystem( "muzzleflash_3_break_ab" )
PrecacheParticleSystem( "muzzleflash_3_break_bb" )
PrecacheParticleSystem( "muzzleflash_3_break_cb" )
PrecacheParticleSystem( "muzzle_lmg_heavy_flameb" )
PrecacheParticleSystem( "m82_shocksmokeb" )
PrecacheParticleSystem( "muzzle_m82_flame_cb" )
PrecacheParticleSystem( "muzzleflash_sr25_break_a" )
PrecacheParticleSystem( "muzzleflash_sr25_break_b" )
PrecacheParticleSystem( "muzzleflash_sr25_break_c" )
PrecacheParticleSystem( "muzzleflash_sr25_break_d" )
PrecacheParticleSystem( "muzzleflash_sr25_break_e" )
PrecacheParticleSystem( "muzzle_sparks_revolver" )
PrecacheParticleSystem( "muzzle_sparks_spit" )
PrecacheParticleSystem( "muzzle_center_m24" )
PrecacheParticleSystem( "muzzleflash_vollmer" )

View File

@ -189,7 +189,7 @@ function ARC9.StartCommand(ply, cmd)
ARC9.LastEyeAngles = cmd:GetViewAngles()
if cmd:GetImpulse() == 100 and wpn:CanToggleAllStatsOnF() then
if cmd:GetImpulse() == 100 and wpn:CanToggleAllStatsOnF() and !wpn:GetCustomize() then
if !wpn:GetReloading() and !wpn:GetUBGL() then
ply:EmitSound(wpn:RandomChoice(wpn:GetProcessedValue("ToggleAttSound")), 75, 100, 1, CHAN_ITEM)
if CLIENT then

View File

@ -327,7 +327,6 @@ end)
local doop = 0
hook.Add("PlayerBindPress", "ARC9_GamepadHUDBinds", function(ply, bind, pressed, code)
if IsValid(LocalPlayer()) and IsValid(LocalPlayer():GetActiveWeapon()) and LocalPlayer():GetActiveWeapon().ARC9 and LocalPlayer():GetActiveWeapon():GetCustomize() and ARC9.ControllerMode() then
local wpn = LocalPlayer():GetActiveWeapon()
if bind == "invprev" then
if doop % 2 == 0 then setscroll = 1 end
doop = doop + 1
@ -958,9 +957,9 @@ function SWEP:CreateCustomizeHUD()
local dx = mousex - lastmousex
local dy = mousey - lastmousey
self.CustomizePitch = self.CustomizePitch - (dx / ARC9ScreenScale(4))*3
self.CustomizePitch = self.CustomizePitch - (dx / ARC9ScreenScale(4)) * 3
-- self.CustomizeYaw = math.Clamp(self.CustomizeYaw + (dy / ARC9ScreenScale(8)) * (math.floor(self.CustomizePitch / 90) % 2 == 0 and 1 or -1), -30, 30)
self.CustomizeYaw = self.CustomizeYaw + (dy / ARC9ScreenScale(8))
self.CustomizeYaw = self.CustomizeYaw + (dy / ARC9ScreenScale(8)) * 3
end
elseif self:GetOwner():KeyDown(IN_RELOAD) then
@ -1076,6 +1075,11 @@ function SWEP:CreateCustomizeHUD()
glyph2 = ARC9.GetBindKey("+showscores"),
row3 = true,
},
{
action = "customize.hint.favorite",
glyph = ARC9.GetBindKey("impulse 100"),
hidden = true,
},
}
end

View File

@ -1,6 +1,7 @@
local scrolleles = {}
local foldericon = Material("arc9/ui/folder.png", "mips smooth")
local folderfavicon = Material("arc9/ui/folder_favorites.png", "mips smooth")
local backicon = Material("arc9/ui/back.png", "mips smooth")
local adminicon = Material("arc9/admin.png", "mips smooth")
@ -145,8 +146,8 @@ local function enterfolder(self, scroll, slottbl, fname)
local folderbtn = vgui.Create("ARC9AttButton", scroll)
folderbtn:SetButtonText(ARC9:GetPhrase("folder." .. folder) or folder)
folderbtn:SetIcon(foldericon)
folderbtn:SetButtonText(folder == "!favorites" and ARC9:GetPhrase("folder.favorites") or ARC9:GetPhrase("folder." .. folder) or folder)
folderbtn:SetIcon(folder == "!favorites" and folderfavicon or foldericon)
folderbtn:SetEmpty(true)
folderbtn:DockMargin(0, 0, ARC9ScreenScale(4), 0)
@ -165,12 +166,12 @@ local function enterfolder(self, scroll, slottbl, fname)
end
end
-- folderbtn.Think = function(self2)
-- if !IsValid(self) then return end
-- if self2:IsHovered() then
-- self.CustomizeHints["customize.hint.select"] = "Open"
-- end
-- end
folderbtn.Think = function(self2)
if !IsValid(self) then return end
if self2:IsHovered() then
self.CustomizeHints["customize.hint.select"] = "customize.hint.select"
end
end
end
if foldercount > 1 then spacer(self, scroll, 0) end
@ -187,7 +188,9 @@ local function enterfolder(self, scroll, slottbl, fname)
if atttbl.AdminOnly and !self:GetOwner():IsAdmin() then continue end
if (!atttbl.Folder and #self.BottomBarPath > 0) or (atttbl.Folder and atttbl.Folder != strpath) then continue end
if strpath != "!favorites" and ((!atttbl.Folder and #self.BottomBarPath > 0) or (atttbl.Folder and atttbl.Folder != strpath)) then continue end
if strpath == "!favorites" and !ARC9.Favorites[att.att] then continue end
local attname = ARC9:GetPhraseForAtt(att.att, "CompactName") or ARC9:GetPhraseForAtt(att.att, "PrintName") or ARC9:GetPhraseForAtt(att.att, "ShortName") or ""
@ -212,7 +215,7 @@ local function enterfolder(self, scroll, slottbl, fname)
self.CustomizeSelectAddr = self2.address
end
end
attbtn2.Think = function(self2)
if !IsValid(self) then return end
@ -255,12 +258,20 @@ local function enterfolder(self, scroll, slottbl, fname)
elseif self2.slottbl.Installed then
self.CustomizeHints["customize.hint.deselect"] = "customize.hint.unattach"
end
if ARC9.Favorites[att.att] then
self.CustomizeHints["customize.hint.favorite"] = "customize.hint.unfavorite"
else
self.CustomizeHints["customize.hint.favorite"] = "customize.hint.favorite"
end
if self.AttInfoBarAtt != self2.att then
self.AttInfoBarAtt = self2.att
self.AttInfoBarAttSlot = slot
self:CreateHUD_AttInfo()
end
self.CustomizeLastHovered = self2
end
end
@ -413,10 +424,10 @@ local function enterfolder(self, scroll, slottbl, fname)
end
surface.CreateFont("ARC9_KeybindPreview_Cust", {
font = "Arial",
size = ARC9ScreenScale(8),
weight = 1000,
antialias = true,
font = "Arial",
size = ARC9ScreenScale(8),
weight = 1000,
antialias = true,
})
function SWEP:CreateHUD_Bottom()
@ -467,9 +478,11 @@ function SWEP:CreateHUD_Bottom()
local atts = ARC9.GetAttsForCats(slottbl.Category or "")
local atts_slots = {}
local atts_fav = {}
for _, att in pairs(atts) do
if (slottbl.RejectAttachments or {})[att] then continue end
if ARC9.Favorites[att] then atts_fav[att] = true end
table.insert(atts_slots, {
att = att,
slot = self.BottomBarAddress
@ -507,6 +520,9 @@ function SWEP:CreateHUD_Bottom()
order_a = atttbl_a.SortOrder or order_a
order_b = atttbl_b.SortOrder or order_b
if ARC9.Favorites[a] then order_a = order_a - ARC9.FavoritesWeight end
if ARC9.Favorites[b] then order_b = order_b - ARC9.FavoritesWeight end
if order_a == order_b then
return (atttbl_a.CompactName or atttbl_a.PrintName or "") < (atttbl_b.CompactName or atttbl_b.PrintName or "")
end
@ -517,8 +533,21 @@ function SWEP:CreateHUD_Bottom()
self.BottomBarFolders = ARC9.GetFoldersForAtts(atts)
self.BottomBarAtts = atts_slots
if table.Count(self.BottomBarFolders) == 1 then
local sub = table.GetKeys(self.BottomBarFolders)[1]
local foldercount = 0
local firstfolder = nil
for k, v in pairs(self.BottomBarFolders) do
if istable(v) then
foldercount = foldercount + 1
firstfolder = k
end
end
if foldercount > 0 and atts_fav != {} then
self.BottomBarFolders["!favorites"] = atts_fav
end
if foldercount == 1 then
local sub = firstfolder
-- print(sub)
@ -671,7 +700,7 @@ function SWEP:CreateHUD_AttInfo()
end
end
else
lowerpanel.HasPros = nil
lowerpanel.HasPros = nil
end
if table.Count(consname) > 0 then
@ -693,6 +722,6 @@ function SWEP:CreateHUD_AttInfo()
end
end
else
lowerpanel.HasCons = nil
lowerpanel.HasCons = nil
end
end

View File

@ -2,10 +2,10 @@
local ARC9ScreenScale = ARC9.ScreenScale
local clicksound = "arc9/newui/uimouse_click_return.ogg"
local removesound = "arc9/newui/presets/paper_scrawl1.ogg"
local savesound = "arc9/newui/presets/paper_write1.ogg"
local applysound = "arc9/newui/presets/paper_search1.ogg"
local randomizesound = "arc9/newui/presets/paper_search1.ogg"
local removesound = "arc9/newui/presets/preset_sound1-delete.ogg"
local savesound = "arc9/newui/presets/preset_sound3-save.ogg"
local applysound = "arc9/newui/presets/preset_sound2-apply.ogg"
local randomizesound = "arc9/newui/presets/shuffle_sound2.ogg"
local mat_default = Material("arc9/arc9_logo.png", "mips smooth")
local mat_random = Material("arc9/ui/random.png", "mips smooth")

View File

@ -96,6 +96,7 @@ ARC9AttButton.MatMarkerInstalled = Material("arc9/ui/mark_installed.png", "mips
ARC9AttButton.MatMarkerLock = Material("arc9/ui/mark_lock.png", "mips smooth")
ARC9AttButton.MatMarkerModes = Material("arc9/ui/mark_modes.png", "mips smooth")
ARC9AttButton.MatMarkerSlots = Material("arc9/ui/mark_slots.png", "mips smooth")
ARC9AttButton.MatMarkerFavorite = Material("arc9/ui/mark_favorite.png", "mips smooth")
function ARC9AttButton:Init()
self:SetText("")
@ -112,6 +113,7 @@ function ARC9AttButton:Paint(w, h)
local colorclicked = ARC9.GetHUDColor("hi")
local mat = self.MatIdle
local matmarker = nil
local favmarker = nil
local att = self.att
local qty = 0
@ -142,6 +144,10 @@ function ARC9AttButton:Paint(w, h)
markercolor = colorclicked
end
if ARC9.Favorites[att] then
favmarker = self.MatMarkerFavorite
end
surface.SetDrawColor(color)
surface.SetMaterial(mat)
surface.DrawTexturedRect(0, 0, w, w)
@ -165,6 +171,12 @@ function ARC9AttButton:Paint(w, h)
-- surface.DrawTexturedRect(0, 0, w, w)
end
if favmarker then
surface.SetDrawColor(markercolor)
surface.SetMaterial(favmarker)
surface.DrawTexturedRect(w - ARC9ScreenScale(11), ARC9ScreenScale(3), ARC9ScreenScale(8), ARC9ScreenScale(8))
end
if self.FolderContain then
surface.SetFont("ARC9_12")
local tww = surface.GetTextSize(self.FolderContain)
@ -745,7 +757,7 @@ function ARC9ColorButton:DoClick()
newel:EnableAlpha()
end
newel:SetPos(self:LocalToScreen(self:GetX() - ARC9ScreenScale(80), self:GetY() - ARC9ScreenScale(48)))
newel:SetPos(self:LocalToScreen(self:GetX() - ARC9ScreenScale(103), self:GetY() - ARC9ScreenScale(48)))
newel:UpdateColor(self.rgbcolor)
newel:ShowCloseButton(false)

View File

@ -96,14 +96,14 @@ function SWEP:LoadPresetFromCode(str, standard)
self:LoadPresetFromTable(tbl)
if !standard then
if !standard then
surface.PlaySound("arc9/preset_install.ogg")
end
self:SavePreset(name, false, (standard and name))
self:SavePreset(name, false, standard and name)
return (name or true)
return name or true
end
function SWEP:GetPresetName(preset)
@ -232,7 +232,7 @@ function SWEP:SavePreset(presetname, nooverride, forcedname)
elseif presetname == "default" then
filename = ARC9.PresetPath .. self:GetPresetBase() .. "/default"
end
if nooverride and file.Exists(filename .. ".txt", "DATA") then return end
file.CreateDir(ARC9.PresetPath .. self:GetPresetBase())
@ -481,27 +481,27 @@ function SWEP:CreateStandardPresets()
if file.Exists(ARC9.PresetPath .. self:GetPresetBase() .. "/" .. name .. ".txt", "DATA") then continue end
if !self:LoadPresetFromCode(v, true) then print("Something gone wrong with standard preset!") continue end
newloaded = true
end
if newloaded then
self:LoadPreset("default")
end
end
end
end
local function deletefolder(path)
local files, folders = file.Find(path .. "*", "DATA")
local files, folders = file.Find(path .. "*", "DATA")
for _, v in ipairs(files) do file.Delete(path .. v) end
for _, v in ipairs(folders) do deletefolder(path .. v .. "/") end
file.Delete(path)
file.Delete(path)
end
concommand.Add("arc9_presets_clear", function(ply)
if !IsValid(ply) then return end
local weapon = ply:GetActiveWeapon()
if IsValid(weapon) and weapon.ARC9 then

View File

@ -251,8 +251,8 @@ local function DarsuBob(self, pos, ang)
end
function SWEP:GetViewModelBob(pos, ang)
self.Sway = 0
self.Bob = 0
self.SwayScale = 0
self.BobScale = 0
if GetConVar("arc9_vm_bobstyle"):GetInt() == 1 then
return FesiugBob(self, pos, ang)
elseif GetConVar("arc9_vm_bobstyle"):GetInt() == 2 then

View File

@ -64,7 +64,7 @@ function SWEP:PreDrawViewModel()
cam.End2D()
end
if blurenable then
if shouldrtblur and blurenable then
DrawBokehDOF(bluramt, 1, 0)
end

View File

@ -194,7 +194,7 @@ hook.Add("StartCommand", "ARC9_Holster", function(ply, ucmd)
end)
function SWEP:DoDeployAnimation()
if (GetConVar("arc9_dev_always_ready"):GetBool() or !self:GetReady()) and self:HasAnimation("ready") then
if !GetConVar("arc9_never_ready"):GetBool() and (GetConVar("arc9_dev_always_ready"):GetBool() or !self:GetReady()) and self:HasAnimation("ready") then
local t = self:PlayAnimation("ready", self:GetProcessedValue("DeployTime", 1), true) or 0
self:SetReadyTime(CurTime() + t)

View File

@ -50,13 +50,13 @@ function SWEP:GetFreeSwayAngles()
local swayamt = self:GetFreeSwayAmount()
local swayspeed = 2
local isScope = CLIENT and self:GetSight() and self:GetSight().atttbl and self:GetSight().atttbl.RTScope
local cheap = CLIENT and isScope and GetConVar("ARC9_cheapscopes"):GetBool()
swayamt = cheap and 1 - self:GetSightAmount() or swayamt * (1-self:GetSightAmount() * 0.2)
smoothswayamt = (cheap or CLIENT) and Lerp(RealFrameTime(), smoothswayamt, swayamt) or swayamt
local ang = Angle(math.sin(CurTime() * 0.6 * swayspeed) + (math.cos(CurTime() * 2) * 0.5), math.sin(CurTime() * 0.4 * swayspeed) + (math.cos(CurTime() * 1.6) * 0.5), 0)
ang = ang * smoothswayamt

View File

@ -235,11 +235,13 @@ do
local stat = base
if stat == nil then
stat = self[val]
stat = self:GetTable()[val]
end
local valContCondition = val .. condition
if self.HasNoAffectors[valContCondition] == true then return stat end
if self.HasNoAffectors[valContCondition] == true then
return stat
end
local unaffected = true
local baseStr = tostring(base)
-- damn

View File

@ -150,12 +150,7 @@ function SWEP:HoldBreathHUD()
-- surface.DrawText(text)
end
SWEP.CachedFreeSway = 0
SWEP.FreeSwayCacheTick = 0
function SWEP:GetFreeSwayAmount()
if engine.TickCount() == self.FreeSwayCacheTick then return self.CachedFreeSway end
if !GetConVar("arc9_mod_sway"):GetBool() then return 0 end
if !self:GetOwner():IsPlayer() then return 0 end
local sway = self:GetProcessedValue("Sway")
@ -167,8 +162,6 @@ function SWEP:GetFreeSwayAmount()
if self:GetOutOfBreath() then
sway = sway + ((1 - self:GetBreath() / 100) * 0.75)
end
self.FreeSwayCacheTick = engine.TickCount()
self.CachedFreeSway = sway
return sway
end

View File

@ -1,6 +1,6 @@
UnLitGeneric
{
"$basetexture" "arc9/laser2"
"$basetexture" "arc9/laser6"
"$additive" "1"
"$translucent" "1"
"$vertexcolor" "1"
@ -14,11 +14,17 @@ UnLitGeneric
Proxies
{
TextureScroll
"TextureScroll"
{
textureScrollVar $detailtexturetransform
textureScrollRate 50
textureScrollAngle 90
}
}
//"AnimatedTexture"
//{
//"animatedTextureVar" "$basetexture"
//"animatedTextureFrameNumVar" "$frame"
//"animatedTextureFrameRate" "30"
//}
}
}

BIN
materials/arc9/laser5.vtf Normal file

Binary file not shown.

BIN
materials/arc9/laser6.vtf Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
materials/arc9/ui/w9k.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.