Commit graph

222 commits

Author SHA1 Message Date
ChillerDragon e9ec2a121b chore: be more precise about the supported versions 2024-02-26 11:36:03 +08:00
ChillerDragon 946ec2b73b test: add test for 0.6 map_data 2024-02-26 10:04:26 +08:00
ChillerDragon ad4befbc20 fix: pcap example test 2024-02-23 12:51:12 +08:00
ChillerDragon 0d296d83d0 feat: add 0.6 support to the pcap printer example 2024-02-23 12:48:12 +08:00
ChillerDragon 69e6dce190 chore: release 0.8.1 2024-02-18 11:31:52 +08:00
ChillerDragon 240c605ec3 feat: do not call ChunkHeader constructor if not needed
Also stays consistent with the code in the PacketHeader
7a367acef3
2024-02-17 13:22:31 +08:00
ChillerDragon c4af1fb8f8 test: add test for cl_say and also for #14 2024-02-17 13:09:45 +08:00
ChillerDragon 8e02807c59 fix: chunk header being cached across messages
closed #14
2024-02-17 13:09:14 +08:00
ChillerDragon 3b50799bbb chore: bump license year to 2024 2024-02-15 18:22:40 +08:00
ChillerDragon e835d6e33b feat: set default chat target to -1 (closed #12) 2024-02-15 18:12:03 +08:00
Chiller Dragon fd7a93e76a chore: link individual examples 2023-11-14 14:05:20 +00:00
Chiller Dragon 4e4f198fb7 chore: link examples in readme 2023-11-14 14:01:57 +00:00
ChillerDragon 871f6bb406 test: add snap7 multi part snap test 2023-07-13 14:01:54 +02:00
ChillerDragon adbd9ecc44 chore: release 0.8.0 2023-07-13 13:02:34 +02:00
ChillerDragon f6955fbc5b fix: conventional commit release messages 2023-07-13 13:00:44 +02:00
ChillerDragon cd7ec74bba feat: mark all msg 0 as ddnet_uuid for now
This will change as soon as ddnet uuids are properly implemented
2023-07-13 12:38:54 +02:00
ChillerDragon 936786901a chore: make it obvious the examples are 0.7 only 2023-07-13 11:34:25 +02:00
ChillerDragon c791adbf2b feat: add flood example 2023-07-13 11:25:01 +02:00
ChillerDragon 64ad0c3b1c test: 0.7 req map data 2023-06-25 13:32:32 +02:00
ChillerDragon e27e5aef67 feat: compress payloads if flag is set
works fine with libtw2 but TeeAI is stuck in a inf loop
2023-06-24 10:48:34 +02:00
ChillerDragon 941249f5a3 feat!: make TwPacket.version private
this forces setting the version on packet construction
and avoids unexpected version missmatches when updating the version
after the packet header has already been created.

To send a 0.6 packet one has to do the following:

	packet = TwPacket(version = '0.6')

And it will guranteed to be a correct header and flags object
by default.
2023-06-24 10:16:42 +02:00
ChillerDragon 3c42c99914 feat: make 0.6 packing smoother
The recommended way now is setting the version when constructing the
packet. Like this:

	packet = TwPacket(version = '0.6')

which will then set the correct header object in version 6 or 7
and thus also set the correct flags. And the version field is also set.

It is not recommended to do this:

	packet = TwPacket() # defaults to 0.7
	packet.version = '0.6'

That might cause confusion. This should be made more failsafe in a new
commit.
2023-06-24 10:09:35 +02:00
ChillerDragon 1a7db735b3 ci: make optional really optional to fix the ci
at some point libtw2 huffman should be tested in the ci too
and it should be possible for a user and a test case
to chose which huffman backend to run even if both are installed.

Maybe with a environment variable.
2023-06-18 12:53:35 +02:00
ChillerDragon d9c5f0d066 feat: add optional libtw2 huffman backend
Prefer libtw2 over TeeAI huffman but do not install it by default.
Thanks to @heinrich5991 for porting his rust code to python.
2023-06-18 12:51:07 +02:00
ChillerDragon ec507c0dcc test: huffman was never broken the test was 2023-06-18 12:13:08 +02:00
ChillerDragon 57f30ccc0e test: cl emote 0.7 test 2023-06-17 11:59:09 +02:00
ChillerDragon e90f2d5b30 test: add failing cl emoticon test 2023-06-11 12:09:39 +02:00
ChillerDragon e06ce8366f feat!: snap items in sys/game messages
This commit is not about snapshots!

Generated the snap item classes for 0.6 and 0.7
And changed the type used for snap items from int to the snap class

This now allows to properly serialize and deserialize
messages such as sys.input
2023-06-09 13:06:24 +02:00
ChillerDragon cfc9c47d0d test: add incomplete sys input test 2023-06-09 10:54:45 +02:00
ChillerDragon 59d0150ed2 fix!: set packet version to 0.7 by default
no more unknown version that could break things
2023-06-09 10:36:24 +02:00
ChillerDragon aef93ce88b chore: use chore for everything else
If it is not a user facing feature. Or something boring.
Do not name it fix or feat do name it chore instead.
A example would be changing configs like this commit.
Maybe even some internal variable naming convetion and so on.
2023-06-04 12:01:38 +02:00
ChillerDragon 4e270eb213 fix: do not shellcheck python venv 2023-06-04 11:54:59 +02:00
ChillerDragon e4118eaa84 feat: conventional commit git hook 2023-06-04 11:52:38 +02:00
ChillerDragon 4fd648025f feat!: proper support for optional fields
This sets message fields to `None` if they were not set.
And also does not pack fields that are set to `None`

BREAKING CHANGE: earlier to this commit the control close reason field
was set to an empty string if it was not set. Now it is set to None
2023-06-04 11:43:18 +02:00
ChillerDragon 2e8ac72bf6 0.6.5 reached feature completion of 0.7
It is not as well tested but since the code is auto generated
it should be functioning the same way
2023-06-03 10:51:28 +02:00
ChillerDragon 4cc2888cb0 Fix 0.6.5 connless header 2023-06-03 10:43:09 +02:00
ChillerDragon 6c158c8841 Suggest minor bump on breaking changes
https://www.conventionalcommits.org/en/v1.0.0/

closed #11
2023-06-01 11:03:08 +02:00
ChillerDragon 9f06c95e8d feat!: set flag token by default in 0.6.5
Set the token flag automatically if a token is provided. So lib users
have less boilerplate code to send a packet. But it can still be
set explicitly to false if desired.

Also add a test for cl_start_info
2023-06-01 09:32:45 +02:00
ChillerDragon 7e11d6d129 Add sv chat 0.6.5 test 2023-05-30 13:17:59 +02:00
ChillerDragon 1fa282b192 Add 0.6.5 system & game message support
Also add a test for sys info
Stills needs more tests. At least one game message.
2023-05-24 09:28:11 +02:00
ChillerDragon 01331e8141 Correctly pack 0.6.5 ctrl connect 2023-05-24 08:54:53 +02:00
ChillerDragon 93ad98ec96 Correctly unpack 0.6.5 ctrl connect 2023-05-23 20:32:44 +02:00
ChillerDragon 77aaa1ada7 Fix 0.6 packet header flags parsing 2023-05-21 10:09:34 +02:00
ChillerDragon 7c70e32725 First 0.6 draft
No 0.6 code is tested yet
This commit is just about adding all 0.6 code without
breaking existing 0.7 tests
2023-05-19 18:27:39 +02:00
ChillerDragon d044e8dbad Release 0.7.0 2023-05-19 09:47:41 +02:00
ChillerDragon 6be2f54103 Do not gen 0.6 code yet 2023-05-19 09:45:57 +02:00
ChillerDragon c5bd2ea687 Prepare 0.6.5 test 2023-05-19 09:41:50 +02:00
ChillerDragon e4e1c40d85 Adapt gen script to support 0.6 2023-05-19 09:17:02 +02:00
ChillerDragon d491f60937 Ensure old distros do not run python2 2023-05-18 08:41:28 +02:00
ChillerDragon 81cee81e94 Remove snap message from generation
currently blocked by broken huffman decompression
2023-05-15 11:24:42 +02:00