Doors #156

Merged
ynerant merged 9 commits from doors into map_generation 2021-01-10 22:54:14 +00:00
1 changed files with 4 additions and 1 deletions
Showing only changes of commit 65ae99a26d - Show all commits

View File

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