Skip to content

Commit d525511

Browse files
authored
Merge pull request #7 from modestimpala/3.0.0
3.0.0
2 parents 11dda24 + b31547e commit d525511

18 files changed

+690
-336
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,8 @@ VotV/Binaries/Win64/pyChaosMod/ChaosBot.exe
2727
VotV/Binaries/Win64/pyChaosMod/updater.log
2828
VotV/Binaries/Win64/pyChaosMod/src/dataclass/__pycache__/*.pyc
2929
VotV/Binaries/Win64/pyChaosMod/src/utils/__pycache__/*.pyc
30+
VotV/Binaries/Win64/pyChaosMod/download_log.txt
31+
VotV/Binaries/Win64/pyChaosMod/ChaosBot_Updater.exe
32+
VotV/Binaries/Win64/pyChaosMod/myvenv/*
33+
/.idea/*
34+
.vscode/launch.json

VotV/Binaries/Win64/Mods/ChaosMod/Scripts/main.lua

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -550,30 +550,16 @@ function launchChaosBot()
550550

551551
local exePath = base_path .. "ChaosBot.exe"
552552
local scriptPath = base_path .. "ChaosBot.py"
553-
local versionPath = base_path .. "ChaosBot_version.txt"
553+
local updaterFile = base_path .. "ChaosBot_Updater.exe"
554554

555555
-- Check if executable exists
556556
local exeFile = io.open(exePath, "r")
557557
if exeFile then
558558
exeFile:close()
559-
-- Check version
560-
local versionFile = io.open(versionPath, "r")
561-
if versionFile then
562-
local version = versionFile:read("*all")
563-
versionFile:close()
564-
print("[ChaosMod] ChaosBot version: " .. version)
565-
566-
if version == ChaosBotVersion then
567-
print("[ChaosMod] ChaosBot is up to date")
568-
else
569-
print("[ChaosMod] ChaosBot is outdated. Updating...")
570-
beginDownload(base_path, exePath)
571-
return
572-
end
573-
else
574-
print("[ChaosMod] ChaosBot version file not found. Updating...")
559+
-- Check if updater exists
560+
if not io.open(updaterFile, "r") then
561+
print("[ChaosMod] Updater not found. Downloading executable...")
575562
beginDownload(base_path, exePath)
576-
return
577563
end
578564

579565
-- Launch executable

0 commit comments

Comments
 (0)