From 247d51c002b0da488cea32901ccec448bbafc25e Mon Sep 17 00:00:00 2001 From: perast Date: Wed, 4 Nov 2020 09:41:26 +0100 Subject: [PATCH] Added syntax="proto2" Added package.json to transpile protobuf vscode --- package.json | 9 +++++++++ protobuf/activity.proto | 1 + protobuf/goal.proto | 1 + protobuf/hash-seeds.proto | 1 + protobuf/login-response.proto | 1 + protobuf/per-session-info.proto | 1 + protobuf/periodic-info.proto | 1 + protobuf/profile.proto | 1 + protobuf/segment-result.proto | 1 + protobuf/tcp-node-msgs.proto | 1 + protobuf/udp-node-msgs.proto | 1 + protobuf/world.proto | 1 + protobuf/zfiles.proto | 1 + 13 files changed, 21 insertions(+) create mode 100644 package.json diff --git a/package.json b/package.json new file mode 100644 index 0000000..caf09f9 --- /dev/null +++ b/package.json @@ -0,0 +1,9 @@ +{ + "version": "1.0.0", + "name": "zoffline", + "description": "zoffline", + "scripts": { + "protobuf:build": "protoc --python_out=. ./protobuf/activity.proto" + } +} + \ No newline at end of file diff --git a/protobuf/activity.proto b/protobuf/activity.proto index 84ad8dc..e194db9 100644 --- a/protobuf/activity.proto +++ b/protobuf/activity.proto @@ -1,3 +1,4 @@ +syntax = "proto2"; message Activity { optional uint64 id = 1; required uint64 player_id = 2; diff --git a/protobuf/goal.proto b/protobuf/goal.proto index 668fd1b..684b162 100644 --- a/protobuf/goal.proto +++ b/protobuf/goal.proto @@ -1,3 +1,4 @@ +syntax = "proto2"; message Goal { optional uint64 id = 1; optional uint64 player_id = 2; diff --git a/protobuf/hash-seeds.proto b/protobuf/hash-seeds.proto index 0be1424..a74416f 100644 --- a/protobuf/hash-seeds.proto +++ b/protobuf/hash-seeds.proto @@ -1,3 +1,4 @@ +syntax = "proto2"; message HashSeed { required uint64 seed1 = 1; required uint64 seed2 = 2; diff --git a/protobuf/login-response.proto b/protobuf/login-response.proto index a3661a1..eb52ef8 100644 --- a/protobuf/login-response.proto +++ b/protobuf/login-response.proto @@ -1,3 +1,4 @@ +syntax = "proto2"; /* XXX: This is a first approximation of login response. Not looked into or verified. */ message UDPNode { diff --git a/protobuf/per-session-info.proto b/protobuf/per-session-info.proto index a20264f..950e7ff 100644 --- a/protobuf/per-session-info.proto +++ b/protobuf/per-session-info.proto @@ -1,3 +1,4 @@ +syntax = "proto2"; message PerSessionInfo { required string relay_url = 1; } diff --git a/protobuf/periodic-info.proto b/protobuf/periodic-info.proto index 2d6e6bc..9b7b95e 100644 --- a/protobuf/periodic-info.proto +++ b/protobuf/periodic-info.proto @@ -1,3 +1,4 @@ +syntax = "proto2"; message PeriodicInfo { required string game_server_ip = 1; optional uint32 f2 = 2; diff --git a/protobuf/profile.proto b/protobuf/profile.proto index 5daa757..36d5c3b 100644 --- a/protobuf/profile.proto +++ b/protobuf/profile.proto @@ -1,3 +1,4 @@ +syntax = "proto2"; message Profile { optional int64 id = 1; optional int32 is_connected_to_strava = 2; diff --git a/protobuf/segment-result.proto b/protobuf/segment-result.proto index 2b705c3..19acf4d 100644 --- a/protobuf/segment-result.proto +++ b/protobuf/segment-result.proto @@ -1,3 +1,4 @@ +syntax = "proto2"; message SegmentResult { optional uint64 id = 1; required uint64 player_id = 2; diff --git a/protobuf/tcp-node-msgs.proto b/protobuf/tcp-node-msgs.proto index 54c3e03..e4d1ed5 100644 --- a/protobuf/tcp-node-msgs.proto +++ b/protobuf/tcp-node-msgs.proto @@ -1,3 +1,4 @@ +syntax = "proto2"; //////////////////////////////////////// // Initial TCP response below //////////////////////////////////////// diff --git a/protobuf/udp-node-msgs.proto b/protobuf/udp-node-msgs.proto index 7387a6f..58c1ac7 100644 --- a/protobuf/udp-node-msgs.proto +++ b/protobuf/udp-node-msgs.proto @@ -1,3 +1,4 @@ +syntax = "proto2"; message PlayerState { optional int32 id = 1; optional int64 worldTime = 2; diff --git a/protobuf/world.proto b/protobuf/world.proto index 0b4e834..9530b90 100644 --- a/protobuf/world.proto +++ b/protobuf/world.proto @@ -1,3 +1,4 @@ +syntax = "proto2"; message World { required uint32 id = 1; required string name = 2; diff --git a/protobuf/zfiles.proto b/protobuf/zfiles.proto index 722459b..eaa11e7 100644 --- a/protobuf/zfiles.proto +++ b/protobuf/zfiles.proto @@ -1,3 +1,4 @@ +syntax = "proto2"; message ZFile { required uint64 id = 1; required string folder = 2;