diff --git a/scripts/generate_messages.py b/scripts/generate_messages.py index 0c631bc..96bfa0a 100755 --- a/scripts/generate_messages.py +++ b/scripts/generate_messages.py @@ -193,9 +193,11 @@ def gen_unpack_members(msg: NetMessageJson) -> str: else: unpacker = 'str()' elif arr_member['kind'] == 'enum': - # TODO: can we represent the enum as text - # instead of as magic number? - unpacker = 'int() # TODO: this is a enum' + # We intentionally do not do anything fancy here + # no enums for example because it comes with too many + # disadvantages see the related issue here + # https://gitlab.com/teeworlds-network/twnet_parser/-/issues/7 + unpacker = 'int()' elif arr_member['kind'] == 'boolean': unpacker = 'int() == 1' elif arr_member['kind'] in ('int32', 'tick'):