X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/decks/%7B%7Bdeck_id%7D%7D/cards/%7B%7Bcard_id%7D%7D/form?a=blobdiff_plain;f=new%2Fplomrogue%2Fgame.py;h=9b20cb2e48e78036c6495849d12a3541ebab0843;hb=34a2854e63892c17232fed7795d1b0d16d014626;hp=51bb37271f31bbb6db66787ddc9cbc38025fcd7b;hpb=1a3d1b2e211a01ae69e97d9f6599f221edfa3c34;p=plomrogue2-experiments diff --git a/new/plomrogue/game.py b/new/plomrogue/game.py index 51bb372..9b20cb2 100755 --- a/new/plomrogue/game.py +++ b/new/plomrogue/game.py @@ -150,8 +150,11 @@ class Game: stringify_yx(thing.position))) player = self.world.get_player() self.io.send('PLAYER_POS %s' % (stringify_yx(player.position))) - self.io.send('PLAYER_INVENTORY %s' % ','.join([str(i) for i in - player.inventory])) + if len(player.inventory) > 0: + self.io.send('PLAYER_INVENTORY %s' % ','.join([str(i) for i in + player.inventory])) + else: + self.io.send('PLAYER_INVENTORY ,') for id_ in player.inventory: thing = self.world.get_thing(id_) self.io.send('THING_TYPE %s %s' % (thing.id_, thing.type_))