From 93043bdd18c63d0561ca8a87a6411639c36526cf Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Thu, 25 May 2023 19:23:35 +0200 Subject: [PATCH] Test WinR --- python/src/xiv_csolver/modules/printer.py | 12 ++++++------ python/src/xiv_csolver/modules/solver.py | 10 +++++----- python/src/xiv_csolver/modules/translator.py | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/python/src/xiv_csolver/modules/printer.py b/python/src/xiv_csolver/modules/printer.py index 0db5795..ee9cfd8 100644 --- a/python/src/xiv_csolver/modules/printer.py +++ b/python/src/xiv_csolver/modules/printer.py @@ -33,18 +33,18 @@ class Printer: } def save_users(self, user_name: str = None, user_stats: list = None) -> dict: - output = self.help_text_dict['users'] + '\n\n' + output = self.help_text_dict['users'] + '\r\n\r\n' if user_name.title() == '': for user, stats in self.full_config.get_users_dict().items(): if user != ' ': - output += f'{user}: [{stats[0]}, {stats[1]}, {stats[2]}]\n' + output += f'{user}: [{stats[0]}, {stats[1]}, {stats[2]}]\r\n' else: self.full_config.get_users_dict()[user_name] = user_stats for user, stats in self.full_config.get_users_dict().items(): if user != ' ': - output += f'{user}: [{stats[0]}, {stats[1]}, {stats[2]}]\n' + output += f'{user}: [{stats[0]}, {stats[1]}, {stats[2]}]\r\n' self.print_users(output) return self.full_config.get_users_dict() @@ -55,18 +55,18 @@ class Printer: return True def save_recipe(self, recipe_name: str = None, recipe_basic_stats: list = None, recipe_advanced_stats: list = None) -> dict: - output = self.help_text_dict['recipe'] + '\n\n' + output = self.help_text_dict['recipe'] + '\r\n\r\n' if recipe_name.title() == '': for recipe, stats in self.full_config.get_recipes_dict().items(): if recipe != ' ': - output += f'{recipe}: [{stats[0]}, {stats[1]}, {stats[2]}, {stats[3]}, {stats[4]}, {stats[5]}, {stats[6]}]\n' + output += f'{recipe}: [{stats[0]}, {stats[1]}, {stats[2]}, {stats[3]}, {stats[4]}, {stats[5]}, {stats[6]}]\r\n' else: self.full_config.get_recipes_dict()[recipe_name] = recipe_basic_stats[:-1] + recipe_advanced_stats for recipe, stats in self.full_config.get_recipes_dict().items(): if recipe != ' ': - output += f'{recipe}: [{stats[0]}, {stats[1]}, {stats[2]}, {stats[3]}, {stats[4]}, {stats[5]}, {stats[6]}]\n' + output += f'{recipe}: [{stats[0]}, {stats[1]}, {stats[2]}, {stats[3]}, {stats[4]}, {stats[5]}, {stats[6]}]\r\n' self.print_recipe(output) return self.full_config.get_recipes_dict() diff --git a/python/src/xiv_csolver/modules/solver.py b/python/src/xiv_csolver/modules/solver.py index 31c9d67..347bca6 100644 --- a/python/src/xiv_csolver/modules/solver.py +++ b/python/src/xiv_csolver/modules/solver.py @@ -50,7 +50,7 @@ Remaining CP: {self.remaining_cp}""" saved_lines.append(line) for line in saved_lines: - justified_text += line + '\n' + justified_text += line + '\r\n' return justified_text[:-1] @@ -82,11 +82,11 @@ Remaining CP: {self.remaining_cp}""" for line in saved_lines: count += 1 if count < 16: - self.macro1 += line + '\n' + self.macro1 += line + '\r\n' elif 15 < count < 31: - self.macro2 += line + '\n' + self.macro2 += line + '\r\n' elif 30 < count < 46: - self.macro3 += line + '\n' + self.macro3 += line + '\r\n' self.macro1 = self.macro1[:-1] self.macro2 = self.macro2[:-1] @@ -155,7 +155,7 @@ class Solver: break if not done: - self.loggers.add_log('Could not find a rotation for a 50% Safe Margin.\n' + self.loggers.add_log('Could not find a rotation for a 50% Safe Margin.\r\n' ' Defaulting to Best Quality.') self.safe_50 = self.best_quality diff --git a/python/src/xiv_csolver/modules/translator.py b/python/src/xiv_csolver/modules/translator.py index 4897cf9..29c28f9 100644 --- a/python/src/xiv_csolver/modules/translator.py +++ b/python/src/xiv_csolver/modules/translator.py @@ -48,7 +48,7 @@ def translate_list(actions: list, lang: str): output.append(dictionary[action]) except KeyError: output.append(supported_languages["en"][action]) - loggers.log('Translation not found. Defaulting to English.\n' + loggers.log('Translation not found. Defaulting to English.\r\n' ' Macros will probably be broken because of this.') else: