Actually parse the colors

This commit is contained in:
Matyáš Caras 2021-12-16 10:12:00 +01:00 committed by GitHub
parent 0d13222ed7
commit 8955263a62
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,7 +24,7 @@ class Game:
'''
Used to print out the current prompt with the options
'''
print(self.nodes[self.current]["text"])
print(self.parse_colors(self.nodes[self.current]["text"]))
print("")
ostring = ""
if("actions" in self.nodes[self.current].keys()):
@ -55,6 +55,6 @@ def load(file_path):
g = Game(data)
return g
except Exception as e:
print("An exception has occured while loading the game from the YAML file:")
print(f"{Back.RED}{Fore.WHITE}An exception has occured while loading the game from the YAML file:{Fore.RESET}{Back.RESET}")
print(e)
return None
return None