Added default config if config.yml is missing
Default config: server: serverFolder: "factorio" worldFile: "factorio/saves/newworld.zip" serverSettings: "factorio/data/server-settings.json" serverExec: "factorio/bin/x64/factorio" port: 34197 factoryman: screen: True screenName: "Factorio" backupDir: "factorio/backups" username: "" apitoken: ""
This commit is contained in:
18
structs.go
18
structs.go
@@ -19,6 +19,24 @@ type UsrConfig struct {
|
||||
} `yaml:"factoryman"`
|
||||
}
|
||||
|
||||
type DefConfig struct {
|
||||
Server struct { // server specific settings
|
||||
ServDir string
|
||||
WorldFile string
|
||||
ServCfg string
|
||||
ServExec string
|
||||
ServPort int
|
||||
}
|
||||
|
||||
Factoryman struct { // factoryman settings
|
||||
BackupDir string
|
||||
UseScreen bool
|
||||
ScreenName string
|
||||
UserName string
|
||||
ApiToken string
|
||||
}
|
||||
}
|
||||
|
||||
// JSON file from config
|
||||
type Mod struct {
|
||||
Name string `json:"name"`
|
||||
|
||||
Reference in New Issue
Block a user