Commit graph

210 commits

Author SHA1 Message Date
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
ChillerDragon fb12b0a498 Fix snap damage "self" conflicting w python keyword 2023-05-15 10:13:39 +02:00
ChillerDragon 7684002a64 Finish poc snap item generation 2023-05-14 12:18:29 +02:00
ChillerDragon 211f470e7b Finish snap init args generation 2023-05-14 11:33:53 +02:00
ChillerDragon 37ec4349aa Make gen init header code shared 2023-05-14 10:41:05 +02:00
ChillerDragon 4801af9c59 A bit more snap generation prep 2023-05-13 16:33:12 +02:00
ChillerDragon 6fef3f1abb More snap preperation in generate script 2023-05-13 14:33:50 +02:00
ChillerDragon 08f71f60a2 Type out snap items for libtw2 json 2023-05-13 10:23:23 +02:00
ChillerDragon 0794cbe0a6 Test packing connless and mark as done 2023-05-13 10:06:59 +02:00
ChillerDragon 8c13ce6c2b Add connless info (inf3) 2023-05-12 17:17:07 +02:00
ChillerDragon e60cd00735 Add tests for connless packets 2023-05-12 10:11:58 +02:00
ChillerDragon ad8511d551 Implemet connless packing 2023-05-10 12:31:27 +02:00
ChillerDragon 04945c770a Fix connless data offset 2023-05-10 11:43:19 +02:00