heinrich5991 / libtw2

Some Teeworlds stuff in Rust.™
Apache License 2.0
50 stars 16 forks source link

gamenet: pending serialize #105

Closed ChillerDragon closed 1 month ago

ChillerDragon commented 2 months ago
cd gamenet/generate
python3 serialize.py --version 0.7 raw/teeworlds-0.7.5.py > spec/teeworlds-0.7.5.json

causes a diff on current master. That should probably be checked in the CI

heinrich5991 commented 2 months ago

I think the changes in there are unintended, I guess serialize.py should be fixed.

diff --git a/gamenet/generate/spec/teeworlds-0.7.5.json b/gamenet/generate/spec/teeworlds-0.7.5.json
index 891db78..532c0a2 100644
--- a/gamenet/generate/spec/teeworlds-0.7.5.json
+++ b/gamenet/generate/spec/teeworlds-0.7.5.json
@@ -8,7 +8,10 @@
                {"name": ["client", "version"], "type": "int32", "value": 1797},
                {"name": ["cl", "call", "vote", "type", "option"], "type": "string", "value": "option"},
                {"name": ["cl", "call", "vote", "type", "kick"], "type": "string", "value": "kick"},
-               {"name": ["cl", "call", "vote", "type", "spec"], "type": "string", "value": "spec"}
+               {"name": ["cl", "call", "vote", "type", "spec"], "type": "string", "value": "spec"},
+               {"name": ["vote", "choice", "no"], "type": "int32", "value": -1},
+               {"name": ["vote", "choice", "pass"], "type": "int32", "value": 0},
+               {"name": ["vote", "choice", "yes"], "type": "int32", "value": 1}
        ],
        "game_enumerations": [
                {