ChenyuRabbitLove commited on
Commit
77f112d
1 Parent(s): 5fafe16

refactor: rename achievement log to adventure log

Browse files
Files changed (1) hide show
  1. utils/utils.py +7 -7
utils/utils.py CHANGED
@@ -29,15 +29,15 @@ def get_player_badges(player_info: gr.State) -> List[str]:
29
  return [f"{MEDIA_PATH}{badge}{MEDIA_FILE_TYPE}" for badge in player_info["badges"]]
30
 
31
 
32
- def get_player_achievement_logs(player_info: gr.State) -> List[str]:
33
- log_template = """<div class="achievement"><p>{player_log}</p></div>"""
34
  return [
35
  log_template.format(player_log=player_log)
36
- for player_log in player_info["achievement_logs"]
37
  ]
38
 
39
 
40
- def get_player_achievement_logs_html(player_info: gr.State) -> str:
41
- achievement_logs = "".join(get_player_achievement_logs(player_info))
42
- template_content = get_content("htmls/achievement_template.html")
43
- return template_content.replace("{logs}", achievement_logs)
 
29
  return [f"{MEDIA_PATH}{badge}{MEDIA_FILE_TYPE}" for badge in player_info["badges"]]
30
 
31
 
32
+ def get_player_adventure_logs(player_info: gr.State) -> List[str]:
33
+ log_template = """<div class="adventure"><p>{player_log}</p></div>"""
34
  return [
35
  log_template.format(player_log=player_log)
36
+ for player_log in player_info["adventure_logs"]
37
  ]
38
 
39
 
40
+ def get_player_adventure_logs_html(player_info: gr.State) -> str:
41
+ adventure_logs = "".join(get_player_adventure_logs(player_info))
42
+ template_content = get_content("htmls/adventure_template.html")
43
+ return template_content.replace("{logs}", adventure_logs)