修复有存档时导入字典未创建的bug
This commit is contained in:
parent
04f4b65d42
commit
793cbea586
@ -45,6 +45,8 @@ class Control():
|
||||
# 存在存档即导入
|
||||
with open(c.USERDATA_PATH) as f:
|
||||
userdata = json.load(f)
|
||||
# 存档内不包含即时游戏时间信息,需要新建
|
||||
self.game_info = {c.CURRENT_TIME:0}
|
||||
# 导入数据
|
||||
self.game_info.update(userdata)
|
||||
except FileNotFoundError:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user