fix(hint): restart hint after switching helper in duo games
public
fix(hint): restart hint after switching helper in duo games Reset applied to Maia games only. Keep a shown threat when the hint is reset. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| Changeset | eb6ed136b458a23b8e7edb590dd326c8dd08443b |
|---|---|
| Author (claimed) | Timo Stolz <timo.stolz@nullachtvierzehn.de>, |
| Parents | 6bed763d4d38 |
| Children | 68af982b6fa0 |
| Pushlog | by timo via ssh by timo via ssh |
modified schach/app.py +5 −2
| @@ -1425,8 +1425,11 @@ class Window(OnlineMixin, PuzzleMixin, O | ||
| 1425 | 1425 | self._refresh_chrome() |
| 1426 | 1426 | if key == "hint_helper": |
| 1427 | 1427 | self._action("hint-helper").set_state(GLib.Variant.new_string(value)) |
| 1428 | - if self.mode == "maia" and self._human_to_move(): | |
| 1429 | - self._changed() # Hinweis mit dem neuen Helfer neu vorbereiten | |
| 1428 | + if self.mode in ("maia", "duo") and self._human_to_move(): | |
| 1429 | + # Hinweis mit dem neuen Helfer von vorn; eine gezeigte Drohung bleibt stehen | |
| 1430 | + threat = (self.threat_move, self.threat_level) | |
| 1431 | + self._changed() | |
| 1432 | + self.threat_move, self.threat_level = threat | |
| 1430 | 1433 | self._refresh() |
| 1431 | 1434 | else: |
| 1432 | 1435 | self._refresh_chrome() |