Skip to content

Commit

Permalink
pause game default dialogs«
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Dec 18, 2024
1 parent b641df9 commit 127a0bf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions ovos_workshop/locale/en/game_pause.dialog
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
game paused
2 changes: 2 additions & 0 deletions ovos_workshop/locale/en/game_unpause.dialog
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
unpausing game
resuming game
8 changes: 6 additions & 2 deletions ovos_workshop/skills/game_skill.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,19 @@ def on_load_game(self):

def on_pause_game(self):
"""called by ocp_pipeline on 'pause' if game is being played"""
# TODO - default dialog/sound
self._paused.set()
self.acknowledge()
# individual skills can change default value if desired
if self.settings.get("pause_dialog", False):
self.speak_dialog("game_pause")

def on_resume_game(self):
"""called by ocp_pipeline on 'resume/unpause' if game is being played and paused"""
# TODO - default dialog/sound
self._paused.clear()
self.acknowledge()
# individual skills can change default value if desired
if self.settings.get("pause_dialog", False):
self.speak_dialog("game_unpause")

@abc.abstractmethod
def on_play_game(self):
Expand Down

0 comments on commit 127a0bf

Please sign in to comment.