diff --git a/lib/game.py b/lib/game.py index 626c86d..0d8fdc2 100644 --- a/lib/game.py +++ b/lib/game.py @@ -61,7 +61,7 @@ class Game: # the game class keeps information about the loaded game exit() def settings_menu(self): # displays the settings menu - print("Settings") + print("Options") print("") print("1 - Language") print("0 - Back") @@ -85,6 +85,7 @@ class Game: # the game class keeps information about the loaded game self.main_menu() def make_selection(self, length=0) -> int: # this method makes sure a valid selection is made and returns the selection as a number + # TODO: replace with selection by keyboard(?) l = length # sets the length if(l == 0): # if no length was set, we get it from nodes l = len(self.nodes[self.current]["actions"])-1 diff --git a/lib/lang/cz.yml b/lib/lang/cz.yml index 2b55f13..b85e465 100644 --- a/lib/lang/cz.yml +++ b/lib/lang/cz.yml @@ -1 +1,19 @@ -TODO: "todo" \ No newline at end of file +yaml_unspecified: 'Musíte specifikovat YAML soubor' +game_by: 'Vytvořil $author' +start: 'Start' +options: 'Nastavení' +quit: 'Vypnout' +quitting: 'Vypínám' +continue: 'Pokračovat' +new_game: 'Nová hra' + +lang: 'Jazyk' +back: 'Zpět' +lang_en: 'Angličtina' +lang_cz: 'Čeština' + +selection: 'Vyberte zadáním čísla:' +not_number: 'Nezadali jste číslo' +invalid: 'Neplatný výběr' + +error_loading: 'Při načítání YAML souboru nastala chyba:' \ No newline at end of file diff --git a/lib/lang/en.yml b/lib/lang/en.yml index 2b55f13..d73318d 100644 --- a/lib/lang/en.yml +++ b/lib/lang/en.yml @@ -1 +1,19 @@ -TODO: "todo" \ No newline at end of file +yaml_unspecified: 'You need to specify a path to a YAML file' +game_by: 'A game by $author' +start: 'Start' +options: 'Options' +quit: 'Quit' +quitting: 'Quitting' +continue: 'Continue' +new_game: 'New game' + +lang: 'Language' +back: 'Back' +lang_en: 'English' +lang_cz: 'Czech' + +selection: 'Make a selection (number):' +not_number: 'Not a number selection' +invalid: 'Invalid selection' + +error_loading: 'An exception has occured while loading the game from the YAML file:' \ No newline at end of file diff --git a/lib/save.py b/lib/save.py index 2732a32..2347209 100644 --- a/lib/save.py +++ b/lib/save.py @@ -3,10 +3,10 @@ import yaml class SaveManager: # manages save and configuration files def __init__(self): - self.id = "" - self.currentPrompt = "" - self.lang = "" - self.inventory = [] + self.id = "" # game ID + self.currentPrompt = "" # Current prompt + self.lang = "" # Selected language + self.inventory = [] # Items in inventory def load(self): if(path.exists(f"./saves/{self.id}.yml")):