Commit 2725d7aa authored by Chunchi Che's avatar Chunchi Che

sync noes-protobuf

parent 49c04e7c
neos-protobuf @ fb92cd6f
Subproject commit ff89698e6fb11829a7170fdf38de646e720bd96d Subproject commit fb92cd6fee6515d9248bfbe8e178ff0dbc7bcae5
...@@ -5600,7 +5600,7 @@ export namespace ygopro { ...@@ -5600,7 +5600,7 @@ export namespace ygopro {
#one_of_decls: number[][] = [ #one_of_decls: number[][] = [
[ [
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 21, 22, 23, 24, 25, 26, 27, 28, 29,
], ],
]; ];
constructor( constructor(
...@@ -5636,6 +5636,7 @@ export namespace ygopro { ...@@ -5636,6 +5636,7 @@ export namespace ygopro {
select_tribute?: never; select_tribute?: never;
update_counter?: never; update_counter?: never;
select_counter?: never; select_counter?: never;
sort_card?: never;
} }
| { | {
start?: never; start?: never;
...@@ -5666,6 +5667,7 @@ export namespace ygopro { ...@@ -5666,6 +5667,7 @@ export namespace ygopro {
select_tribute?: never; select_tribute?: never;
update_counter?: never; update_counter?: never;
select_counter?: never; select_counter?: never;
sort_card?: never;
} }
| { | {
start?: never; start?: never;
...@@ -5696,6 +5698,7 @@ export namespace ygopro { ...@@ -5696,6 +5698,7 @@ export namespace ygopro {
select_tribute?: never; select_tribute?: never;
update_counter?: never; update_counter?: never;
select_counter?: never; select_counter?: never;
sort_card?: never;
} }
| { | {
start?: never; start?: never;
...@@ -5726,6 +5729,7 @@ export namespace ygopro { ...@@ -5726,6 +5729,7 @@ export namespace ygopro {
select_tribute?: never; select_tribute?: never;
update_counter?: never; update_counter?: never;
select_counter?: never; select_counter?: never;
sort_card?: never;
} }
| { | {
start?: never; start?: never;
...@@ -5756,6 +5760,7 @@ export namespace ygopro { ...@@ -5756,6 +5760,7 @@ export namespace ygopro {
select_tribute?: never; select_tribute?: never;
update_counter?: never; update_counter?: never;
select_counter?: never; select_counter?: never;
sort_card?: never;
} }
| { | {
start?: never; start?: never;
...@@ -5786,6 +5791,7 @@ export namespace ygopro { ...@@ -5786,6 +5791,7 @@ export namespace ygopro {
select_tribute?: never; select_tribute?: never;
update_counter?: never; update_counter?: never;
select_counter?: never; select_counter?: never;
sort_card?: never;
} }
| { | {
start?: never; start?: never;
...@@ -5816,6 +5822,7 @@ export namespace ygopro { ...@@ -5816,6 +5822,7 @@ export namespace ygopro {
select_tribute?: never; select_tribute?: never;
update_counter?: never; update_counter?: never;
select_counter?: never; select_counter?: never;
sort_card?: never;
} }
| { | {
start?: never; start?: never;
...@@ -5846,6 +5853,7 @@ export namespace ygopro { ...@@ -5846,6 +5853,7 @@ export namespace ygopro {
select_tribute?: never; select_tribute?: never;
update_counter?: never; update_counter?: never;
select_counter?: never; select_counter?: never;
sort_card?: never;
} }
| { | {
start?: never; start?: never;
...@@ -5876,6 +5884,7 @@ export namespace ygopro { ...@@ -5876,6 +5884,7 @@ export namespace ygopro {
select_tribute?: never; select_tribute?: never;
update_counter?: never; update_counter?: never;
select_counter?: never; select_counter?: never;
sort_card?: never;
} }
| { | {
start?: never; start?: never;
...@@ -5906,6 +5915,7 @@ export namespace ygopro { ...@@ -5906,6 +5915,7 @@ export namespace ygopro {
select_tribute?: never; select_tribute?: never;
update_counter?: never; update_counter?: never;
select_counter?: never; select_counter?: never;
sort_card?: never;
} }
| { | {
start?: never; start?: never;
...@@ -5936,6 +5946,7 @@ export namespace ygopro { ...@@ -5936,6 +5946,7 @@ export namespace ygopro {
select_tribute?: never; select_tribute?: never;
update_counter?: never; update_counter?: never;
select_counter?: never; select_counter?: never;
sort_card?: never;
} }
| { | {
start?: never; start?: never;
...@@ -5966,6 +5977,7 @@ export namespace ygopro { ...@@ -5966,6 +5977,7 @@ export namespace ygopro {
select_tribute?: never; select_tribute?: never;
update_counter?: never; update_counter?: never;
select_counter?: never; select_counter?: never;
sort_card?: never;
} }
| { | {
start?: never; start?: never;
...@@ -5996,6 +6008,7 @@ export namespace ygopro { ...@@ -5996,6 +6008,7 @@ export namespace ygopro {
select_tribute?: never; select_tribute?: never;
update_counter?: never; update_counter?: never;
select_counter?: never; select_counter?: never;
sort_card?: never;
} }
| { | {
start?: never; start?: never;
...@@ -6026,6 +6039,7 @@ export namespace ygopro { ...@@ -6026,6 +6039,7 @@ export namespace ygopro {
select_tribute?: never; select_tribute?: never;
update_counter?: never; update_counter?: never;
select_counter?: never; select_counter?: never;
sort_card?: never;
} }
| { | {
start?: never; start?: never;
...@@ -6056,6 +6070,7 @@ export namespace ygopro { ...@@ -6056,6 +6070,7 @@ export namespace ygopro {
select_tribute?: never; select_tribute?: never;
update_counter?: never; update_counter?: never;
select_counter?: never; select_counter?: never;
sort_card?: never;
} }
| { | {
start?: never; start?: never;
...@@ -6086,6 +6101,7 @@ export namespace ygopro { ...@@ -6086,6 +6101,7 @@ export namespace ygopro {
select_tribute?: never; select_tribute?: never;
update_counter?: never; update_counter?: never;
select_counter?: never; select_counter?: never;
sort_card?: never;
} }
| { | {
start?: never; start?: never;
...@@ -6116,6 +6132,7 @@ export namespace ygopro { ...@@ -6116,6 +6132,7 @@ export namespace ygopro {
select_tribute?: never; select_tribute?: never;
update_counter?: never; update_counter?: never;
select_counter?: never; select_counter?: never;
sort_card?: never;
} }
| { | {
start?: never; start?: never;
...@@ -6146,6 +6163,7 @@ export namespace ygopro { ...@@ -6146,6 +6163,7 @@ export namespace ygopro {
select_tribute?: never; select_tribute?: never;
update_counter?: never; update_counter?: never;
select_counter?: never; select_counter?: never;
sort_card?: never;
} }
| { | {
start?: never; start?: never;
...@@ -6176,6 +6194,7 @@ export namespace ygopro { ...@@ -6176,6 +6194,7 @@ export namespace ygopro {
select_tribute?: never; select_tribute?: never;
update_counter?: never; update_counter?: never;
select_counter?: never; select_counter?: never;
sort_card?: never;
} }
| { | {
start?: never; start?: never;
...@@ -6206,6 +6225,7 @@ export namespace ygopro { ...@@ -6206,6 +6225,7 @@ export namespace ygopro {
select_tribute?: never; select_tribute?: never;
update_counter?: never; update_counter?: never;
select_counter?: never; select_counter?: never;
sort_card?: never;
} }
| { | {
start?: never; start?: never;
...@@ -6236,6 +6256,7 @@ export namespace ygopro { ...@@ -6236,6 +6256,7 @@ export namespace ygopro {
select_tribute?: never; select_tribute?: never;
update_counter?: never; update_counter?: never;
select_counter?: never; select_counter?: never;
sort_card?: never;
} }
| { | {
start?: never; start?: never;
...@@ -6266,6 +6287,7 @@ export namespace ygopro { ...@@ -6266,6 +6287,7 @@ export namespace ygopro {
select_tribute?: never; select_tribute?: never;
update_counter?: never; update_counter?: never;
select_counter?: never; select_counter?: never;
sort_card?: never;
} }
| { | {
start?: never; start?: never;
...@@ -6296,6 +6318,7 @@ export namespace ygopro { ...@@ -6296,6 +6318,7 @@ export namespace ygopro {
select_tribute?: never; select_tribute?: never;
update_counter?: never; update_counter?: never;
select_counter?: never; select_counter?: never;
sort_card?: never;
} }
| { | {
start?: never; start?: never;
...@@ -6326,6 +6349,7 @@ export namespace ygopro { ...@@ -6326,6 +6349,7 @@ export namespace ygopro {
select_tribute?: never; select_tribute?: never;
update_counter?: never; update_counter?: never;
select_counter?: never; select_counter?: never;
sort_card?: never;
} }
| { | {
start?: never; start?: never;
...@@ -6356,6 +6380,7 @@ export namespace ygopro { ...@@ -6356,6 +6380,7 @@ export namespace ygopro {
select_tribute?: never; select_tribute?: never;
update_counter?: never; update_counter?: never;
select_counter?: never; select_counter?: never;
sort_card?: never;
} }
| { | {
start?: never; start?: never;
...@@ -6386,6 +6411,7 @@ export namespace ygopro { ...@@ -6386,6 +6411,7 @@ export namespace ygopro {
select_tribute?: StocGameMessage.MsgSelectTribute; select_tribute?: StocGameMessage.MsgSelectTribute;
update_counter?: never; update_counter?: never;
select_counter?: never; select_counter?: never;
sort_card?: never;
} }
| { | {
start?: never; start?: never;
...@@ -6416,6 +6442,7 @@ export namespace ygopro { ...@@ -6416,6 +6442,7 @@ export namespace ygopro {
select_tribute?: never; select_tribute?: never;
update_counter?: StocGameMessage.MsgUpdateCounter; update_counter?: StocGameMessage.MsgUpdateCounter;
select_counter?: never; select_counter?: never;
sort_card?: never;
} }
| { | {
start?: never; start?: never;
...@@ -6446,6 +6473,38 @@ export namespace ygopro { ...@@ -6446,6 +6473,38 @@ export namespace ygopro {
select_tribute?: never; select_tribute?: never;
update_counter?: never; update_counter?: never;
select_counter?: StocGameMessage.MsgSelectCounter; select_counter?: StocGameMessage.MsgSelectCounter;
sort_card?: never;
}
| {
start?: never;
draw?: never;
new_turn?: never;
new_phase?: never;
hint?: never;
select_idle_cmd?: never;
select_place?: never;
move?: never;
select_card?: never;
select_chain?: never;
select_effect_yn?: never;
select_position?: never;
select_option?: never;
shuffle_hand?: never;
select_battle_cmd?: never;
pos_change?: never;
select_unselect_card?: never;
select_yes_no?: never;
update_hp?: never;
win?: never;
wait?: never;
unimplemented?: never;
update_data?: never;
reload_field?: never;
select_sum?: never;
select_tribute?: never;
update_counter?: never;
select_counter?: never;
sort_card?: StocGameMessage.MsgSortCard;
} }
)) ))
) { ) {
...@@ -6549,6 +6608,9 @@ export namespace ygopro { ...@@ -6549,6 +6608,9 @@ export namespace ygopro {
if ("select_counter" in data && data.select_counter != undefined) { if ("select_counter" in data && data.select_counter != undefined) {
this.select_counter = data.select_counter; this.select_counter = data.select_counter;
} }
if ("sort_card" in data && data.sort_card != undefined) {
this.sort_card = data.sort_card;
}
} }
} }
get start() { get start() {
...@@ -6915,6 +6977,19 @@ export namespace ygopro { ...@@ -6915,6 +6977,19 @@ export namespace ygopro {
get has_select_counter() { get has_select_counter() {
return pb_1.Message.getField(this, 28) != null; return pb_1.Message.getField(this, 28) != null;
} }
get sort_card() {
return pb_1.Message.getWrapperField(
this,
StocGameMessage.MsgSortCard,
29
) as StocGameMessage.MsgSortCard;
}
set sort_card(value: StocGameMessage.MsgSortCard) {
pb_1.Message.setOneofWrapperField(this, 29, this.#one_of_decls[0], value);
}
get has_sort_card() {
return pb_1.Message.getField(this, 29) != null;
}
get gameMsg() { get gameMsg() {
const cases: { const cases: {
[index: number]: [index: number]:
...@@ -6946,7 +7021,8 @@ export namespace ygopro { ...@@ -6946,7 +7021,8 @@ export namespace ygopro {
| "select_sum" | "select_sum"
| "select_tribute" | "select_tribute"
| "update_counter" | "update_counter"
| "select_counter"; | "select_counter"
| "sort_card";
} = { } = {
0: "none", 0: "none",
1: "start", 1: "start",
...@@ -6977,13 +7053,14 @@ export namespace ygopro { ...@@ -6977,13 +7053,14 @@ export namespace ygopro {
26: "select_tribute", 26: "select_tribute",
27: "update_counter", 27: "update_counter",
28: "select_counter", 28: "select_counter",
29: "sort_card",
}; };
return cases[ return cases[
pb_1.Message.computeOneofCase( pb_1.Message.computeOneofCase(
this, this,
[ [
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
] ]
) )
]; ];
...@@ -7061,6 +7138,9 @@ export namespace ygopro { ...@@ -7061,6 +7138,9 @@ export namespace ygopro {
select_counter?: ReturnType< select_counter?: ReturnType<
typeof StocGameMessage.MsgSelectCounter.prototype.toObject typeof StocGameMessage.MsgSelectCounter.prototype.toObject
>; >;
sort_card?: ReturnType<
typeof StocGameMessage.MsgSortCard.prototype.toObject
>;
}): StocGameMessage { }): StocGameMessage {
const message = new StocGameMessage({}); const message = new StocGameMessage({});
if (data.start != null) { if (data.start != null) {
...@@ -7189,6 +7269,11 @@ export namespace ygopro { ...@@ -7189,6 +7269,11 @@ export namespace ygopro {
data.select_counter data.select_counter
); );
} }
if (data.sort_card != null) {
message.sort_card = StocGameMessage.MsgSortCard.fromObject(
data.sort_card
);
}
return message; return message;
} }
toObject() { toObject() {
...@@ -7265,6 +7350,9 @@ export namespace ygopro { ...@@ -7265,6 +7350,9 @@ export namespace ygopro {
select_counter?: ReturnType< select_counter?: ReturnType<
typeof StocGameMessage.MsgSelectCounter.prototype.toObject typeof StocGameMessage.MsgSelectCounter.prototype.toObject
>; >;
sort_card?: ReturnType<
typeof StocGameMessage.MsgSortCard.prototype.toObject
>;
} = {}; } = {};
if (this.start != null) { if (this.start != null) {
data.start = this.start.toObject(); data.start = this.start.toObject();
...@@ -7350,6 +7438,9 @@ export namespace ygopro { ...@@ -7350,6 +7438,9 @@ export namespace ygopro {
if (this.select_counter != null) { if (this.select_counter != null) {
data.select_counter = this.select_counter.toObject(); data.select_counter = this.select_counter.toObject();
} }
if (this.sort_card != null) {
data.sort_card = this.sort_card.toObject();
}
return data; return data;
} }
serialize(): Uint8Array; serialize(): Uint8Array;
...@@ -7456,6 +7547,10 @@ export namespace ygopro { ...@@ -7456,6 +7547,10 @@ export namespace ygopro {
writer.writeMessage(28, this.select_counter, () => writer.writeMessage(28, this.select_counter, () =>
this.select_counter.serialize(writer) this.select_counter.serialize(writer)
); );
if (this.has_sort_card)
writer.writeMessage(29, this.sort_card, () =>
this.sort_card.serialize(writer)
);
if (!w) return writer.getResultBuffer(); if (!w) return writer.getResultBuffer();
} }
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): StocGameMessage { static deserialize(bytes: Uint8Array | pb_1.BinaryReader): StocGameMessage {
...@@ -7680,6 +7775,14 @@ export namespace ygopro { ...@@ -7680,6 +7775,14 @@ export namespace ygopro {
StocGameMessage.MsgSelectCounter.deserialize(reader)) StocGameMessage.MsgSelectCounter.deserialize(reader))
); );
break; break;
case 29:
reader.readMessage(
message.sort_card,
() =>
(message.sort_card =
StocGameMessage.MsgSortCard.deserialize(reader))
);
break;
default: default:
reader.skipField(); reader.skipField();
} }
...@@ -14454,6 +14557,271 @@ export namespace ygopro { ...@@ -14454,6 +14557,271 @@ export namespace ygopro {
} }
} }
} }
export class MsgSortCard extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(
data?:
| any[]
| {
player?: number;
options?: StocGameMessage.MsgSortCard.Info[];
}
) {
super();
pb_1.Message.initialize(
this,
Array.isArray(data) ? data : [],
0,
-1,
[2],
this.#one_of_decls
);
if (!Array.isArray(data) && typeof data == "object") {
if ("player" in data && data.player != undefined) {
this.player = data.player;
}
if ("options" in data && data.options != undefined) {
this.options = data.options;
}
}
}
get player() {
return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
}
set player(value: number) {
pb_1.Message.setField(this, 1, value);
}
get options() {
return pb_1.Message.getRepeatedWrapperField(
this,
StocGameMessage.MsgSortCard.Info,
2
) as StocGameMessage.MsgSortCard.Info[];
}
set options(value: StocGameMessage.MsgSortCard.Info[]) {
pb_1.Message.setRepeatedWrapperField(this, 2, value);
}
static fromObject(data: {
player?: number;
options?: ReturnType<
typeof StocGameMessage.MsgSortCard.Info.prototype.toObject
>[];
}): MsgSortCard {
const message = new MsgSortCard({});
if (data.player != null) {
message.player = data.player;
}
if (data.options != null) {
message.options = data.options.map((item) =>
StocGameMessage.MsgSortCard.Info.fromObject(item)
);
}
return message;
}
toObject() {
const data: {
player?: number;
options?: ReturnType<
typeof StocGameMessage.MsgSortCard.Info.prototype.toObject
>[];
} = {};
if (this.player != null) {
data.player = this.player;
}
if (this.options != null) {
data.options = this.options.map(
(item: StocGameMessage.MsgSortCard.Info) => item.toObject()
);
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.player != 0) writer.writeInt32(1, this.player);
if (this.options.length)
writer.writeRepeatedMessage(
2,
this.options,
(item: StocGameMessage.MsgSortCard.Info) => item.serialize(writer)
);
if (!w) return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgSortCard {
const reader =
bytes instanceof pb_1.BinaryReader
? bytes
: new pb_1.BinaryReader(bytes),
message = new MsgSortCard();
while (reader.nextField()) {
if (reader.isEndGroup()) break;
switch (reader.getFieldNumber()) {
case 1:
message.player = reader.readInt32();
break;
case 2:
reader.readMessage(message.options, () =>
pb_1.Message.addToRepeatedWrapperField(
message,
2,
StocGameMessage.MsgSortCard.Info.deserialize(reader),
StocGameMessage.MsgSortCard.Info
)
);
break;
default:
reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): MsgSortCard {
return MsgSortCard.deserialize(bytes);
}
}
export namespace MsgSortCard {
export class Info extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(
data?:
| any[]
| {
code?: number;
location?: CardLocation;
response?: number;
}
) {
super();
pb_1.Message.initialize(
this,
Array.isArray(data) ? data : [],
0,
-1,
[],
this.#one_of_decls
);
if (!Array.isArray(data) && typeof data == "object") {
if ("code" in data && data.code != undefined) {
this.code = data.code;
}
if ("location" in data && data.location != undefined) {
this.location = data.location;
}
if ("response" in data && data.response != undefined) {
this.response = data.response;
}
}
}
get code() {
return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
}
set code(value: number) {
pb_1.Message.setField(this, 1, value);
}
get location() {
return pb_1.Message.getWrapperField(
this,
CardLocation,
2
) as CardLocation;
}
set location(value: CardLocation) {
pb_1.Message.setWrapperField(this, 2, value);
}
get has_location() {
return pb_1.Message.getField(this, 2) != null;
}
get response() {
return pb_1.Message.getFieldWithDefault(this, 3, 0) as number;
}
set response(value: number) {
pb_1.Message.setField(this, 3, value);
}
static fromObject(data: {
code?: number;
location?: ReturnType<typeof CardLocation.prototype.toObject>;
response?: number;
}): Info {
const message = new Info({});
if (data.code != null) {
message.code = data.code;
}
if (data.location != null) {
message.location = CardLocation.fromObject(data.location);
}
if (data.response != null) {
message.response = data.response;
}
return message;
}
toObject() {
const data: {
code?: number;
location?: ReturnType<typeof CardLocation.prototype.toObject>;
response?: number;
} = {};
if (this.code != null) {
data.code = this.code;
}
if (this.location != null) {
data.location = this.location.toObject();
}
if (this.response != null) {
data.response = this.response;
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.code != 0) writer.writeInt32(1, this.code);
if (this.has_location)
writer.writeMessage(2, this.location, () =>
this.location.serialize(writer)
);
if (this.response != 0) writer.writeInt32(3, this.response);
if (!w) return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Info {
const reader =
bytes instanceof pb_1.BinaryReader
? bytes
: new pb_1.BinaryReader(bytes),
message = new Info();
while (reader.nextField()) {
if (reader.isEndGroup()) break;
switch (reader.getFieldNumber()) {
case 1:
message.code = reader.readInt32();
break;
case 2:
reader.readMessage(
message.location,
() => (message.location = CardLocation.deserialize(reader))
);
break;
case 3:
message.response = reader.readInt32();
break;
default:
reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): Info {
return Info.deserialize(bytes);
}
}
}
export class MsgReloadField extends pb_1.Message { export class MsgReloadField extends pb_1.Message {
#one_of_decls: number[][] = []; #one_of_decls: number[][] = [];
constructor( constructor(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment