Fixed list of persistent objects not being updated when things are removed from the level.

This commit is contained in:
Patrick Marsee 2019-05-24 14:06:34 -04:00
parent e81345e793
commit 1b41c46105
4 changed files with 13 additions and 5 deletions

View file

@ -212,6 +212,13 @@ If -l is given, a map legend will be printed under the map."""
ret.append("Player name:{0:.>68}".format(self.gameBase.playerName))
ret.append("Player position:{0:.>64}".format("{0}{1}".format(self.gameBase.numberToLetter(self.gameBase.playerx), self.gameBase.playery)))
ret.append("Prev. position:{0:.>65}".format("{0}{1}".format(self.gameBase.numberToLetter(self.gameBase.prevx), self.gameBase.prevy)))
ret.append("Things:\nID Name X Y")
for i in self.gameBase.level.things:
j = self.gameBase.level.things[i]
ret.append("{0:<7} {1:<31} {2:<3} {3:<3}".format(i, j.name, j.x, j.y))
ret.append("Persistent:")
for i in self.gameBase.level.persistent:
ret.append(str(i))
print('\n'.join(ret))
#heapq.heappush(self.gameBase.eventQueue, (self.gameBase.gameTime, gameevents.NoOpEvent()))
return