You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Plugin runtime |`../protocol/protoc-gen-bitwise/runtime/cs/{BitReader,BitWriter,Quantize}.cs`|`Quantize.cs` is copied into `Generated/` at build time |
@@ -34,8 +34,11 @@ Override with `/p:_ProtocolRepo=...` or a local `Directory.Build.props` if your
34
34
## Change workflow
35
35
36
36
1.**Edit the `.proto` file(s)** in `../protocol/proto/decentraland/...`
37
-
- For new top-level game messages, add to the `ClientMessage` / `ServerMessage``oneof` in `pulse_comms.proto`.
38
-
- For shared primitives, edit the appropriate file in `common/`.
37
+
-**Pick the right pulse file by direction:**
38
+
- Client→server message → add it to `pulse_client.proto`, then add the variant to the `ClientMessage``oneof` at the bottom of that file.
39
+
- Server→client message → add it to `pulse_server.proto`, then add the variant to the `ServerMessage``oneof` at the bottom of that file.
40
+
- Type referenced from **both** directions (e.g. another shared state struct like `PlayerState`) → put it in `pulse_shared.proto`. Both `pulse_client.proto` and `pulse_server.proto` import it. Don't cross-import client↔server.
41
+
- For shared primitives across protocols (vectors, etc.), edit the appropriate file in `common/`.
39
42
- Filenames are `snake_case.proto`; message types are `PascalCase`; fields are `snake_case`.
40
43
-**Keep comments minimal** — at most one short line above a message or field. No multi-paragraph docblocks, bullet-list "contracts", or lifecycle prose. The proto is a schema vendored into every client repo; invariants belong in the server handler that enforces them or in the PR description, not here.
41
44
@@ -49,7 +52,7 @@ Override with `/p:_ProtocolRepo=...` or a local `Directory.Build.props` if your
Rules of thumb: match existing tiering in `pulse_comms.proto`; `optional` on a quantized field means it participates in the plugin-generated field_mask (absent fields don't hit the wire).
55
+
Rules of thumb: match existing tiering in `pulse_server.proto` (`PlayerStateDeltaTier0`); `optional` on a quantized field means it participates in the plugin-generated field_mask (absent fields don't hit the wire).
2. Run tests: `DOTNET_ROOT="$HOME/.dotnet" PATH="$HOME/.dotnet:$PATH" dotnet test src/DCLPulse/DCLPulse.sln -p:GenerateProto=false`
98
-
3. Verify the new/changed C# types show up in `src/Protocol/Generated/PulseComms.cs`(data class) and `PulseComms.Bitwise.cs` (if the message has `quantized` / `bit_packed` fields).
101
+
3. Verify the new/changed C# types show up in the generated file matching the source proto: `src/Protocol/Generated/PulseClient.cs`, `PulseServer.cs`, or `PulseShared.cs`(data classes), plus `PulseServer.Bitwise.cs`etc. (if the message has `quantized` / `bit_packed` fields). All three live in the same `Decentraland.Pulse` namespace, so callers don't need to know which file a type came from.
99
102
4. If you changed `ClientMessage` / `ServerMessage` oneofs, confirm the new `MessageOneofCase` enum value appears and your handler is registered.
0 commit comments