Skip to content

Commit

Permalink
Update Requirementss
Browse files Browse the repository at this point in the history
  • Loading branch information
Kraust committed Sep 2, 2024
1 parent f58d680 commit d947ebb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
19 changes: 9 additions & 10 deletions OSCRUI/datafunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,12 @@ def copy_summary_callback(self, translate, parser_num: int = 1):
duration = self.parser1.active_combat.duration.total_seconds()
combat_time = f'{int(duration / 60):02}:{duration % 60:02.0f}'

summary = f'{{ OSCR }} {parser.active_combat.map}'
summary = f'OSCR {parser.active_combat.map}'
difficulty = parser.active_combat.difficulty
if difficulty and isinstance(difficulty, str) and difficulty != 'Unknown':
summary += f' ({difficulty}) - DPS / DMG [{combat_time}]: '
summary += f' ({difficulty}) - DPS [{combat_time}]: '
else:
summary += f' - DPS / DMG [{combat_time}]: '
summary += f' - DPS [{combat_time}]: '
players = sorted(
self.parser1.active_combat.player_dict.values(),
reverse=True,
Expand All @@ -170,8 +170,7 @@ def copy_summary_callback(self, translate, parser_num: int = 1):
parts = list()
for player in players:
parts.append(
f"`{player.handle}` {player.DPS:,.0f} / "
+ format_damage_number(player.total_damage))
f"{player.handle} {player.DPS:,.0f}")
summary += " | ".join(parts)

self.app.clipboard().setText(summary)
Expand Down Expand Up @@ -314,7 +313,7 @@ def copy_analysis_callback(self):
for col, value in row_data.items():
formatted_row.append(f'[{current_header[col]}] {format_function(value, col)}')
formatted_row_name = ''.join(row_name) if isinstance(row_name, tuple) else row_name
output.append(f"`{formatted_row_name}`: {' | '.join(formatted_row)}")
output.append(f"{formatted_row_name}: {' | '.join(formatted_row)}")
output_string = '\n'.join(output)
self.app.clipboard().setText(output_string)
elif copy_mode == self._('Global Max One Hit'):
Expand All @@ -333,7 +332,7 @@ def copy_analysis_callback(self):
max_one_hit_ability = max_one_hit_ability.get_data(0)
if isinstance(max_one_hit_ability, tuple):
max_one_hit_ability = ''.join(max_one_hit_ability)
output_string = (f'{{ OSCR }} {prefix}: {max_one_hit:,.2f} '
output_string = (f'OSCR {prefix}: {max_one_hit:,.2f} '
f'(`{"".join(max_one_hit_item.get_data(0))}` – '
f'{max_one_hit_ability})')
self.app.clipboard().setText(output_string)
Expand All @@ -354,7 +353,7 @@ def copy_analysis_callback(self):
max_one_hit_ability = max_one_hit_item.get_data(0)
if isinstance(max_one_hit_ability, tuple):
max_one_hit_ability = ''.join(max_one_hit_ability)
output_string = (f'{{ OSCR }} {prefix}: {max_one_hit:,.2f} '
output_string = (f'OSCR {prefix}: {max_one_hit:,.2f} '
f'(`{"".join(selected_row.get_data(0))}` – '
f'{max_one_hit_ability})')
self.app.clipboard().setText(output_string)
Expand All @@ -372,7 +371,7 @@ def copy_analysis_callback(self):
magnitudes.append((player_item.get_data(2), ''.join(player_item.get_data(0))))
magnitudes.sort(key=lambda x: x[0], reverse=True)
magnitudes = [f"`[{''.join(player)}]` {magnitude:,.2f}" for magnitude, player in magnitudes]
output_string = (f'{{ OSCR }} {prefix}: {" | ".join(magnitudes)}')
output_string = (f'OSCR {prefix}: {" | ".join(magnitudes)}')
self.app.clipboard().setText(output_string)
elif copy_mode == self._('Magnitude / s'):
if current_tab == 0:
Expand All @@ -388,5 +387,5 @@ def copy_analysis_callback(self):
magnitudes.append((player_item.get_data(1), ''.join(player_item.get_data(0))))
magnitudes.sort(key=lambda x: x[0], reverse=True)
magnitudes = [f"`[{''.join(player)}]` {magnitude:,.2f}" for magnitude, player in magnitudes]
output_string = (f'{{ OSCR }} {prefix}: {" | ".join(magnitudes)}')
output_string = (f'OSCR {prefix}: {" | ".join(magnitudes)}')
self.app.clipboard().setText(output_string)
4 changes: 2 additions & 2 deletions OSCRUI/leagueconnector.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
from .subwindows import show_warning, uploadresult_dialog
from .textedit import format_datetime_str

# OSCR_SERVER_BACKEND = "https://oscr.stobuilds.com/"
OSCR_SERVER_BACKEND = "http://127.0.0.1:8000"
OSCR_SERVER_BACKEND = "https://oscr.stobuilds.com/"
# OSCR_SERVER_BACKEND = "http://127.0.0.1:8000"


def establish_league_connection(self, translate):
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ dependencies = [
"PySide6==6.7.2",
"pyqtgraph==0.13.7",
"numpy==1.26.4",
"STO-OSCR>=2024.7b90",
"OSCR-django-client>=2024.6.9.0",
"STO-OSCR>=2024.9b20",
"OSCR-django-client>=2024.9.2.1",
"pydantic==2.7.3",
]
requires-python = ">=3.10"
Expand Down

0 comments on commit d947ebb

Please sign in to comment.