This commit is contained in:
Gvidas Juknevičius 2024-08-18 03:36:52 +03:00
parent c32838af39
commit 09992e46e7
Signed by: MCorange
GPG Key ID: 12B1346D720B7FBB
3 changed files with 8 additions and 10 deletions

View File

@ -50,7 +50,7 @@ __BUNDLER_FILES["updater.lua"] = function ()
sleep(60) sleep(60)
os.reboot() os.reboot()
end end
file.write(Cast(basalt_code)) file.write(utils.Cast(basalt_code))
file.close() file.close()
utils.MonPrint("Rebooting...") utils.MonPrint("Rebooting...")
os.reboot() os.reboot()
@ -71,13 +71,14 @@ __BUNDLER_FILES["config.lua"] = function ()
end -- FILE END: config.lua -- end -- FILE END: config.lua --
__BUNDLER_FILES["ui.lua"] = function () __BUNDLER_FILES["ui.lua"] = function ()
local utils = require("utils.lua")
local basalt = require("basalt") local basalt = require("basalt")
local config = require("config.lua") local config = require("config.lua")
local updater = require("updater.lua") local updater = require("updater.lua")
--- @type Monitor --- @type Monitor
local monitor = Cast(peripheral.find("monitor")) local monitor = utils.Cast(peripheral.find("monitor"))
--- @type drive --- @type drive
local drive = Cast(peripheral.find("drive")) local drive = utils.Cast(peripheral.find("drive"))
--- @class Ui --- @class Ui
--- @field pin string --- @field pin string
--- @field main any --- @field main any
@ -137,11 +138,9 @@ __BUNDLER_FILES["ui.lua"] = function ()
main = basalt.addMonitor(monitor), main = basalt.addMonitor(monitor),
} }
ui.main:setMonitor(monitor) ui.main:setMonitor(monitor)
-- local pinLabel =
ui.pinLabel = ui.main:addLabel() ui.pinLabel = ui.main:addLabel()
:setText("") :setText("")
:setFontSize(1) :setFontSize(1)
-- local enterButton =
ui.enterButton = ui.main:addButton() ui.enterButton = ui.main:addButton()
:setText(">>>>") :setText(">>>>")
:setBackground(colors.blue) :setBackground(colors.blue)

View File

@ -1,10 +1,11 @@
local utils = require("utils.lua")
local basalt = require("basalt") local basalt = require("basalt")
local config = require("config.lua") local config = require("config.lua")
local updater = require("updater.lua") local updater = require("updater.lua")
--- @type Monitor --- @type Monitor
local monitor = Cast(peripheral.find("monitor")) local monitor = utils.Cast(peripheral.find("monitor"))
--- @type drive --- @type drive
local drive = Cast(peripheral.find("drive")) local drive = utils.Cast(peripheral.find("drive"))
--- @class Ui --- @class Ui
--- @field pin string --- @field pin string
@ -74,12 +75,10 @@ function InitUi()
} }
ui.main:setMonitor(monitor) ui.main:setMonitor(monitor)
-- local pinLabel =
ui.pinLabel = ui.main:addLabel() ui.pinLabel = ui.main:addLabel()
:setText("") :setText("")
:setFontSize(1) :setFontSize(1)
-- local enterButton =
ui.enterButton = ui.main:addButton() ui.enterButton = ui.main:addButton()
:setText(">>>>") :setText(">>>>")
:setBackground(colors.blue) :setBackground(colors.blue)

View File

@ -50,7 +50,7 @@ function GetBasalt()
os.reboot() os.reboot()
end end
file.write(Cast(basalt_code)) file.write(utils.Cast(basalt_code))
file.close() file.close()
utils.MonPrint("Rebooting...") utils.MonPrint("Rebooting...")