mirror of
https://github.com/JonnyBro/beatrun.git
synced 2024-12-29 21:33:02 +05:00
Compare commits
2 commits
979646cd78
...
714e4f787b
Author | SHA1 | Date | |
---|---|---|---|
714e4f787b | |||
bc88a68ad0 |
4 changed files with 39 additions and 9 deletions
|
@ -131,13 +131,24 @@ local function BeatrunHUD()
|
|||
|
||||
surface.SetFont("DebugFixedSmall")
|
||||
|
||||
local vtext = VERSIONGLOBAL
|
||||
local tw, _ = surface.GetTextSize(vtext)
|
||||
surface.SetTextColor(255, 255, 255, 15)
|
||||
local tw, _ = surface.GetTextSize("v" .. VERSIONGLOBAL)
|
||||
surface.SetTextColor(255, 255, 255, 20)
|
||||
surface.SetTextPos(scrw - tw, 0)
|
||||
surface.DrawText(vtext)
|
||||
surface.DrawText("v" .. VERSIONGLOBAL)
|
||||
surface.SetFont("BeatrunHUD")
|
||||
|
||||
if file.Exists("beatrun/version.txt", "DATA") then
|
||||
local latest_version = file.Read("beatrun/version.txt", "DATA")
|
||||
|
||||
if latest_version ~= VERSIONGLOBAL then
|
||||
local notlatest_w, _ = surface.GetTextSize("Update available!")
|
||||
surface.SetTextColor(255, 255, 255, 30)
|
||||
surface.SetTextPos(scrw - notlatest_w, 10)
|
||||
surface.DrawText("Update available!")
|
||||
surface.SetFont("BeatrunHUD")
|
||||
end
|
||||
end
|
||||
|
||||
local pl = ply:GetNW2Int("PLoss")
|
||||
local CT = CurTime()
|
||||
|
||||
|
|
|
@ -2,4 +2,22 @@ include("shared.lua")
|
|||
|
||||
for _, v in ipairs(file.Find("gamemodes/beatrun/gamemode/cl/*.lua", "GAME")) do
|
||||
include("cl/" .. v)
|
||||
end
|
||||
end
|
||||
|
||||
http.Fetch("https://raw.githubusercontent.com/JonnyBro/beatrun/main/version.txt", function(body, size, headers, code)
|
||||
if code == 200 then
|
||||
if not file.Exists("beatrun/version.txt", "DATA") then
|
||||
file.Write("beatrun/version.txt", body)
|
||||
end
|
||||
|
||||
if body ~= VERSIONGLOBAL then
|
||||
file.Write("beatrun/version.txt", body)
|
||||
else
|
||||
print("Latest version already")
|
||||
end
|
||||
else
|
||||
print("Error while checking version:\n" .. body)
|
||||
end
|
||||
end, function(e)
|
||||
print("Error while checking version:\n" .. e)
|
||||
end)
|
|
@ -1,11 +1,11 @@
|
|||
VERSIONGLOBAL = "v1.0.7"
|
||||
VERSIONGLOBAL = "1.0.8"
|
||||
|
||||
DeriveGamemode("sandbox")
|
||||
|
||||
GM.Name = "Beatrun"
|
||||
GM.Author = "who cares"
|
||||
GM.Email = "whocares@noone.com"
|
||||
GM.Website = "www.mirrorsedge.com xd"
|
||||
GM.Author = "N/A"
|
||||
GM.Email = "N/A"
|
||||
GM.Website = "github.com/JonnyBro/beatrun"
|
||||
|
||||
include("player_class/player_beatrun.lua")
|
||||
|
||||
|
|
1
version.txt
Normal file
1
version.txt
Normal file
|
@ -0,0 +1 @@
|
|||
1.0.8
|
Loading…
Reference in a new issue