The logs of the map was not updated

This commit is contained in:
Yohann D'ANELLO 2021-01-10 23:41:51 +01:00
parent 60675d7859
commit 65ae99a26d
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
1 changed files with 4 additions and 1 deletions

View File

@ -199,7 +199,9 @@ class Game:
self.map_index = 0
return
while self.map_index >= len(self.maps):
self.maps.append(broguelike.Generator().run())
m = broguelike.Generator().run()
m.logs = self.logs
self.maps.append(m)
new_map = self.map
new_map.floor = self.map_index
old_map.remove_entity(self.player)
@ -417,6 +419,7 @@ class Game:
self.maps = [Map().load_state(map_dict) for map_dict in d["maps"]]
for i, m in enumerate(self.maps):
m.floor = i
m.logs = self.logs
except KeyError as error:
self.message = _("Some keys are missing in your save file.\n"
"Your save seems to be corrupt. It got deleted.")\