Code cleanup and improvements.

This commit is contained in:
2026-09-03 21:52:06 +02:00
parent ea323e3ab0
commit ecdea827ac
20 changed files with 312 additions and 213 deletions

View File

@@ -199,8 +199,6 @@ def patch_change_colors(type_key: str) -> tuple[str, str]:
}.get(type_key.casefold(), ("#2a201c", "#d8aa61"))
def run_dashboard(paths: AppPaths) -> None:
try:
import tkinter as tk
@@ -677,19 +675,9 @@ def run_dashboard(paths: AppPaths) -> None:
responsive_layout_after: str | None = None
buttons = (
play_button,
update_button,
repair_button,
doctor_button,
settings_button,
import_button,
launcher_update_button,
)
game_mutation_buttons = (
update_button,
repair_button,
import_button,
launcher_update_button,
*action_widgets.operation_buttons,
)
game_mutation_buttons = action_widgets.mutation_buttons
def append_log(value: str) -> None:
nonlocal activity_log_lines
@@ -1050,11 +1038,11 @@ def run_dashboard(paths: AppPaths) -> None:
append_log(f"$ {' '.join(command)}")
def worker() -> None:
def publish_output(line: str) -> None:
def publish_output(output_line: str) -> None:
if game_client_id is None:
events.put(("output", line))
events.put(("output", output_line))
else:
events.put(("output", f"[Client {game_client_id}] {line}"))
events.put(("output", f"[Client {game_client_id}] {output_line}"))
if (
game_client_id is not None