diff --git a/requirements.txt b/requirements.txt index 9c5d27c..f5f1638 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,60 +1,63 @@ -altgraph==0.17.3 +altgraph==0.17.4 async-generator==1.10 -attrs==22.2.0 -beautifulsoup4==4.11.2 -blinker==1.6.2 -certifi>=2024.07.04 -cffi==1.15.1 -charset-normalizer==3.0.1 -click==8.1.3 +attrs==24.3.0 +beautifulsoup4==4.12.3 +blinker==1.9.0 +certifi==2024.12.14 +cffi==1.17.1 +charset-normalizer==3.4.0 +click==8.1.7 colorama==0.4.6 -contourpy==1.0.7 -cycler==0.11.0 -exceptiongroup==1.1.0 -Flask==3.0.3 -fonttools==4.51.0 +contourpy==1.3.1 +cycler==0.12.1 +exceptiongroup==1.2.2 +Flask==3.1.0 +fonttools==4.55.3 h11==0.14.0 -idna==3.7 -itsdangerous==2.1.2 +idna==3.10 +itsdangerous==2.2.0 Jinja2==3.1.4 -kiwisolver==1.4.4 -loguru==0.6.0 -lxml==4.9.2 -MarkupSafe==2.1.2 -matplotlib==3.7.0 -msgpack==1.0.4 -numpy==1.24.2 -outcome==1.2.0 -packaging==23.0 -pathvalidate==3.0.0 +kiwisolver==1.4.7 +loguru==0.7.3 +lxml==5.3.0 +MarkupSafe==3.0.2 +matplotlib==3.10.0 +msgpack==1.1.0 +numpy==2.2.0 +outcome==1.3.0.post0 +packaging==24.2 +pathvalidate==3.2.1 pefile==2023.2.7 -pillow==10.3.0 -protobuf==4.22.1 -psutil==5.9.5 -pycparser==2.21 -pyinstaller==5.13.2 -pyinstaller-hooks-contrib==2023.0 -pyinstaller-versionfile==2.1.1 -pyparsing==3.0.9 +pillow==11.0.0 +protobuf==5.29.2 +psutil==6.1.1 +pycparser==2.22 +pyinstaller==6.11.1 +pyinstaller-hooks-contrib==2024.10 +pyinstaller_versionfile==3.0.0 +pyparsing==3.2.0 pypresence==4.3.0 -PyQt5==5.15.9 +PyQt5==5.15.11 PyQt5-Qt5==5.15.2 -PyQt5-sip==12.11.1 +PyQt5_sip==12.16.1 PySocks==1.7.1 -pystray==0.19.4 -python-dateutil==2.8.2 -pywin32==306 -pywin32-ctypes==0.2.2 -PyYAML==6.0 -requests==2.32.1 -selenium==4.15.2 -six==1.16.0 -sniffio==1.3.0 +pystray==0.19.5 +python-dateutil==2.9.0.post0 +pywin32==308 +pywin32-ctypes==0.2.3 +PyYAML==6.0.2 +requests==2.32.3 +selenium==4.27.1 +setuptools==75.6.0 +six==1.17.0 +sniffio==1.3.1 sortedcontainers==2.4.0 -soupsieve==2.4 -trio==0.22.0 -trio-websocket==0.9.2 -urllib3>=1.26.19 -Werkzeug==3.0.3 -win32-setctime==1.1.0 +soupsieve==2.6 +trio==0.27.0 +trio-websocket==0.11.1 +typing_extensions==4.12.2 +urllib3==2.2.3 +websocket-client==1.8.0 +Werkzeug==3.1.3 +win32_setctime==1.2.0 wsproto==1.2.0 diff --git a/umalauncher/_assets/rmu/101.png b/umalauncher/_assets/rmu/101.png new file mode 100644 index 0000000..da856d4 Binary files /dev/null and b/umalauncher/_assets/rmu/101.png differ diff --git a/umalauncher/_assets/rmu/102.png b/umalauncher/_assets/rmu/102.png new file mode 100644 index 0000000..4c6b6b5 Binary files /dev/null and b/umalauncher/_assets/rmu/102.png differ diff --git a/umalauncher/_assets/rmu/103.png b/umalauncher/_assets/rmu/103.png new file mode 100644 index 0000000..32b0c4e Binary files /dev/null and b/umalauncher/_assets/rmu/103.png differ diff --git a/umalauncher/_assets/rmu/105.png b/umalauncher/_assets/rmu/105.png new file mode 100644 index 0000000..1bffe59 Binary files /dev/null and b/umalauncher/_assets/rmu/105.png differ diff --git a/umalauncher/_assets/rmu/106.png b/umalauncher/_assets/rmu/106.png new file mode 100644 index 0000000..9d431b4 Binary files /dev/null and b/umalauncher/_assets/rmu/106.png differ diff --git a/umalauncher/constants.py b/umalauncher/constants.py index 5acc15c..6667bba 100644 --- a/umalauncher/constants.py +++ b/umalauncher/constants.py @@ -247,4 +247,12 @@ 300: "02", 400: "03", 500: "04" +} + +RMU_KEY_TO_ORDER = { + 101: 1, + 105: 2, + 102: 3, + 103: 4, + 106: 5, } \ No newline at end of file diff --git a/umalauncher/helper_table.py b/umalauncher/helper_table.py index 8531319..47d60f3 100644 --- a/umalauncher/helper_table.py +++ b/umalauncher/helper_table.py @@ -595,6 +595,16 @@ def create_helper_elements(self, data, last_data) -> str: print(f"{gff_vegetables}") + # Run! Mecha Umamusume + if 'mecha_data_set' in data: + mecha_data = data['mecha_data_set'] + for command_data in mecha_data.get('command_info_array', []): + command_id = command_data['command_id'] + command_key = constants.COMMAND_ID_TO_KEY.get(command_id, None) + if command_key and command_key in command_info and 'point_up_info_array' in command_data: + command_info[command_key]['point_up_info_array'] = command_data['point_up_info_array'] + + main_info = { "turn": turn, "scenario_id": scenario_id, diff --git a/umalauncher/helper_table_defaults.py b/umalauncher/helper_table_defaults.py index 2182894..b45960f 100644 --- a/umalauncher/helper_table_defaults.py +++ b/umalauncher/helper_table_defaults.py @@ -648,6 +648,7 @@ class UsefulPartnerCountSettings(se.NewSettings): ), } + class UsefulPartnerCountRow(hte.Row): long_name = "Useful training partner count" short_name = "Useful
Partners" @@ -687,6 +688,7 @@ class LArcStarGaugeGainSettings(se.NewSettings): ), } + class LArcStarGaugeGainRow(hte.Row): long_name = "L'Arc star gauge gain" short_name = "Star Gauge" @@ -729,7 +731,8 @@ class LArcAptitudePointsSettings(se.NewSettings): se.SettingType.COLOR ), } - + + class LArcAptitudePointsRow(hte.Row): long_name = "L'Arc aptitude points gained" short_name = "Aptitude
Points" @@ -755,7 +758,8 @@ def _generate_cells(self, game_state) -> list[hte.Cell]: cells.append(hte.Cell(aptitude_gain)) return cells - + + class UAFSportPointGainRow(hte.Row): long_name = "UAF Sports point gain" short_name = "Sport Gain" @@ -809,7 +813,8 @@ class UAFSportPointGainSettings(se.NewSettings): se.SettingType.COLOR ), } - + + class EnergyRatio(hte.Row): long_name = "Energy to Stat Ratio" short_name = "Energy Ratio" @@ -860,7 +865,8 @@ def _generate_cells(self, game_state) -> list[hte.Cell]: cells.append(hte.Cell(display_text)) return cells - + + class EnergyRatioSettings(se.NewSettings): _settings = { "comparison_choice": se.Setting( @@ -884,6 +890,7 @@ class EnergyRatioSettings(se.NewSettings): ), } + class GFFVegetablesSettings(se.NewSettings): _settings = { "highlight_max": se.Setting( @@ -900,6 +907,7 @@ class GFFVegetablesSettings(se.NewSettings): ), } + class GFFVegetablesRow(hte.Row): long_name = "GFF Vegetable Gain" short_name = "Veggies" @@ -963,6 +971,88 @@ def _generate_cells(self, game_state) -> list[hte.Cell]: return cells +class RMUTotalResearchLevelSettings(se.NewSettings): + _settings = { + "highlight_max": se.Setting( + "Highlight max", + "Highlights the facility with the highest research level gain.", + True, + se.SettingType.BOOL + ), + "highlight_max_color": se.Setting( + "Highlight max color", + "The color to use to highlight the facility with the highest research level gain.", + "#90EE90", + se.SettingType.COLOR + ), + } + + +class RMUTotalResearchLevelRow(hte.Row): + long_name = "Run! Mecha Umamusume research level total" + short_name = "Research Gain" + description = "[Scenario-specific] Shows the total research level gained on each facility. Hidden in other scenarios." + + def __init__(self): + super().__init__() + self.settings = RMUTotalResearchLevelSettings() + + def _generate_cells(self, game_state) -> list[hte.Cell]: + if list(game_state.values())[0]['scenario_id'] != 9: + return [] + + cells = [hte.Cell(self.short_name, title=self.description)] + + max_research_lvl = max(sum([data['value'] for data in command['point_up_info_array']]) for command in game_state.values()) + + for command in game_state.values(): + research_lvl = sum([data['value'] for data in command['point_up_info_array']]) + if self.settings.highlight_max.value and max_research_lvl > 0 and research_lvl == max_research_lvl: + cells.append(hte.Cell(research_lvl, bold=True, color=self.settings.highlight_max_color.value)) + else: + cells.append(hte.Cell(research_lvl)) + + return cells + + +class RMUResearchDistributionRow(hte.Row): + long_name = "Run! Mecha Umamusume research level distribution" + short_name = "Research Lvl
Distribution" + description = "[Scenario-specific] Shows the distribution of research level gained on each facility. Hidden in other scenarios." + + def _generate_cells(self, game_state) -> list[hte.Cell]: + if list(game_state.values())[0]['scenario_id'] != 9: + return [] + + cells = [hte.Cell(self.short_name, title=self.description)] + + for command in game_state.values(): + research_list = command['point_up_info_array'] + research_list = sorted(research_list, key=lambda x: constants.RMU_KEY_TO_ORDER[x['status_type']]) + + cell_text = f"
" + for data_dict in research_list: + value = data_dict['value'] + id = data_dict['status_type'] + if value <= 0: + continue + cell_text += f"
" + cell_text += f"
{value}
" + cell_text += "
" + + cell_text += "
" + + cells.append(hte.Cell(cell_text)) + + return cells + + def to_tr(self, command_info): + if list(command_info.values())[0]['scenario_id'] != 9: + return "" + + return super().to_tr(command_info) + + class RowTypes(Enum): CURRENT_STATS = CurrentStatsRow GAINED_STATS = GainedStatsRow @@ -985,6 +1075,8 @@ class RowTypes(Enum): ENERGY_RATIO = EnergyRatio GFF_VEGETABLES = GFFVegetablesRow GFF_VEGETABLES_DIST = GFFVegetablesDistributionRow + RMU_RESEARCH = RMUTotalResearchLevelRow + RMU_RESEARCH_DIST = RMUResearchDistributionRow class DefaultPreset(hte.Preset): @@ -996,6 +1088,7 @@ class DefaultPreset(hte.Preset): RowTypes.LARC_STAR_GAUGE_GAIN, RowTypes.UAF_SPORT_POINT_GAIN, RowTypes.GFF_VEGETABLES, + RowTypes.RMU_RESEARCH, RowTypes.CURRENT_STATS, RowTypes.GAINED_STATS, RowTypes.USEFUL_BOND, diff --git a/umalauncher/util.py b/umalauncher/util.py index 23aaecd..3b63182 100644 --- a/umalauncher/util.py +++ b/umalauncher/util.py @@ -586,6 +586,15 @@ def get_gff_veg_image_dict(force=False): gff_veg_image_dict.update(assets_folder_images_to_dict("_assets/gff/vegetables")) return gff_veg_image_dict +rmu_image_dict = {} +def get_rmu_image_dict(force=False): + global rmu_image_dict + + if force or not rmu_image_dict: + logger.debug("Loading RMU images...") + rmu_image_dict.update(assets_folder_images_to_dict("_assets/rmu")) + return rmu_image_dict + GROUP_SUPPORT_ID_TO_PASSION_ZONE_EFFECT_ID_DICT = {} def get_group_support_id_to_passion_zone_effect_id_dict(force=False): global GROUP_SUPPORT_ID_TO_PASSION_ZONE_EFFECT_ID_DICT @@ -623,5 +632,6 @@ def scouting_score_to_rank_string(score): get_uaf_genre_image_dict, get_gff_veg_image_dict, get_gl_token_dict, + get_rmu_image_dict, get_group_support_id_to_passion_zone_effect_id_dict, ] \ No newline at end of file diff --git a/umalauncher/version.py b/umalauncher/version.py index d6f0172..0523f49 100644 --- a/umalauncher/version.py +++ b/umalauncher/version.py @@ -11,7 +11,7 @@ import gui import glob -VERSION = "1.14.9" +VERSION = "1.15.0" def parse_version(version_string: str): """Convert version string to tuple."""