Skip to content

Commit

Permalink
Fix Arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
Martmists-GH committed Feb 18, 2019
1 parent 3cbb87f commit 0c2834a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions rlbot_gui/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,16 +223,15 @@ def begin_python_bot(bot_name):
def as_jsonifyable(obj):
if isinstance(obj, (int, float, str)):
return obj
elif isinstance(obj, list):
elif "Array" in obj.__class__.__name__:
return list(map(as_jsonifyable, obj))
else:
return {attr: as_jsonifyable(getattr(obj, attr)) for attr in dir(obj) if not attr.startswith("_")}


@eel.expose
def get_game_tick_packet():
obj = as_jsonifyable(game_tick_packet)
return obj
return as_jsonifyable(game_tick_packet)


should_quit = False
Expand Down

0 comments on commit 0c2834a

Please sign in to comment.