diff options
| author | historia <[not public]> | 2026-07-18 04:44:50 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-07-18 04:44:50 -0400 |
| commit | 2b5d8f595f96a2864899f4c7e28bc06fa52d2603 (patch) | |
| tree | f1539db865d9968414e59d9b250861c1b356d627 /internal/config/config.go | |
| parent | db8ca1fe26a36b78074a424ae657b2cbb9b3af19 (diff) | |
| download | thehouseoficarus-2b5d8f595f96a2864899f4c7e28bc06fa52d2603.tar.gz | |
feat: expose all colors in config.yaml for easier theming
Diffstat (limited to 'internal/config/config.go')
| -rw-r--r-- | internal/config/config.go | 73 |
1 files changed, 72 insertions, 1 deletions
diff --git a/internal/config/config.go b/internal/config/config.go index 755d43b..9510cb2 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -12,6 +12,7 @@ type Config struct { StartupValidation ValidationConfig `yaml:"startup_validation"` GameConstants GameConstants `yaml:"game_constants"` DefaultColors ColorsConfig `yaml:"default_colors"` + ConstantColors ColorsConfig `yaml:"constant_colors"` TLS TLSConfig `yaml:"tls"` Telnet TelnetConfig `yaml:"telnet"` TelnetTLS TelnetTLSConfig `yaml:"telnet_tls"` @@ -79,6 +80,75 @@ func DefaultColors() ColorsConfig { } } +// DefaultConstantColors returns the built-in specs for the colors that the +// engine renders conditionally and that players can never override (HP-bar +// tiers, level-difference bands, table-header chrome, status indicators, etc). +// Admins may override any of these via the constant_colors section of +// config.yaml; players have no access to them. +func DefaultConstantColors() ColorsConfig { + return ColorsConfig{ + // HP / status bars (cmd_score.go, render_combat.go). + "hp_bar_high": "6C", + "hp_bar_med": "B3", + "hp_bar_low": "A7", + "hp_bar_empty": "ED dim", + + // Task worksite progress bar (sys_labor.go) — same tiering rules + // as the HP bar but a different low-color so labor tasks read + // green/yellow/orange rather than green/yellow/red. It reuses + // hp_bar_empty for the empty/unfilled cells. + "task_bar_high": "6C", + "task_bar_med": "B3", + "task_bar_low": "43", + + // Score-panel other bars and tech/buff indicators (cmd_score.go). + "battery_bar": "6E", + "run_energy_bar": "6C", + "active_tech_on": "6C", + "active_tech_status": "6C", + "active_tech_stat": "6E", + "score_max_value": "FA", + + // Skill-level tier color on the score panel (cmd_score.go). + "skill_lvl_max": "B4", + "skill_lvl_high": "B3", + "skill_lvl_mid": "74", + "skill_lvl_low": "49", + "skill_lvl_base": "42", + + // Level-difference band on mobs/players (render_color.go). + "level_diff_equal": "FA", + "level_diff_up_small": "B3", + "level_diff_up_big": "A7", + "level_diff_down_small": "6E", + "level_diff_down_big": "41", + + // Tech list status / name styling (cmd_tech.go). + "tech_status_on": "6C", + "tech_status_off": "F0", + "tech_status_locked": "A7", + "tech_name_unlocked": "49", + "tech_name_locked": "F0", + + // Shared table-heading chrome (cmd_skills.go, cmd_mods.go, + // cmd_option.go, cmd_aps.go). + "table_header_label": "49", + "table_header_value": "FA", + "table_header_detail": "F5", + "table_header_xp": "B3", + "table_header_desc": "FF", + + // APS / look inline accents. + "aps_here": "6C", + "mob_hp_inline": "A7", + "protected_label": "FA", + "god_tag_label": "bold", + + // Production menu degraded/locked rows (production_menu.go). + "production_locked": "F0", + } +} + type ValidationConfig struct { RootRooms []int `yaml:"root_rooms"` IgnoreUnreachable []int `yaml:"ignore_unreachable"` @@ -130,7 +200,8 @@ func Default() *Config { GameConstants: GameConstants{ ShopDefaultRestock: 1000, }, - DefaultColors: DefaultColors(), + DefaultColors: DefaultColors(), + ConstantColors: DefaultConstantColors(), TLS: TLSConfig{ CertFile: "", KeyFile: "", |
