Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed hyperlink format color to not conflict with critical logs #403

Merged
merged 1 commit into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/color_formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class CustomFormatter(logging.Formatter):
# Startup
24: white + "%(message)s" + reset,
# Hyperlink
50: hyperlink + "%(message)s" + reset,
25: hyperlink + "%(message)s" + reset,

# STT
27: blue + format_string + reset,
Expand Down
2 changes: 1 addition & 1 deletion src/game_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def end_conversation(self, input_json: dict[str, Any]) -> dict[str, Any]:
self.__talk = None

logging.log(24, '\nConversations not starting when you select an NPC? See here:')
logging.log(50, 'https://art-from-the-machine.github.io/Mantella/pages/issues_qna')
logging.log(25, 'https://art-from-the-machine.github.io/Mantella/pages/issues_qna')
logging.log(24, '\nWaiting for player to select an NPC...')
return {comm_consts.KEY_REPLYTYPE: comm_consts.KEY_REPLYTYPE_ENDCONVERSATION}

Expand Down
2 changes: 1 addition & 1 deletion src/http/http_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def start(self, port: int, routes: list[routeable], show_debug: bool = False):
route.add_route_to_server(self.__app)

logging.log(24, '\nConversations not starting when you select an NPC? See here:')
logging.log(50, 'https://art-from-the-machine.github.io/Mantella/pages/issues_qna')
logging.log(25, 'https://art-from-the-machine.github.io/Mantella/pages/issues_qna')
logging.log(24, '\nWaiting for player to select an NPC...')

uvicorn.run(self.__app, port=port)
4 changes: 2 additions & 2 deletions src/ui/start_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ async def favicon():

link = f'http://localhost:{str(self._config.port)}/ui?__theme=dark'
logging.log(24, f'\nMantella settings can be changed via this link:')
logging.log(50, link)
logging.log(25, link)
if self._config.auto_launch_ui == True:
if not webbrowser.open(link, new=2):
logging.warning('\nFailed to open Mantella settings UI automatically. To edit settings, see here:')
logging.log(50, link)
logging.log(25, link)

def __load_css(self):
with open('src/ui/style.css', 'r') as file:
Expand Down