encode correct color

This commit is contained in:
Fabian Dill 2021-06-06 23:44:04 +02:00
parent fc941f55ef
commit 353ea0fbbe
1 changed files with 1 additions and 1 deletions

View File

@ -253,7 +253,7 @@ class FactorioJSONtoTextParser(JSONtoTextParser):
for color in colors: for color in colors:
if color in {"red", "green", "blue", "orange", "yellow", "pink", "purple", "white", "black", "gray", if color in {"red", "green", "blue", "orange", "yellow", "pink", "purple", "white", "black", "gray",
"brown", "cyan", "acid"}: "brown", "cyan", "acid"}:
node["text"] = f"[color={node['color']}]{node['text']}[/color]" node["text"] = f"[color={color}]{node['text']}[/color]"
return self._handle_text(node) return self._handle_text(node)
elif color == "magenta": elif color == "magenta":
node["text"] = f"[color=pink]{node['text']}[/color]" node["text"] = f"[color=pink]{node['text']}[/color]"