Load map floor index when loading a new game

This commit is contained in:
Yohann D'ANELLO 2021-01-08 21:23:12 +01:00
parent 949555ffff
commit ad3cce116e
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
1 changed files with 2 additions and 0 deletions

View File

@ -343,6 +343,8 @@ class Game:
try:
self.map_index = d["map_index"]
self.maps = [Map().load_state(map_dict) for map_dict in d["maps"]]
for i, m in enumerate(self.maps):
m.floor = i
except KeyError:
self.message = _("Some keys are missing in your save file.\n"
"Your save seems to be corrupt. It got deleted.")