This commit is contained in:
Matyáš Caras 2021-12-02 11:20:39 +01:00
parent d0cc24c193
commit 0d13222ed7
2 changed files with 2 additions and 2 deletions

View file

@ -10,7 +10,7 @@ game: # here goes all the game logic
- sit
wave:
description: "Wave" # this appears in the selection box, if no description is supplied
text: "You wave at the customers to signal your arrival. They all ignore you and look away."
text: "&bYou wave at the customers to signal your arrival. &rThey all ignore you and look away."
sit: # if no `actions` are supplied, the game exits
description: "Sit down"
text: "You quietly sit down and check the menu."

View file

@ -42,7 +42,7 @@ class Game:
'''
Used to convert color codes in string to colors from the colorama lib
'''
newText = text.replace("&b",Fore.CYAN).replace("\n",Fore.RESET + "\n") # replace color codes and newlines with colorama
newText = text.replace("&b",Fore.CYAN).replace("&c",Fore.RED).replace("&e", Fore.YELLOW).replace("&a",Fore.GREEN).replace("&9",Fore.BLUE).replace("&r",Fore.RESET).replace("&f",Fore.WHITE).replace("&5",Fore.MAGENTA).replace("\n",Fore.RESET + "\n") # replace color codes and newlines with colorama
newText += Fore.RESET # reset color at the end of the text
return newText