:3333333 extra config stuff
This commit is contained in:
@@ -1,3 +1,27 @@
|
||||
return {
|
||||
correctPin = "42169"
|
||||
local config = {
|
||||
correctPin = "42169",
|
||||
release_url = "https://git.mcorangehq.xyz/xomf/keypadOS/raw/branch/main/keypadOS.lua",
|
||||
basalt_url = "https://raw.githubusercontent.com/Pyroxenium/Basalt/master/docs/versions/latest.lua",
|
||||
config_path = "keypadOS.config.lua"
|
||||
}
|
||||
|
||||
local DEFAULT_CONFIG = "return {\n" ..
|
||||
" group=\"default\",\n" ..
|
||||
"}\n"
|
||||
|
||||
--- @class Config
|
||||
--- @field group string
|
||||
|
||||
--- Read current configs, create if doesnt exist
|
||||
---@return Config
|
||||
function config.ReadConfig()
|
||||
if not fs.exists(config.config_path) then
|
||||
local f = fs.open(config.config_path, "w")
|
||||
f.write(DEFAULT_CONFIG)
|
||||
f.close();
|
||||
end
|
||||
local cfg = require(config.config_path)
|
||||
return cfg
|
||||
end
|
||||
|
||||
return config
|
||||
|
||||
Reference in New Issue
Block a user