diff options
| author | historia <[not public]> | 2026-06-16 01:59:27 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-06-16 01:59:27 -0400 |
| commit | 43f21aabae8924f35c12c8485e690aeefe0089fb (patch) | |
| tree | b5fbadb89df3cf4ffec86503bb8e2d7e52b27454 /internal/config/config.go | |
| parent | 4cc1ddcd185509080b4b3e15d1646567edd51c9d (diff) | |
| download | thehouseoficarus-43f21aabae8924f35c12c8485e690aeefe0089fb.tar.gz | |
feat: overhauled ansi color, added prompt options
Diffstat (limited to 'internal/config/config.go')
| -rw-r--r-- | internal/config/config.go | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/internal/config/config.go b/internal/config/config.go index 5c0a4b0..48f1a69 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -8,11 +8,39 @@ import ( type Config struct { Game GameConfig `yaml:"game"` + Colors ColorsConfig `yaml:"colors"` Telnet TelnetConfig `yaml:"telnet"` 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", + } +} + type GameConfig struct { TickLength int `yaml:"tick_length"` } @@ -39,6 +67,7 @@ func Default() *Config { Game: GameConfig{ TickLength: 600, }, + Colors: DefaultColors(), Telnet: TelnetConfig{ Enabled: true, Port: 4000, |
