diff options
Diffstat (limited to 'internal/config')
| -rw-r--r-- | internal/config/config.go | 69 |
1 files changed, 44 insertions, 25 deletions
diff --git a/internal/config/config.go b/internal/config/config.go index 48f1a69..d2065d2 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -7,37 +7,45 @@ import ( ) type Config struct { - Game GameConfig `yaml:"game"` - Colors ColorsConfig `yaml:"colors"` - Telnet TelnetConfig `yaml:"telnet"` - HTTP HTTPConfig `yaml:"http"` - HTTPS HTTPSConfig `yaml:"https"` + Game GameConfig `yaml:"game"` + Colors ColorsConfig `yaml:"colors"` + Telnet TelnetConfig `yaml:"telnet"` + TelnetTLS TelnetTLSConfig `yaml:"telnet_tls"` + HTTP HTTPConfig `yaml:"http"` + HTTPS HTTPSConfig `yaml:"https"` } type ColorsConfig map[string]string func DefaultColors() ColorsConfig { return ColorsConfig{ - "room_name": "fg=cyan bold", - "room_number": "dim", - "room_desc": "fg=white", - "direction": "fg=cyan", - "exit_direction": "fg=cyan", - "exit_name": "fg=green", - "mob_name": "fg=bright_red", - "friendly_npc": "fg=green", - "hostile_npc": "fg=bright_red", - "damage": "fg=red", - "enemy_hp": "fg=red", - "character_hp": "fg=green", - "xp": "fg=yellow", - "level_up": "fg=bright_yellow bold", - "item": "fg=green", - "player_name": "fg=bright_white", - "death": "fg=red bold", - "victory": "fg=green", - "miss": "dim", - "error": "fg=red", + "room_name": "81 bold", + "room_number": "240", + "room_desc": "252", + "direction": "75", + "exit_direction": "75", + "exit_name": "114", + "mob_name": "203", + "friendly_npc": "120", + "hostile_npc": "203", + "damage": "196", + "enemy_hp": "167", + "character_hp": "84", + "xp": "222", + "level_up": "226 bold", + "item": "223", + "player_name": "189", + "death": "196 bold", + "victory": "83", + "miss": "243", + "error": "209", + "say": "230", + "dialog": "117", + "broadcast": "215", + "fire": "208", + "eat_food": "156", + "drop_message": "186", + "credits_pickup": "220", } } @@ -50,6 +58,13 @@ type TelnetConfig struct { Port int `yaml:"port"` } +type TelnetTLSConfig struct { + Enabled bool `yaml:"enabled"` + Port int `yaml:"port"` + CertFile string `yaml:"cert_file"` + KeyFile string `yaml:"key_file"` +} + type HTTPConfig struct { Enabled bool `yaml:"enabled"` Port int `yaml:"port"` @@ -72,6 +87,10 @@ func Default() *Config { Enabled: true, Port: 4000, }, + TelnetTLS: TelnetTLSConfig{ + Enabled: false, + Port: 4001, + }, HTTP: HTTPConfig{ Enabled: false, Port: 8080, |
