diff --git a/README.ru.md b/README.ru.md index 12d1bab..4d6a809 100644 --- a/README.ru.md +++ b/README.ru.md @@ -20,11 +20,7 @@ > Все модули можно найти **[здесь](https://github.com/JonnyBro/beatrun/tree/main/lua/bin)**.\ > Проверьте **[Благодарности](#благодарности)** чтобы найти исходный код модулей. -## Steam Workshop (ржака) - -[Подписаться](https://steamcommunity.com/sharedfiles/filedetails/?id=3290421288) - -### Автоматическая установка (Рекомендуемое | Windows 10/11) +## Автоматическая установка (Рекомендуемое | Windows 10/11) > [!WARNING] > Windows 7 не поддерживается.\ @@ -40,7 +36,7 @@ irm https://beatrun.jonnybro.ru/install | iex * Выберите режим `Beatrun` в правом нижнем углу. -### Ручная установка +## Ручная установка 1. **[Скачайте проект](https://github.com/JonnyBro/beatrun/archive/refs/heads/master.zip)**. 2. **Удалите папку `beatrun` по пути *путь_к_игре/garrysmod/addons* если присутствует.** diff --git a/beatrun/gamemodes/beatrun/content/resource/localization/en/beatrun.properties b/beatrun/gamemodes/beatrun/content/resource/localization/en/beatrun.properties index ea9447b..c105a2e 100644 --- a/beatrun/gamemodes/beatrun/content/resource/localization/en/beatrun.properties +++ b/beatrun/gamemodes/beatrun/content/resource/localization/en/beatrun.properties @@ -54,7 +54,7 @@ beatrun.coursemenu.trials=Courses - %s beatrun.coursemenu.buildmode=Toggle Build Mode beatrun.coursemenu.freeplay=Return to Freeplay -# CoursesDatabase +# Courses Database beatrun.coursesdatabase.cantuploadfreeplay=Can't upload in Freeplay beatrun.coursesdatabase.upload1=You're trying to upload a course with the name %s on map %s. beatrun.coursesdatabase.upload2=Use Beatrun_Confirm to continue or Beatrun_Cancel to cancel. @@ -63,6 +63,7 @@ beatrun.coursesdatabase.update1=You are trying to update a course with this code # Tools Menu beatrun.toolsmenu.client=Client beatrun.toolsmenu.server=Server +beatrun.toolsmenu.extra=Extra # Tools Menu Courses Section beatrun.toolsmenu.courses.name=Courses @@ -229,6 +230,16 @@ beatrun.toolsmenu.gamemodes.infectiontime=Time in seconds beatrun.toolsmenu.gamemodes.datatheft=Toggle Data Theft Gamemode beatrun.toolsmenu.gamemodes.deathmatch=Toggle Deathmatch Gamemode +# Tools Menu Extra Section +beatrun.toolsmenu.extra.name=Extra +beatrun.toolsmenu.extra.desc=Extra settings for speedrunners/sweaty boys + +beatrun.toolsmenu.extra.stats=Extra Stats +beatrun.toolsmenu.extra.statsdesc=Shows extra stats besides speedometer to provide more info to help on harder tricks + +beatrun.toolsmenu.extra.speedrunsverif=Speedrun Verification Stats +beatrun.toolsmenu.extra.speedrunsverifdesc=Shows info about your current settings (Purist Mode, Purist wallrun and Kick Glitch version) + # Checkpoints beatrun.checkpoints.countdown1=Ready beatrun.checkpoints.countdown2=Set diff --git a/beatrun/gamemodes/beatrun/content/resource/localization/ru/beatrun.properties b/beatrun/gamemodes/beatrun/content/resource/localization/ru/beatrun.properties index 27f7461..4dd514f 100644 --- a/beatrun/gamemodes/beatrun/content/resource/localization/ru/beatrun.properties +++ b/beatrun/gamemodes/beatrun/content/resource/localization/ru/beatrun.properties @@ -54,7 +54,7 @@ beatrun.coursemenu.trials=Курсы - %s beatrun.coursemenu.buildmode=Режим строительства beatrun.coursemenu.freeplay=Свободная игра -# CoursesDatabase +# Courses Database beatrun.coursesdatabase.cantuploadfreeplay=Нельзя загружать во время свободной игры beatrun.coursesdatabase.upload1=Вы пытаетесь загрузить курс с названием %s на карте %s. beatrun.coursesdatabase.upload2=Используйте Beatrun_Confirm чтобы продолжить или Beatrun_Cancel чтобы отменить. @@ -63,6 +63,7 @@ beatrun.coursesdatabase.update1=Вы пытаетесь обновить кур # Tools Menu beatrun.toolsmenu.client=Клиент beatrun.toolsmenu.server=Сервер +beatrun.toolsmenu.extra=Дополнительно # Tools Menu Courses Section beatrun.toolsmenu.courses.name=Курсы @@ -226,6 +227,16 @@ beatrun.toolsmenu.gamemodes.infectiontime=Время в секундах beatrun.toolsmenu.gamemodes.datatheft=Переключить Data Theft beatrun.toolsmenu.gamemodes.deathmatch=Переключить Deathmatch +# Tools Menu Extra Section +beatrun.toolsmenu.extra.name=Дополнительно +beatrun.toolsmenu.extra.desc=Доп. настройки для спидранеров/потеющих ребяток + +beatrun.toolsmenu.extra.stats=Доп. статы +beatrun.toolsmenu.extra.statsdesc=Показывает дополнительные статы рядом со спидометром + +beatrun.toolsmenu.extra.speedrunsverif=Статы для верификации спидранов +beatrun.toolsmenu.extra.speedrunsverifdesc=Показывает ваши настройки в углу экрана (Purist Mode, Purist wallrun и версия Kick Glitch) + # Checkpoints beatrun.checkpoints.countdown1=Раз beatrun.checkpoints.countdown2=Два diff --git a/beatrun/gamemodes/beatrun/entities/weapons/runnerhands/shared.lua b/beatrun/gamemodes/beatrun/entities/weapons/runnerhands/shared.lua index 4c4c4b4..2d29b6b 100644 --- a/beatrun/gamemodes/beatrun/entities/weapons/runnerhands/shared.lua +++ b/beatrun/gamemodes/beatrun/entities/weapons/runnerhands/shared.lua @@ -99,6 +99,8 @@ function SWEP:Deploy() self:SetWasOnGround(false) self:SetBlockAnims(false) self:SetPunch(1) + + return true end function SWEP:Initialize() diff --git a/beatrun/gamemodes/beatrun/gamemode/cl/DiscordPresence.lua b/beatrun/gamemodes/beatrun/gamemode/cl/DiscordPresence.lua index 41220ee..f439727 100644 --- a/beatrun/gamemodes/beatrun/gamemode/cl/DiscordPresence.lua +++ b/beatrun/gamemodes/beatrun/gamemode/cl/DiscordPresence.lua @@ -1,5 +1,4 @@ if not util.IsBinaryModuleInstalled("gdiscord") then return end - require("gdiscord") local image = "default" @@ -9,7 +8,6 @@ local discord_start = discord_start or -1 function DiscordUpdate() local ply = LocalPlayer() - if not ply.GetLevel then return end local rpc_data = {} @@ -26,7 +24,6 @@ function DiscordUpdate() rpc_data["state"] = "Local Server" end else - -- rpc_data["state"] = string.Replace(ip, ":27015", "") rpc_data["state"] = "Dedicated Server" end end @@ -41,13 +38,10 @@ function DiscordUpdate() local level = ply:GetLevel() local customname = hook.Run("BeatrunHUDCourse") local course = customname and customname or Course_Name ~= "" and Course_Name or "Freeplay" - rpc_data["details"] = "Level: " .. level .. " | Map: " .. game.GetMap() rpc_data["startTimestamp"] = discord_start - rpc_data["largeImageKey"] = image rpc_data["largeImageText"] = course - DiscordUpdateRPC(rpc_data) end diff --git a/beatrun/gamemodes/beatrun/gamemode/cl/HUD.lua b/beatrun/gamemodes/beatrun/gamemode/cl/HUD.lua index 63a2886..1159285 100644 --- a/beatrun/gamemodes/beatrun/gamemode/cl/HUD.lua +++ b/beatrun/gamemodes/beatrun/gamemode/cl/HUD.lua @@ -1,7 +1,8 @@ -local showtotalXP = CreateClientConVar("Beatrun_HUDXP", "1", true, false, language.GetPhrase("beatrun.convars.hudxp"), 0, 1) +local show_total_xp = CreateClientConVar("Beatrun_HUDXP", "1", true, false, language.GetPhrase("beatrun.convars.hudxp"), 0, 1) local sway = CreateClientConVar("Beatrun_HUDSway", "1", true, false, language.GetPhrase("beatrun.convars.hudsway"), 0, 1) local dynamic = CreateClientConVar("Beatrun_HUDDynamic", "0", true, false, language.GetPhrase("beatrun.convars.huddynamic"), 0, 1) local hidden = CreateClientConVar("Beatrun_HUDHidden", "0", true, false, language.GetPhrase("beatrun.convars.hudhidden"), 0, 2) +local verificationstats = CreateClientConVar("Beatrun_HUDVerification", "0", true, false, "", 0, 1) -- local reticle = CreateClientConVar("Beatrun_HUDReticle", "1", true, false, language.GetPhrase("beatrun.convars.hudreticle"), 0, 1) CreateClientConVar("Beatrun_HUDTextColor", "255 255 255 255", true, true, language.GetPhrase("beatrun.convars.hudtextcolor")) @@ -175,7 +176,7 @@ local function BeatrunHUD() -- local lastxp = ply.LastXP or 0 local nicktext = nil - if showtotalXP:GetBool() then + if show_total_xp:GetBool() then nicktext = ply:Nick() .. " | " .. ply:GetXP() .. "XP" else nicktext = ply:Nick() @@ -226,6 +227,18 @@ local function BeatrunHUD() surface.SetTextPos(scrw * 0.015 + vp.z, scrh * 0.9 + vp.x) surface.DrawText(language.GetPhrase("beatrun.hud.lvl"):format(ply:GetLevel())) + if verificationstats:GetBool() then + surface.SetTextPos(scrw * 0.015 + vp.z, scrh * 0.02 + vp.x) + surface.DrawText("Purist: ") + surface.DrawText(LocalPlayer():GetInfo("Beatrun_PuristMode") == "1" and "true" or "false") + surface.SetTextPos(scrw * 0.015 + vp.z, scrh * 0.04 + vp.x) + surface.DrawText("Purist Wallrun: ") + surface.DrawText(LocalPlayer():GetInfo("Beatrun_PuristWallrun") == "1" and "true" or "false") + surface.SetTextPos(scrw * 0.015 + vp.z, scrh * 0.06 + vp.x) + surface.DrawText("Kick Glitch: ") + surface.DrawText(LocalPlayer():GetInfo("Beatrun_OldKickGlitch") == "1" and "Old" or "New") + end + if tobool(LocalPlayer():GetInfo("Beatrun_PuristMode")) then surface.SetDrawColor(230, 230, 230) surface.SetMaterial(MELogo) diff --git a/beatrun/gamemodes/beatrun/gamemode/cl/SteamPresence.lua b/beatrun/gamemodes/beatrun/gamemode/cl/SteamPresence.lua index 31108a0..43e65e2 100644 --- a/beatrun/gamemodes/beatrun/gamemode/cl/SteamPresence.lua +++ b/beatrun/gamemodes/beatrun/gamemode/cl/SteamPresence.lua @@ -1,5 +1,4 @@ if not util.IsBinaryModuleInstalled("steamrichpresencer") then return end - require("steamrichpresencer") local richtext = "" @@ -7,25 +6,21 @@ local refresh_time = 60 local function UpdateRichPresence() local ply = LocalPlayer() - if not ply.GetLevel then return end local map = game.GetMap() local level = ply:GetLevel() local customname = hook.Run("BeatrunHUDCourse") local course = customname and customname or Course_Name ~= "" and Course_Name or "Freeplay" - local updatedtext = "Beatrun Lv. " .. level .. " (" .. map .. ") | " .. course if richtext ~= updatedtext then richtext = updatedtext - steamworks.SetRichPresence("generic", richtext) end end hook.Add("OnGamemodeLoaded", "LoadDLL", function() UpdateRichPresence() - timer.Create("UpdateSteamRichPresence", refresh_time, 0, UpdateRichPresence) end) \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/cl/ToolMenuSettings.lua b/beatrun/gamemodes/beatrun/gamemode/cl/ToolMenuSettings.lua index 4cef365..dbfb8e6 100644 --- a/beatrun/gamemodes/beatrun/gamemode/cl/ToolMenuSettings.lua +++ b/beatrun/gamemodes/beatrun/gamemode/cl/ToolMenuSettings.lua @@ -7,6 +7,7 @@ end hook.Add("AddToolMenuCategories", "Beatrun_Category", function() spawnmenu.AddToolCategory("Beatrun", "Client", language.GetPhrase("beatrun.toolsmenu.client")) spawnmenu.AddToolCategory("Beatrun", "Server", language.GetPhrase("beatrun.toolsmenu.server")) + spawnmenu.AddToolCategory("Beatrun", "Extra", language.GetPhrase("beatrun.toolsmenu.extra")) end) hook.Add("PopulateToolMenu", "Beatrun_ToolMenu", function() @@ -435,4 +436,15 @@ hook.Add("PopulateToolMenu", "Beatrun_ToolMenu", function() experimentals:CheckBox("\"Slippy Wallruns\"", "Beatrun_Experimentals_SlippyWallrun") experimentals:ControlHelp("You randomly drop from wallruns with a different weapon out. Requires Cruelty Parkour to be ON.") end) + + spawnmenu.AddToolMenuOption("Beatrun", "Extra", "beatrun_extra", "#beatrun.toolsmenu.extra.name", "", "", function(panel) + panel:ClearControls() + panel:SetName("#beatrun.toolsmenu.extra.desc") + + panel:CheckBox("#beatrun.toolsmenu.extra.stats", "Beatrun_HUDStats") + panel:ControlHelp("#beatrun.toolsmenu.extra.statsdesc") + + panel:CheckBox("#beatrun.toolsmenu.extra.speedrunsverif", "Beatrun_HUDVerification") + panel:ControlHelp("#beatrun.toolsmenu.extra.speedrunsverifdesc") + end) end) diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Checkpoints.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Checkpoints.lua index be3eeff..7879cf8 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Checkpoints.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Checkpoints.lua @@ -19,6 +19,7 @@ local timecolor = color_neutral if CLIENT then CreateClientConVar("Beatrun_ShowSpeedometer", 1, true, true, language.GetPhrase("#beatrun.convars.showspeedometer"), 0, 1) + CreateClientConVar("Beatrun_HUDStats", "0", true, false, "", 0, 1) end if SERVER then @@ -264,6 +265,44 @@ function CourseHUD() surface.SetTextColor(r, g, b, a) surface.SetTextPos(ScrW() * 0.85 - w * 0.5 + vpx, ScrH() * 0.85 + vpz) surface.DrawText(text) + + if GetConVar("Beatrun_HUDStats"):GetBool() then + local ang1 = ply:GetAimVector() + ang1 = math.Round(ang1:Angle()[2] % 90, 0) + surface.SetTextPos(ScrW() * 0.85 - w * 0.5 + vpx, ScrH() * 0.88 + vpz) + surface.DrawText(ang1) + + surface.SetTextPos(ScrW() * 0.87 - w * 0.5 + vpx, ScrH() * 0.88 + vpz) + surface.DrawText("Angle") + + surface.SetTextPos(ScrW() * 0.85 - w * 0.5 + vpx, ScrH() * 0.90 + vpz) + surface.DrawText(ply:GetWallrun()) + surface.SetTextPos(ScrW() * 0.87 - w * 0.5 + vpx, ScrH() * 0.90 + vpz) + surface.DrawText("Wall stat") + + if ply:UsingRH() then + surface.SetTextPos(ScrW() * 0.85 - w * 0.5 + vpx, ScrH() * 0.92 + vpz) + surface.DrawText(tostring(ply:GetActiveWeapon():GetQuakeJumping())) + surface.SetTextPos(ScrW() * 0.89 - w * 0.5 + vpx, ScrH() * 0.92 + vpz) + surface.DrawText("Quake") + end + + surface.SetTextPos(ScrW() * 0.85 - w * 0.5 + vpx, ScrH() * 0.94 + vpz) + if (ply:GetWallrunTime() - CurTime()) < 0 then + surface.DrawText("0.00") + else + surface.DrawText(tostring(math.Round(ply:GetWallrunTime() - CurTime(), 2))) + end + + surface.SetTextPos(ScrW() * 0.89 - w * 0.5 + vpx, ScrH() * 0.94 + vpz) + surface.DrawText("Wallrun Time Remains") + + surface.SetTextPos(ScrW() * 0.85 - w * 0.5 + vpx, ScrH() * 0.96 + vpz) + surface.DrawText(tostring(CurTime() < ply:GetWallrunTime())) + + surface.SetTextPos(ScrW() * 0.89 - w * 0.5 + vpx, ScrH() * 0.96 + vpz) + surface.DrawText("Wallrunning") + end end if incourse and pbtimes then diff --git a/beatrun/gamemodes/beatrun/gamemode/shared.lua b/beatrun/gamemodes/beatrun/gamemode/shared.lua index 053fe8d..92f0919 100644 --- a/beatrun/gamemodes/beatrun/gamemode/shared.lua +++ b/beatrun/gamemodes/beatrun/gamemode/shared.lua @@ -1,4 +1,4 @@ -VERSIONGLOBAL = "v1.0.1" +VERSIONGLOBAL = "v1.0.4" DeriveGamemode("sandbox")