From b358b27c8b77bebd3596429a60caa6d1e38d5613 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Mon, 30 Sep 2024 19:03:31 +0200 Subject: [PATCH] Added ability to specify a download repo version for a mod version --- src/core/Global.ttslua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/core/Global.ttslua b/src/core/Global.ttslua index ef9e0b83..e8e3493c 100644 --- a/src/core/Global.ttslua +++ b/src/core/Global.ttslua @@ -1928,6 +1928,15 @@ function compareVersion(request) -- global variable to make it accessible for other functions modMeta = JSON.decode(request.text) + -- maybe update SOURCE_REPO to specific version + if modMeta["setSpecificDownloadVersion"] then + local versionTable = modMeta["setSpecificDownloadVersion"][1] + if versionTable[MOD_VERSION] then + SOURCE_REPO = "https://github.com/Chr1Z93/SCED-downloads/releases/download/" .. versionTable[MOD_VERSION] .. "/" + log("Using download repo version: " .. versionTable[MOD_VERSION]) + end + end + -- stop here if on latest or newer version if convertVersionToNumber(MOD_VERSION) >= convertVersionToNumber(modMeta["latestVersion"]) then return end