added comments

This commit is contained in:
Chr1Z93 2023-04-16 23:19:51 +02:00
parent 1e641968a2
commit 4fe52a4856

View File

@ -1040,17 +1040,15 @@ function titleSplash(scenarioName)
end
---------------------------------------------------------
-- Update Notification related functionality
-- Update notification related functionality
---------------------------------------------------------
-- grabs the latest mod version and release notes from GitHub
-- this is called onLoad()
-- grabs the latest mod version and release notes from GitHub (called onLoad())
function getModVersion()
WebRequest.get(SOURCE_REPO .. '/modversion.json', compareVersion)
end
-- compares the modversion with GitHub and reports if a new version is available
-- this is called as callback_function from getModVersion()
-- compares the modversion with GitHub and possibly shows the update notification
function compareVersion(request)
if request.is_error then
log(request.error)
@ -1106,6 +1104,7 @@ end
-- close / don't show again buttons on the XML use this
function onClick_notification(_, parameter)
if parameter == "dontNotify" then
-- this variable tracks if "don't show again" was pressed for a version before
dontNotify[modMeta["latestVersion"]] = true
elseif parameter == "details" then
UI.show("releaseNotes")