Skip to content

Commit

Permalink
3/3 ok
Browse files Browse the repository at this point in the history
  • Loading branch information
Kraust committed Aug 10, 2024
1 parent 7d2d851 commit eb36bc0
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 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 | [{combat_time}]: '
summary += f' ({difficulty}) - DPS / DMG [{combat_time}]: '
else:
summary += f' - DPS | [{combat_time}]: '
summary += f' - DPS / DMG [{combat_time}]: '
players = sorted(
self.parser1.active_combat.player_dict.values(),
reverse=True,
Expand All @@ -170,7 +170,8 @@ def copy_summary_callback(self, translate, parser_num: int = 1):
parts = list()
for player in players:
parts.append(
f"{player.handle} {player.DPS:,.0f}")
f"`{player.handle}` {player.DPS:,.0f} / "
+ format_damage_number(player.total_damage))
summary += " | ".join(parts)

self.app.clipboard().setText(summary)
Expand Down Expand Up @@ -332,7 +333,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 @@ -353,7 +354,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 Down Expand Up @@ -387,5 +388,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)

0 comments on commit eb36bc0

Please sign in to comment.