diff --git a/numnastics b/numnastics index 5e710ea..5f80dfb 100755 --- a/numnastics +++ b/numnastics @@ -48,9 +48,11 @@ def game(mode): i = -1 sounds['error'].play() endTime = round(time.time() - startTime, 2) - message = [ - "Congratulations! You beat Numnastics in " + str(tries) + " tries.",\ - "Your time was " + str(int(endTime / 60)) + "minutes and " + str(round(endTime % 60, 2)) + " seconds."] + message = ["Congratulations! You beat Numnastics in " + str(tries) + " tries."] + if int(endTime / 60) == 1: + message.append("Your time was " + str(int(endTime / 60)) + " minute and " + str(round(endTime % 60, 2)) + " seconds.") + else: + message.append("Your time was " + str(int(endTime / 60)) + " minutes and " + str(round(endTime % 60, 2)) + " seconds.") display_message(message) sounds['win'].play() time.sleep(sounds['win'].get_length()) diff --git a/storm_games.py b/storm_games.py index 9392e3b..7354705 100755 --- a/storm_games.py +++ b/storm_games.py @@ -27,6 +27,13 @@ def write_config(writeGlobal = False): with open(globalPath, 'w') as configfile: globalConfig.write(configfile) +def read_config(section, value, readGlobal = False): + if readGlobal == False: + with open(gamePath, 'r') as configfile: + return localConfig.read(section, value) + else: + return globalConfig.read(section, value) + def speak(text, interupt = True): if interupt == True: spd.cancel() spd.say(text) @@ -151,7 +158,6 @@ def game_menu(*options): event = pygame.event.clear() time.sleep(0.001) -def donate(*mode): - subprocess.call(["xdg-open", "https://liberapay.com/stormdragon2976/donate"]) +def donate(): pygame.mixer.music.pause() - mode = "menu" + subprocess.call(["xdg-open", "https://liberapay.com/stormdragon2976/donate"])