Skip to content

Commit

Permalink
Merge pull request #115 from riazufila/stats-readable-bug
Browse files Browse the repository at this point in the history
Fixed format on book and inv
  • Loading branch information
riazufila authored May 9, 2021
2 parents 586e21c + 6c3472e commit da8732e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cogs/book.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ def translateToReadableFormat(self, non_readable_format):
else:
buffer_list.append(s.capitalize())

readable_format = " ".join(buffer_list)
elif non_readable_format[6:7] == "_":
buffer_list = []
split = non_readable_format.split("_")

for s in split:
buffer_list.append(s.capitalize())

readable_format = " ".join(buffer_list)
elif non_readable_format.lower() in ["wsrs", "dr", "hp", "cc", "aoe"]:
readable_format = non_readable_format.upper()
Expand Down
9 changes: 9 additions & 0 deletions cogs/guardian.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def heroStatsLevel(self, stats, level, user_level):
return stats

def translateToReadableFormat(self, non_readable_format):
print(non_readable_format)
buffer_for_res = non_readable_format[::-1]
if buffer_for_res[3:4] == "_":
buffer_list = []
Expand All @@ -30,6 +31,14 @@ def translateToReadableFormat(self, non_readable_format):
else:
buffer_list.append(s.capitalize())

readable_format = " ".join(buffer_list)
elif non_readable_format[6:7] == "_":
buffer_list = []
split = non_readable_format.split("_")

for s in split:
buffer_list.append(s.capitalize())

readable_format = " ".join(buffer_list)
elif non_readable_format.lower() in ["wsrs", "dr", "hp", "cc", "aoe"]:
readable_format = non_readable_format.upper()
Expand Down

0 comments on commit da8732e

Please sign in to comment.