We didnt start the fire
This commit is contained in:
31
src/main.lua
31
src/main.lua
@@ -1,20 +1,23 @@
|
||||
-- keycardOS "bootloader", has no access to basalt
|
||||
-- intended for checking for updates, and automatically updating basalt if it is missing
|
||||
local utils = require("utils.lua")
|
||||
local updater = require("updater.lua")
|
||||
local main = {}
|
||||
local updater = require("updater");
|
||||
|
||||
local MODULE_PATH = "keypadOS.lua";
|
||||
local MODULE_URL = "https://git.mcorangehq.xyz/xomf/keypadOS/raw/branch/keypad/keypadOS.lua";
|
||||
|
||||
KEYPADOS_VERSION = "4.0"
|
||||
|
||||
function main.Main()
|
||||
utils.MonReset(0.5)
|
||||
updater.GetBasalt()
|
||||
utils.MonPrint("keypadOS v" .. KEYPADOS_VERSION)
|
||||
utils.MonReset(1)
|
||||
require("ui.lua").InitUi()
|
||||
--- @param upd Updater
|
||||
local function updaterLoop(upd)
|
||||
while true do
|
||||
upd:checkAndUpdateAll();
|
||||
end
|
||||
end
|
||||
|
||||
local function _start()
|
||||
local upd = updater.new();
|
||||
upd:addEntry(MODULE_PATH, "keypad", MODULE_URL);
|
||||
|
||||
return main
|
||||
parallel.waitForAny(function() updaterLoop(upd) end, require(MODULE_PATH))
|
||||
end
|
||||
|
||||
local mod = {};
|
||||
mod.main = _start;
|
||||
return mod;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user