From: Christian Heller Date: Sat, 12 Jan 2019 21:40:32 +0000 (+0100) Subject: Improve invisibility depiction. X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/decks/static/template?a=commitdiff_plain;h=3576b6cfa39467478565b704de0160fc48c9a181;p=plomrogue2-experiments Improve invisibility depiction. --- diff --git a/server.py b/server.py index c5fbff4..fc095b7 100755 --- a/server.py +++ b/server.py @@ -162,7 +162,7 @@ class CommandHandler(game_common.Commander, server_.game.Commander): self.send('MAP_SIZE ' + stringify_yx(self.world.map_.size)) visible_map = self.world.get_player().get_visible_map() for y in range(self.world.map_.size[0]): - self.send('VISIBLE_MAP_LINE %5s %s' % (y, visible_map.get_line(y))) + self.send('VISIBLE_MAP_LINE %5s "%s"' % (y, visible_map.get_line(y))) for thing in self.world.things: self.send('THING_TYPE %s %s' % (thing.id_, thing.type_)) self.send('THING_POS %s %s' % (thing.id_, diff --git a/server_/game.py b/server_/game.py index 7e15247..f6a5e9e 100644 --- a/server_/game.py +++ b/server_/game.py @@ -146,7 +146,7 @@ class Thing(game_common.Thing): def get_visible_map(self): size = self.world.map_.size - m = Map(size, '?'*size[0]*size[1]) + m = Map(size, ' '*size[0]*size[1]) y_me = self.position[0] x_me = self.position[1] for y in range(m.size[0]):