congif from .cell/cell.toml
Some checks failed
Build and Deploy / build-macos (push) Failing after 10s
Build and Deploy / build-windows (CLANG64) (push) Has been cancelled
Build and Deploy / package-dist (push) Has been cancelled
Build and Deploy / deploy-itch (push) Has been cancelled
Build and Deploy / deploy-gitea (push) Has been cancelled
Build and Deploy / build-linux (push) Has been cancelled
Some checks failed
Build and Deploy / build-macos (push) Failing after 10s
Build and Deploy / build-windows (CLANG64) (push) Has been cancelled
Build and Deploy / package-dist (push) Has been cancelled
Build and Deploy / deploy-itch (push) Has been cancelled
Build and Deploy / deploy-gitea (push) Has been cancelled
Build and Deploy / build-linux (push) Has been cancelled
This commit is contained in:
7
.cell/cell.toml
Normal file
7
.cell/cell.toml
Normal file
@@ -0,0 +1,7 @@
|
||||
# Cell configuration
|
||||
|
||||
# ENet service interval in seconds
|
||||
ENETSERVICE = 0.05
|
||||
|
||||
# Reply timeout in seconds
|
||||
REPLYTIMEOUT = 30
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -20,4 +20,4 @@ icon.ico
|
||||
steam/
|
||||
subprojects/*/
|
||||
build_dbg/
|
||||
.cell
|
||||
modules/
|
||||
|
||||
@@ -232,6 +232,27 @@ globalThis.use = function use(file, ...args) {
|
||||
return ret
|
||||
}
|
||||
|
||||
var configPath = '.cell/cell.toml'
|
||||
if (io.exists(configPath)) {
|
||||
try {
|
||||
var toml = use('toml')
|
||||
var configText = io.slurp(configPath)
|
||||
var config = toml.decode(configText)
|
||||
|
||||
// Override defaults with config values
|
||||
if (config.ENETSERVICE !== undefined) {
|
||||
ENETSERVICE = config.ENETSERVICE
|
||||
log.system(`Loaded ENETSERVICE from config: ${ENETSERVICE}`)
|
||||
}
|
||||
if (config.REPLYTIMEOUT !== undefined) {
|
||||
REPLYTIMEOUT = config.REPLYTIMEOUT
|
||||
log.system(`Loaded REPLYTIMEOUT from config: ${REPLYTIMEOUT}`)
|
||||
}
|
||||
} catch (err) {
|
||||
log.error(`Failed to load config from ${configPath}: ${err}`)
|
||||
}
|
||||
}
|
||||
|
||||
globalThis.json = use('json')
|
||||
var time = use('time')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user