normalise config

This commit is contained in:
wish
2022-10-24 16:00:58 +11:00
parent 318cf6626c
commit 77ed0564ce
3 changed files with 81 additions and 82 deletions

View File

@@ -3,13 +3,13 @@
"BinPath": "bin", "BinPath": "bin",
"DisableSoftCrash": false, "DisableSoftCrash": false,
"FeaturedWeapons": 2, "FeaturedWeapons": 2,
"devmode": true, "DevMode": true,
"devmodeoptions": { "DevModeOptions": {
"EnableLauncherServer": false, "EnableLauncherServer": false,
"hideLoginNotice": false, "HideLoginNotice": false,
"loginNotice": "<BODY><CENTER><SIZE_3><C_4>Welcome to Erupe SU9.1 Beta!<BR><BODY><LEFT><SIZE_2><C_5>Erupe is experimental software<C_7>, we are not liable for any<BR><BODY>issues caused by installing the software!<BR><BODY><BR><BODY><C_4>■Report bugs on Discord!<C_7><BR><BODY><BR><BODY><C_4>■Test everything!<C_7><BR><BODY><BR><BODY><C_4>■Don't talk to softlocking NPCs!<C_7><BR><BODY><BR><BODY><C_4>■Fork the code on GitHub!<C_7><BR><BODY><BR><BODY>Thank you to all of the contributors,<BR><BODY><BR><BODY>this wouldn't exist without you.", "LoginNotice": "<BODY><CENTER><SIZE_3><C_4>Welcome to Erupe SU9.1 Beta!<BR><BODY><LEFT><SIZE_2><C_5>Erupe is experimental software<C_7>, we are not liable for any<BR><BODY>issues caused by installing the software!<BR><BODY><BR><BODY><C_4>■Report bugs on Discord!<C_7><BR><BODY><BR><BODY><C_4>■Test everything!<C_7><BR><BODY><BR><BODY><C_4>■Don't talk to softlocking NPCs!<C_7><BR><BODY><BR><BODY><C_4>■Fork the code on GitHub!<C_7><BR><BODY><BR><BODY>Thank you to all of the contributors,<BR><BODY><BR><BODY>this wouldn't exist without you.",
"cleandb": false, "CleanDB": false,
"maxlauncherhr": false, "MaxLauncherHR": false,
"LogInboundMessages": false, "LogInboundMessages": false,
"LogOutboundMessages": false, "LogOutboundMessages": false,
"MaxHexdumpLength": 256, "MaxHexdumpLength": 256,
@@ -26,88 +26,88 @@
"OutputDir": "savedata" "OutputDir": "savedata"
} }
}, },
"discord": { "Discord": {
"enabled": false, "Enabled": false,
"bottoken": "", "BotToken": "",
"realtimeChannelID": "" "RealtimeChannelID": ""
}, },
"Commands": [ "Commands": [
{ {
"name": "Rights", "Name": "Rights",
"enabled": true, "Enabled": true,
"prefix": "!rights" "Prefix": "!rights"
}, { }, {
"name": "Raviente", "Name": "Raviente",
"enabled": true, "Enabled": true,
"prefix": "!ravi" "Prefix": "!ravi"
}, { }, {
"name": "Teleport", "Name": "Teleport",
"enabled": false, "Enabled": false,
"prefix": "!tele" "Prefix": "!tele"
}, { }, {
"name": "Reload", "Name": "Reload",
"enabled": true, "Enabled": true,
"prefix": "!reload" "Prefix": "!reload"
}, { }, {
"name": "KeyQuest", "Name": "KeyQuest",
"enabled": false, "Enabled": false,
"prefix": "!kqf" "Prefix": "!kqf"
} }
], ],
"database": { "Database": {
"host": "localhost", "Host": "localhost",
"port": 5432, "Port": 5432,
"user": "postgres", "User": "postgres",
"password": "", "Password": "a",
"database": "erupe" "Database": "erupe"
}, },
"launcher": { "Launcher": {
"enabled": true, "Enabled": false,
"port": 80, "Port": 80,
"UseOriginalLauncherFiles": false "UseOriginalLauncherFiles": false
}, },
"sign": { "Sign": {
"enabled": true, "Enabled": true,
"port": 53312 "Port": 53312
}, },
"channel": { "Channel": {
"enabled": true "Enabled": true
}, },
"entrance": { "Entrance": {
"enabled": true, "Enabled": true,
"port": 53310, "Port": 53310,
"entries": [ "Entries": [
{ {
"name": "Newbie", "description": "", "ip": "", "type": 3, "recommended": 2, "allowedclientflags": 0, "Name": "Newbie", "Description": "", "IP": "", "Type": 3, "Recommended": 2, "AllowedClientFlags": 0,
"channels": [ "Channels": [
{ "port": 54001, "MaxPlayers": 100 }, { "Port": 54001, "MaxPlayers": 100 },
{ "port": 54002, "MaxPlayers": 100 } { "Port": 54002, "MaxPlayers": 100 }
] ]
}, { }, {
"name": "Normal", "description": "", "ip": "", "type": 1, "recommended": 0, "allowedclientflags": 0, "Name": "Normal", "Description": "", "IP": "", "Type": 1, "Recommended": 0, "AllowedClientFlags": 0,
"channels": [ "Channels": [
{ "port": 54003, "MaxPlayers": 100 }, { "Port": 54003, "MaxPlayers": 100 },
{ "port": 54004, "MaxPlayers": 100 } { "Port": 54004, "MaxPlayers": 100 }
] ]
}, { }, {
"name": "Cities", "description": "", "ip": "", "type": 2, "recommended": 0, "allowedclientflags": 0, "Name": "Cities", "Description": "", "IP": "", "Type": 2, "Recommended": 0, "AllowedClientFlags": 0,
"channels": [ "Channels": [
{ "port": 54005, "MaxPlayers": 100 } { "Port": 54005, "MaxPlayers": 100 }
] ]
}, { }, {
"name": "Tavern", "description": "", "ip": "", "type": 4, "recommended": 0, "allowedclientflags": 0, "Name": "Tavern", "Description": "", "IP": "", "Type": 4, "Recommended": 0, "AllowedClientFlags": 0,
"channels": [ "Channels": [
{ "port": 54006, "MaxPlayers": 100 } { "Port": 54006, "MaxPlayers": 100 }
] ]
}, { }, {
"name": "Return", "description": "", "ip": "", "type": 5, "recommended": 0, "allowedclientflags": 0, "Name": "Return", "Description": "", "IP": "", "Type": 5, "Recommended": 0, "AllowedClientFlags": 0,
"channels": [ "Channels": [
{ "port": 54007, "MaxPlayers": 100 } { "Port": 54007, "MaxPlayers": 100 }
] ]
}, { }, {
"name": "MezFes", "description": "", "ip": "", "type": 6, "recommended": 6, "allowedclientflags": 0, "Name": "MezFes", "Description": "", "IP": "", "Type": 6, "Recommended": 6, "AllowedClientFlags": 0,
"channels": [ "Channels": [
{ "port": 54008, "MaxPlayers": 100 } { "Port": 54008, "MaxPlayers": 100 }
] ]
} }
] ]

View File

@@ -30,23 +30,22 @@ type Config struct {
// DevModeOptions holds various debug/temporary options for use while developing Erupe. // DevModeOptions holds various debug/temporary options for use while developing Erupe.
type DevModeOptions struct { type DevModeOptions struct {
EnableLauncherServer bool // Enables the launcher server to be served on port 80 HideLoginNotice bool // Hide the Erupe notice on login
HideLoginNotice bool // Hide the Erupe notice on login LoginNotice string // MHFML string of the login notice displayed
LoginNotice string // MHFML string of the login notice displayed CleanDB bool // Automatically wipes the DB on server reset.
CleanDB bool // Automatically wipes the DB on server reset. MaxLauncherHR bool // Sets the HR returned in the launcher to HR7 so that you can join non-beginner worlds.
MaxLauncherHR bool // Sets the HR returned in the launcher to HR7 so that you can join non-beginner worlds. LogInboundMessages bool // Log all messages sent to the server
LogInboundMessages bool // Log all messages sent to the server LogOutboundMessages bool // Log all messages sent to the clients
LogOutboundMessages bool // Log all messages sent to the clients MaxHexdumpLength int // Maximum number of bytes printed when logs are enabled
MaxHexdumpLength int // Maximum number of bytes printed when logs are enabled DivaEvent int // Diva Defense event status
DivaEvent int // Diva Defense event status FestaEvent int // Hunter's Festa event status
FestaEvent int // Hunter's Festa event status TournamentEvent int // VS Tournament event status
TournamentEvent int // VS Tournament event status MezFesEvent bool // MezFes status
MezFesEvent bool // MezFes status MezFesAlt bool // Swaps out Volpakkun for Tokotoko
MezFesAlt bool // Swaps out Volpakkun for Tokotoko DisableTokenCheck bool // Disables checking login token exists in the DB (security risk!)
DisableTokenCheck bool // Disables checking login token exists in the DB (security risk!) DisableMailItems bool // Hack to prevent english versions of MHF from crashing
DisableMailItems bool // Hack to prevent english versions of MHF from crashing QuestDebugTools bool // Enable various quest debug logs
QuestDebugTools bool // Enable various quest debug logs SaveDumps SaveDumpOptions
SaveDumps SaveDumpOptions
} }
type SaveDumpOptions struct { type SaveDumpOptions struct {

View File

@@ -119,7 +119,7 @@ func main() {
// Launcher HTTP server. // Launcher HTTP server.
var launcherServer *launcherserver.Server var launcherServer *launcherserver.Server
if config.ErupeConfig.DevMode && config.ErupeConfig.DevModeOptions.EnableLauncherServer { if config.ErupeConfig.Launcher.Enabled {
launcherServer = launcherserver.NewServer( launcherServer = launcherserver.NewServer(
&launcherserver.Config{ &launcherserver.Config{
Logger: logger.Named("launcher"), Logger: logger.Named("launcher"),
@@ -235,7 +235,7 @@ func main() {
entranceServer.Shutdown() entranceServer.Shutdown()
} }
if config.ErupeConfig.DevModeOptions.EnableLauncherServer { if config.ErupeConfig.Launcher.Enabled {
launcherServer.Shutdown() launcherServer.Shutdown()
} }