Skip to content

Commit

Permalink
v1.15.0 (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinVG207 authored Dec 21, 2024
2 parents b3ab1ff + d08dceb commit 7df916e
Show file tree
Hide file tree
Showing 11 changed files with 179 additions and 55 deletions.
103 changes: 53 additions & 50 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Binary file added umalauncher/_assets/rmu/101.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added umalauncher/_assets/rmu/102.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added umalauncher/_assets/rmu/103.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added umalauncher/_assets/rmu/105.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added umalauncher/_assets/rmu/106.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions umalauncher/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,4 +247,12 @@
300: "02",
400: "03",
500: "04"
}

RMU_KEY_TO_ORDER = {
101: 1,
105: 2,
102: 3,
103: 4,
106: 5,
}
10 changes: 10 additions & 0 deletions umalauncher/helper_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
101 changes: 97 additions & 4 deletions umalauncher/helper_table_defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,7 @@ class UsefulPartnerCountSettings(se.NewSettings):
),
}


class UsefulPartnerCountRow(hte.Row):
long_name = "Useful training partner count"
short_name = "Useful<br>Partners"
Expand Down Expand Up @@ -687,6 +688,7 @@ class LArcStarGaugeGainSettings(se.NewSettings):
),
}


class LArcStarGaugeGainRow(hte.Row):
long_name = "L'Arc star gauge gain"
short_name = "Star Gauge"
Expand Down Expand Up @@ -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<br>Points"
Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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(
Expand All @@ -884,6 +890,7 @@ class EnergyRatioSettings(se.NewSettings):
),
}


class GFFVegetablesSettings(se.NewSettings):
_settings = {
"highlight_max": se.Setting(
Expand All @@ -900,6 +907,7 @@ class GFFVegetablesSettings(se.NewSettings):
),
}


class GFFVegetablesRow(hte.Row):
long_name = "GFF Vegetable Gain"
short_name = "Veggies"
Expand Down Expand Up @@ -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 <br>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"<div style=\"display: flex; align-items: center; justify-content: center; gap: 0.2rem;\">"
for data_dict in research_list:
value = data_dict['value']
id = data_dict['status_type']
if value <= 0:
continue
cell_text += f"<div style=\"display: flex; flex-direction: column; align-items: center; justify-content: center;\"><img src=\"{util.get_rmu_image_dict()[str(id)]}\" height=\"29\" width=\"24\" style=\"margin-bottom: -2px\" />"
cell_text += f"<div>{value}</div>"
cell_text += "</div>"

cell_text += "</div>"

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
Expand All @@ -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):
Expand All @@ -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,
Expand Down
10 changes: 10 additions & 0 deletions umalauncher/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
]
2 changes: 1 addition & 1 deletion umalauncher/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down

0 comments on commit 7df916e

Please sign in to comment.