Skip to content

EnableModUpdateChecker v0.9

Choose a tag to compare

@Vermintide-Analytics Vermintide-Analytics released this 05 Nov 04:52
· 4 commits to master since this release

Include the ability for mods to manually check for updates later on.

  • Set up a callback by calling mod.register_MUC_callback(func)
  • Manually check for updates by calling mod.MUC_check_for_update(). This will make the curl request and invoke any registered callbacks when done. The callbacks are given a boolean parameter, representing whether or not the current version is up to date.

Example usage:

mod.on_all_mods_loaded = function()
    mod.register_MUC_callback(function(up_to_date)
        if up_to_date then
            mod:echo("You have the latest version of mod")
        else
            mod:echo("There is a more recent version of mod")
        end
    end
end

mod:command("checkformodupdate", "Check to see if there is a more recent version of mod", function()
    mod.MUC_check_for_update()
end)