This commit is contained in:
Victor Fors 2022-04-08 13:09:15 +02:00
parent 3a3dc4415c
commit 2df04078b4

View File

@ -73,8 +73,9 @@ def personastate(n):
return states[n]
def main():
for player in sorted(get_player_summaries([friend['steamid'] for friend in get_friend_list(uid)]), key=lambda player: player['personaname']):
print(player['personaname'] + ': ' + personastate(player['personastate']) + (', playing ' + player['gameextrainfo'] if 'gameextrainfo' in player else ''))
friends = [friend['steamid'] for friend in get_friend_list(uid)]
players = sorted(get_player_summaries(friends), key=lambda player: player['personaname'])
print('\n'.join([player['personaname'] + ': ' + personastate(player['personastate']) + (', playing ' + player['gameextrainfo'] if 'gameextrainfo' in player else '') for player in players]))
if __name__ == '__main__':