Add indices to shot proto
All checks were successful
Tests / Tests (pull_request) Successful in 11s

This commit is contained in:
2024-09-13 16:54:17 -07:00
parent d57bb607e4
commit 9b18ada78d
4 changed files with 40 additions and 10 deletions

View File

@@ -930,6 +930,8 @@ function _decodeKeyBallIdentifiers(bb: ByteBuffer): KeyBallIdentifiers {
export interface Shot {
identifier_histories?: IdentifierHistory[];
key_balls?: KeyBallIdentifiers;
start_index?: number;
end_index?: number;
}
export function encodeShot(message: Shot): Uint8Array {
@@ -962,6 +964,20 @@ function _encodeShot(message: Shot, bb: ByteBuffer): void {
writeByteBuffer(bb, nested);
pushByteBuffer(nested);
}
// optional uint32 start_index = 5;
let $start_index = message.start_index;
if ($start_index !== undefined) {
writeVarint32(bb, 40);
writeVarint32(bb, $start_index);
}
// optional uint32 end_index = 6;
let $end_index = message.end_index;
if ($end_index !== undefined) {
writeVarint32(bb, 48);
writeVarint32(bb, $end_index);
}
}
export function decodeShot(binary: Uint8Array): Shot {
@@ -996,6 +1012,18 @@ function _decodeShot(bb: ByteBuffer): Shot {
break;
}
// optional uint32 start_index = 5;
case 5: {
message.start_index = readVarint32(bb) >>> 0;
break;
}
// optional uint32 end_index = 6;
case 6: {
message.end_index = readVarint32(bb) >>> 0;
break;
}
default:
skipUnknownField(bb, tag & 7);
}