Add dev options to config

This commit is contained in:
Andrew Gutekanst
2020-02-22 22:40:11 -05:00
parent 1d8eec2280
commit 35f34d31db
4 changed files with 31 additions and 7 deletions

View File

@@ -9,9 +9,11 @@ import (
// Config holds the global server-wide config.
type Config struct {
HostIP string `mapstructure:"host_ip"`
HostIP string `mapstructure:"host_ip"`
BinPath string `mapstructure:"bin_path"`
DevMode bool
DevModeOptions DevModeOptions
Database Database
Launcher Launcher
Sign Sign
@@ -19,6 +21,12 @@ type Config struct {
Entrance Entrance
}
// DevModeOptions holds various debug/temporary options for use while developing Erupe.
type DevModeOptions struct {
CleanDB bool // Automatically wipes the DB on server reset.
MaxLauncherHR bool // Sets the HR returned in the launcher to HR9 so that you can join non-beginner worlds.
}
// Database holds the postgres database config.
type Database struct {
Host string
@@ -30,7 +38,7 @@ type Database struct {
// Launcher holds the launcher server config.
type Launcher struct {
Port int
Port int
UseOriginalLauncherFiles bool
}