Skip to content

Commit 09832a9

Browse files
committed
fix: minor fix
1 parent 2daea9a commit 09832a9

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

bot/base/localization.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ class LocalizationMap:
6464
localization_map = {attr: value for attr, value in vars(LocalizationMap).items()
6565
if not callable(value) and not attr.startswith('_')}
6666

67+
localization_map.update({
68+
'True': '是',
69+
'False': '否'
70+
})
71+
6772
def _localization_single(string):
6873
for name, value in localization_map.items():
6974
string = string.replace(name, value)

bot/base/log.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ def emit(self, record):
4040

4141
def get_task_log(self, task_id):
4242
with self.lock:
43-
logs = list(self.buffer[task_id])
43+
if task_id in self.buffer:
44+
logs = list(self.buffer[task_id])
45+
else:
46+
logs = []
4447
return logs
4548

4649
task_log_handler = TaskLogHandler()

module/umamusume/types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def __init__(self):
136136
self.aoharu_race_index = 0
137137

138138
def log_turn_info(self, scenario_type : ScenarioType):
139-
log.info("当前回合时间 >" + str(self.date))
139+
log.info("当前回合时间 " + str(self.date))
140140
log.info("干劲状态 " + str(self.motivation_level.name))
141141
log.info("体力剩余 " + str(self.remain_stamina))
142142
log.info("当前属性值 速度:%s, 耐力:%s, 力量:%s, 毅力:%s, 智力:%s, 技能点:%s", self.uma_attribute.speed,

0 commit comments

Comments
 (0)