resolveNodeColors returns the fg/bg ANSI color codes for a node+symbol, applying per-symbol biome overrides before falling back to the biome default.
(node *mapNode, symbol rune)
| 958 | // resolveNodeColors returns the fg/bg ANSI color codes for a node+symbol, |
| 959 | // applying per-symbol biome overrides before falling back to the biome default. |
| 960 | func resolveNodeColors(node *mapNode, symbol rune) (fg, bg int) { |
| 961 | symStr := string(symbol) |
| 962 | if node.SymbolOverrides != nil { |
| 963 | if ov, ok := node.SymbolOverrides[symStr]; ok { |
| 964 | fg = ov.FGColor |
| 965 | bg = ov.BGColor |
| 966 | // Fill in biome default where override is zero |
| 967 | if fg == 0 { |
| 968 | fg = node.Color.FGColor |
| 969 | } |
| 970 | if bg == 0 { |
| 971 | bg = node.Color.BGColor |
| 972 | } |
| 973 | return fg, bg |
| 974 | } |
| 975 | } |
| 976 | return node.Color.FGColor, node.Color.BGColor |
| 977 | } |
| 978 | |
| 979 | // arrowForDelta returns the connector rune that best represents the direction |
| 980 | // from one room to another given the raw coordinate delta between them. |
no outgoing calls
no test coverage detected