Made mainDir path relative to main file

This commit is contained in:
LDDestroier 2019-03-13 00:17:55 -04:00 committed by GitHub
parent e58d3515d1
commit ea8bbd18fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -1,7 +1,11 @@
local scr_x, scr_y = term.getSize()
local keysDown, miceDown = {}, {}
local config = {mainDir = "ccbn-data"}
local useAbsoluteMainDir = false
local config = {
mainDir = useAbsoluteMainDir and "ccbn-data" or fs.combine(fs.getDir(shell.getRunningProgram()), "ccbn-data")
}
config.chipDir = fs.combine(config.mainDir, "chipdata")
config.objectDir = fs.combine(config.mainDir, "objectdata")