Refactor turtle configuration loading to use dynamic base directory path

This commit is contained in:
MayaTheShy
2026-03-22 16:07:20 -04:00
parent 761127650f
commit 63e28d9126

View File

@@ -19,7 +19,10 @@ local CRAFT_SLOTS = {1, 2, 3, 5, 6, 7, 9, 10, 11}
-- Load config from file if present
-------------------------------------------------
local TURTLE_CONFIG_FILE = ".turtle_config"
local _baseDir = fs.getDir(shell.getRunningProgram())
local function _path(rel) return fs.combine(_baseDir, rel) end
local TURTLE_CONFIG_FILE = _path(".turtle_config")
local function loadConfig()
if not fs.exists(TURTLE_CONFIG_FILE) then return end