mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
feat: let the damn thing compile
This commit is contained in:
1 parent
5d81b7ff5a
commit
74fefe6291
40 files changed
+34496
-378
No files matched your search
@@ -1,5 +1,17 @@
|
||||
// @ts-nocheck
|
||||
export * from './i18n.ts';
|
||||
export * from './legacy_average_definitions.ts';
|
||||
export * from './legacy_camouflage_definitions.ts';
|
||||
export * from './legacy_consumable_definitions.ts';
|
||||
export * from './legacy_equipment_definitions.ts';
|
||||
export * from './legacy_game_definitions.ts';
|
||||
export * from './legacy_i18n.ts';
|
||||
export * from './legacy_map_definitions.ts';
|
||||
export * from './legacy_model_definitions.ts';
|
||||
export * from './legacy_provision_definitions.ts';
|
||||
export * from './legacy_rating_leaderboard.ts';
|
||||
export * from './legacy_skill_definitions.ts';
|
||||
export * from './legacy_tank_definitions.ts';
|
||||
export * from './reviews.ts';
|
||||
export * from './tank.ts';
|
||||
export * from './tanks.ts';
|
||||
@@ -0,0 +1,47 @@
|
||||
syntax = "proto2";
|
||||
|
||||
package blitzkit;
|
||||
|
||||
message AverageDefinitions {
|
||||
map<uint32, AverageDefinitionsEntry> averages = 1;
|
||||
required Samples samples = 2;
|
||||
required uint64 time = 3;
|
||||
}
|
||||
|
||||
message AverageDefinitionsEntry {
|
||||
required AverageDefinitionsAllStats mu = 1;
|
||||
required AverageDefinitionsAllStats sigma = 2;
|
||||
required AverageDefinitionsAllStats r = 3;
|
||||
required Samples samples = 4;
|
||||
}
|
||||
|
||||
message AverageDefinitionsAllStats {
|
||||
required float battles = 1;
|
||||
required float capture_points = 2;
|
||||
required float damage_dealt = 3;
|
||||
required float damage_received = 4;
|
||||
required float dropped_capture_points = 5;
|
||||
required float frags = 6;
|
||||
required float frags8p = 7;
|
||||
required float hits = 8;
|
||||
required float losses = 9;
|
||||
required float max_frags = 10;
|
||||
required float max_xp = 11;
|
||||
required float shots = 12;
|
||||
required float spotted = 13;
|
||||
required float survived_battles = 14;
|
||||
required float win_and_survived = 15;
|
||||
required float wins = 16;
|
||||
required float xp = 17;
|
||||
required float battle_life_time = 18;
|
||||
}
|
||||
|
||||
message Samples {
|
||||
required uint32 d_1 = 1;
|
||||
required uint32 d_7 = 2;
|
||||
required uint32 d_30 = 3;
|
||||
required uint32 d_60 = 4;
|
||||
required uint32 d_90 = 5;
|
||||
required uint32 d_120 = 6;
|
||||
required uint32 total = 7;
|
||||
}
|
||||
@@ -0,0 +1,944 @@
|
||||
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-ts_proto v2.2.2
|
||||
// protoc v5.28.2
|
||||
// source: packages/core/src/protos/legacy_average_definitions.proto
|
||||
|
||||
/* eslint-disable */
|
||||
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
||||
|
||||
export const protobufPackage = "blitzkit";
|
||||
|
||||
export interface AverageDefinitions {
|
||||
averages: { [key: number]: AverageDefinitionsEntry };
|
||||
samples: Samples;
|
||||
time: number;
|
||||
}
|
||||
|
||||
export interface AverageDefinitions_AveragesEntry {
|
||||
key: number;
|
||||
value: AverageDefinitionsEntry | undefined;
|
||||
}
|
||||
|
||||
export interface AverageDefinitionsEntry {
|
||||
mu: AverageDefinitionsAllStats;
|
||||
sigma: AverageDefinitionsAllStats;
|
||||
r: AverageDefinitionsAllStats;
|
||||
samples: Samples;
|
||||
}
|
||||
|
||||
export interface AverageDefinitionsAllStats {
|
||||
battles: number;
|
||||
capture_points: number;
|
||||
damage_dealt: number;
|
||||
damage_received: number;
|
||||
dropped_capture_points: number;
|
||||
frags: number;
|
||||
frags8p: number;
|
||||
hits: number;
|
||||
losses: number;
|
||||
max_frags: number;
|
||||
max_xp: number;
|
||||
shots: number;
|
||||
spotted: number;
|
||||
survived_battles: number;
|
||||
win_and_survived: number;
|
||||
wins: number;
|
||||
xp: number;
|
||||
battle_life_time: number;
|
||||
}
|
||||
|
||||
export interface Samples {
|
||||
d_1: number;
|
||||
d_7: number;
|
||||
d_30: number;
|
||||
d_60: number;
|
||||
d_90: number;
|
||||
d_120: number;
|
||||
total: number;
|
||||
}
|
||||
|
||||
function createBaseAverageDefinitions(): AverageDefinitions {
|
||||
return { averages: {}, samples: createBaseSamples(), time: 0 };
|
||||
}
|
||||
|
||||
export const AverageDefinitions: MessageFns<AverageDefinitions> = {
|
||||
encode(message: AverageDefinitions, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
Object.entries(message.averages).forEach(([key, value]) => {
|
||||
AverageDefinitions_AveragesEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join();
|
||||
});
|
||||
if (message.samples !== undefined) {
|
||||
Samples.encode(message.samples, writer.uint32(18).fork()).join();
|
||||
}
|
||||
if (message.time !== 0) {
|
||||
writer.uint32(24).uint64(message.time);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): AverageDefinitions {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseAverageDefinitions();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
const entry1 = AverageDefinitions_AveragesEntry.decode(reader, reader.uint32());
|
||||
if (entry1.value !== undefined) {
|
||||
message.averages[entry1.key] = entry1.value;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.samples = Samples.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
case 3: {
|
||||
if (tag !== 24) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.time = longToNumber(reader.uint64());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): AverageDefinitions {
|
||||
return {
|
||||
averages: isObject(object.averages)
|
||||
? Object.entries(object.averages).reduce<{ [key: number]: AverageDefinitionsEntry }>((acc, [key, value]) => {
|
||||
acc[globalThis.Number(key)] = AverageDefinitionsEntry.fromJSON(value);
|
||||
return acc;
|
||||
}, {})
|
||||
: {},
|
||||
samples: Samples.fromJSON(assertSet("AverageDefinitions.samples", object.samples)),
|
||||
time: globalThis.Number(assertSet("AverageDefinitions.time", object.time)),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: AverageDefinitions): unknown {
|
||||
const obj: any = {};
|
||||
if (message.averages) {
|
||||
const entries = Object.entries(message.averages);
|
||||
if (entries.length > 0) {
|
||||
obj.averages = {};
|
||||
entries.forEach(([k, v]) => {
|
||||
obj.averages[k] = AverageDefinitionsEntry.toJSON(v);
|
||||
});
|
||||
}
|
||||
}
|
||||
if (message.samples !== undefined) {
|
||||
obj.samples = Samples.toJSON(message.samples);
|
||||
}
|
||||
if (message.time !== 0) {
|
||||
obj.time = Math.round(message.time);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<AverageDefinitions>, I>>(base?: I): AverageDefinitions {
|
||||
return AverageDefinitions.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<AverageDefinitions>, I>>(object: I): AverageDefinitions {
|
||||
const message = createBaseAverageDefinitions();
|
||||
message.averages = Object.entries(object.averages ?? {}).reduce<{ [key: number]: AverageDefinitionsEntry }>(
|
||||
(acc, [key, value]) => {
|
||||
if (value !== undefined) {
|
||||
acc[globalThis.Number(key)] = AverageDefinitionsEntry.fromPartial(value);
|
||||
}
|
||||
return acc;
|
||||
},
|
||||
{},
|
||||
);
|
||||
message.samples = (object.samples !== undefined && object.samples !== null)
|
||||
? Samples.fromPartial(object.samples)
|
||||
: createBaseSamples();
|
||||
message.time = object.time ?? 0;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseAverageDefinitions_AveragesEntry(): AverageDefinitions_AveragesEntry {
|
||||
return { key: 0, value: createBaseAverageDefinitionsEntry() };
|
||||
}
|
||||
|
||||
export const AverageDefinitions_AveragesEntry: MessageFns<AverageDefinitions_AveragesEntry> = {
|
||||
encode(message: AverageDefinitions_AveragesEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.key !== undefined) {
|
||||
writer.uint32(8).uint32(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
AverageDefinitionsEntry.encode(message.value, writer.uint32(18).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): AverageDefinitions_AveragesEntry {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseAverageDefinitions_AveragesEntry();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 8) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.key = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.value = AverageDefinitionsEntry.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): AverageDefinitions_AveragesEntry {
|
||||
return {
|
||||
key: globalThis.Number(assertSet("AverageDefinitions_AveragesEntry.key", object.key)),
|
||||
value: AverageDefinitionsEntry.fromJSON(assertSet("AverageDefinitions_AveragesEntry.value", object.value)),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: AverageDefinitions_AveragesEntry): unknown {
|
||||
const obj: any = {};
|
||||
if (message.key !== undefined) {
|
||||
obj.key = Math.round(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
obj.value = AverageDefinitionsEntry.toJSON(message.value);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<AverageDefinitions_AveragesEntry>, I>>(
|
||||
base?: I,
|
||||
): AverageDefinitions_AveragesEntry {
|
||||
return AverageDefinitions_AveragesEntry.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<AverageDefinitions_AveragesEntry>, I>>(
|
||||
object: I,
|
||||
): AverageDefinitions_AveragesEntry {
|
||||
const message = createBaseAverageDefinitions_AveragesEntry();
|
||||
message.key = object.key ?? 0;
|
||||
message.value = (object.value !== undefined && object.value !== null)
|
||||
? AverageDefinitionsEntry.fromPartial(object.value)
|
||||
: undefined;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseAverageDefinitionsEntry(): AverageDefinitionsEntry {
|
||||
return {
|
||||
mu: createBaseAverageDefinitionsAllStats(),
|
||||
sigma: createBaseAverageDefinitionsAllStats(),
|
||||
r: createBaseAverageDefinitionsAllStats(),
|
||||
samples: createBaseSamples(),
|
||||
};
|
||||
}
|
||||
|
||||
export const AverageDefinitionsEntry: MessageFns<AverageDefinitionsEntry> = {
|
||||
encode(message: AverageDefinitionsEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.mu !== undefined) {
|
||||
AverageDefinitionsAllStats.encode(message.mu, writer.uint32(10).fork()).join();
|
||||
}
|
||||
if (message.sigma !== undefined) {
|
||||
AverageDefinitionsAllStats.encode(message.sigma, writer.uint32(18).fork()).join();
|
||||
}
|
||||
if (message.r !== undefined) {
|
||||
AverageDefinitionsAllStats.encode(message.r, writer.uint32(26).fork()).join();
|
||||
}
|
||||
if (message.samples !== undefined) {
|
||||
Samples.encode(message.samples, writer.uint32(34).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): AverageDefinitionsEntry {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseAverageDefinitionsEntry();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.mu = AverageDefinitionsAllStats.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.sigma = AverageDefinitionsAllStats.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
case 3: {
|
||||
if (tag !== 26) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.r = AverageDefinitionsAllStats.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
case 4: {
|
||||
if (tag !== 34) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.samples = Samples.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): AverageDefinitionsEntry {
|
||||
return {
|
||||
mu: AverageDefinitionsAllStats.fromJSON(assertSet("AverageDefinitionsEntry.mu", object.mu)),
|
||||
sigma: AverageDefinitionsAllStats.fromJSON(assertSet("AverageDefinitionsEntry.sigma", object.sigma)),
|
||||
r: AverageDefinitionsAllStats.fromJSON(assertSet("AverageDefinitionsEntry.r", object.r)),
|
||||
samples: Samples.fromJSON(assertSet("AverageDefinitionsEntry.samples", object.samples)),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: AverageDefinitionsEntry): unknown {
|
||||
const obj: any = {};
|
||||
if (message.mu !== undefined) {
|
||||
obj.mu = AverageDefinitionsAllStats.toJSON(message.mu);
|
||||
}
|
||||
if (message.sigma !== undefined) {
|
||||
obj.sigma = AverageDefinitionsAllStats.toJSON(message.sigma);
|
||||
}
|
||||
if (message.r !== undefined) {
|
||||
obj.r = AverageDefinitionsAllStats.toJSON(message.r);
|
||||
}
|
||||
if (message.samples !== undefined) {
|
||||
obj.samples = Samples.toJSON(message.samples);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<AverageDefinitionsEntry>, I>>(base?: I): AverageDefinitionsEntry {
|
||||
return AverageDefinitionsEntry.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<AverageDefinitionsEntry>, I>>(object: I): AverageDefinitionsEntry {
|
||||
const message = createBaseAverageDefinitionsEntry();
|
||||
message.mu = (object.mu !== undefined && object.mu !== null)
|
||||
? AverageDefinitionsAllStats.fromPartial(object.mu)
|
||||
: createBaseAverageDefinitionsAllStats();
|
||||
message.sigma = (object.sigma !== undefined && object.sigma !== null)
|
||||
? AverageDefinitionsAllStats.fromPartial(object.sigma)
|
||||
: createBaseAverageDefinitionsAllStats();
|
||||
message.r = (object.r !== undefined && object.r !== null)
|
||||
? AverageDefinitionsAllStats.fromPartial(object.r)
|
||||
: createBaseAverageDefinitionsAllStats();
|
||||
message.samples = (object.samples !== undefined && object.samples !== null)
|
||||
? Samples.fromPartial(object.samples)
|
||||
: createBaseSamples();
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseAverageDefinitionsAllStats(): AverageDefinitionsAllStats {
|
||||
return {
|
||||
battles: 0,
|
||||
capture_points: 0,
|
||||
damage_dealt: 0,
|
||||
damage_received: 0,
|
||||
dropped_capture_points: 0,
|
||||
frags: 0,
|
||||
frags8p: 0,
|
||||
hits: 0,
|
||||
losses: 0,
|
||||
max_frags: 0,
|
||||
max_xp: 0,
|
||||
shots: 0,
|
||||
spotted: 0,
|
||||
survived_battles: 0,
|
||||
win_and_survived: 0,
|
||||
wins: 0,
|
||||
xp: 0,
|
||||
battle_life_time: 0,
|
||||
};
|
||||
}
|
||||
|
||||
export const AverageDefinitionsAllStats: MessageFns<AverageDefinitionsAllStats> = {
|
||||
encode(message: AverageDefinitionsAllStats, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.battles !== 0) {
|
||||
writer.uint32(13).float(message.battles);
|
||||
}
|
||||
if (message.capture_points !== 0) {
|
||||
writer.uint32(21).float(message.capture_points);
|
||||
}
|
||||
if (message.damage_dealt !== 0) {
|
||||
writer.uint32(29).float(message.damage_dealt);
|
||||
}
|
||||
if (message.damage_received !== 0) {
|
||||
writer.uint32(37).float(message.damage_received);
|
||||
}
|
||||
if (message.dropped_capture_points !== 0) {
|
||||
writer.uint32(45).float(message.dropped_capture_points);
|
||||
}
|
||||
if (message.frags !== 0) {
|
||||
writer.uint32(53).float(message.frags);
|
||||
}
|
||||
if (message.frags8p !== 0) {
|
||||
writer.uint32(61).float(message.frags8p);
|
||||
}
|
||||
if (message.hits !== 0) {
|
||||
writer.uint32(69).float(message.hits);
|
||||
}
|
||||
if (message.losses !== 0) {
|
||||
writer.uint32(77).float(message.losses);
|
||||
}
|
||||
if (message.max_frags !== 0) {
|
||||
writer.uint32(85).float(message.max_frags);
|
||||
}
|
||||
if (message.max_xp !== 0) {
|
||||
writer.uint32(93).float(message.max_xp);
|
||||
}
|
||||
if (message.shots !== 0) {
|
||||
writer.uint32(101).float(message.shots);
|
||||
}
|
||||
if (message.spotted !== 0) {
|
||||
writer.uint32(109).float(message.spotted);
|
||||
}
|
||||
if (message.survived_battles !== 0) {
|
||||
writer.uint32(117).float(message.survived_battles);
|
||||
}
|
||||
if (message.win_and_survived !== 0) {
|
||||
writer.uint32(125).float(message.win_and_survived);
|
||||
}
|
||||
if (message.wins !== 0) {
|
||||
writer.uint32(133).float(message.wins);
|
||||
}
|
||||
if (message.xp !== 0) {
|
||||
writer.uint32(141).float(message.xp);
|
||||
}
|
||||
if (message.battle_life_time !== 0) {
|
||||
writer.uint32(149).float(message.battle_life_time);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): AverageDefinitionsAllStats {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseAverageDefinitionsAllStats();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 13) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.battles = reader.float();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 21) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.capture_points = reader.float();
|
||||
continue;
|
||||
}
|
||||
case 3: {
|
||||
if (tag !== 29) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.damage_dealt = reader.float();
|
||||
continue;
|
||||
}
|
||||
case 4: {
|
||||
if (tag !== 37) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.damage_received = reader.float();
|
||||
continue;
|
||||
}
|
||||
case 5: {
|
||||
if (tag !== 45) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.dropped_capture_points = reader.float();
|
||||
continue;
|
||||
}
|
||||
case 6: {
|
||||
if (tag !== 53) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.frags = reader.float();
|
||||
continue;
|
||||
}
|
||||
case 7: {
|
||||
if (tag !== 61) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.frags8p = reader.float();
|
||||
continue;
|
||||
}
|
||||
case 8: {
|
||||
if (tag !== 69) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.hits = reader.float();
|
||||
continue;
|
||||
}
|
||||
case 9: {
|
||||
if (tag !== 77) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.losses = reader.float();
|
||||
continue;
|
||||
}
|
||||
case 10: {
|
||||
if (tag !== 85) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.max_frags = reader.float();
|
||||
continue;
|
||||
}
|
||||
case 11: {
|
||||
if (tag !== 93) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.max_xp = reader.float();
|
||||
continue;
|
||||
}
|
||||
case 12: {
|
||||
if (tag !== 101) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.shots = reader.float();
|
||||
continue;
|
||||
}
|
||||
case 13: {
|
||||
if (tag !== 109) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.spotted = reader.float();
|
||||
continue;
|
||||
}
|
||||
case 14: {
|
||||
if (tag !== 117) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.survived_battles = reader.float();
|
||||
continue;
|
||||
}
|
||||
case 15: {
|
||||
if (tag !== 125) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.win_and_survived = reader.float();
|
||||
continue;
|
||||
}
|
||||
case 16: {
|
||||
if (tag !== 133) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.wins = reader.float();
|
||||
continue;
|
||||
}
|
||||
case 17: {
|
||||
if (tag !== 141) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.xp = reader.float();
|
||||
continue;
|
||||
}
|
||||
case 18: {
|
||||
if (tag !== 149) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.battle_life_time = reader.float();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): AverageDefinitionsAllStats {
|
||||
return {
|
||||
battles: globalThis.Number(assertSet("AverageDefinitionsAllStats.battles", object.battles)),
|
||||
capture_points: globalThis.Number(assertSet("AverageDefinitionsAllStats.capture_points", object.capture_points)),
|
||||
damage_dealt: globalThis.Number(assertSet("AverageDefinitionsAllStats.damage_dealt", object.damage_dealt)),
|
||||
damage_received: globalThis.Number(
|
||||
assertSet("AverageDefinitionsAllStats.damage_received", object.damage_received),
|
||||
),
|
||||
dropped_capture_points: globalThis.Number(
|
||||
assertSet("AverageDefinitionsAllStats.dropped_capture_points", object.dropped_capture_points),
|
||||
),
|
||||
frags: globalThis.Number(assertSet("AverageDefinitionsAllStats.frags", object.frags)),
|
||||
frags8p: globalThis.Number(assertSet("AverageDefinitionsAllStats.frags8p", object.frags8p)),
|
||||
hits: globalThis.Number(assertSet("AverageDefinitionsAllStats.hits", object.hits)),
|
||||
losses: globalThis.Number(assertSet("AverageDefinitionsAllStats.losses", object.losses)),
|
||||
max_frags: globalThis.Number(assertSet("AverageDefinitionsAllStats.max_frags", object.max_frags)),
|
||||
max_xp: globalThis.Number(assertSet("AverageDefinitionsAllStats.max_xp", object.max_xp)),
|
||||
shots: globalThis.Number(assertSet("AverageDefinitionsAllStats.shots", object.shots)),
|
||||
spotted: globalThis.Number(assertSet("AverageDefinitionsAllStats.spotted", object.spotted)),
|
||||
survived_battles: globalThis.Number(
|
||||
assertSet("AverageDefinitionsAllStats.survived_battles", object.survived_battles),
|
||||
),
|
||||
win_and_survived: globalThis.Number(
|
||||
assertSet("AverageDefinitionsAllStats.win_and_survived", object.win_and_survived),
|
||||
),
|
||||
wins: globalThis.Number(assertSet("AverageDefinitionsAllStats.wins", object.wins)),
|
||||
xp: globalThis.Number(assertSet("AverageDefinitionsAllStats.xp", object.xp)),
|
||||
battle_life_time: globalThis.Number(
|
||||
assertSet("AverageDefinitionsAllStats.battle_life_time", object.battle_life_time),
|
||||
),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: AverageDefinitionsAllStats): unknown {
|
||||
const obj: any = {};
|
||||
if (message.battles !== 0) {
|
||||
obj.battles = message.battles;
|
||||
}
|
||||
if (message.capture_points !== 0) {
|
||||
obj.capture_points = message.capture_points;
|
||||
}
|
||||
if (message.damage_dealt !== 0) {
|
||||
obj.damage_dealt = message.damage_dealt;
|
||||
}
|
||||
if (message.damage_received !== 0) {
|
||||
obj.damage_received = message.damage_received;
|
||||
}
|
||||
if (message.dropped_capture_points !== 0) {
|
||||
obj.dropped_capture_points = message.dropped_capture_points;
|
||||
}
|
||||
if (message.frags !== 0) {
|
||||
obj.frags = message.frags;
|
||||
}
|
||||
if (message.frags8p !== 0) {
|
||||
obj.frags8p = message.frags8p;
|
||||
}
|
||||
if (message.hits !== 0) {
|
||||
obj.hits = message.hits;
|
||||
}
|
||||
if (message.losses !== 0) {
|
||||
obj.losses = message.losses;
|
||||
}
|
||||
if (message.max_frags !== 0) {
|
||||
obj.max_frags = message.max_frags;
|
||||
}
|
||||
if (message.max_xp !== 0) {
|
||||
obj.max_xp = message.max_xp;
|
||||
}
|
||||
if (message.shots !== 0) {
|
||||
obj.shots = message.shots;
|
||||
}
|
||||
if (message.spotted !== 0) {
|
||||
obj.spotted = message.spotted;
|
||||
}
|
||||
if (message.survived_battles !== 0) {
|
||||
obj.survived_battles = message.survived_battles;
|
||||
}
|
||||
if (message.win_and_survived !== 0) {
|
||||
obj.win_and_survived = message.win_and_survived;
|
||||
}
|
||||
if (message.wins !== 0) {
|
||||
obj.wins = message.wins;
|
||||
}
|
||||
if (message.xp !== 0) {
|
||||
obj.xp = message.xp;
|
||||
}
|
||||
if (message.battle_life_time !== 0) {
|
||||
obj.battle_life_time = message.battle_life_time;
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<AverageDefinitionsAllStats>, I>>(base?: I): AverageDefinitionsAllStats {
|
||||
return AverageDefinitionsAllStats.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<AverageDefinitionsAllStats>, I>>(object: I): AverageDefinitionsAllStats {
|
||||
const message = createBaseAverageDefinitionsAllStats();
|
||||
message.battles = object.battles ?? 0;
|
||||
message.capture_points = object.capture_points ?? 0;
|
||||
message.damage_dealt = object.damage_dealt ?? 0;
|
||||
message.damage_received = object.damage_received ?? 0;
|
||||
message.dropped_capture_points = object.dropped_capture_points ?? 0;
|
||||
message.frags = object.frags ?? 0;
|
||||
message.frags8p = object.frags8p ?? 0;
|
||||
message.hits = object.hits ?? 0;
|
||||
message.losses = object.losses ?? 0;
|
||||
message.max_frags = object.max_frags ?? 0;
|
||||
message.max_xp = object.max_xp ?? 0;
|
||||
message.shots = object.shots ?? 0;
|
||||
message.spotted = object.spotted ?? 0;
|
||||
message.survived_battles = object.survived_battles ?? 0;
|
||||
message.win_and_survived = object.win_and_survived ?? 0;
|
||||
message.wins = object.wins ?? 0;
|
||||
message.xp = object.xp ?? 0;
|
||||
message.battle_life_time = object.battle_life_time ?? 0;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseSamples(): Samples {
|
||||
return { d_1: 0, d_7: 0, d_30: 0, d_60: 0, d_90: 0, d_120: 0, total: 0 };
|
||||
}
|
||||
|
||||
export const Samples: MessageFns<Samples> = {
|
||||
encode(message: Samples, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.d_1 !== 0) {
|
||||
writer.uint32(8).uint32(message.d_1);
|
||||
}
|
||||
if (message.d_7 !== 0) {
|
||||
writer.uint32(16).uint32(message.d_7);
|
||||
}
|
||||
if (message.d_30 !== 0) {
|
||||
writer.uint32(24).uint32(message.d_30);
|
||||
}
|
||||
if (message.d_60 !== 0) {
|
||||
writer.uint32(32).uint32(message.d_60);
|
||||
}
|
||||
if (message.d_90 !== 0) {
|
||||
writer.uint32(40).uint32(message.d_90);
|
||||
}
|
||||
if (message.d_120 !== 0) {
|
||||
writer.uint32(48).uint32(message.d_120);
|
||||
}
|
||||
if (message.total !== 0) {
|
||||
writer.uint32(56).uint32(message.total);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): Samples {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseSamples();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 8) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.d_1 = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 16) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.d_7 = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 3: {
|
||||
if (tag !== 24) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.d_30 = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 4: {
|
||||
if (tag !== 32) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.d_60 = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 5: {
|
||||
if (tag !== 40) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.d_90 = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 6: {
|
||||
if (tag !== 48) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.d_120 = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 7: {
|
||||
if (tag !== 56) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.total = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): Samples {
|
||||
return {
|
||||
d_1: globalThis.Number(assertSet("Samples.d_1", object.d_1)),
|
||||
d_7: globalThis.Number(assertSet("Samples.d_7", object.d_7)),
|
||||
d_30: globalThis.Number(assertSet("Samples.d_30", object.d_30)),
|
||||
d_60: globalThis.Number(assertSet("Samples.d_60", object.d_60)),
|
||||
d_90: globalThis.Number(assertSet("Samples.d_90", object.d_90)),
|
||||
d_120: globalThis.Number(assertSet("Samples.d_120", object.d_120)),
|
||||
total: globalThis.Number(assertSet("Samples.total", object.total)),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: Samples): unknown {
|
||||
const obj: any = {};
|
||||
if (message.d_1 !== 0) {
|
||||
obj.d_1 = Math.round(message.d_1);
|
||||
}
|
||||
if (message.d_7 !== 0) {
|
||||
obj.d_7 = Math.round(message.d_7);
|
||||
}
|
||||
if (message.d_30 !== 0) {
|
||||
obj.d_30 = Math.round(message.d_30);
|
||||
}
|
||||
if (message.d_60 !== 0) {
|
||||
obj.d_60 = Math.round(message.d_60);
|
||||
}
|
||||
if (message.d_90 !== 0) {
|
||||
obj.d_90 = Math.round(message.d_90);
|
||||
}
|
||||
if (message.d_120 !== 0) {
|
||||
obj.d_120 = Math.round(message.d_120);
|
||||
}
|
||||
if (message.total !== 0) {
|
||||
obj.total = Math.round(message.total);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<Samples>, I>>(base?: I): Samples {
|
||||
return Samples.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<Samples>, I>>(object: I): Samples {
|
||||
const message = createBaseSamples();
|
||||
message.d_1 = object.d_1 ?? 0;
|
||||
message.d_7 = object.d_7 ?? 0;
|
||||
message.d_30 = object.d_30 ?? 0;
|
||||
message.d_60 = object.d_60 ?? 0;
|
||||
message.d_90 = object.d_90 ?? 0;
|
||||
message.d_120 = object.d_120 ?? 0;
|
||||
message.total = object.total ?? 0;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
||||
|
||||
export type DeepPartial<T> = T extends Builtin ? T
|
||||
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
||||
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
||||
: T extends { $case: string; value: unknown } ? { $case: T["$case"]; value?: DeepPartial<T["value"]> }
|
||||
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
||||
: Partial<T>;
|
||||
|
||||
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
||||
export type Exact<P, I extends P> = P extends Builtin ? P
|
||||
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
||||
|
||||
function longToNumber(int64: { toString(): string }): number {
|
||||
const num = globalThis.Number(int64.toString());
|
||||
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
||||
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
||||
}
|
||||
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
||||
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
function isObject(value: any): boolean {
|
||||
return typeof value === "object" && value !== null;
|
||||
}
|
||||
|
||||
function isSet(value: any): boolean {
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
function assertSet<T>(field: string, value: T | undefined): T {
|
||||
if (!isSet(value)) {
|
||||
throw new TypeError(`Required field ${field} is not set`);
|
||||
}
|
||||
|
||||
return value as T;
|
||||
}
|
||||
|
||||
export interface MessageFns<T> {
|
||||
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
||||
fromJSON(object: any): T;
|
||||
toJSON(message: T): unknown;
|
||||
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
||||
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
syntax = "proto2";
|
||||
|
||||
package blitzkit;
|
||||
|
||||
import "packages/core/src/protos/legacy_i18n.proto";
|
||||
|
||||
message CamouflageDefinitions {
|
||||
map<uint32, Camouflage> camouflages = 1;
|
||||
}
|
||||
|
||||
message Camouflage {
|
||||
required uint32 id = 1;
|
||||
required I18nString name = 2;
|
||||
optional I18nString tank_name = 3;
|
||||
optional I18nString tank_name_full = 4;
|
||||
}
|
||||
@@ -0,0 +1,343 @@
|
||||
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-ts_proto v2.2.2
|
||||
// protoc v5.28.2
|
||||
// source: packages/core/src/protos/legacy_camouflage_definitions.proto
|
||||
|
||||
/* eslint-disable */
|
||||
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
||||
import { I18nString } from "./legacy_i18n";
|
||||
|
||||
export const protobufPackage = "blitzkit";
|
||||
|
||||
export interface CamouflageDefinitions {
|
||||
camouflages: { [key: number]: Camouflage };
|
||||
}
|
||||
|
||||
export interface CamouflageDefinitions_CamouflagesEntry {
|
||||
key: number;
|
||||
value: Camouflage | undefined;
|
||||
}
|
||||
|
||||
export interface Camouflage {
|
||||
id: number;
|
||||
name: I18nString;
|
||||
tank_name?: I18nString | undefined;
|
||||
tank_name_full?: I18nString | undefined;
|
||||
}
|
||||
|
||||
function createBaseCamouflageDefinitions(): CamouflageDefinitions {
|
||||
return { camouflages: {} };
|
||||
}
|
||||
|
||||
export const CamouflageDefinitions: MessageFns<CamouflageDefinitions> = {
|
||||
encode(message: CamouflageDefinitions, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
Object.entries(message.camouflages).forEach(([key, value]) => {
|
||||
CamouflageDefinitions_CamouflagesEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join();
|
||||
});
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): CamouflageDefinitions {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseCamouflageDefinitions();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
const entry1 = CamouflageDefinitions_CamouflagesEntry.decode(reader, reader.uint32());
|
||||
if (entry1.value !== undefined) {
|
||||
message.camouflages[entry1.key] = entry1.value;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): CamouflageDefinitions {
|
||||
return {
|
||||
camouflages: isObject(object.camouflages)
|
||||
? Object.entries(object.camouflages).reduce<{ [key: number]: Camouflage }>((acc, [key, value]) => {
|
||||
acc[globalThis.Number(key)] = Camouflage.fromJSON(value);
|
||||
return acc;
|
||||
}, {})
|
||||
: {},
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: CamouflageDefinitions): unknown {
|
||||
const obj: any = {};
|
||||
if (message.camouflages) {
|
||||
const entries = Object.entries(message.camouflages);
|
||||
if (entries.length > 0) {
|
||||
obj.camouflages = {};
|
||||
entries.forEach(([k, v]) => {
|
||||
obj.camouflages[k] = Camouflage.toJSON(v);
|
||||
});
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<CamouflageDefinitions>, I>>(base?: I): CamouflageDefinitions {
|
||||
return CamouflageDefinitions.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<CamouflageDefinitions>, I>>(object: I): CamouflageDefinitions {
|
||||
const message = createBaseCamouflageDefinitions();
|
||||
message.camouflages = Object.entries(object.camouflages ?? {}).reduce<{ [key: number]: Camouflage }>(
|
||||
(acc, [key, value]) => {
|
||||
if (value !== undefined) {
|
||||
acc[globalThis.Number(key)] = Camouflage.fromPartial(value);
|
||||
}
|
||||
return acc;
|
||||
},
|
||||
{},
|
||||
);
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseCamouflageDefinitions_CamouflagesEntry(): CamouflageDefinitions_CamouflagesEntry {
|
||||
return { key: 0, value: createBaseCamouflage() };
|
||||
}
|
||||
|
||||
export const CamouflageDefinitions_CamouflagesEntry: MessageFns<CamouflageDefinitions_CamouflagesEntry> = {
|
||||
encode(message: CamouflageDefinitions_CamouflagesEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.key !== undefined) {
|
||||
writer.uint32(8).uint32(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
Camouflage.encode(message.value, writer.uint32(18).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): CamouflageDefinitions_CamouflagesEntry {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseCamouflageDefinitions_CamouflagesEntry();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 8) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.key = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.value = Camouflage.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): CamouflageDefinitions_CamouflagesEntry {
|
||||
return {
|
||||
key: globalThis.Number(assertSet("CamouflageDefinitions_CamouflagesEntry.key", object.key)),
|
||||
value: Camouflage.fromJSON(assertSet("CamouflageDefinitions_CamouflagesEntry.value", object.value)),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: CamouflageDefinitions_CamouflagesEntry): unknown {
|
||||
const obj: any = {};
|
||||
if (message.key !== undefined) {
|
||||
obj.key = Math.round(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
obj.value = Camouflage.toJSON(message.value);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<CamouflageDefinitions_CamouflagesEntry>, I>>(
|
||||
base?: I,
|
||||
): CamouflageDefinitions_CamouflagesEntry {
|
||||
return CamouflageDefinitions_CamouflagesEntry.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<CamouflageDefinitions_CamouflagesEntry>, I>>(
|
||||
object: I,
|
||||
): CamouflageDefinitions_CamouflagesEntry {
|
||||
const message = createBaseCamouflageDefinitions_CamouflagesEntry();
|
||||
message.key = object.key ?? 0;
|
||||
message.value = (object.value !== undefined && object.value !== null)
|
||||
? Camouflage.fromPartial(object.value)
|
||||
: undefined;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseCamouflage(): Camouflage {
|
||||
return { id: 0, name: createBaseI18nString(), tank_name: undefined, tank_name_full: undefined };
|
||||
}
|
||||
|
||||
export const Camouflage: MessageFns<Camouflage> = {
|
||||
encode(message: Camouflage, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.id !== 0) {
|
||||
writer.uint32(8).uint32(message.id);
|
||||
}
|
||||
if (message.name !== undefined) {
|
||||
I18nString.encode(message.name, writer.uint32(18).fork()).join();
|
||||
}
|
||||
if (message.tank_name !== undefined) {
|
||||
I18nString.encode(message.tank_name, writer.uint32(26).fork()).join();
|
||||
}
|
||||
if (message.tank_name_full !== undefined) {
|
||||
I18nString.encode(message.tank_name_full, writer.uint32(34).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): Camouflage {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseCamouflage();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 8) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.id = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.name = I18nString.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
case 3: {
|
||||
if (tag !== 26) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.tank_name = I18nString.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
case 4: {
|
||||
if (tag !== 34) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.tank_name_full = I18nString.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): Camouflage {
|
||||
return {
|
||||
id: globalThis.Number(assertSet("Camouflage.id", object.id)),
|
||||
name: I18nString.fromJSON(assertSet("Camouflage.name", object.name)),
|
||||
tank_name: isSet(object.tank_name) ? I18nString.fromJSON(object.tank_name) : undefined,
|
||||
tank_name_full: isSet(object.tank_name_full) ? I18nString.fromJSON(object.tank_name_full) : undefined,
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: Camouflage): unknown {
|
||||
const obj: any = {};
|
||||
if (message.id !== 0) {
|
||||
obj.id = Math.round(message.id);
|
||||
}
|
||||
if (message.name !== undefined) {
|
||||
obj.name = I18nString.toJSON(message.name);
|
||||
}
|
||||
if (message.tank_name !== undefined) {
|
||||
obj.tank_name = I18nString.toJSON(message.tank_name);
|
||||
}
|
||||
if (message.tank_name_full !== undefined) {
|
||||
obj.tank_name_full = I18nString.toJSON(message.tank_name_full);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<Camouflage>, I>>(base?: I): Camouflage {
|
||||
return Camouflage.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<Camouflage>, I>>(object: I): Camouflage {
|
||||
const message = createBaseCamouflage();
|
||||
message.id = object.id ?? 0;
|
||||
message.name = (object.name !== undefined && object.name !== null)
|
||||
? I18nString.fromPartial(object.name)
|
||||
: createBaseI18nString();
|
||||
message.tank_name = (object.tank_name !== undefined && object.tank_name !== null)
|
||||
? I18nString.fromPartial(object.tank_name)
|
||||
: undefined;
|
||||
message.tank_name_full = (object.tank_name_full !== undefined && object.tank_name_full !== null)
|
||||
? I18nString.fromPartial(object.tank_name_full)
|
||||
: undefined;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
||||
|
||||
export type DeepPartial<T> = T extends Builtin ? T
|
||||
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
||||
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
||||
: T extends { $case: string; value: unknown } ? { $case: T["$case"]; value?: DeepPartial<T["value"]> }
|
||||
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
||||
: Partial<T>;
|
||||
|
||||
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
||||
export type Exact<P, I extends P> = P extends Builtin ? P
|
||||
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
||||
|
||||
function isObject(value: any): boolean {
|
||||
return typeof value === "object" && value !== null;
|
||||
}
|
||||
|
||||
function isSet(value: any): boolean {
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
function assertSet<T>(field: string, value: T | undefined): T {
|
||||
if (!isSet(value)) {
|
||||
throw new TypeError(`Required field ${field} is not set`);
|
||||
}
|
||||
|
||||
return value as T;
|
||||
}
|
||||
|
||||
export interface MessageFns<T> {
|
||||
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
||||
fromJSON(object: any): T;
|
||||
toJSON(message: T): unknown;
|
||||
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
||||
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
syntax = "proto2";
|
||||
|
||||
package blitzkit;
|
||||
|
||||
import "packages/core/src/protos/legacy_i18n.proto";
|
||||
|
||||
message ConsumableDefinitions {
|
||||
map<uint32, Consumable> consumables = 1;
|
||||
}
|
||||
|
||||
message Consumable {
|
||||
required uint32 id = 1;
|
||||
required I18nString name = 2;
|
||||
required uint32 cooldown = 3;
|
||||
optional float duration = 4;
|
||||
required bool game_mode_exclusive = 5;
|
||||
repeated ConsumableTankFilter include = 6;
|
||||
repeated ConsumableTankFilter exclude = 7;
|
||||
}
|
||||
|
||||
message ConsumableTankFilter {
|
||||
oneof filter_type {
|
||||
ConsumableTankTierFilter tiers = 1;
|
||||
ConsumableTankIdsFilter ids = 2;
|
||||
ConsumableTankCategoryFilter categories = 3;
|
||||
ConsumableTankNationFilter nations = 4;
|
||||
}
|
||||
}
|
||||
|
||||
message ConsumableTankTierFilter {
|
||||
required uint32 min = 1;
|
||||
required uint32 max = 2;
|
||||
}
|
||||
|
||||
message ConsumableTankIdsFilter {
|
||||
repeated uint32 ids = 1;
|
||||
}
|
||||
|
||||
message ConsumableTankCategoryFilter {
|
||||
repeated ConsumableTankCategoryFilterCategory categories = 1;
|
||||
}
|
||||
|
||||
enum ConsumableTankCategoryFilterCategory {
|
||||
CONSUMABLE_TANK_CATEGORY_FILTER_CATEGORY_CLIP = 0;
|
||||
}
|
||||
|
||||
message ConsumableTankNationFilter {
|
||||
repeated string nations = 1;
|
||||
}
|
||||
@@ -0,0 +1,883 @@
|
||||
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-ts_proto v2.2.2
|
||||
// protoc v5.28.2
|
||||
// source: packages/core/src/protos/legacy_consumable_definitions.proto
|
||||
|
||||
/* eslint-disable */
|
||||
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
||||
import { I18nString } from "./legacy_i18n";
|
||||
|
||||
export const protobufPackage = "blitzkit";
|
||||
|
||||
export enum ConsumableTankCategoryFilterCategory {
|
||||
CLIP = 0,
|
||||
}
|
||||
|
||||
export function consumableTankCategoryFilterCategoryFromJSON(object: any): ConsumableTankCategoryFilterCategory {
|
||||
switch (object) {
|
||||
case 0:
|
||||
case "CONSUMABLE_TANK_CATEGORY_FILTER_CATEGORY_CLIP":
|
||||
return ConsumableTankCategoryFilterCategory.CLIP;
|
||||
default:
|
||||
throw new globalThis.Error(
|
||||
"Unrecognized enum value " + object + " for enum ConsumableTankCategoryFilterCategory",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export function consumableTankCategoryFilterCategoryToJSON(object: ConsumableTankCategoryFilterCategory): string {
|
||||
switch (object) {
|
||||
case ConsumableTankCategoryFilterCategory.CLIP:
|
||||
return "CONSUMABLE_TANK_CATEGORY_FILTER_CATEGORY_CLIP";
|
||||
default:
|
||||
throw new globalThis.Error(
|
||||
"Unrecognized enum value " + object + " for enum ConsumableTankCategoryFilterCategory",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export interface ConsumableDefinitions {
|
||||
consumables: { [key: number]: Consumable };
|
||||
}
|
||||
|
||||
export interface ConsumableDefinitions_ConsumablesEntry {
|
||||
key: number;
|
||||
value: Consumable | undefined;
|
||||
}
|
||||
|
||||
export interface Consumable {
|
||||
id: number;
|
||||
name: I18nString;
|
||||
cooldown: number;
|
||||
duration?: number | undefined;
|
||||
game_mode_exclusive: boolean;
|
||||
include: ConsumableTankFilter[];
|
||||
exclude: ConsumableTankFilter[];
|
||||
}
|
||||
|
||||
export interface ConsumableTankFilter {
|
||||
filter_type?:
|
||||
| { $case: "tiers"; value: ConsumableTankTierFilter }
|
||||
| { $case: "ids"; value: ConsumableTankIdsFilter }
|
||||
| { $case: "categories"; value: ConsumableTankCategoryFilter }
|
||||
| { $case: "nations"; value: ConsumableTankNationFilter }
|
||||
| undefined;
|
||||
}
|
||||
|
||||
export interface ConsumableTankTierFilter {
|
||||
min: number;
|
||||
max: number;
|
||||
}
|
||||
|
||||
export interface ConsumableTankIdsFilter {
|
||||
ids: number[];
|
||||
}
|
||||
|
||||
export interface ConsumableTankCategoryFilter {
|
||||
categories: ConsumableTankCategoryFilterCategory[];
|
||||
}
|
||||
|
||||
export interface ConsumableTankNationFilter {
|
||||
nations: string[];
|
||||
}
|
||||
|
||||
function createBaseConsumableDefinitions(): ConsumableDefinitions {
|
||||
return { consumables: {} };
|
||||
}
|
||||
|
||||
export const ConsumableDefinitions: MessageFns<ConsumableDefinitions> = {
|
||||
encode(message: ConsumableDefinitions, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
Object.entries(message.consumables).forEach(([key, value]) => {
|
||||
ConsumableDefinitions_ConsumablesEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join();
|
||||
});
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): ConsumableDefinitions {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseConsumableDefinitions();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
const entry1 = ConsumableDefinitions_ConsumablesEntry.decode(reader, reader.uint32());
|
||||
if (entry1.value !== undefined) {
|
||||
message.consumables[entry1.key] = entry1.value;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): ConsumableDefinitions {
|
||||
return {
|
||||
consumables: isObject(object.consumables)
|
||||
? Object.entries(object.consumables).reduce<{ [key: number]: Consumable }>((acc, [key, value]) => {
|
||||
acc[globalThis.Number(key)] = Consumable.fromJSON(value);
|
||||
return acc;
|
||||
}, {})
|
||||
: {},
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: ConsumableDefinitions): unknown {
|
||||
const obj: any = {};
|
||||
if (message.consumables) {
|
||||
const entries = Object.entries(message.consumables);
|
||||
if (entries.length > 0) {
|
||||
obj.consumables = {};
|
||||
entries.forEach(([k, v]) => {
|
||||
obj.consumables[k] = Consumable.toJSON(v);
|
||||
});
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<ConsumableDefinitions>, I>>(base?: I): ConsumableDefinitions {
|
||||
return ConsumableDefinitions.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<ConsumableDefinitions>, I>>(object: I): ConsumableDefinitions {
|
||||
const message = createBaseConsumableDefinitions();
|
||||
message.consumables = Object.entries(object.consumables ?? {}).reduce<{ [key: number]: Consumable }>(
|
||||
(acc, [key, value]) => {
|
||||
if (value !== undefined) {
|
||||
acc[globalThis.Number(key)] = Consumable.fromPartial(value);
|
||||
}
|
||||
return acc;
|
||||
},
|
||||
{},
|
||||
);
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseConsumableDefinitions_ConsumablesEntry(): ConsumableDefinitions_ConsumablesEntry {
|
||||
return { key: 0, value: createBaseConsumable() };
|
||||
}
|
||||
|
||||
export const ConsumableDefinitions_ConsumablesEntry: MessageFns<ConsumableDefinitions_ConsumablesEntry> = {
|
||||
encode(message: ConsumableDefinitions_ConsumablesEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.key !== undefined) {
|
||||
writer.uint32(8).uint32(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
Consumable.encode(message.value, writer.uint32(18).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): ConsumableDefinitions_ConsumablesEntry {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseConsumableDefinitions_ConsumablesEntry();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 8) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.key = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.value = Consumable.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): ConsumableDefinitions_ConsumablesEntry {
|
||||
return {
|
||||
key: globalThis.Number(assertSet("ConsumableDefinitions_ConsumablesEntry.key", object.key)),
|
||||
value: Consumable.fromJSON(assertSet("ConsumableDefinitions_ConsumablesEntry.value", object.value)),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: ConsumableDefinitions_ConsumablesEntry): unknown {
|
||||
const obj: any = {};
|
||||
if (message.key !== undefined) {
|
||||
obj.key = Math.round(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
obj.value = Consumable.toJSON(message.value);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<ConsumableDefinitions_ConsumablesEntry>, I>>(
|
||||
base?: I,
|
||||
): ConsumableDefinitions_ConsumablesEntry {
|
||||
return ConsumableDefinitions_ConsumablesEntry.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<ConsumableDefinitions_ConsumablesEntry>, I>>(
|
||||
object: I,
|
||||
): ConsumableDefinitions_ConsumablesEntry {
|
||||
const message = createBaseConsumableDefinitions_ConsumablesEntry();
|
||||
message.key = object.key ?? 0;
|
||||
message.value = (object.value !== undefined && object.value !== null)
|
||||
? Consumable.fromPartial(object.value)
|
||||
: undefined;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseConsumable(): Consumable {
|
||||
return {
|
||||
id: 0,
|
||||
name: createBaseI18nString(),
|
||||
cooldown: 0,
|
||||
duration: undefined,
|
||||
game_mode_exclusive: false,
|
||||
include: [],
|
||||
exclude: [],
|
||||
};
|
||||
}
|
||||
|
||||
export const Consumable: MessageFns<Consumable> = {
|
||||
encode(message: Consumable, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.id !== 0) {
|
||||
writer.uint32(8).uint32(message.id);
|
||||
}
|
||||
if (message.name !== undefined) {
|
||||
I18nString.encode(message.name, writer.uint32(18).fork()).join();
|
||||
}
|
||||
if (message.cooldown !== 0) {
|
||||
writer.uint32(24).uint32(message.cooldown);
|
||||
}
|
||||
if (message.duration !== undefined && message.duration !== undefined) {
|
||||
writer.uint32(37).float(message.duration);
|
||||
}
|
||||
if (message.game_mode_exclusive !== false) {
|
||||
writer.uint32(40).bool(message.game_mode_exclusive);
|
||||
}
|
||||
for (const v of message.include) {
|
||||
ConsumableTankFilter.encode(v!, writer.uint32(50).fork()).join();
|
||||
}
|
||||
for (const v of message.exclude) {
|
||||
ConsumableTankFilter.encode(v!, writer.uint32(58).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): Consumable {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseConsumable();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 8) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.id = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.name = I18nString.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
case 3: {
|
||||
if (tag !== 24) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.cooldown = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 4: {
|
||||
if (tag !== 37) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.duration = reader.float();
|
||||
continue;
|
||||
}
|
||||
case 5: {
|
||||
if (tag !== 40) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.game_mode_exclusive = reader.bool();
|
||||
continue;
|
||||
}
|
||||
case 6: {
|
||||
if (tag !== 50) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.include.push(ConsumableTankFilter.decode(reader, reader.uint32()));
|
||||
continue;
|
||||
}
|
||||
case 7: {
|
||||
if (tag !== 58) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.exclude.push(ConsumableTankFilter.decode(reader, reader.uint32()));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): Consumable {
|
||||
return {
|
||||
id: globalThis.Number(assertSet("Consumable.id", object.id)),
|
||||
name: I18nString.fromJSON(assertSet("Consumable.name", object.name)),
|
||||
cooldown: globalThis.Number(assertSet("Consumable.cooldown", object.cooldown)),
|
||||
duration: isSet(object.duration) ? globalThis.Number(object.duration) : undefined,
|
||||
game_mode_exclusive: globalThis.Boolean(assertSet("Consumable.game_mode_exclusive", object.game_mode_exclusive)),
|
||||
include: globalThis.Array.isArray(object?.include)
|
||||
? object.include.map((e: any) => ConsumableTankFilter.fromJSON(e))
|
||||
: [],
|
||||
exclude: globalThis.Array.isArray(object?.exclude)
|
||||
? object.exclude.map((e: any) => ConsumableTankFilter.fromJSON(e))
|
||||
: [],
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: Consumable): unknown {
|
||||
const obj: any = {};
|
||||
if (message.id !== 0) {
|
||||
obj.id = Math.round(message.id);
|
||||
}
|
||||
if (message.name !== undefined) {
|
||||
obj.name = I18nString.toJSON(message.name);
|
||||
}
|
||||
if (message.cooldown !== 0) {
|
||||
obj.cooldown = Math.round(message.cooldown);
|
||||
}
|
||||
if (message.duration !== undefined && message.duration !== undefined) {
|
||||
obj.duration = message.duration;
|
||||
}
|
||||
if (message.game_mode_exclusive !== false) {
|
||||
obj.game_mode_exclusive = message.game_mode_exclusive;
|
||||
}
|
||||
if (message.include?.length) {
|
||||
obj.include = message.include.map((e) => ConsumableTankFilter.toJSON(e));
|
||||
}
|
||||
if (message.exclude?.length) {
|
||||
obj.exclude = message.exclude.map((e) => ConsumableTankFilter.toJSON(e));
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<Consumable>, I>>(base?: I): Consumable {
|
||||
return Consumable.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<Consumable>, I>>(object: I): Consumable {
|
||||
const message = createBaseConsumable();
|
||||
message.id = object.id ?? 0;
|
||||
message.name = (object.name !== undefined && object.name !== null)
|
||||
? I18nString.fromPartial(object.name)
|
||||
: createBaseI18nString();
|
||||
message.cooldown = object.cooldown ?? 0;
|
||||
message.duration = object.duration ?? undefined;
|
||||
message.game_mode_exclusive = object.game_mode_exclusive ?? false;
|
||||
message.include = object.include?.map((e) => ConsumableTankFilter.fromPartial(e)) || [];
|
||||
message.exclude = object.exclude?.map((e) => ConsumableTankFilter.fromPartial(e)) || [];
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseConsumableTankFilter(): ConsumableTankFilter {
|
||||
return { filter_type: undefined };
|
||||
}
|
||||
|
||||
export const ConsumableTankFilter: MessageFns<ConsumableTankFilter> = {
|
||||
encode(message: ConsumableTankFilter, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
switch (message.filter_type?.$case) {
|
||||
case "tiers":
|
||||
ConsumableTankTierFilter.encode(message.filter_type.value, writer.uint32(10).fork()).join();
|
||||
break;
|
||||
case "ids":
|
||||
ConsumableTankIdsFilter.encode(message.filter_type.value, writer.uint32(18).fork()).join();
|
||||
break;
|
||||
case "categories":
|
||||
ConsumableTankCategoryFilter.encode(message.filter_type.value, writer.uint32(26).fork()).join();
|
||||
break;
|
||||
case "nations":
|
||||
ConsumableTankNationFilter.encode(message.filter_type.value, writer.uint32(34).fork()).join();
|
||||
break;
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): ConsumableTankFilter {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseConsumableTankFilter();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.filter_type = { $case: "tiers", value: ConsumableTankTierFilter.decode(reader, reader.uint32()) };
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.filter_type = { $case: "ids", value: ConsumableTankIdsFilter.decode(reader, reader.uint32()) };
|
||||
continue;
|
||||
}
|
||||
case 3: {
|
||||
if (tag !== 26) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.filter_type = {
|
||||
$case: "categories",
|
||||
value: ConsumableTankCategoryFilter.decode(reader, reader.uint32()),
|
||||
};
|
||||
continue;
|
||||
}
|
||||
case 4: {
|
||||
if (tag !== 34) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.filter_type = { $case: "nations", value: ConsumableTankNationFilter.decode(reader, reader.uint32()) };
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): ConsumableTankFilter {
|
||||
return {
|
||||
filter_type: isSet(object.tiers)
|
||||
? { $case: "tiers", value: ConsumableTankTierFilter.fromJSON(object.tiers) }
|
||||
: isSet(object.ids)
|
||||
? { $case: "ids", value: ConsumableTankIdsFilter.fromJSON(object.ids) }
|
||||
: isSet(object.categories)
|
||||
? { $case: "categories", value: ConsumableTankCategoryFilter.fromJSON(object.categories) }
|
||||
: isSet(object.nations)
|
||||
? { $case: "nations", value: ConsumableTankNationFilter.fromJSON(object.nations) }
|
||||
: undefined,
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: ConsumableTankFilter): unknown {
|
||||
const obj: any = {};
|
||||
if (message.filter_type?.$case === "tiers") {
|
||||
obj.tiers = ConsumableTankTierFilter.toJSON(message.filter_type.value);
|
||||
}
|
||||
if (message.filter_type?.$case === "ids") {
|
||||
obj.ids = ConsumableTankIdsFilter.toJSON(message.filter_type.value);
|
||||
}
|
||||
if (message.filter_type?.$case === "categories") {
|
||||
obj.categories = ConsumableTankCategoryFilter.toJSON(message.filter_type.value);
|
||||
}
|
||||
if (message.filter_type?.$case === "nations") {
|
||||
obj.nations = ConsumableTankNationFilter.toJSON(message.filter_type.value);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<ConsumableTankFilter>, I>>(base?: I): ConsumableTankFilter {
|
||||
return ConsumableTankFilter.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<ConsumableTankFilter>, I>>(object: I): ConsumableTankFilter {
|
||||
const message = createBaseConsumableTankFilter();
|
||||
if (
|
||||
object.filter_type?.$case === "tiers" &&
|
||||
object.filter_type?.value !== undefined &&
|
||||
object.filter_type?.value !== null
|
||||
) {
|
||||
message.filter_type = { $case: "tiers", value: ConsumableTankTierFilter.fromPartial(object.filter_type.value) };
|
||||
}
|
||||
if (
|
||||
object.filter_type?.$case === "ids" &&
|
||||
object.filter_type?.value !== undefined &&
|
||||
object.filter_type?.value !== null
|
||||
) {
|
||||
message.filter_type = { $case: "ids", value: ConsumableTankIdsFilter.fromPartial(object.filter_type.value) };
|
||||
}
|
||||
if (
|
||||
object.filter_type?.$case === "categories" &&
|
||||
object.filter_type?.value !== undefined &&
|
||||
object.filter_type?.value !== null
|
||||
) {
|
||||
message.filter_type = {
|
||||
$case: "categories",
|
||||
value: ConsumableTankCategoryFilter.fromPartial(object.filter_type.value),
|
||||
};
|
||||
}
|
||||
if (
|
||||
object.filter_type?.$case === "nations" &&
|
||||
object.filter_type?.value !== undefined &&
|
||||
object.filter_type?.value !== null
|
||||
) {
|
||||
message.filter_type = {
|
||||
$case: "nations",
|
||||
value: ConsumableTankNationFilter.fromPartial(object.filter_type.value),
|
||||
};
|
||||
}
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseConsumableTankTierFilter(): ConsumableTankTierFilter {
|
||||
return { min: 0, max: 0 };
|
||||
}
|
||||
|
||||
export const ConsumableTankTierFilter: MessageFns<ConsumableTankTierFilter> = {
|
||||
encode(message: ConsumableTankTierFilter, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.min !== 0) {
|
||||
writer.uint32(8).uint32(message.min);
|
||||
}
|
||||
if (message.max !== 0) {
|
||||
writer.uint32(16).uint32(message.max);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): ConsumableTankTierFilter {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseConsumableTankTierFilter();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 8) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.min = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 16) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.max = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): ConsumableTankTierFilter {
|
||||
return {
|
||||
min: globalThis.Number(assertSet("ConsumableTankTierFilter.min", object.min)),
|
||||
max: globalThis.Number(assertSet("ConsumableTankTierFilter.max", object.max)),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: ConsumableTankTierFilter): unknown {
|
||||
const obj: any = {};
|
||||
if (message.min !== 0) {
|
||||
obj.min = Math.round(message.min);
|
||||
}
|
||||
if (message.max !== 0) {
|
||||
obj.max = Math.round(message.max);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<ConsumableTankTierFilter>, I>>(base?: I): ConsumableTankTierFilter {
|
||||
return ConsumableTankTierFilter.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<ConsumableTankTierFilter>, I>>(object: I): ConsumableTankTierFilter {
|
||||
const message = createBaseConsumableTankTierFilter();
|
||||
message.min = object.min ?? 0;
|
||||
message.max = object.max ?? 0;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseConsumableTankIdsFilter(): ConsumableTankIdsFilter {
|
||||
return { ids: [] };
|
||||
}
|
||||
|
||||
export const ConsumableTankIdsFilter: MessageFns<ConsumableTankIdsFilter> = {
|
||||
encode(message: ConsumableTankIdsFilter, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
writer.uint32(10).fork();
|
||||
for (const v of message.ids) {
|
||||
writer.uint32(v);
|
||||
}
|
||||
writer.join();
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): ConsumableTankIdsFilter {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseConsumableTankIdsFilter();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag === 8) {
|
||||
message.ids.push(reader.uint32());
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if (tag === 10) {
|
||||
const end2 = reader.uint32() + reader.pos;
|
||||
while (reader.pos < end2) {
|
||||
message.ids.push(reader.uint32());
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): ConsumableTankIdsFilter {
|
||||
return { ids: globalThis.Array.isArray(object?.ids) ? object.ids.map((e: any) => globalThis.Number(e)) : [] };
|
||||
},
|
||||
|
||||
toJSON(message: ConsumableTankIdsFilter): unknown {
|
||||
const obj: any = {};
|
||||
if (message.ids?.length) {
|
||||
obj.ids = message.ids.map((e) => Math.round(e));
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<ConsumableTankIdsFilter>, I>>(base?: I): ConsumableTankIdsFilter {
|
||||
return ConsumableTankIdsFilter.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<ConsumableTankIdsFilter>, I>>(object: I): ConsumableTankIdsFilter {
|
||||
const message = createBaseConsumableTankIdsFilter();
|
||||
message.ids = object.ids?.map((e) => e) || [];
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseConsumableTankCategoryFilter(): ConsumableTankCategoryFilter {
|
||||
return { categories: [] };
|
||||
}
|
||||
|
||||
export const ConsumableTankCategoryFilter: MessageFns<ConsumableTankCategoryFilter> = {
|
||||
encode(message: ConsumableTankCategoryFilter, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
writer.uint32(10).fork();
|
||||
for (const v of message.categories) {
|
||||
writer.int32(v);
|
||||
}
|
||||
writer.join();
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): ConsumableTankCategoryFilter {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseConsumableTankCategoryFilter();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag === 8) {
|
||||
message.categories.push(reader.int32() as any);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if (tag === 10) {
|
||||
const end2 = reader.uint32() + reader.pos;
|
||||
while (reader.pos < end2) {
|
||||
message.categories.push(reader.int32() as any);
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): ConsumableTankCategoryFilter {
|
||||
return {
|
||||
categories: globalThis.Array.isArray(object?.categories)
|
||||
? object.categories.map((e: any) => consumableTankCategoryFilterCategoryFromJSON(e))
|
||||
: [],
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: ConsumableTankCategoryFilter): unknown {
|
||||
const obj: any = {};
|
||||
if (message.categories?.length) {
|
||||
obj.categories = message.categories.map((e) => consumableTankCategoryFilterCategoryToJSON(e));
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<ConsumableTankCategoryFilter>, I>>(base?: I): ConsumableTankCategoryFilter {
|
||||
return ConsumableTankCategoryFilter.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<ConsumableTankCategoryFilter>, I>>(object: I): ConsumableTankCategoryFilter {
|
||||
const message = createBaseConsumableTankCategoryFilter();
|
||||
message.categories = object.categories?.map((e) => e) || [];
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseConsumableTankNationFilter(): ConsumableTankNationFilter {
|
||||
return { nations: [] };
|
||||
}
|
||||
|
||||
export const ConsumableTankNationFilter: MessageFns<ConsumableTankNationFilter> = {
|
||||
encode(message: ConsumableTankNationFilter, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
for (const v of message.nations) {
|
||||
writer.uint32(10).string(v!);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): ConsumableTankNationFilter {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseConsumableTankNationFilter();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.nations.push(reader.string());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): ConsumableTankNationFilter {
|
||||
return {
|
||||
nations: globalThis.Array.isArray(object?.nations) ? object.nations.map((e: any) => globalThis.String(e)) : [],
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: ConsumableTankNationFilter): unknown {
|
||||
const obj: any = {};
|
||||
if (message.nations?.length) {
|
||||
obj.nations = message.nations;
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<ConsumableTankNationFilter>, I>>(base?: I): ConsumableTankNationFilter {
|
||||
return ConsumableTankNationFilter.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<ConsumableTankNationFilter>, I>>(object: I): ConsumableTankNationFilter {
|
||||
const message = createBaseConsumableTankNationFilter();
|
||||
message.nations = object.nations?.map((e) => e) || [];
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
||||
|
||||
export type DeepPartial<T> = T extends Builtin ? T
|
||||
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
||||
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
||||
: T extends { $case: string; value: unknown } ? { $case: T["$case"]; value?: DeepPartial<T["value"]> }
|
||||
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
||||
: Partial<T>;
|
||||
|
||||
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
||||
export type Exact<P, I extends P> = P extends Builtin ? P
|
||||
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
||||
|
||||
function isObject(value: any): boolean {
|
||||
return typeof value === "object" && value !== null;
|
||||
}
|
||||
|
||||
function isSet(value: any): boolean {
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
function assertSet<T>(field: string, value: T | undefined): T {
|
||||
if (!isSet(value)) {
|
||||
throw new TypeError(`Required field ${field} is not set`);
|
||||
}
|
||||
|
||||
return value as T;
|
||||
}
|
||||
|
||||
export interface MessageFns<T> {
|
||||
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
||||
fromJSON(object: any): T;
|
||||
toJSON(message: T): unknown;
|
||||
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
||||
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
syntax = "proto2";
|
||||
|
||||
package blitzkit;
|
||||
|
||||
import "packages/core/src/protos/legacy_i18n.proto";
|
||||
|
||||
message EquipmentDefinitions {
|
||||
map<string, EquipmentPreset> presets = 1;
|
||||
map<uint32, Equipment> equipments = 2;
|
||||
}
|
||||
|
||||
message Equipment {
|
||||
required I18nString name = 1;
|
||||
required I18nString description = 2;
|
||||
}
|
||||
|
||||
message EquipmentPreset {
|
||||
repeated EquipmentSlot slots = 1;
|
||||
}
|
||||
|
||||
message EquipmentSlot {
|
||||
required uint32 left = 1;
|
||||
required uint32 right = 2;
|
||||
}
|
||||
@@ -0,0 +1,578 @@
|
||||
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-ts_proto v2.2.2
|
||||
// protoc v5.28.2
|
||||
// source: packages/core/src/protos/legacy_equipment_definitions.proto
|
||||
|
||||
/* eslint-disable */
|
||||
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
||||
import { I18nString } from "./legacy_i18n";
|
||||
|
||||
export const protobufPackage = "blitzkit";
|
||||
|
||||
export interface EquipmentDefinitions {
|
||||
presets: { [key: string]: EquipmentPreset };
|
||||
equipments: { [key: number]: Equipment };
|
||||
}
|
||||
|
||||
export interface EquipmentDefinitions_PresetsEntry {
|
||||
key: string;
|
||||
value: EquipmentPreset | undefined;
|
||||
}
|
||||
|
||||
export interface EquipmentDefinitions_EquipmentsEntry {
|
||||
key: number;
|
||||
value: Equipment | undefined;
|
||||
}
|
||||
|
||||
export interface Equipment {
|
||||
name: I18nString;
|
||||
description: I18nString;
|
||||
}
|
||||
|
||||
export interface EquipmentPreset {
|
||||
slots: EquipmentSlot[];
|
||||
}
|
||||
|
||||
export interface EquipmentSlot {
|
||||
left: number;
|
||||
right: number;
|
||||
}
|
||||
|
||||
function createBaseEquipmentDefinitions(): EquipmentDefinitions {
|
||||
return { presets: {}, equipments: {} };
|
||||
}
|
||||
|
||||
export const EquipmentDefinitions: MessageFns<EquipmentDefinitions> = {
|
||||
encode(message: EquipmentDefinitions, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
Object.entries(message.presets).forEach(([key, value]) => {
|
||||
EquipmentDefinitions_PresetsEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join();
|
||||
});
|
||||
Object.entries(message.equipments).forEach(([key, value]) => {
|
||||
EquipmentDefinitions_EquipmentsEntry.encode({ key: key as any, value }, writer.uint32(18).fork()).join();
|
||||
});
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): EquipmentDefinitions {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseEquipmentDefinitions();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
const entry1 = EquipmentDefinitions_PresetsEntry.decode(reader, reader.uint32());
|
||||
if (entry1.value !== undefined) {
|
||||
message.presets[entry1.key] = entry1.value;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
const entry2 = EquipmentDefinitions_EquipmentsEntry.decode(reader, reader.uint32());
|
||||
if (entry2.value !== undefined) {
|
||||
message.equipments[entry2.key] = entry2.value;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): EquipmentDefinitions {
|
||||
return {
|
||||
presets: isObject(object.presets)
|
||||
? Object.entries(object.presets).reduce<{ [key: string]: EquipmentPreset }>((acc, [key, value]) => {
|
||||
acc[key] = EquipmentPreset.fromJSON(value);
|
||||
return acc;
|
||||
}, {})
|
||||
: {},
|
||||
equipments: isObject(object.equipments)
|
||||
? Object.entries(object.equipments).reduce<{ [key: number]: Equipment }>((acc, [key, value]) => {
|
||||
acc[globalThis.Number(key)] = Equipment.fromJSON(value);
|
||||
return acc;
|
||||
}, {})
|
||||
: {},
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: EquipmentDefinitions): unknown {
|
||||
const obj: any = {};
|
||||
if (message.presets) {
|
||||
const entries = Object.entries(message.presets);
|
||||
if (entries.length > 0) {
|
||||
obj.presets = {};
|
||||
entries.forEach(([k, v]) => {
|
||||
obj.presets[k] = EquipmentPreset.toJSON(v);
|
||||
});
|
||||
}
|
||||
}
|
||||
if (message.equipments) {
|
||||
const entries = Object.entries(message.equipments);
|
||||
if (entries.length > 0) {
|
||||
obj.equipments = {};
|
||||
entries.forEach(([k, v]) => {
|
||||
obj.equipments[k] = Equipment.toJSON(v);
|
||||
});
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<EquipmentDefinitions>, I>>(base?: I): EquipmentDefinitions {
|
||||
return EquipmentDefinitions.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<EquipmentDefinitions>, I>>(object: I): EquipmentDefinitions {
|
||||
const message = createBaseEquipmentDefinitions();
|
||||
message.presets = Object.entries(object.presets ?? {}).reduce<{ [key: string]: EquipmentPreset }>(
|
||||
(acc, [key, value]) => {
|
||||
if (value !== undefined) {
|
||||
acc[key] = EquipmentPreset.fromPartial(value);
|
||||
}
|
||||
return acc;
|
||||
},
|
||||
{},
|
||||
);
|
||||
message.equipments = Object.entries(object.equipments ?? {}).reduce<{ [key: number]: Equipment }>(
|
||||
(acc, [key, value]) => {
|
||||
if (value !== undefined) {
|
||||
acc[globalThis.Number(key)] = Equipment.fromPartial(value);
|
||||
}
|
||||
return acc;
|
||||
},
|
||||
{},
|
||||
);
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseEquipmentDefinitions_PresetsEntry(): EquipmentDefinitions_PresetsEntry {
|
||||
return { key: "", value: createBaseEquipmentPreset() };
|
||||
}
|
||||
|
||||
export const EquipmentDefinitions_PresetsEntry: MessageFns<EquipmentDefinitions_PresetsEntry> = {
|
||||
encode(message: EquipmentDefinitions_PresetsEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.key !== undefined) {
|
||||
writer.uint32(10).string(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
EquipmentPreset.encode(message.value, writer.uint32(18).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): EquipmentDefinitions_PresetsEntry {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseEquipmentDefinitions_PresetsEntry();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.key = reader.string();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.value = EquipmentPreset.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): EquipmentDefinitions_PresetsEntry {
|
||||
return {
|
||||
key: globalThis.String(assertSet("EquipmentDefinitions_PresetsEntry.key", object.key)),
|
||||
value: EquipmentPreset.fromJSON(assertSet("EquipmentDefinitions_PresetsEntry.value", object.value)),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: EquipmentDefinitions_PresetsEntry): unknown {
|
||||
const obj: any = {};
|
||||
if (message.key !== undefined) {
|
||||
obj.key = message.key;
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
obj.value = EquipmentPreset.toJSON(message.value);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<EquipmentDefinitions_PresetsEntry>, I>>(
|
||||
base?: I,
|
||||
): EquipmentDefinitions_PresetsEntry {
|
||||
return EquipmentDefinitions_PresetsEntry.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<EquipmentDefinitions_PresetsEntry>, I>>(
|
||||
object: I,
|
||||
): EquipmentDefinitions_PresetsEntry {
|
||||
const message = createBaseEquipmentDefinitions_PresetsEntry();
|
||||
message.key = object.key ?? "";
|
||||
message.value = (object.value !== undefined && object.value !== null)
|
||||
? EquipmentPreset.fromPartial(object.value)
|
||||
: undefined;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseEquipmentDefinitions_EquipmentsEntry(): EquipmentDefinitions_EquipmentsEntry {
|
||||
return { key: 0, value: createBaseEquipment() };
|
||||
}
|
||||
|
||||
export const EquipmentDefinitions_EquipmentsEntry: MessageFns<EquipmentDefinitions_EquipmentsEntry> = {
|
||||
encode(message: EquipmentDefinitions_EquipmentsEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.key !== undefined) {
|
||||
writer.uint32(8).uint32(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
Equipment.encode(message.value, writer.uint32(18).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): EquipmentDefinitions_EquipmentsEntry {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseEquipmentDefinitions_EquipmentsEntry();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 8) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.key = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.value = Equipment.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): EquipmentDefinitions_EquipmentsEntry {
|
||||
return {
|
||||
key: globalThis.Number(assertSet("EquipmentDefinitions_EquipmentsEntry.key", object.key)),
|
||||
value: Equipment.fromJSON(assertSet("EquipmentDefinitions_EquipmentsEntry.value", object.value)),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: EquipmentDefinitions_EquipmentsEntry): unknown {
|
||||
const obj: any = {};
|
||||
if (message.key !== undefined) {
|
||||
obj.key = Math.round(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
obj.value = Equipment.toJSON(message.value);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<EquipmentDefinitions_EquipmentsEntry>, I>>(
|
||||
base?: I,
|
||||
): EquipmentDefinitions_EquipmentsEntry {
|
||||
return EquipmentDefinitions_EquipmentsEntry.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<EquipmentDefinitions_EquipmentsEntry>, I>>(
|
||||
object: I,
|
||||
): EquipmentDefinitions_EquipmentsEntry {
|
||||
const message = createBaseEquipmentDefinitions_EquipmentsEntry();
|
||||
message.key = object.key ?? 0;
|
||||
message.value = (object.value !== undefined && object.value !== null)
|
||||
? Equipment.fromPartial(object.value)
|
||||
: undefined;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseEquipment(): Equipment {
|
||||
return { name: createBaseI18nString(), description: createBaseI18nString() };
|
||||
}
|
||||
|
||||
export const Equipment: MessageFns<Equipment> = {
|
||||
encode(message: Equipment, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.name !== undefined) {
|
||||
I18nString.encode(message.name, writer.uint32(10).fork()).join();
|
||||
}
|
||||
if (message.description !== undefined) {
|
||||
I18nString.encode(message.description, writer.uint32(18).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): Equipment {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseEquipment();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.name = I18nString.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.description = I18nString.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): Equipment {
|
||||
return {
|
||||
name: I18nString.fromJSON(assertSet("Equipment.name", object.name)),
|
||||
description: I18nString.fromJSON(assertSet("Equipment.description", object.description)),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: Equipment): unknown {
|
||||
const obj: any = {};
|
||||
if (message.name !== undefined) {
|
||||
obj.name = I18nString.toJSON(message.name);
|
||||
}
|
||||
if (message.description !== undefined) {
|
||||
obj.description = I18nString.toJSON(message.description);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<Equipment>, I>>(base?: I): Equipment {
|
||||
return Equipment.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<Equipment>, I>>(object: I): Equipment {
|
||||
const message = createBaseEquipment();
|
||||
message.name = (object.name !== undefined && object.name !== null)
|
||||
? I18nString.fromPartial(object.name)
|
||||
: createBaseI18nString();
|
||||
message.description = (object.description !== undefined && object.description !== null)
|
||||
? I18nString.fromPartial(object.description)
|
||||
: createBaseI18nString();
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseEquipmentPreset(): EquipmentPreset {
|
||||
return { slots: [] };
|
||||
}
|
||||
|
||||
export const EquipmentPreset: MessageFns<EquipmentPreset> = {
|
||||
encode(message: EquipmentPreset, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
for (const v of message.slots) {
|
||||
EquipmentSlot.encode(v!, writer.uint32(10).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): EquipmentPreset {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseEquipmentPreset();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.slots.push(EquipmentSlot.decode(reader, reader.uint32()));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): EquipmentPreset {
|
||||
return {
|
||||
slots: globalThis.Array.isArray(object?.slots) ? object.slots.map((e: any) => EquipmentSlot.fromJSON(e)) : [],
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: EquipmentPreset): unknown {
|
||||
const obj: any = {};
|
||||
if (message.slots?.length) {
|
||||
obj.slots = message.slots.map((e) => EquipmentSlot.toJSON(e));
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<EquipmentPreset>, I>>(base?: I): EquipmentPreset {
|
||||
return EquipmentPreset.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<EquipmentPreset>, I>>(object: I): EquipmentPreset {
|
||||
const message = createBaseEquipmentPreset();
|
||||
message.slots = object.slots?.map((e) => EquipmentSlot.fromPartial(e)) || [];
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseEquipmentSlot(): EquipmentSlot {
|
||||
return { left: 0, right: 0 };
|
||||
}
|
||||
|
||||
export const EquipmentSlot: MessageFns<EquipmentSlot> = {
|
||||
encode(message: EquipmentSlot, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.left !== 0) {
|
||||
writer.uint32(8).uint32(message.left);
|
||||
}
|
||||
if (message.right !== 0) {
|
||||
writer.uint32(16).uint32(message.right);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): EquipmentSlot {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseEquipmentSlot();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 8) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.left = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 16) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.right = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): EquipmentSlot {
|
||||
return {
|
||||
left: globalThis.Number(assertSet("EquipmentSlot.left", object.left)),
|
||||
right: globalThis.Number(assertSet("EquipmentSlot.right", object.right)),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: EquipmentSlot): unknown {
|
||||
const obj: any = {};
|
||||
if (message.left !== 0) {
|
||||
obj.left = Math.round(message.left);
|
||||
}
|
||||
if (message.right !== 0) {
|
||||
obj.right = Math.round(message.right);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<EquipmentSlot>, I>>(base?: I): EquipmentSlot {
|
||||
return EquipmentSlot.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<EquipmentSlot>, I>>(object: I): EquipmentSlot {
|
||||
const message = createBaseEquipmentSlot();
|
||||
message.left = object.left ?? 0;
|
||||
message.right = object.right ?? 0;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
||||
|
||||
export type DeepPartial<T> = T extends Builtin ? T
|
||||
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
||||
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
||||
: T extends { $case: string; value: unknown } ? { $case: T["$case"]; value?: DeepPartial<T["value"]> }
|
||||
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
||||
: Partial<T>;
|
||||
|
||||
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
||||
export type Exact<P, I extends P> = P extends Builtin ? P
|
||||
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
||||
|
||||
function isObject(value: any): boolean {
|
||||
return typeof value === "object" && value !== null;
|
||||
}
|
||||
|
||||
function isSet(value: any): boolean {
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
function assertSet<T>(field: string, value: T | undefined): T {
|
||||
if (!isSet(value)) {
|
||||
throw new TypeError(`Required field ${field} is not set`);
|
||||
}
|
||||
|
||||
return value as T;
|
||||
}
|
||||
|
||||
export interface MessageFns<T> {
|
||||
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
||||
fromJSON(object: any): T;
|
||||
toJSON(message: T): unknown;
|
||||
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
||||
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
syntax = "proto2";
|
||||
|
||||
package blitzkit;
|
||||
|
||||
import "packages/core/src/protos/legacy_i18n.proto";
|
||||
|
||||
message GameDefinitions {
|
||||
required string version = 1;
|
||||
repeated string nations = 2;
|
||||
map<uint32, GameMode> gameModes = 3;
|
||||
map<uint32, GameModeRole> roles = 4;
|
||||
}
|
||||
|
||||
message GameMode {
|
||||
required I18nString name = 1;
|
||||
}
|
||||
|
||||
message GameModeRole {
|
||||
repeated uint32 provisions = 1;
|
||||
repeated uint32 consumables = 2;
|
||||
}
|
||||
@@ -0,0 +1,546 @@
|
||||
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-ts_proto v2.2.2
|
||||
// protoc v5.28.2
|
||||
// source: packages/core/src/protos/legacy_game_definitions.proto
|
||||
|
||||
/* eslint-disable */
|
||||
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
||||
import { I18nString, createBaseI18nString } from "./legacy_i18n";
|
||||
|
||||
export const protobufPackage = "blitzkit";
|
||||
|
||||
export interface GameDefinitions {
|
||||
version: string;
|
||||
nations: string[];
|
||||
gameModes: { [key: number]: GameMode };
|
||||
roles: { [key: number]: GameModeRole };
|
||||
}
|
||||
|
||||
export interface GameDefinitions_GameModesEntry {
|
||||
key: number;
|
||||
value: GameMode | undefined;
|
||||
}
|
||||
|
||||
export interface GameDefinitions_RolesEntry {
|
||||
key: number;
|
||||
value: GameModeRole | undefined;
|
||||
}
|
||||
|
||||
export interface GameMode {
|
||||
name: I18nString;
|
||||
}
|
||||
|
||||
export interface GameModeRole {
|
||||
provisions: number[];
|
||||
consumables: number[];
|
||||
}
|
||||
|
||||
function createBaseGameDefinitions(): GameDefinitions {
|
||||
return { version: "", nations: [], gameModes: {}, roles: {} };
|
||||
}
|
||||
|
||||
export const GameDefinitions: MessageFns<GameDefinitions> = {
|
||||
encode(message: GameDefinitions, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.version !== "") {
|
||||
writer.uint32(10).string(message.version);
|
||||
}
|
||||
for (const v of message.nations) {
|
||||
writer.uint32(18).string(v!);
|
||||
}
|
||||
Object.entries(message.gameModes).forEach(([key, value]) => {
|
||||
GameDefinitions_GameModesEntry.encode({ key: key as any, value }, writer.uint32(26).fork()).join();
|
||||
});
|
||||
Object.entries(message.roles).forEach(([key, value]) => {
|
||||
GameDefinitions_RolesEntry.encode({ key: key as any, value }, writer.uint32(34).fork()).join();
|
||||
});
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): GameDefinitions {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseGameDefinitions();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.version = reader.string();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.nations.push(reader.string());
|
||||
continue;
|
||||
}
|
||||
case 3: {
|
||||
if (tag !== 26) {
|
||||
break;
|
||||
}
|
||||
|
||||
const entry3 = GameDefinitions_GameModesEntry.decode(reader, reader.uint32());
|
||||
if (entry3.value !== undefined) {
|
||||
message.gameModes[entry3.key] = entry3.value;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
case 4: {
|
||||
if (tag !== 34) {
|
||||
break;
|
||||
}
|
||||
|
||||
const entry4 = GameDefinitions_RolesEntry.decode(reader, reader.uint32());
|
||||
if (entry4.value !== undefined) {
|
||||
message.roles[entry4.key] = entry4.value;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): GameDefinitions {
|
||||
return {
|
||||
version: globalThis.String(assertSet("GameDefinitions.version", object.version)),
|
||||
nations: globalThis.Array.isArray(object?.nations) ? object.nations.map((e: any) => globalThis.String(e)) : [],
|
||||
gameModes: isObject(object.gameModes)
|
||||
? Object.entries(object.gameModes).reduce<{ [key: number]: GameMode }>((acc, [key, value]) => {
|
||||
acc[globalThis.Number(key)] = GameMode.fromJSON(value);
|
||||
return acc;
|
||||
}, {})
|
||||
: {},
|
||||
roles: isObject(object.roles)
|
||||
? Object.entries(object.roles).reduce<{ [key: number]: GameModeRole }>((acc, [key, value]) => {
|
||||
acc[globalThis.Number(key)] = GameModeRole.fromJSON(value);
|
||||
return acc;
|
||||
}, {})
|
||||
: {},
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: GameDefinitions): unknown {
|
||||
const obj: any = {};
|
||||
if (message.version !== "") {
|
||||
obj.version = message.version;
|
||||
}
|
||||
if (message.nations?.length) {
|
||||
obj.nations = message.nations;
|
||||
}
|
||||
if (message.gameModes) {
|
||||
const entries = Object.entries(message.gameModes);
|
||||
if (entries.length > 0) {
|
||||
obj.gameModes = {};
|
||||
entries.forEach(([k, v]) => {
|
||||
obj.gameModes[k] = GameMode.toJSON(v);
|
||||
});
|
||||
}
|
||||
}
|
||||
if (message.roles) {
|
||||
const entries = Object.entries(message.roles);
|
||||
if (entries.length > 0) {
|
||||
obj.roles = {};
|
||||
entries.forEach(([k, v]) => {
|
||||
obj.roles[k] = GameModeRole.toJSON(v);
|
||||
});
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<GameDefinitions>, I>>(base?: I): GameDefinitions {
|
||||
return GameDefinitions.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<GameDefinitions>, I>>(object: I): GameDefinitions {
|
||||
const message = createBaseGameDefinitions();
|
||||
message.version = object.version ?? "";
|
||||
message.nations = object.nations?.map((e) => e) || [];
|
||||
message.gameModes = Object.entries(object.gameModes ?? {}).reduce<{ [key: number]: GameMode }>(
|
||||
(acc, [key, value]) => {
|
||||
if (value !== undefined) {
|
||||
acc[globalThis.Number(key)] = GameMode.fromPartial(value);
|
||||
}
|
||||
return acc;
|
||||
},
|
||||
{},
|
||||
);
|
||||
message.roles = Object.entries(object.roles ?? {}).reduce<{ [key: number]: GameModeRole }>((acc, [key, value]) => {
|
||||
if (value !== undefined) {
|
||||
acc[globalThis.Number(key)] = GameModeRole.fromPartial(value);
|
||||
}
|
||||
return acc;
|
||||
}, {});
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseGameDefinitions_GameModesEntry(): GameDefinitions_GameModesEntry {
|
||||
return { key: 0, value: createBaseGameMode() };
|
||||
}
|
||||
|
||||
export const GameDefinitions_GameModesEntry: MessageFns<GameDefinitions_GameModesEntry> = {
|
||||
encode(message: GameDefinitions_GameModesEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.key !== undefined) {
|
||||
writer.uint32(8).uint32(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
GameMode.encode(message.value, writer.uint32(18).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): GameDefinitions_GameModesEntry {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseGameDefinitions_GameModesEntry();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 8) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.key = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.value = GameMode.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): GameDefinitions_GameModesEntry {
|
||||
return {
|
||||
key: globalThis.Number(assertSet("GameDefinitions_GameModesEntry.key", object.key)),
|
||||
value: GameMode.fromJSON(assertSet("GameDefinitions_GameModesEntry.value", object.value)),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: GameDefinitions_GameModesEntry): unknown {
|
||||
const obj: any = {};
|
||||
if (message.key !== undefined) {
|
||||
obj.key = Math.round(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
obj.value = GameMode.toJSON(message.value);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<GameDefinitions_GameModesEntry>, I>>(base?: I): GameDefinitions_GameModesEntry {
|
||||
return GameDefinitions_GameModesEntry.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<GameDefinitions_GameModesEntry>, I>>(
|
||||
object: I,
|
||||
): GameDefinitions_GameModesEntry {
|
||||
const message = createBaseGameDefinitions_GameModesEntry();
|
||||
message.key = object.key ?? 0;
|
||||
message.value = (object.value !== undefined && object.value !== null)
|
||||
? GameMode.fromPartial(object.value)
|
||||
: undefined;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseGameDefinitions_RolesEntry(): GameDefinitions_RolesEntry {
|
||||
return { key: 0, value: createBaseGameModeRole() };
|
||||
}
|
||||
|
||||
export const GameDefinitions_RolesEntry: MessageFns<GameDefinitions_RolesEntry> = {
|
||||
encode(message: GameDefinitions_RolesEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.key !== undefined) {
|
||||
writer.uint32(8).uint32(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
GameModeRole.encode(message.value, writer.uint32(18).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): GameDefinitions_RolesEntry {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseGameDefinitions_RolesEntry();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 8) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.key = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.value = GameModeRole.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): GameDefinitions_RolesEntry {
|
||||
return {
|
||||
key: globalThis.Number(assertSet("GameDefinitions_RolesEntry.key", object.key)),
|
||||
value: GameModeRole.fromJSON(assertSet("GameDefinitions_RolesEntry.value", object.value)),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: GameDefinitions_RolesEntry): unknown {
|
||||
const obj: any = {};
|
||||
if (message.key !== undefined) {
|
||||
obj.key = Math.round(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
obj.value = GameModeRole.toJSON(message.value);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<GameDefinitions_RolesEntry>, I>>(base?: I): GameDefinitions_RolesEntry {
|
||||
return GameDefinitions_RolesEntry.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<GameDefinitions_RolesEntry>, I>>(object: I): GameDefinitions_RolesEntry {
|
||||
const message = createBaseGameDefinitions_RolesEntry();
|
||||
message.key = object.key ?? 0;
|
||||
message.value = (object.value !== undefined && object.value !== null)
|
||||
? GameModeRole.fromPartial(object.value)
|
||||
: undefined;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseGameMode(): GameMode {
|
||||
return { name: createBaseI18nString() };
|
||||
}
|
||||
|
||||
export const GameMode: MessageFns<GameMode> = {
|
||||
encode(message: GameMode, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.name !== undefined) {
|
||||
I18nString.encode(message.name, writer.uint32(10).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): GameMode {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseGameMode();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.name = I18nString.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): GameMode {
|
||||
return { name: I18nString.fromJSON(assertSet("GameMode.name", object.name)) };
|
||||
},
|
||||
|
||||
toJSON(message: GameMode): unknown {
|
||||
const obj: any = {};
|
||||
if (message.name !== undefined) {
|
||||
obj.name = I18nString.toJSON(message.name);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<GameMode>, I>>(base?: I): GameMode {
|
||||
return GameMode.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<GameMode>, I>>(object: I): GameMode {
|
||||
const message = createBaseGameMode();
|
||||
message.name = (object.name !== undefined && object.name !== null)
|
||||
? I18nString.fromPartial(object.name)
|
||||
: createBaseI18nString();
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseGameModeRole(): GameModeRole {
|
||||
return { provisions: [], consumables: [] };
|
||||
}
|
||||
|
||||
export const GameModeRole: MessageFns<GameModeRole> = {
|
||||
encode(message: GameModeRole, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
writer.uint32(10).fork();
|
||||
for (const v of message.provisions) {
|
||||
writer.uint32(v);
|
||||
}
|
||||
writer.join();
|
||||
writer.uint32(18).fork();
|
||||
for (const v of message.consumables) {
|
||||
writer.uint32(v);
|
||||
}
|
||||
writer.join();
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): GameModeRole {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseGameModeRole();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag === 8) {
|
||||
message.provisions.push(reader.uint32());
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if (tag === 10) {
|
||||
const end2 = reader.uint32() + reader.pos;
|
||||
while (reader.pos < end2) {
|
||||
message.provisions.push(reader.uint32());
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 2: {
|
||||
if (tag === 16) {
|
||||
message.consumables.push(reader.uint32());
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if (tag === 18) {
|
||||
const end2 = reader.uint32() + reader.pos;
|
||||
while (reader.pos < end2) {
|
||||
message.consumables.push(reader.uint32());
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): GameModeRole {
|
||||
return {
|
||||
provisions: globalThis.Array.isArray(object?.provisions)
|
||||
? object.provisions.map((e: any) => globalThis.Number(e))
|
||||
: [],
|
||||
consumables: globalThis.Array.isArray(object?.consumables)
|
||||
? object.consumables.map((e: any) => globalThis.Number(e))
|
||||
: [],
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: GameModeRole): unknown {
|
||||
const obj: any = {};
|
||||
if (message.provisions?.length) {
|
||||
obj.provisions = message.provisions.map((e) => Math.round(e));
|
||||
}
|
||||
if (message.consumables?.length) {
|
||||
obj.consumables = message.consumables.map((e) => Math.round(e));
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<GameModeRole>, I>>(base?: I): GameModeRole {
|
||||
return GameModeRole.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<GameModeRole>, I>>(object: I): GameModeRole {
|
||||
const message = createBaseGameModeRole();
|
||||
message.provisions = object.provisions?.map((e) => e) || [];
|
||||
message.consumables = object.consumables?.map((e) => e) || [];
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
||||
|
||||
export type DeepPartial<T> = T extends Builtin ? T
|
||||
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
||||
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
||||
: T extends { $case: string; value: unknown } ? { $case: T["$case"]; value?: DeepPartial<T["value"]> }
|
||||
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
||||
: Partial<T>;
|
||||
|
||||
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
||||
export type Exact<P, I extends P> = P extends Builtin ? P
|
||||
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
||||
|
||||
function isObject(value: any): boolean {
|
||||
return typeof value === "object" && value !== null;
|
||||
}
|
||||
|
||||
function isSet(value: any): boolean {
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
function assertSet<T>(field: string, value: T | undefined): T {
|
||||
if (!isSet(value)) {
|
||||
throw new TypeError(`Required field ${field} is not set`);
|
||||
}
|
||||
|
||||
return value as T;
|
||||
}
|
||||
|
||||
export interface MessageFns<T> {
|
||||
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
||||
fromJSON(object: any): T;
|
||||
toJSON(message: T): unknown;
|
||||
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
||||
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
syntax = "proto2";
|
||||
|
||||
package blitzkit;
|
||||
|
||||
message I18nString {
|
||||
map<string, string> locales = 1;
|
||||
}
|
||||
@@ -0,0 +1,212 @@
|
||||
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-ts_proto v2.2.2
|
||||
// protoc v5.28.2
|
||||
// source: packages/core/src/protos/legacy_i18n.proto
|
||||
|
||||
/* eslint-disable */
|
||||
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
||||
|
||||
export const protobufPackage = "blitzkit";
|
||||
|
||||
export interface I18nString {
|
||||
locales: { [key: string]: string };
|
||||
}
|
||||
|
||||
export interface I18nString_LocalesEntry {
|
||||
key: string;
|
||||
value: string;
|
||||
}
|
||||
|
||||
export function createBaseI18nString(): I18nString {
|
||||
return { locales: {} };
|
||||
}
|
||||
|
||||
export const I18nString: MessageFns<I18nString> = {
|
||||
encode(message: I18nString, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
Object.entries(message.locales).forEach(([key, value]) => {
|
||||
I18nString_LocalesEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join();
|
||||
});
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): I18nString {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseI18nString();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
const entry1 = I18nString_LocalesEntry.decode(reader, reader.uint32());
|
||||
if (entry1.value !== undefined) {
|
||||
message.locales[entry1.key] = entry1.value;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): I18nString {
|
||||
return {
|
||||
locales: isObject(object.locales)
|
||||
? Object.entries(object.locales).reduce<{ [key: string]: string }>((acc, [key, value]) => {
|
||||
acc[key] = String(value);
|
||||
return acc;
|
||||
}, {})
|
||||
: {},
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: I18nString): unknown {
|
||||
const obj: any = {};
|
||||
if (message.locales) {
|
||||
const entries = Object.entries(message.locales);
|
||||
if (entries.length > 0) {
|
||||
obj.locales = {};
|
||||
entries.forEach(([k, v]) => {
|
||||
obj.locales[k] = v;
|
||||
});
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<I18nString>, I>>(base?: I): I18nString {
|
||||
return I18nString.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<I18nString>, I>>(object: I): I18nString {
|
||||
const message = createBaseI18nString();
|
||||
message.locales = Object.entries(object.locales ?? {}).reduce<{ [key: string]: string }>((acc, [key, value]) => {
|
||||
if (value !== undefined) {
|
||||
acc[key] = globalThis.String(value);
|
||||
}
|
||||
return acc;
|
||||
}, {});
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseI18nString_LocalesEntry(): I18nString_LocalesEntry {
|
||||
return { key: "", value: "" };
|
||||
}
|
||||
|
||||
export const I18nString_LocalesEntry: MessageFns<I18nString_LocalesEntry> = {
|
||||
encode(message: I18nString_LocalesEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.key !== undefined) {
|
||||
writer.uint32(10).string(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
writer.uint32(18).string(message.value);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): I18nString_LocalesEntry {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseI18nString_LocalesEntry();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.key = reader.string();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.value = reader.string();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): I18nString_LocalesEntry {
|
||||
return {
|
||||
key: globalThis.String(assertSet("I18nString_LocalesEntry.key", object.key)),
|
||||
value: globalThis.String(assertSet("I18nString_LocalesEntry.value", object.value)),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: I18nString_LocalesEntry): unknown {
|
||||
const obj: any = {};
|
||||
if (message.key !== undefined) {
|
||||
obj.key = message.key;
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
obj.value = message.value;
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<I18nString_LocalesEntry>, I>>(base?: I): I18nString_LocalesEntry {
|
||||
return I18nString_LocalesEntry.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<I18nString_LocalesEntry>, I>>(object: I): I18nString_LocalesEntry {
|
||||
const message = createBaseI18nString_LocalesEntry();
|
||||
message.key = object.key ?? "";
|
||||
message.value = object.value ?? "";
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
||||
|
||||
export type DeepPartial<T> = T extends Builtin ? T
|
||||
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
||||
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
||||
: T extends { $case: string; value: unknown } ? { $case: T["$case"]; value?: DeepPartial<T["value"]> }
|
||||
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
||||
: Partial<T>;
|
||||
|
||||
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
||||
export type Exact<P, I extends P> = P extends Builtin ? P
|
||||
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
||||
|
||||
function isObject(value: any): boolean {
|
||||
return typeof value === "object" && value !== null;
|
||||
}
|
||||
|
||||
function isSet(value: any): boolean {
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
function assertSet<T>(field: string, value: T | undefined): T {
|
||||
if (!isSet(value)) {
|
||||
throw new TypeError(`Required field ${field} is not set`);
|
||||
}
|
||||
|
||||
return value as T;
|
||||
}
|
||||
|
||||
export interface MessageFns<T> {
|
||||
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
||||
fromJSON(object: any): T;
|
||||
toJSON(message: T): unknown;
|
||||
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
||||
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
syntax = "proto2";
|
||||
|
||||
package blitzkit;
|
||||
|
||||
import "packages/core/src/protos/legacy_i18n.proto";
|
||||
|
||||
message MapDefinitions {
|
||||
map<int32, MapDefinition> maps = 1;
|
||||
}
|
||||
|
||||
message MapDefinition {
|
||||
required uint32 id = 1;
|
||||
required I18nString name = 2;
|
||||
}
|
||||
@@ -0,0 +1,298 @@
|
||||
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-ts_proto v2.2.2
|
||||
// protoc v5.28.2
|
||||
// source: packages/core/src/protos/legacy_map_definitions.proto
|
||||
|
||||
/* eslint-disable */
|
||||
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
||||
import { I18nString } from "./legacy_i18n";
|
||||
|
||||
export const protobufPackage = "blitzkit";
|
||||
|
||||
export interface MapDefinitions {
|
||||
maps: { [key: number]: MapDefinition };
|
||||
}
|
||||
|
||||
export interface MapDefinitions_MapsEntry {
|
||||
key: number;
|
||||
value: MapDefinition | undefined;
|
||||
}
|
||||
|
||||
export interface MapDefinition {
|
||||
id: number;
|
||||
name: I18nString;
|
||||
}
|
||||
|
||||
function createBaseMapDefinitions(): MapDefinitions {
|
||||
return { maps: {} };
|
||||
}
|
||||
|
||||
export const MapDefinitions: MessageFns<MapDefinitions> = {
|
||||
encode(message: MapDefinitions, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
Object.entries(message.maps).forEach(([key, value]) => {
|
||||
MapDefinitions_MapsEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join();
|
||||
});
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): MapDefinitions {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseMapDefinitions();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
const entry1 = MapDefinitions_MapsEntry.decode(reader, reader.uint32());
|
||||
if (entry1.value !== undefined) {
|
||||
message.maps[entry1.key] = entry1.value;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): MapDefinitions {
|
||||
return {
|
||||
maps: isObject(object.maps)
|
||||
? Object.entries(object.maps).reduce<{ [key: number]: MapDefinition }>((acc, [key, value]) => {
|
||||
acc[globalThis.Number(key)] = MapDefinition.fromJSON(value);
|
||||
return acc;
|
||||
}, {})
|
||||
: {},
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: MapDefinitions): unknown {
|
||||
const obj: any = {};
|
||||
if (message.maps) {
|
||||
const entries = Object.entries(message.maps);
|
||||
if (entries.length > 0) {
|
||||
obj.maps = {};
|
||||
entries.forEach(([k, v]) => {
|
||||
obj.maps[k] = MapDefinition.toJSON(v);
|
||||
});
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<MapDefinitions>, I>>(base?: I): MapDefinitions {
|
||||
return MapDefinitions.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<MapDefinitions>, I>>(object: I): MapDefinitions {
|
||||
const message = createBaseMapDefinitions();
|
||||
message.maps = Object.entries(object.maps ?? {}).reduce<{ [key: number]: MapDefinition }>((acc, [key, value]) => {
|
||||
if (value !== undefined) {
|
||||
acc[globalThis.Number(key)] = MapDefinition.fromPartial(value);
|
||||
}
|
||||
return acc;
|
||||
}, {});
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseMapDefinitions_MapsEntry(): MapDefinitions_MapsEntry {
|
||||
return { key: 0, value: createBaseMapDefinition() };
|
||||
}
|
||||
|
||||
export const MapDefinitions_MapsEntry: MessageFns<MapDefinitions_MapsEntry> = {
|
||||
encode(message: MapDefinitions_MapsEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.key !== undefined) {
|
||||
writer.uint32(8).int32(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
MapDefinition.encode(message.value, writer.uint32(18).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): MapDefinitions_MapsEntry {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseMapDefinitions_MapsEntry();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 8) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.key = reader.int32();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.value = MapDefinition.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): MapDefinitions_MapsEntry {
|
||||
return {
|
||||
key: globalThis.Number(assertSet("MapDefinitions_MapsEntry.key", object.key)),
|
||||
value: MapDefinition.fromJSON(assertSet("MapDefinitions_MapsEntry.value", object.value)),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: MapDefinitions_MapsEntry): unknown {
|
||||
const obj: any = {};
|
||||
if (message.key !== undefined) {
|
||||
obj.key = Math.round(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
obj.value = MapDefinition.toJSON(message.value);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<MapDefinitions_MapsEntry>, I>>(base?: I): MapDefinitions_MapsEntry {
|
||||
return MapDefinitions_MapsEntry.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<MapDefinitions_MapsEntry>, I>>(object: I): MapDefinitions_MapsEntry {
|
||||
const message = createBaseMapDefinitions_MapsEntry();
|
||||
message.key = object.key ?? 0;
|
||||
message.value = (object.value !== undefined && object.value !== null)
|
||||
? MapDefinition.fromPartial(object.value)
|
||||
: undefined;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseMapDefinition(): MapDefinition {
|
||||
return { id: 0, name: createBaseI18nString() };
|
||||
}
|
||||
|
||||
export const MapDefinition: MessageFns<MapDefinition> = {
|
||||
encode(message: MapDefinition, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.id !== 0) {
|
||||
writer.uint32(8).uint32(message.id);
|
||||
}
|
||||
if (message.name !== undefined) {
|
||||
I18nString.encode(message.name, writer.uint32(18).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): MapDefinition {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseMapDefinition();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 8) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.id = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.name = I18nString.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): MapDefinition {
|
||||
return {
|
||||
id: globalThis.Number(assertSet("MapDefinition.id", object.id)),
|
||||
name: I18nString.fromJSON(assertSet("MapDefinition.name", object.name)),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: MapDefinition): unknown {
|
||||
const obj: any = {};
|
||||
if (message.id !== 0) {
|
||||
obj.id = Math.round(message.id);
|
||||
}
|
||||
if (message.name !== undefined) {
|
||||
obj.name = I18nString.toJSON(message.name);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<MapDefinition>, I>>(base?: I): MapDefinition {
|
||||
return MapDefinition.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<MapDefinition>, I>>(object: I): MapDefinition {
|
||||
const message = createBaseMapDefinition();
|
||||
message.id = object.id ?? 0;
|
||||
message.name = (object.name !== undefined && object.name !== null)
|
||||
? I18nString.fromPartial(object.name)
|
||||
: createBaseI18nString();
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
||||
|
||||
export type DeepPartial<T> = T extends Builtin ? T
|
||||
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
||||
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
||||
: T extends { $case: string; value: unknown } ? { $case: T["$case"]; value?: DeepPartial<T["value"]> }
|
||||
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
||||
: Partial<T>;
|
||||
|
||||
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
||||
export type Exact<P, I extends P> = P extends Builtin ? P
|
||||
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
||||
|
||||
function isObject(value: any): boolean {
|
||||
return typeof value === "object" && value !== null;
|
||||
}
|
||||
|
||||
function isSet(value: any): boolean {
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
function assertSet<T>(field: string, value: T | undefined): T {
|
||||
if (!isSet(value)) {
|
||||
throw new TypeError(`Required field ${field} is not set`);
|
||||
}
|
||||
|
||||
return value as T;
|
||||
}
|
||||
|
||||
export interface MessageFns<T> {
|
||||
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
||||
fromJSON(object: any): T;
|
||||
toJSON(message: T): unknown;
|
||||
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
||||
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
syntax = "proto2";
|
||||
|
||||
package blitzkit;
|
||||
|
||||
message ModelDefinitions {
|
||||
map<uint32, ModelDefinition> models = 1;
|
||||
}
|
||||
|
||||
message ModelDefinition {
|
||||
required Armor armor = 1;
|
||||
required Vector3 turret_origin = 2;
|
||||
optional InitialTurretRotation initial_turret_rotation = 3;
|
||||
map<uint32, TurretModelDefinition> turrets = 4;
|
||||
map<uint32, TrackModelDefinition> tracks = 5;
|
||||
required BoundingBox bounding_box = 6;
|
||||
}
|
||||
|
||||
message Armor {
|
||||
map<uint32, float> thickness = 1;
|
||||
repeated uint32 spaced = 2;
|
||||
}
|
||||
|
||||
message Vector3 {
|
||||
required float x = 1;
|
||||
required float y = 2;
|
||||
required float z = 3;
|
||||
}
|
||||
|
||||
message InitialTurretRotation {
|
||||
required float yaw = 1;
|
||||
required float pitch = 2;
|
||||
required float roll = 3;
|
||||
}
|
||||
|
||||
message TurretModelDefinition {
|
||||
required BoundingBox bounding_box = 1;
|
||||
required Armor armor = 2;
|
||||
required uint32 model_id = 3;
|
||||
required Vector3 gun_origin = 4;
|
||||
map<uint32, GunModelDefinition> guns = 5;
|
||||
optional YawLimits yaw = 6;
|
||||
}
|
||||
|
||||
message YawLimits {
|
||||
required float min = 1;
|
||||
required float max = 2;
|
||||
}
|
||||
|
||||
message BoundingBox {
|
||||
required Vector3 min = 1;
|
||||
required Vector3 max = 2;
|
||||
}
|
||||
|
||||
message TrackModelDefinition {
|
||||
required float thickness = 1;
|
||||
required Vector3 origin = 2;
|
||||
}
|
||||
|
||||
message GunModelDefinition {
|
||||
required Armor armor = 1;
|
||||
required float thickness = 2;
|
||||
required uint32 model_id = 3;
|
||||
required PitchLimits pitch = 4;
|
||||
optional float mask = 5;
|
||||
}
|
||||
|
||||
message PitchLimits {
|
||||
required float min = 1;
|
||||
required float max = 2;
|
||||
optional PitchLimitsExtrema front = 3;
|
||||
optional PitchLimitsExtrema back = 4;
|
||||
optional float transition = 5;
|
||||
}
|
||||
|
||||
message PitchLimitsExtrema {
|
||||
required float min = 1;
|
||||
required float max = 2;
|
||||
required float range = 3;
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,19 @@
|
||||
syntax = "proto2";
|
||||
|
||||
package blitzkit;
|
||||
|
||||
import "packages/core/src/protos/legacy_consumable_definitions.proto";
|
||||
import "packages/core/src/protos/legacy_i18n.proto";
|
||||
|
||||
message ProvisionDefinitions {
|
||||
map<uint32, Provision> provisions = 1;
|
||||
}
|
||||
|
||||
message Provision {
|
||||
required uint32 id = 1;
|
||||
required I18nString name = 2;
|
||||
optional float crew = 3;
|
||||
required bool game_mode_exclusive = 5;
|
||||
repeated ConsumableTankFilter include = 6;
|
||||
repeated ConsumableTankFilter exclude = 7;
|
||||
}
|
||||
@@ -0,0 +1,378 @@
|
||||
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-ts_proto v2.2.2
|
||||
// protoc v5.28.2
|
||||
// source: packages/core/src/protos/legacy_provision_definitions.proto
|
||||
|
||||
/* eslint-disable */
|
||||
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
||||
import { ConsumableTankFilter } from "./legacy_consumable_definitions";
|
||||
import { I18nString } from "./legacy_i18n";
|
||||
|
||||
export const protobufPackage = "blitzkit";
|
||||
|
||||
export interface ProvisionDefinitions {
|
||||
provisions: { [key: number]: Provision };
|
||||
}
|
||||
|
||||
export interface ProvisionDefinitions_ProvisionsEntry {
|
||||
key: number;
|
||||
value: Provision | undefined;
|
||||
}
|
||||
|
||||
export interface Provision {
|
||||
id: number;
|
||||
name: I18nString;
|
||||
crew?: number | undefined;
|
||||
game_mode_exclusive: boolean;
|
||||
include: ConsumableTankFilter[];
|
||||
exclude: ConsumableTankFilter[];
|
||||
}
|
||||
|
||||
function createBaseProvisionDefinitions(): ProvisionDefinitions {
|
||||
return { provisions: {} };
|
||||
}
|
||||
|
||||
export const ProvisionDefinitions: MessageFns<ProvisionDefinitions> = {
|
||||
encode(message: ProvisionDefinitions, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
Object.entries(message.provisions).forEach(([key, value]) => {
|
||||
ProvisionDefinitions_ProvisionsEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join();
|
||||
});
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): ProvisionDefinitions {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseProvisionDefinitions();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
const entry1 = ProvisionDefinitions_ProvisionsEntry.decode(reader, reader.uint32());
|
||||
if (entry1.value !== undefined) {
|
||||
message.provisions[entry1.key] = entry1.value;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): ProvisionDefinitions {
|
||||
return {
|
||||
provisions: isObject(object.provisions)
|
||||
? Object.entries(object.provisions).reduce<{ [key: number]: Provision }>((acc, [key, value]) => {
|
||||
acc[globalThis.Number(key)] = Provision.fromJSON(value);
|
||||
return acc;
|
||||
}, {})
|
||||
: {},
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: ProvisionDefinitions): unknown {
|
||||
const obj: any = {};
|
||||
if (message.provisions) {
|
||||
const entries = Object.entries(message.provisions);
|
||||
if (entries.length > 0) {
|
||||
obj.provisions = {};
|
||||
entries.forEach(([k, v]) => {
|
||||
obj.provisions[k] = Provision.toJSON(v);
|
||||
});
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<ProvisionDefinitions>, I>>(base?: I): ProvisionDefinitions {
|
||||
return ProvisionDefinitions.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<ProvisionDefinitions>, I>>(object: I): ProvisionDefinitions {
|
||||
const message = createBaseProvisionDefinitions();
|
||||
message.provisions = Object.entries(object.provisions ?? {}).reduce<{ [key: number]: Provision }>(
|
||||
(acc, [key, value]) => {
|
||||
if (value !== undefined) {
|
||||
acc[globalThis.Number(key)] = Provision.fromPartial(value);
|
||||
}
|
||||
return acc;
|
||||
},
|
||||
{},
|
||||
);
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseProvisionDefinitions_ProvisionsEntry(): ProvisionDefinitions_ProvisionsEntry {
|
||||
return { key: 0, value: createBaseProvision() };
|
||||
}
|
||||
|
||||
export const ProvisionDefinitions_ProvisionsEntry: MessageFns<ProvisionDefinitions_ProvisionsEntry> = {
|
||||
encode(message: ProvisionDefinitions_ProvisionsEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.key !== undefined) {
|
||||
writer.uint32(8).uint32(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
Provision.encode(message.value, writer.uint32(18).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): ProvisionDefinitions_ProvisionsEntry {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseProvisionDefinitions_ProvisionsEntry();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 8) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.key = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.value = Provision.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): ProvisionDefinitions_ProvisionsEntry {
|
||||
return {
|
||||
key: globalThis.Number(assertSet("ProvisionDefinitions_ProvisionsEntry.key", object.key)),
|
||||
value: Provision.fromJSON(assertSet("ProvisionDefinitions_ProvisionsEntry.value", object.value)),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: ProvisionDefinitions_ProvisionsEntry): unknown {
|
||||
const obj: any = {};
|
||||
if (message.key !== undefined) {
|
||||
obj.key = Math.round(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
obj.value = Provision.toJSON(message.value);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<ProvisionDefinitions_ProvisionsEntry>, I>>(
|
||||
base?: I,
|
||||
): ProvisionDefinitions_ProvisionsEntry {
|
||||
return ProvisionDefinitions_ProvisionsEntry.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<ProvisionDefinitions_ProvisionsEntry>, I>>(
|
||||
object: I,
|
||||
): ProvisionDefinitions_ProvisionsEntry {
|
||||
const message = createBaseProvisionDefinitions_ProvisionsEntry();
|
||||
message.key = object.key ?? 0;
|
||||
message.value = (object.value !== undefined && object.value !== null)
|
||||
? Provision.fromPartial(object.value)
|
||||
: undefined;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseProvision(): Provision {
|
||||
return { id: 0, name: createBaseI18nString(), crew: undefined, game_mode_exclusive: false, include: [], exclude: [] };
|
||||
}
|
||||
|
||||
export const Provision: MessageFns<Provision> = {
|
||||
encode(message: Provision, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.id !== 0) {
|
||||
writer.uint32(8).uint32(message.id);
|
||||
}
|
||||
if (message.name !== undefined) {
|
||||
I18nString.encode(message.name, writer.uint32(18).fork()).join();
|
||||
}
|
||||
if (message.crew !== undefined && message.crew !== undefined) {
|
||||
writer.uint32(29).float(message.crew);
|
||||
}
|
||||
if (message.game_mode_exclusive !== false) {
|
||||
writer.uint32(40).bool(message.game_mode_exclusive);
|
||||
}
|
||||
for (const v of message.include) {
|
||||
ConsumableTankFilter.encode(v!, writer.uint32(50).fork()).join();
|
||||
}
|
||||
for (const v of message.exclude) {
|
||||
ConsumableTankFilter.encode(v!, writer.uint32(58).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): Provision {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseProvision();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 8) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.id = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.name = I18nString.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
case 3: {
|
||||
if (tag !== 29) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.crew = reader.float();
|
||||
continue;
|
||||
}
|
||||
case 5: {
|
||||
if (tag !== 40) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.game_mode_exclusive = reader.bool();
|
||||
continue;
|
||||
}
|
||||
case 6: {
|
||||
if (tag !== 50) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.include.push(ConsumableTankFilter.decode(reader, reader.uint32()));
|
||||
continue;
|
||||
}
|
||||
case 7: {
|
||||
if (tag !== 58) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.exclude.push(ConsumableTankFilter.decode(reader, reader.uint32()));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): Provision {
|
||||
return {
|
||||
id: globalThis.Number(assertSet("Provision.id", object.id)),
|
||||
name: I18nString.fromJSON(assertSet("Provision.name", object.name)),
|
||||
crew: isSet(object.crew) ? globalThis.Number(object.crew) : undefined,
|
||||
game_mode_exclusive: globalThis.Boolean(assertSet("Provision.game_mode_exclusive", object.game_mode_exclusive)),
|
||||
include: globalThis.Array.isArray(object?.include)
|
||||
? object.include.map((e: any) => ConsumableTankFilter.fromJSON(e))
|
||||
: [],
|
||||
exclude: globalThis.Array.isArray(object?.exclude)
|
||||
? object.exclude.map((e: any) => ConsumableTankFilter.fromJSON(e))
|
||||
: [],
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: Provision): unknown {
|
||||
const obj: any = {};
|
||||
if (message.id !== 0) {
|
||||
obj.id = Math.round(message.id);
|
||||
}
|
||||
if (message.name !== undefined) {
|
||||
obj.name = I18nString.toJSON(message.name);
|
||||
}
|
||||
if (message.crew !== undefined && message.crew !== undefined) {
|
||||
obj.crew = message.crew;
|
||||
}
|
||||
if (message.game_mode_exclusive !== false) {
|
||||
obj.game_mode_exclusive = message.game_mode_exclusive;
|
||||
}
|
||||
if (message.include?.length) {
|
||||
obj.include = message.include.map((e) => ConsumableTankFilter.toJSON(e));
|
||||
}
|
||||
if (message.exclude?.length) {
|
||||
obj.exclude = message.exclude.map((e) => ConsumableTankFilter.toJSON(e));
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<Provision>, I>>(base?: I): Provision {
|
||||
return Provision.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<Provision>, I>>(object: I): Provision {
|
||||
const message = createBaseProvision();
|
||||
message.id = object.id ?? 0;
|
||||
message.name = (object.name !== undefined && object.name !== null)
|
||||
? I18nString.fromPartial(object.name)
|
||||
: createBaseI18nString();
|
||||
message.crew = object.crew ?? undefined;
|
||||
message.game_mode_exclusive = object.game_mode_exclusive ?? false;
|
||||
message.include = object.include?.map((e) => ConsumableTankFilter.fromPartial(e)) || [];
|
||||
message.exclude = object.exclude?.map((e) => ConsumableTankFilter.fromPartial(e)) || [];
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
||||
|
||||
export type DeepPartial<T> = T extends Builtin ? T
|
||||
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
||||
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
||||
: T extends { $case: string; value: unknown } ? { $case: T["$case"]; value?: DeepPartial<T["value"]> }
|
||||
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
||||
: Partial<T>;
|
||||
|
||||
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
||||
export type Exact<P, I extends P> = P extends Builtin ? P
|
||||
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
||||
|
||||
function isObject(value: any): boolean {
|
||||
return typeof value === "object" && value !== null;
|
||||
}
|
||||
|
||||
function isSet(value: any): boolean {
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
function assertSet<T>(field: string, value: T | undefined): T {
|
||||
if (!isSet(value)) {
|
||||
throw new TypeError(`Required field ${field} is not set`);
|
||||
}
|
||||
|
||||
return value as T;
|
||||
}
|
||||
|
||||
export interface MessageFns<T> {
|
||||
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
||||
fromJSON(object: any): T;
|
||||
toJSON(message: T): unknown;
|
||||
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
||||
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
syntax = "proto2";
|
||||
|
||||
package blitzkit;
|
||||
|
||||
message RatingLeaderboard {
|
||||
oneof version {
|
||||
RatingLeaderboardV1 v1 = 1;
|
||||
RatingLeaderboardV2 v2 = 2;
|
||||
}
|
||||
}
|
||||
|
||||
message RatingLeaderboardV1 {
|
||||
repeated RatingLeaderboardEntryV1 entries = 1;
|
||||
}
|
||||
|
||||
message RatingLeaderboardEntryV1 {
|
||||
required uint32 id = 1;
|
||||
required uint32 score = 2;
|
||||
}
|
||||
|
||||
message RatingLeaderboardV2 {
|
||||
repeated RatingLeaderboardEntryV2 entries = 1;
|
||||
}
|
||||
|
||||
message RatingLeaderboardEntryV2 {
|
||||
required uint32 id = 1;
|
||||
required uint32 score = 2;
|
||||
required uint32 battles = 3;
|
||||
required uint32 wins = 4;
|
||||
required uint32 survived = 5;
|
||||
required uint32 damage = 6;
|
||||
required uint32 kills = 7;
|
||||
}
|
||||
@@ -0,0 +1,512 @@
|
||||
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-ts_proto v2.2.2
|
||||
// protoc v5.28.2
|
||||
// source: packages/core/src/protos/legacy_rating_leaderboard.proto
|
||||
|
||||
/* eslint-disable */
|
||||
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
||||
|
||||
export const protobufPackage = "blitzkit";
|
||||
|
||||
export interface RatingLeaderboard {
|
||||
version?: { $case: "v1"; value: RatingLeaderboardV1 } | { $case: "v2"; value: RatingLeaderboardV2 } | undefined;
|
||||
}
|
||||
|
||||
export interface RatingLeaderboardV1 {
|
||||
entries: RatingLeaderboardEntryV1[];
|
||||
}
|
||||
|
||||
export interface RatingLeaderboardEntryV1 {
|
||||
id: number;
|
||||
score: number;
|
||||
}
|
||||
|
||||
export interface RatingLeaderboardV2 {
|
||||
entries: RatingLeaderboardEntryV2[];
|
||||
}
|
||||
|
||||
export interface RatingLeaderboardEntryV2 {
|
||||
id: number;
|
||||
score: number;
|
||||
battles: number;
|
||||
wins: number;
|
||||
survived: number;
|
||||
damage: number;
|
||||
kills: number;
|
||||
}
|
||||
|
||||
function createBaseRatingLeaderboard(): RatingLeaderboard {
|
||||
return { version: undefined };
|
||||
}
|
||||
|
||||
export const RatingLeaderboard: MessageFns<RatingLeaderboard> = {
|
||||
encode(message: RatingLeaderboard, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
switch (message.version?.$case) {
|
||||
case "v1":
|
||||
RatingLeaderboardV1.encode(message.version.value, writer.uint32(10).fork()).join();
|
||||
break;
|
||||
case "v2":
|
||||
RatingLeaderboardV2.encode(message.version.value, writer.uint32(18).fork()).join();
|
||||
break;
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): RatingLeaderboard {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseRatingLeaderboard();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.version = { $case: "v1", value: RatingLeaderboardV1.decode(reader, reader.uint32()) };
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.version = { $case: "v2", value: RatingLeaderboardV2.decode(reader, reader.uint32()) };
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): RatingLeaderboard {
|
||||
return {
|
||||
version: isSet(object.v1)
|
||||
? { $case: "v1", value: RatingLeaderboardV1.fromJSON(object.v1) }
|
||||
: isSet(object.v2)
|
||||
? { $case: "v2", value: RatingLeaderboardV2.fromJSON(object.v2) }
|
||||
: undefined,
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: RatingLeaderboard): unknown {
|
||||
const obj: any = {};
|
||||
if (message.version?.$case === "v1") {
|
||||
obj.v1 = RatingLeaderboardV1.toJSON(message.version.value);
|
||||
}
|
||||
if (message.version?.$case === "v2") {
|
||||
obj.v2 = RatingLeaderboardV2.toJSON(message.version.value);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<RatingLeaderboard>, I>>(base?: I): RatingLeaderboard {
|
||||
return RatingLeaderboard.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<RatingLeaderboard>, I>>(object: I): RatingLeaderboard {
|
||||
const message = createBaseRatingLeaderboard();
|
||||
if (object.version?.$case === "v1" && object.version?.value !== undefined && object.version?.value !== null) {
|
||||
message.version = { $case: "v1", value: RatingLeaderboardV1.fromPartial(object.version.value) };
|
||||
}
|
||||
if (object.version?.$case === "v2" && object.version?.value !== undefined && object.version?.value !== null) {
|
||||
message.version = { $case: "v2", value: RatingLeaderboardV2.fromPartial(object.version.value) };
|
||||
}
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseRatingLeaderboardV1(): RatingLeaderboardV1 {
|
||||
return { entries: [] };
|
||||
}
|
||||
|
||||
export const RatingLeaderboardV1: MessageFns<RatingLeaderboardV1> = {
|
||||
encode(message: RatingLeaderboardV1, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
for (const v of message.entries) {
|
||||
RatingLeaderboardEntryV1.encode(v!, writer.uint32(10).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): RatingLeaderboardV1 {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseRatingLeaderboardV1();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.entries.push(RatingLeaderboardEntryV1.decode(reader, reader.uint32()));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): RatingLeaderboardV1 {
|
||||
return {
|
||||
entries: globalThis.Array.isArray(object?.entries)
|
||||
? object.entries.map((e: any) => RatingLeaderboardEntryV1.fromJSON(e))
|
||||
: [],
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: RatingLeaderboardV1): unknown {
|
||||
const obj: any = {};
|
||||
if (message.entries?.length) {
|
||||
obj.entries = message.entries.map((e) => RatingLeaderboardEntryV1.toJSON(e));
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<RatingLeaderboardV1>, I>>(base?: I): RatingLeaderboardV1 {
|
||||
return RatingLeaderboardV1.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<RatingLeaderboardV1>, I>>(object: I): RatingLeaderboardV1 {
|
||||
const message = createBaseRatingLeaderboardV1();
|
||||
message.entries = object.entries?.map((e) => RatingLeaderboardEntryV1.fromPartial(e)) || [];
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseRatingLeaderboardEntryV1(): RatingLeaderboardEntryV1 {
|
||||
return { id: 0, score: 0 };
|
||||
}
|
||||
|
||||
export const RatingLeaderboardEntryV1: MessageFns<RatingLeaderboardEntryV1> = {
|
||||
encode(message: RatingLeaderboardEntryV1, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.id !== 0) {
|
||||
writer.uint32(8).uint32(message.id);
|
||||
}
|
||||
if (message.score !== 0) {
|
||||
writer.uint32(16).uint32(message.score);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): RatingLeaderboardEntryV1 {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseRatingLeaderboardEntryV1();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 8) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.id = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 16) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.score = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): RatingLeaderboardEntryV1 {
|
||||
return {
|
||||
id: globalThis.Number(assertSet("RatingLeaderboardEntryV1.id", object.id)),
|
||||
score: globalThis.Number(assertSet("RatingLeaderboardEntryV1.score", object.score)),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: RatingLeaderboardEntryV1): unknown {
|
||||
const obj: any = {};
|
||||
if (message.id !== 0) {
|
||||
obj.id = Math.round(message.id);
|
||||
}
|
||||
if (message.score !== 0) {
|
||||
obj.score = Math.round(message.score);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<RatingLeaderboardEntryV1>, I>>(base?: I): RatingLeaderboardEntryV1 {
|
||||
return RatingLeaderboardEntryV1.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<RatingLeaderboardEntryV1>, I>>(object: I): RatingLeaderboardEntryV1 {
|
||||
const message = createBaseRatingLeaderboardEntryV1();
|
||||
message.id = object.id ?? 0;
|
||||
message.score = object.score ?? 0;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseRatingLeaderboardV2(): RatingLeaderboardV2 {
|
||||
return { entries: [] };
|
||||
}
|
||||
|
||||
export const RatingLeaderboardV2: MessageFns<RatingLeaderboardV2> = {
|
||||
encode(message: RatingLeaderboardV2, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
for (const v of message.entries) {
|
||||
RatingLeaderboardEntryV2.encode(v!, writer.uint32(10).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): RatingLeaderboardV2 {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseRatingLeaderboardV2();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.entries.push(RatingLeaderboardEntryV2.decode(reader, reader.uint32()));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): RatingLeaderboardV2 {
|
||||
return {
|
||||
entries: globalThis.Array.isArray(object?.entries)
|
||||
? object.entries.map((e: any) => RatingLeaderboardEntryV2.fromJSON(e))
|
||||
: [],
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: RatingLeaderboardV2): unknown {
|
||||
const obj: any = {};
|
||||
if (message.entries?.length) {
|
||||
obj.entries = message.entries.map((e) => RatingLeaderboardEntryV2.toJSON(e));
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<RatingLeaderboardV2>, I>>(base?: I): RatingLeaderboardV2 {
|
||||
return RatingLeaderboardV2.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<RatingLeaderboardV2>, I>>(object: I): RatingLeaderboardV2 {
|
||||
const message = createBaseRatingLeaderboardV2();
|
||||
message.entries = object.entries?.map((e) => RatingLeaderboardEntryV2.fromPartial(e)) || [];
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseRatingLeaderboardEntryV2(): RatingLeaderboardEntryV2 {
|
||||
return { id: 0, score: 0, battles: 0, wins: 0, survived: 0, damage: 0, kills: 0 };
|
||||
}
|
||||
|
||||
export const RatingLeaderboardEntryV2: MessageFns<RatingLeaderboardEntryV2> = {
|
||||
encode(message: RatingLeaderboardEntryV2, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.id !== 0) {
|
||||
writer.uint32(8).uint32(message.id);
|
||||
}
|
||||
if (message.score !== 0) {
|
||||
writer.uint32(16).uint32(message.score);
|
||||
}
|
||||
if (message.battles !== 0) {
|
||||
writer.uint32(24).uint32(message.battles);
|
||||
}
|
||||
if (message.wins !== 0) {
|
||||
writer.uint32(32).uint32(message.wins);
|
||||
}
|
||||
if (message.survived !== 0) {
|
||||
writer.uint32(40).uint32(message.survived);
|
||||
}
|
||||
if (message.damage !== 0) {
|
||||
writer.uint32(48).uint32(message.damage);
|
||||
}
|
||||
if (message.kills !== 0) {
|
||||
writer.uint32(56).uint32(message.kills);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): RatingLeaderboardEntryV2 {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseRatingLeaderboardEntryV2();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 8) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.id = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 16) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.score = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 3: {
|
||||
if (tag !== 24) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.battles = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 4: {
|
||||
if (tag !== 32) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.wins = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 5: {
|
||||
if (tag !== 40) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.survived = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 6: {
|
||||
if (tag !== 48) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.damage = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 7: {
|
||||
if (tag !== 56) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.kills = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): RatingLeaderboardEntryV2 {
|
||||
return {
|
||||
id: globalThis.Number(assertSet("RatingLeaderboardEntryV2.id", object.id)),
|
||||
score: globalThis.Number(assertSet("RatingLeaderboardEntryV2.score", object.score)),
|
||||
battles: globalThis.Number(assertSet("RatingLeaderboardEntryV2.battles", object.battles)),
|
||||
wins: globalThis.Number(assertSet("RatingLeaderboardEntryV2.wins", object.wins)),
|
||||
survived: globalThis.Number(assertSet("RatingLeaderboardEntryV2.survived", object.survived)),
|
||||
damage: globalThis.Number(assertSet("RatingLeaderboardEntryV2.damage", object.damage)),
|
||||
kills: globalThis.Number(assertSet("RatingLeaderboardEntryV2.kills", object.kills)),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: RatingLeaderboardEntryV2): unknown {
|
||||
const obj: any = {};
|
||||
if (message.id !== 0) {
|
||||
obj.id = Math.round(message.id);
|
||||
}
|
||||
if (message.score !== 0) {
|
||||
obj.score = Math.round(message.score);
|
||||
}
|
||||
if (message.battles !== 0) {
|
||||
obj.battles = Math.round(message.battles);
|
||||
}
|
||||
if (message.wins !== 0) {
|
||||
obj.wins = Math.round(message.wins);
|
||||
}
|
||||
if (message.survived !== 0) {
|
||||
obj.survived = Math.round(message.survived);
|
||||
}
|
||||
if (message.damage !== 0) {
|
||||
obj.damage = Math.round(message.damage);
|
||||
}
|
||||
if (message.kills !== 0) {
|
||||
obj.kills = Math.round(message.kills);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<RatingLeaderboardEntryV2>, I>>(base?: I): RatingLeaderboardEntryV2 {
|
||||
return RatingLeaderboardEntryV2.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<RatingLeaderboardEntryV2>, I>>(object: I): RatingLeaderboardEntryV2 {
|
||||
const message = createBaseRatingLeaderboardEntryV2();
|
||||
message.id = object.id ?? 0;
|
||||
message.score = object.score ?? 0;
|
||||
message.battles = object.battles ?? 0;
|
||||
message.wins = object.wins ?? 0;
|
||||
message.survived = object.survived ?? 0;
|
||||
message.damage = object.damage ?? 0;
|
||||
message.kills = object.kills ?? 0;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
||||
|
||||
export type DeepPartial<T> = T extends Builtin ? T
|
||||
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
||||
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
||||
: T extends { $case: string; value: unknown } ? { $case: T["$case"]; value?: DeepPartial<T["value"]> }
|
||||
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
||||
: Partial<T>;
|
||||
|
||||
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
||||
export type Exact<P, I extends P> = P extends Builtin ? P
|
||||
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
||||
|
||||
function isSet(value: any): boolean {
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
function assertSet<T>(field: string, value: T | undefined): T {
|
||||
if (!isSet(value)) {
|
||||
throw new TypeError(`Required field ${field} is not set`);
|
||||
}
|
||||
|
||||
return value as T;
|
||||
}
|
||||
|
||||
export interface MessageFns<T> {
|
||||
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
||||
fromJSON(object: any): T;
|
||||
toJSON(message: T): unknown;
|
||||
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
||||
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
syntax = "proto2";
|
||||
|
||||
package blitzkit;
|
||||
|
||||
message SkillDefinitions {
|
||||
// enums are disallowed as keys so using uint32; convert run-time
|
||||
map<uint32, Skill> classes = 1;
|
||||
}
|
||||
|
||||
message Skill {
|
||||
repeated string skills = 1;
|
||||
}
|
||||
@@ -0,0 +1,279 @@
|
||||
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-ts_proto v2.2.2
|
||||
// protoc v5.28.2
|
||||
// source: packages/core/src/protos/legacy_skill_definitions.proto
|
||||
|
||||
/* eslint-disable */
|
||||
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
||||
|
||||
export const protobufPackage = "blitzkit";
|
||||
|
||||
export interface SkillDefinitions {
|
||||
/** enums are disallowed as keys so using uint32; convert run-time */
|
||||
classes: { [key: number]: Skill };
|
||||
}
|
||||
|
||||
export interface SkillDefinitions_ClassesEntry {
|
||||
key: number;
|
||||
value: Skill | undefined;
|
||||
}
|
||||
|
||||
export interface Skill {
|
||||
skills: string[];
|
||||
}
|
||||
|
||||
function createBaseSkillDefinitions(): SkillDefinitions {
|
||||
return { classes: {} };
|
||||
}
|
||||
|
||||
export const SkillDefinitions: MessageFns<SkillDefinitions> = {
|
||||
encode(message: SkillDefinitions, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
Object.entries(message.classes).forEach(([key, value]) => {
|
||||
SkillDefinitions_ClassesEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join();
|
||||
});
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): SkillDefinitions {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseSkillDefinitions();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
const entry1 = SkillDefinitions_ClassesEntry.decode(reader, reader.uint32());
|
||||
if (entry1.value !== undefined) {
|
||||
message.classes[entry1.key] = entry1.value;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): SkillDefinitions {
|
||||
return {
|
||||
classes: isObject(object.classes)
|
||||
? Object.entries(object.classes).reduce<{ [key: number]: Skill }>((acc, [key, value]) => {
|
||||
acc[globalThis.Number(key)] = Skill.fromJSON(value);
|
||||
return acc;
|
||||
}, {})
|
||||
: {},
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: SkillDefinitions): unknown {
|
||||
const obj: any = {};
|
||||
if (message.classes) {
|
||||
const entries = Object.entries(message.classes);
|
||||
if (entries.length > 0) {
|
||||
obj.classes = {};
|
||||
entries.forEach(([k, v]) => {
|
||||
obj.classes[k] = Skill.toJSON(v);
|
||||
});
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<SkillDefinitions>, I>>(base?: I): SkillDefinitions {
|
||||
return SkillDefinitions.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<SkillDefinitions>, I>>(object: I): SkillDefinitions {
|
||||
const message = createBaseSkillDefinitions();
|
||||
message.classes = Object.entries(object.classes ?? {}).reduce<{ [key: number]: Skill }>((acc, [key, value]) => {
|
||||
if (value !== undefined) {
|
||||
acc[globalThis.Number(key)] = Skill.fromPartial(value);
|
||||
}
|
||||
return acc;
|
||||
}, {});
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseSkillDefinitions_ClassesEntry(): SkillDefinitions_ClassesEntry {
|
||||
return { key: 0, value: createBaseSkill() };
|
||||
}
|
||||
|
||||
export const SkillDefinitions_ClassesEntry: MessageFns<SkillDefinitions_ClassesEntry> = {
|
||||
encode(message: SkillDefinitions_ClassesEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
if (message.key !== undefined) {
|
||||
writer.uint32(8).uint32(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
Skill.encode(message.value, writer.uint32(18).fork()).join();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): SkillDefinitions_ClassesEntry {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseSkillDefinitions_ClassesEntry();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 8) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.key = reader.uint32();
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.value = Skill.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): SkillDefinitions_ClassesEntry {
|
||||
return {
|
||||
key: globalThis.Number(assertSet("SkillDefinitions_ClassesEntry.key", object.key)),
|
||||
value: Skill.fromJSON(assertSet("SkillDefinitions_ClassesEntry.value", object.value)),
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: SkillDefinitions_ClassesEntry): unknown {
|
||||
const obj: any = {};
|
||||
if (message.key !== undefined) {
|
||||
obj.key = Math.round(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
obj.value = Skill.toJSON(message.value);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<SkillDefinitions_ClassesEntry>, I>>(base?: I): SkillDefinitions_ClassesEntry {
|
||||
return SkillDefinitions_ClassesEntry.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<SkillDefinitions_ClassesEntry>, I>>(
|
||||
object: I,
|
||||
): SkillDefinitions_ClassesEntry {
|
||||
const message = createBaseSkillDefinitions_ClassesEntry();
|
||||
message.key = object.key ?? 0;
|
||||
message.value = (object.value !== undefined && object.value !== null) ? Skill.fromPartial(object.value) : undefined;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseSkill(): Skill {
|
||||
return { skills: [] };
|
||||
}
|
||||
|
||||
export const Skill: MessageFns<Skill> = {
|
||||
encode(message: Skill, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||
for (const v of message.skills) {
|
||||
writer.uint32(10).string(v!);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): Skill {
|
||||
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseSkill();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.skills.push(reader.string());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skip(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): Skill {
|
||||
return {
|
||||
skills: globalThis.Array.isArray(object?.skills) ? object.skills.map((e: any) => globalThis.String(e)) : [],
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: Skill): unknown {
|
||||
const obj: any = {};
|
||||
if (message.skills?.length) {
|
||||
obj.skills = message.skills;
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
create<I extends Exact<DeepPartial<Skill>, I>>(base?: I): Skill {
|
||||
return Skill.fromPartial(base ?? ({} as any));
|
||||
},
|
||||
fromPartial<I extends Exact<DeepPartial<Skill>, I>>(object: I): Skill {
|
||||
const message = createBaseSkill();
|
||||
message.skills = object.skills?.map((e) => e) || [];
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
||||
|
||||
export type DeepPartial<T> = T extends Builtin ? T
|
||||
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
||||
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
||||
: T extends { $case: string; value: unknown } ? { $case: T["$case"]; value?: DeepPartial<T["value"]> }
|
||||
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
||||
: Partial<T>;
|
||||
|
||||
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
||||
export type Exact<P, I extends P> = P extends Builtin ? P
|
||||
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
||||
|
||||
function isObject(value: any): boolean {
|
||||
return typeof value === "object" && value !== null;
|
||||
}
|
||||
|
||||
function isSet(value: any): boolean {
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
function assertSet<T>(field: string, value: T | undefined): T {
|
||||
if (!isSet(value)) {
|
||||
throw new TypeError(`Required field ${field} is not set`);
|
||||
}
|
||||
|
||||
return value as T;
|
||||
}
|
||||
|
||||
export interface MessageFns<T> {
|
||||
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
||||
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
||||
fromJSON(object: any): T;
|
||||
toJSON(message: T): unknown;
|
||||
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
||||
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
||||
}
|
||||
@@ -0,0 +1,234 @@
|
||||
syntax = "proto2";
|
||||
|
||||
package blitzkit;
|
||||
|
||||
import "packages/core/src/protos/legacy_i18n.proto";
|
||||
|
||||
message TankDefinitions {
|
||||
map<uint32, TankDefinition> tanks = 1;
|
||||
}
|
||||
|
||||
message TankDefinition {
|
||||
required uint32 id = 1;
|
||||
map<uint32, uint32> roles = 2;
|
||||
required bool fixed_camouflage = 4;
|
||||
repeated int32 camouflages = 5;
|
||||
repeated int32 ancestors = 6;
|
||||
repeated int32 successors = 7;
|
||||
repeated Crew crew = 8;
|
||||
required uint32 health = 9;
|
||||
required string nation = 10;
|
||||
required I18nString name = 11;
|
||||
optional I18nString name_full = 12;
|
||||
required TankType type = 13;
|
||||
required uint32 max_consumables = 14;
|
||||
required uint32 max_provisions = 15;
|
||||
required uint32 tier = 16;
|
||||
required TankClass class = 17;
|
||||
required bool testing = 18;
|
||||
required bool deprecated = 19;
|
||||
repeated TurretDefinition turrets = 20;
|
||||
repeated EngineDefinition engines = 21;
|
||||
repeated TrackDefinition tracks = 22;
|
||||
required TankPrice price = 23;
|
||||
optional ResearchCost research_cost = 24;
|
||||
required float speed_forwards = 25;
|
||||
required float speed_backwards = 26;
|
||||
required float camouflage_still = 27;
|
||||
required float camouflage_moving = 28;
|
||||
required float camouflage_onFire = 29;
|
||||
required string equipment_preset = 30;
|
||||
required uint32 weight = 31;
|
||||
}
|
||||
|
||||
message ResearchCost {
|
||||
oneof research_cost_type {
|
||||
uint32 xp = 1;
|
||||
ResearchCostSeasonalTokens seasonal_tokens = 2;
|
||||
}
|
||||
}
|
||||
|
||||
message ResearchCostSeasonalTokens {
|
||||
required uint32 season = 1;
|
||||
required uint32 tokens = 2;
|
||||
}
|
||||
|
||||
enum TankPriceType {
|
||||
TANK_PRICE_TYPE_CREDITS = 0;
|
||||
TANK_PRICE_TYPE_GOLD = 1;
|
||||
}
|
||||
|
||||
message TankPrice {
|
||||
required TankPriceType type = 1;
|
||||
required uint32 value = 2;
|
||||
}
|
||||
|
||||
message TrackDefinition {
|
||||
required uint32 id = 1;
|
||||
required uint32 tier = 2;
|
||||
required I18nString name = 3;
|
||||
required uint32 weight = 4;
|
||||
required float traverse_speed = 5;
|
||||
optional ResearchCost research_cost = 6;
|
||||
required float dispersion_move = 7;
|
||||
required float dispersion_traverse = 8;
|
||||
required float resistance_hard = 9;
|
||||
required float resistance_medium = 10;
|
||||
required float resistance_soft = 11;
|
||||
repeated Unlock unlocks = 12;
|
||||
}
|
||||
|
||||
message EngineDefinition {
|
||||
required uint32 id = 1;
|
||||
required I18nString name = 2;
|
||||
optional ResearchCost research_cost = 3;
|
||||
required uint32 tier = 4;
|
||||
required float fire_chance = 5;
|
||||
required uint32 power = 6;
|
||||
required uint32 weight = 7;
|
||||
repeated Unlock unlocks = 8;
|
||||
}
|
||||
|
||||
message TurretDefinition {
|
||||
required uint32 id = 1;
|
||||
required uint32 health = 2;
|
||||
required uint32 view_range = 3;
|
||||
required float traverse_speed = 4;
|
||||
optional ResearchCost research_cost = 5;
|
||||
required I18nString name = 6;
|
||||
required uint32 tier = 7;
|
||||
required uint32 weight = 8;
|
||||
repeated GunDefinition guns = 9;
|
||||
repeated Unlock unlocks = 10;
|
||||
}
|
||||
|
||||
message GunDefinition {
|
||||
oneof gun_type {
|
||||
GunDefinitionRegular regular = 1;
|
||||
GunDefinitionAutoLoader auto_loader = 2;
|
||||
GunDefinitionAutoReloader auto_reloader = 3;
|
||||
}
|
||||
}
|
||||
|
||||
message GunDefinitionRegular {
|
||||
required GunDefinitionBase base = 1;
|
||||
required GunDefinitionRegularProperties extension = 2;
|
||||
}
|
||||
|
||||
message GunDefinitionRegularProperties {
|
||||
required float reload = 1;
|
||||
}
|
||||
|
||||
message GunDefinitionAutoLoader {
|
||||
required GunDefinitionBase base = 1;
|
||||
required GunDefinitionAutoLoaderProperties extension = 2;
|
||||
}
|
||||
|
||||
message GunDefinitionAutoLoaderProperties {
|
||||
required float clip_reload = 1;
|
||||
required float intra_clip = 2;
|
||||
required float shell_count = 3;
|
||||
}
|
||||
|
||||
message GunDefinitionAutoReloader {
|
||||
required GunDefinitionBase base = 1;
|
||||
required GunDefinitionAutoReloaderProperties extension = 2;
|
||||
}
|
||||
|
||||
message GunDefinitionAutoReloaderProperties {
|
||||
repeated float shell_reloads = 1;
|
||||
required float intra_clip = 2;
|
||||
required float shell_count = 3;
|
||||
}
|
||||
|
||||
message GunDefinitionBase {
|
||||
required uint32 id = 1;
|
||||
required float rotation_speed = 2;
|
||||
optional ResearchCost research_cost = 3;
|
||||
required uint32 weight = 4;
|
||||
required I18nString name = 5;
|
||||
required uint32 tier = 6;
|
||||
repeated ShellDefinition shells = 7;
|
||||
required float camouflage_loss = 8;
|
||||
required float aim_time = 9;
|
||||
required float dispersion_base = 10;
|
||||
required float dispersion_traverse = 11;
|
||||
required float dispersion_shot = 12;
|
||||
required float dispersion_damaged = 13;
|
||||
repeated Unlock unlocks = 14;
|
||||
required uint32 shell_capacity = 15;
|
||||
}
|
||||
|
||||
message ShellDefinition {
|
||||
required uint32 id = 1;
|
||||
required I18nString name = 2;
|
||||
required uint32 velocity = 3;
|
||||
required uint32 armor_damage = 4;
|
||||
required uint32 module_damage = 5;
|
||||
required float caliber = 6;
|
||||
required string icon = 7;
|
||||
required ShellPenetration penetration = 8;
|
||||
required ShellType type = 9;
|
||||
optional float normalization = 10;
|
||||
optional float ricochet = 11;
|
||||
optional float explosion_radius = 12;
|
||||
required uint32 range = 13;
|
||||
}
|
||||
|
||||
enum ShellType {
|
||||
SHELL_TYPE_AP = 0;
|
||||
SHELL_TYPE_APCR = 1;
|
||||
SHELL_TYPE_HEAT = 2;
|
||||
SHELL_TYPE_HE = 3;
|
||||
}
|
||||
|
||||
message ShellPenetration {
|
||||
required float near = 1;
|
||||
required float far = 2;
|
||||
}
|
||||
|
||||
message Unlock {
|
||||
required int32 id = 1;
|
||||
required ModuleType type = 2;
|
||||
required UnlockCost cost = 3;
|
||||
}
|
||||
|
||||
message UnlockCost {
|
||||
required string type = 1;
|
||||
required int32 value = 2;
|
||||
}
|
||||
|
||||
enum ModuleType {
|
||||
MODULE_TYPE_VEHICLE = 0;
|
||||
MODULE_TYPE_ENGINE = 1;
|
||||
MODULE_TYPE_TRACKS = 2;
|
||||
MODULE_TYPE_TURRET = 3;
|
||||
MODULE_TYPE_GUN = 4;
|
||||
}
|
||||
|
||||
enum TankClass {
|
||||
TANK_CLASS_LIGHT = 0;
|
||||
TANK_CLASS_MEDIUM = 1;
|
||||
TANK_CLASS_HEAVY = 2;
|
||||
TANK_CLASS_TANK_DESTROYER = 3;
|
||||
}
|
||||
|
||||
enum TankType {
|
||||
TANK_TYPE_RESEARCHABLE = 0;
|
||||
TANK_TYPE_PREMIUM = 1;
|
||||
TANK_TYPE_COLLECTOR = 2;
|
||||
}
|
||||
|
||||
message Crew {
|
||||
required CrewType type = 1;
|
||||
required uint32 count = 2;
|
||||
repeated CrewType substitute = 3;
|
||||
}
|
||||
|
||||
enum CrewType {
|
||||
CREW_TYPE_COMMANDER = 0;
|
||||
CREW_TYPE_RADIOMAN = 1;
|
||||
CREW_TYPE_GUNNER = 2;
|
||||
CREW_TYPE_DRIVER = 3;
|
||||
CREW_TYPE_LOADER = 4;
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -7,34 +7,4 @@ package blitzkit;
|
||||
message Tank {
|
||||
required string id = 1;
|
||||
required I18n name = 2;
|
||||
required TankClass class = 3;
|
||||
required TankType type = 4;
|
||||
}
|
||||
|
||||
enum TankClass {
|
||||
LIGHT = 1;
|
||||
MEDIUM = 2;
|
||||
HEAVY = 3;
|
||||
TANK_DESTROYER = 4;
|
||||
}
|
||||
|
||||
enum TankType {
|
||||
RESEARCHABLE = 1;
|
||||
PREMIUM = 2;
|
||||
COLLECTOR = 3;
|
||||
}
|
||||
|
||||
enum ShellType {
|
||||
AP = 1;
|
||||
APCR = 2;
|
||||
HEAT = 3;
|
||||
HE = 4;
|
||||
}
|
||||
|
||||
enum CrewType {
|
||||
COMMANDER = 1;
|
||||
DRIVER = 2;
|
||||
GUNNER = 3;
|
||||
LOADER = 4;
|
||||
RADIOMAN = 5;
|
||||
}
|
||||
@@ -10,179 +10,13 @@ import { I18n } from "./i18n";
|
||||
|
||||
export const protobufPackage = "blitzkit";
|
||||
|
||||
export enum TankClass {
|
||||
LIGHT = 1,
|
||||
MEDIUM = 2,
|
||||
HEAVY = 3,
|
||||
TANK_DESTROYER = 4,
|
||||
}
|
||||
|
||||
export function tankClassFromJSON(object: any): TankClass {
|
||||
switch (object) {
|
||||
case 1:
|
||||
case "LIGHT":
|
||||
return TankClass.LIGHT;
|
||||
case 2:
|
||||
case "MEDIUM":
|
||||
return TankClass.MEDIUM;
|
||||
case 3:
|
||||
case "HEAVY":
|
||||
return TankClass.HEAVY;
|
||||
case 4:
|
||||
case "TANK_DESTROYER":
|
||||
return TankClass.TANK_DESTROYER;
|
||||
default:
|
||||
throw new globalThis.Error("Unrecognized enum value " + object + " for enum TankClass");
|
||||
}
|
||||
}
|
||||
|
||||
export function tankClassToJSON(object: TankClass): string {
|
||||
switch (object) {
|
||||
case TankClass.LIGHT:
|
||||
return "LIGHT";
|
||||
case TankClass.MEDIUM:
|
||||
return "MEDIUM";
|
||||
case TankClass.HEAVY:
|
||||
return "HEAVY";
|
||||
case TankClass.TANK_DESTROYER:
|
||||
return "TANK_DESTROYER";
|
||||
default:
|
||||
throw new globalThis.Error("Unrecognized enum value " + object + " for enum TankClass");
|
||||
}
|
||||
}
|
||||
|
||||
export enum TankType {
|
||||
RESEARCHABLE = 1,
|
||||
PREMIUM = 2,
|
||||
COLLECTOR = 3,
|
||||
}
|
||||
|
||||
export function tankTypeFromJSON(object: any): TankType {
|
||||
switch (object) {
|
||||
case 1:
|
||||
case "RESEARCHABLE":
|
||||
return TankType.RESEARCHABLE;
|
||||
case 2:
|
||||
case "PREMIUM":
|
||||
return TankType.PREMIUM;
|
||||
case 3:
|
||||
case "COLLECTOR":
|
||||
return TankType.COLLECTOR;
|
||||
default:
|
||||
throw new globalThis.Error("Unrecognized enum value " + object + " for enum TankType");
|
||||
}
|
||||
}
|
||||
|
||||
export function tankTypeToJSON(object: TankType): string {
|
||||
switch (object) {
|
||||
case TankType.RESEARCHABLE:
|
||||
return "RESEARCHABLE";
|
||||
case TankType.PREMIUM:
|
||||
return "PREMIUM";
|
||||
case TankType.COLLECTOR:
|
||||
return "COLLECTOR";
|
||||
default:
|
||||
throw new globalThis.Error("Unrecognized enum value " + object + " for enum TankType");
|
||||
}
|
||||
}
|
||||
|
||||
export enum ShellType {
|
||||
AP = 1,
|
||||
APCR = 2,
|
||||
HEAT = 3,
|
||||
HE = 4,
|
||||
}
|
||||
|
||||
export function shellTypeFromJSON(object: any): ShellType {
|
||||
switch (object) {
|
||||
case 1:
|
||||
case "AP":
|
||||
return ShellType.AP;
|
||||
case 2:
|
||||
case "APCR":
|
||||
return ShellType.APCR;
|
||||
case 3:
|
||||
case "HEAT":
|
||||
return ShellType.HEAT;
|
||||
case 4:
|
||||
case "HE":
|
||||
return ShellType.HE;
|
||||
default:
|
||||
throw new globalThis.Error("Unrecognized enum value " + object + " for enum ShellType");
|
||||
}
|
||||
}
|
||||
|
||||
export function shellTypeToJSON(object: ShellType): string {
|
||||
switch (object) {
|
||||
case ShellType.AP:
|
||||
return "AP";
|
||||
case ShellType.APCR:
|
||||
return "APCR";
|
||||
case ShellType.HEAT:
|
||||
return "HEAT";
|
||||
case ShellType.HE:
|
||||
return "HE";
|
||||
default:
|
||||
throw new globalThis.Error("Unrecognized enum value " + object + " for enum ShellType");
|
||||
}
|
||||
}
|
||||
|
||||
export enum CrewType {
|
||||
COMMANDER = 1,
|
||||
DRIVER = 2,
|
||||
GUNNER = 3,
|
||||
LOADER = 4,
|
||||
RADIOMAN = 5,
|
||||
}
|
||||
|
||||
export function crewTypeFromJSON(object: any): CrewType {
|
||||
switch (object) {
|
||||
case 1:
|
||||
case "COMMANDER":
|
||||
return CrewType.COMMANDER;
|
||||
case 2:
|
||||
case "DRIVER":
|
||||
return CrewType.DRIVER;
|
||||
case 3:
|
||||
case "GUNNER":
|
||||
return CrewType.GUNNER;
|
||||
case 4:
|
||||
case "LOADER":
|
||||
return CrewType.LOADER;
|
||||
case 5:
|
||||
case "RADIOMAN":
|
||||
return CrewType.RADIOMAN;
|
||||
default:
|
||||
throw new globalThis.Error("Unrecognized enum value " + object + " for enum CrewType");
|
||||
}
|
||||
}
|
||||
|
||||
export function crewTypeToJSON(object: CrewType): string {
|
||||
switch (object) {
|
||||
case CrewType.COMMANDER:
|
||||
return "COMMANDER";
|
||||
case CrewType.DRIVER:
|
||||
return "DRIVER";
|
||||
case CrewType.GUNNER:
|
||||
return "GUNNER";
|
||||
case CrewType.LOADER:
|
||||
return "LOADER";
|
||||
case CrewType.RADIOMAN:
|
||||
return "RADIOMAN";
|
||||
default:
|
||||
throw new globalThis.Error("Unrecognized enum value " + object + " for enum CrewType");
|
||||
}
|
||||
}
|
||||
|
||||
export interface Tank {
|
||||
id: string;
|
||||
name: I18n;
|
||||
class: TankClass;
|
||||
type: TankType;
|
||||
}
|
||||
|
||||
function createBaseTank(): Tank {
|
||||
return { id: "", name: createBaseI18n(), class: 1, type: 1 };
|
||||
return { id: "", name: createBaseI18n() };
|
||||
}
|
||||
|
||||
export const Tank: MessageFns<Tank> = {
|
||||
@@ -193,12 +27,6 @@ export const Tank: MessageFns<Tank> = {
|
||||
if (message.name !== undefined) {
|
||||
I18n.encode(message.name, writer.uint32(18).fork()).join();
|
||||
}
|
||||
if (message.class !== 1) {
|
||||
writer.uint32(24).int32(message.class);
|
||||
}
|
||||
if (message.type !== 1) {
|
||||
writer.uint32(32).int32(message.type);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@@ -225,22 +53,6 @@ export const Tank: MessageFns<Tank> = {
|
||||
message.name = I18n.decode(reader, reader.uint32());
|
||||
continue;
|
||||
}
|
||||
case 3: {
|
||||
if (tag !== 24) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.class = reader.int32() as any;
|
||||
continue;
|
||||
}
|
||||
case 4: {
|
||||
if (tag !== 32) {
|
||||
break;
|
||||
}
|
||||
|
||||
message.type = reader.int32() as any;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
@@ -254,8 +66,6 @@ export const Tank: MessageFns<Tank> = {
|
||||
return {
|
||||
id: globalThis.String(assertSet("Tank.id", object.id)),
|
||||
name: I18n.fromJSON(assertSet("Tank.name", object.name)),
|
||||
class: tankClassFromJSON(assertSet("Tank.class", object.class)),
|
||||
type: tankTypeFromJSON(assertSet("Tank.type", object.type)),
|
||||
};
|
||||
},
|
||||
|
||||
@@ -267,12 +77,6 @@ export const Tank: MessageFns<Tank> = {
|
||||
if (message.name !== undefined) {
|
||||
obj.name = I18n.toJSON(message.name);
|
||||
}
|
||||
if (message.class !== 1) {
|
||||
obj.class = tankClassToJSON(message.class);
|
||||
}
|
||||
if (message.type !== 1) {
|
||||
obj.type = tankTypeToJSON(message.type);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
@@ -285,8 +89,6 @@ export const Tank: MessageFns<Tank> = {
|
||||
message.name = (object.name !== undefined && object.name !== null)
|
||||
? I18n.fromPartial(object.name)
|
||||
: createBaseI18n();
|
||||
message.class = object.class ?? 1;
|
||||
message.type = object.type ?? 1;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,592 @@
|
||||
// <auto-generated>
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: packages/core/src/protos/legacy_camouflage_definitions.proto
|
||||
// </auto-generated>
|
||||
#pragma warning disable 1591, 0612, 3021, 8981
|
||||
#region Designer generated code
|
||||
|
||||
using pb = global::Google.Protobuf;
|
||||
using pbc = global::Google.Protobuf.Collections;
|
||||
using pbr = global::Google.Protobuf.Reflection;
|
||||
using scg = global::System.Collections.Generic;
|
||||
namespace Blitzkit {
|
||||
|
||||
/// <summary>Holder for reflection information generated from packages/core/src/protos/legacy_camouflage_definitions.proto</summary>
|
||||
public static partial class LegacyCamouflageDefinitionsReflection {
|
||||
|
||||
#region Descriptor
|
||||
/// <summary>File descriptor for packages/core/src/protos/legacy_camouflage_definitions.proto</summary>
|
||||
public static pbr::FileDescriptor Descriptor {
|
||||
get { return descriptor; }
|
||||
}
|
||||
private static pbr::FileDescriptor descriptor;
|
||||
|
||||
static LegacyCamouflageDefinitionsReflection() {
|
||||
byte[] descriptorData = global::System.Convert.FromBase64String(
|
||||
string.Concat(
|
||||
"CjxwYWNrYWdlcy9jb3JlL3NyYy9wcm90b3MvbGVnYWN5X2NhbW91ZmxhZ2Vf",
|
||||
"ZGVmaW5pdGlvbnMucHJvdG8SCGJsaXR6a2l0GipwYWNrYWdlcy9jb3JlL3Ny",
|
||||
"Yy9wcm90b3MvbGVnYWN5X2kxOG4ucHJvdG8iqAEKFUNhbW91ZmxhZ2VEZWZp",
|
||||
"bml0aW9ucxJFCgtjYW1vdWZsYWdlcxgBIAMoCzIwLmJsaXR6a2l0LkNhbW91",
|
||||
"ZmxhZ2VEZWZpbml0aW9ucy5DYW1vdWZsYWdlc0VudHJ5GkgKEENhbW91Zmxh",
|
||||
"Z2VzRW50cnkSCwoDa2V5GAEgASgNEiMKBXZhbHVlGAIgASgLMhQuYmxpdHpr",
|
||||
"aXQuQ2Ftb3VmbGFnZToCOAEikwEKCkNhbW91ZmxhZ2USCgoCaWQYASACKA0S",
|
||||
"IgoEbmFtZRgCIAIoCzIULmJsaXR6a2l0LkkxOG5TdHJpbmcSJwoJdGFua19u",
|
||||
"YW1lGAMgASgLMhQuYmxpdHpraXQuSTE4blN0cmluZxIsCg50YW5rX25hbWVf",
|
||||
"ZnVsbBgEIAEoCzIULmJsaXR6a2l0LkkxOG5TdHJpbmc="));
|
||||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
|
||||
new pbr::FileDescriptor[] { global::Blitzkit.LegacyI18NReflection.Descriptor, },
|
||||
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.CamouflageDefinitions), global::Blitzkit.CamouflageDefinitions.Parser, new[]{ "Camouflages" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }),
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.Camouflage), global::Blitzkit.Camouflage.Parser, new[]{ "Id", "Name", "TankName", "TankNameFull" }, null, null, null, null)
|
||||
}));
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
#region Messages
|
||||
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
|
||||
public sealed partial class CamouflageDefinitions : pb::IMessage<CamouflageDefinitions>
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
, pb::IBufferMessage
|
||||
#endif
|
||||
{
|
||||
private static readonly pb::MessageParser<CamouflageDefinitions> _parser = new pb::MessageParser<CamouflageDefinitions>(() => new CamouflageDefinitions());
|
||||
private pb::UnknownFieldSet _unknownFields;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pb::MessageParser<CamouflageDefinitions> Parser { get { return _parser; } }
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pbr::MessageDescriptor Descriptor {
|
||||
get { return global::Blitzkit.LegacyCamouflageDefinitionsReflection.Descriptor.MessageTypes[0]; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
pbr::MessageDescriptor pb::IMessage.Descriptor {
|
||||
get { return Descriptor; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public CamouflageDefinitions() {
|
||||
OnConstruction();
|
||||
}
|
||||
|
||||
partial void OnConstruction();
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public CamouflageDefinitions(CamouflageDefinitions other) : this() {
|
||||
camouflages_ = other.camouflages_.Clone();
|
||||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public CamouflageDefinitions Clone() {
|
||||
return new CamouflageDefinitions(this);
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "camouflages" field.</summary>
|
||||
public const int CamouflagesFieldNumber = 1;
|
||||
private static readonly pbc::MapField<uint, global::Blitzkit.Camouflage>.Codec _map_camouflages_codec
|
||||
= new pbc::MapField<uint, global::Blitzkit.Camouflage>.Codec(pb::FieldCodec.ForUInt32(8, 0), pb::FieldCodec.ForMessage(18, global::Blitzkit.Camouflage.Parser), 10);
|
||||
private readonly pbc::MapField<uint, global::Blitzkit.Camouflage> camouflages_ = new pbc::MapField<uint, global::Blitzkit.Camouflage>();
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public pbc::MapField<uint, global::Blitzkit.Camouflage> Camouflages {
|
||||
get { return camouflages_; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override bool Equals(object other) {
|
||||
return Equals(other as CamouflageDefinitions);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public bool Equals(CamouflageDefinitions other) {
|
||||
if (ReferenceEquals(other, null)) {
|
||||
return false;
|
||||
}
|
||||
if (ReferenceEquals(other, this)) {
|
||||
return true;
|
||||
}
|
||||
if (!Camouflages.Equals(other.Camouflages)) return false;
|
||||
return Equals(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override int GetHashCode() {
|
||||
int hash = 1;
|
||||
hash ^= Camouflages.GetHashCode();
|
||||
if (_unknownFields != null) {
|
||||
hash ^= _unknownFields.GetHashCode();
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override string ToString() {
|
||||
return pb::JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void WriteTo(pb::CodedOutputStream output) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
output.WriteRawMessage(this);
|
||||
#else
|
||||
camouflages_.WriteTo(output, _map_camouflages_codec);
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(output);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
|
||||
camouflages_.WriteTo(ref output, _map_camouflages_codec);
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(ref output);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public int CalculateSize() {
|
||||
int size = 0;
|
||||
size += camouflages_.CalculateSize(_map_camouflages_codec);
|
||||
if (_unknownFields != null) {
|
||||
size += _unknownFields.CalculateSize();
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(CamouflageDefinitions other) {
|
||||
if (other == null) {
|
||||
return;
|
||||
}
|
||||
camouflages_.MergeFrom(other.camouflages_);
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(pb::CodedInputStream input) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
input.ReadRawMessage(this);
|
||||
#else
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
if ((tag & 7) == 4) {
|
||||
// Abort on any end group tag.
|
||||
return;
|
||||
}
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
|
||||
break;
|
||||
case 10: {
|
||||
camouflages_.AddEntriesFrom(input, _map_camouflages_codec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
if ((tag & 7) == 4) {
|
||||
// Abort on any end group tag.
|
||||
return;
|
||||
}
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
|
||||
break;
|
||||
case 10: {
|
||||
camouflages_.AddEntriesFrom(ref input, _map_camouflages_codec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
|
||||
public sealed partial class Camouflage : pb::IMessage<Camouflage>
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
, pb::IBufferMessage
|
||||
#endif
|
||||
{
|
||||
private static readonly pb::MessageParser<Camouflage> _parser = new pb::MessageParser<Camouflage>(() => new Camouflage());
|
||||
private pb::UnknownFieldSet _unknownFields;
|
||||
private int _hasBits0;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pb::MessageParser<Camouflage> Parser { get { return _parser; } }
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pbr::MessageDescriptor Descriptor {
|
||||
get { return global::Blitzkit.LegacyCamouflageDefinitionsReflection.Descriptor.MessageTypes[1]; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
pbr::MessageDescriptor pb::IMessage.Descriptor {
|
||||
get { return Descriptor; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public Camouflage() {
|
||||
OnConstruction();
|
||||
}
|
||||
|
||||
partial void OnConstruction();
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public Camouflage(Camouflage other) : this() {
|
||||
_hasBits0 = other._hasBits0;
|
||||
id_ = other.id_;
|
||||
name_ = other.name_ != null ? other.name_.Clone() : null;
|
||||
tankName_ = other.tankName_ != null ? other.tankName_.Clone() : null;
|
||||
tankNameFull_ = other.tankNameFull_ != null ? other.tankNameFull_.Clone() : null;
|
||||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public Camouflage Clone() {
|
||||
return new Camouflage(this);
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "id" field.</summary>
|
||||
public const int IdFieldNumber = 1;
|
||||
private readonly static uint IdDefaultValue = 0;
|
||||
|
||||
private uint id_;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public uint Id {
|
||||
get { if ((_hasBits0 & 1) != 0) { return id_; } else { return IdDefaultValue; } }
|
||||
set {
|
||||
_hasBits0 |= 1;
|
||||
id_ = value;
|
||||
}
|
||||
}
|
||||
/// <summary>Gets whether the "id" field is set</summary>
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public bool HasId {
|
||||
get { return (_hasBits0 & 1) != 0; }
|
||||
}
|
||||
/// <summary>Clears the value of the "id" field</summary>
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void ClearId() {
|
||||
_hasBits0 &= ~1;
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "name" field.</summary>
|
||||
public const int NameFieldNumber = 2;
|
||||
private global::Blitzkit.I18nString name_;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public global::Blitzkit.I18nString Name {
|
||||
get { return name_; }
|
||||
set {
|
||||
name_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "tank_name" field.</summary>
|
||||
public const int TankNameFieldNumber = 3;
|
||||
private global::Blitzkit.I18nString tankName_;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public global::Blitzkit.I18nString TankName {
|
||||
get { return tankName_; }
|
||||
set {
|
||||
tankName_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "tank_name_full" field.</summary>
|
||||
public const int TankNameFullFieldNumber = 4;
|
||||
private global::Blitzkit.I18nString tankNameFull_;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public global::Blitzkit.I18nString TankNameFull {
|
||||
get { return tankNameFull_; }
|
||||
set {
|
||||
tankNameFull_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override bool Equals(object other) {
|
||||
return Equals(other as Camouflage);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public bool Equals(Camouflage other) {
|
||||
if (ReferenceEquals(other, null)) {
|
||||
return false;
|
||||
}
|
||||
if (ReferenceEquals(other, this)) {
|
||||
return true;
|
||||
}
|
||||
if (Id != other.Id) return false;
|
||||
if (!object.Equals(Name, other.Name)) return false;
|
||||
if (!object.Equals(TankName, other.TankName)) return false;
|
||||
if (!object.Equals(TankNameFull, other.TankNameFull)) return false;
|
||||
return Equals(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override int GetHashCode() {
|
||||
int hash = 1;
|
||||
if (HasId) hash ^= Id.GetHashCode();
|
||||
if (name_ != null) hash ^= Name.GetHashCode();
|
||||
if (tankName_ != null) hash ^= TankName.GetHashCode();
|
||||
if (tankNameFull_ != null) hash ^= TankNameFull.GetHashCode();
|
||||
if (_unknownFields != null) {
|
||||
hash ^= _unknownFields.GetHashCode();
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override string ToString() {
|
||||
return pb::JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void WriteTo(pb::CodedOutputStream output) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
output.WriteRawMessage(this);
|
||||
#else
|
||||
if (HasId) {
|
||||
output.WriteRawTag(8);
|
||||
output.WriteUInt32(Id);
|
||||
}
|
||||
if (name_ != null) {
|
||||
output.WriteRawTag(18);
|
||||
output.WriteMessage(Name);
|
||||
}
|
||||
if (tankName_ != null) {
|
||||
output.WriteRawTag(26);
|
||||
output.WriteMessage(TankName);
|
||||
}
|
||||
if (tankNameFull_ != null) {
|
||||
output.WriteRawTag(34);
|
||||
output.WriteMessage(TankNameFull);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(output);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
|
||||
if (HasId) {
|
||||
output.WriteRawTag(8);
|
||||
output.WriteUInt32(Id);
|
||||
}
|
||||
if (name_ != null) {
|
||||
output.WriteRawTag(18);
|
||||
output.WriteMessage(Name);
|
||||
}
|
||||
if (tankName_ != null) {
|
||||
output.WriteRawTag(26);
|
||||
output.WriteMessage(TankName);
|
||||
}
|
||||
if (tankNameFull_ != null) {
|
||||
output.WriteRawTag(34);
|
||||
output.WriteMessage(TankNameFull);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(ref output);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public int CalculateSize() {
|
||||
int size = 0;
|
||||
if (HasId) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Id);
|
||||
}
|
||||
if (name_ != null) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeMessageSize(Name);
|
||||
}
|
||||
if (tankName_ != null) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeMessageSize(TankName);
|
||||
}
|
||||
if (tankNameFull_ != null) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeMessageSize(TankNameFull);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
size += _unknownFields.CalculateSize();
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(Camouflage other) {
|
||||
if (other == null) {
|
||||
return;
|
||||
}
|
||||
if (other.HasId) {
|
||||
Id = other.Id;
|
||||
}
|
||||
if (other.name_ != null) {
|
||||
if (name_ == null) {
|
||||
Name = new global::Blitzkit.I18nString();
|
||||
}
|
||||
Name.MergeFrom(other.Name);
|
||||
}
|
||||
if (other.tankName_ != null) {
|
||||
if (tankName_ == null) {
|
||||
TankName = new global::Blitzkit.I18nString();
|
||||
}
|
||||
TankName.MergeFrom(other.TankName);
|
||||
}
|
||||
if (other.tankNameFull_ != null) {
|
||||
if (tankNameFull_ == null) {
|
||||
TankNameFull = new global::Blitzkit.I18nString();
|
||||
}
|
||||
TankNameFull.MergeFrom(other.TankNameFull);
|
||||
}
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(pb::CodedInputStream input) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
input.ReadRawMessage(this);
|
||||
#else
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
if ((tag & 7) == 4) {
|
||||
// Abort on any end group tag.
|
||||
return;
|
||||
}
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
|
||||
break;
|
||||
case 8: {
|
||||
Id = input.ReadUInt32();
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
if (name_ == null) {
|
||||
Name = new global::Blitzkit.I18nString();
|
||||
}
|
||||
input.ReadMessage(Name);
|
||||
break;
|
||||
}
|
||||
case 26: {
|
||||
if (tankName_ == null) {
|
||||
TankName = new global::Blitzkit.I18nString();
|
||||
}
|
||||
input.ReadMessage(TankName);
|
||||
break;
|
||||
}
|
||||
case 34: {
|
||||
if (tankNameFull_ == null) {
|
||||
TankNameFull = new global::Blitzkit.I18nString();
|
||||
}
|
||||
input.ReadMessage(TankNameFull);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
if ((tag & 7) == 4) {
|
||||
// Abort on any end group tag.
|
||||
return;
|
||||
}
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
|
||||
break;
|
||||
case 8: {
|
||||
Id = input.ReadUInt32();
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
if (name_ == null) {
|
||||
Name = new global::Blitzkit.I18nString();
|
||||
}
|
||||
input.ReadMessage(Name);
|
||||
break;
|
||||
}
|
||||
case 26: {
|
||||
if (tankName_ == null) {
|
||||
TankName = new global::Blitzkit.I18nString();
|
||||
}
|
||||
input.ReadMessage(TankName);
|
||||
break;
|
||||
}
|
||||
case 34: {
|
||||
if (tankNameFull_ == null) {
|
||||
TankNameFull = new global::Blitzkit.I18nString();
|
||||
}
|
||||
input.ReadMessage(TankNameFull);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
#endregion Designer generated code
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,978 @@
|
||||
// <auto-generated>
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: packages/core/src/protos/legacy_equipment_definitions.proto
|
||||
// </auto-generated>
|
||||
#pragma warning disable 1591, 0612, 3021, 8981
|
||||
#region Designer generated code
|
||||
|
||||
using pb = global::Google.Protobuf;
|
||||
using pbc = global::Google.Protobuf.Collections;
|
||||
using pbr = global::Google.Protobuf.Reflection;
|
||||
using scg = global::System.Collections.Generic;
|
||||
namespace Blitzkit {
|
||||
|
||||
/// <summary>Holder for reflection information generated from packages/core/src/protos/legacy_equipment_definitions.proto</summary>
|
||||
public static partial class LegacyEquipmentDefinitionsReflection {
|
||||
|
||||
#region Descriptor
|
||||
/// <summary>File descriptor for packages/core/src/protos/legacy_equipment_definitions.proto</summary>
|
||||
public static pbr::FileDescriptor Descriptor {
|
||||
get { return descriptor; }
|
||||
}
|
||||
private static pbr::FileDescriptor descriptor;
|
||||
|
||||
static LegacyEquipmentDefinitionsReflection() {
|
||||
byte[] descriptorData = global::System.Convert.FromBase64String(
|
||||
string.Concat(
|
||||
"CjtwYWNrYWdlcy9jb3JlL3NyYy9wcm90b3MvbGVnYWN5X2VxdWlwbWVudF9k",
|
||||
"ZWZpbml0aW9ucy5wcm90bxIIYmxpdHpraXQaKnBhY2thZ2VzL2NvcmUvc3Jj",
|
||||
"L3Byb3Rvcy9sZWdhY3lfaTE4bi5wcm90byKrAgoURXF1aXBtZW50RGVmaW5p",
|
||||
"dGlvbnMSPAoHcHJlc2V0cxgBIAMoCzIrLmJsaXR6a2l0LkVxdWlwbWVudERl",
|
||||
"ZmluaXRpb25zLlByZXNldHNFbnRyeRJCCgplcXVpcG1lbnRzGAIgAygLMi4u",
|
||||
"YmxpdHpraXQuRXF1aXBtZW50RGVmaW5pdGlvbnMuRXF1aXBtZW50c0VudHJ5",
|
||||
"GkkKDFByZXNldHNFbnRyeRILCgNrZXkYASABKAkSKAoFdmFsdWUYAiABKAsy",
|
||||
"GS5ibGl0emtpdC5FcXVpcG1lbnRQcmVzZXQ6AjgBGkYKD0VxdWlwbWVudHNF",
|
||||
"bnRyeRILCgNrZXkYASABKA0SIgoFdmFsdWUYAiABKAsyEy5ibGl0emtpdC5F",
|
||||
"cXVpcG1lbnQ6AjgBIloKCUVxdWlwbWVudBIiCgRuYW1lGAEgAigLMhQuYmxp",
|
||||
"dHpraXQuSTE4blN0cmluZxIpCgtkZXNjcmlwdGlvbhgCIAIoCzIULmJsaXR6",
|
||||
"a2l0LkkxOG5TdHJpbmciOQoPRXF1aXBtZW50UHJlc2V0EiYKBXNsb3RzGAEg",
|
||||
"AygLMhcuYmxpdHpraXQuRXF1aXBtZW50U2xvdCIsCg1FcXVpcG1lbnRTbG90",
|
||||
"EgwKBGxlZnQYASACKA0SDQoFcmlnaHQYAiACKA0="));
|
||||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
|
||||
new pbr::FileDescriptor[] { global::Blitzkit.LegacyI18NReflection.Descriptor, },
|
||||
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.EquipmentDefinitions), global::Blitzkit.EquipmentDefinitions.Parser, new[]{ "Presets", "Equipments" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, null, }),
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.Equipment), global::Blitzkit.Equipment.Parser, new[]{ "Name", "Description" }, null, null, null, null),
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.EquipmentPreset), global::Blitzkit.EquipmentPreset.Parser, new[]{ "Slots" }, null, null, null, null),
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.EquipmentSlot), global::Blitzkit.EquipmentSlot.Parser, new[]{ "Left", "Right" }, null, null, null, null)
|
||||
}));
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
#region Messages
|
||||
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
|
||||
public sealed partial class EquipmentDefinitions : pb::IMessage<EquipmentDefinitions>
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
, pb::IBufferMessage
|
||||
#endif
|
||||
{
|
||||
private static readonly pb::MessageParser<EquipmentDefinitions> _parser = new pb::MessageParser<EquipmentDefinitions>(() => new EquipmentDefinitions());
|
||||
private pb::UnknownFieldSet _unknownFields;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pb::MessageParser<EquipmentDefinitions> Parser { get { return _parser; } }
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pbr::MessageDescriptor Descriptor {
|
||||
get { return global::Blitzkit.LegacyEquipmentDefinitionsReflection.Descriptor.MessageTypes[0]; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
pbr::MessageDescriptor pb::IMessage.Descriptor {
|
||||
get { return Descriptor; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public EquipmentDefinitions() {
|
||||
OnConstruction();
|
||||
}
|
||||
|
||||
partial void OnConstruction();
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public EquipmentDefinitions(EquipmentDefinitions other) : this() {
|
||||
presets_ = other.presets_.Clone();
|
||||
equipments_ = other.equipments_.Clone();
|
||||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public EquipmentDefinitions Clone() {
|
||||
return new EquipmentDefinitions(this);
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "presets" field.</summary>
|
||||
public const int PresetsFieldNumber = 1;
|
||||
private static readonly pbc::MapField<string, global::Blitzkit.EquipmentPreset>.Codec _map_presets_codec
|
||||
= new pbc::MapField<string, global::Blitzkit.EquipmentPreset>.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForMessage(18, global::Blitzkit.EquipmentPreset.Parser), 10);
|
||||
private readonly pbc::MapField<string, global::Blitzkit.EquipmentPreset> presets_ = new pbc::MapField<string, global::Blitzkit.EquipmentPreset>();
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public pbc::MapField<string, global::Blitzkit.EquipmentPreset> Presets {
|
||||
get { return presets_; }
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "equipments" field.</summary>
|
||||
public const int EquipmentsFieldNumber = 2;
|
||||
private static readonly pbc::MapField<uint, global::Blitzkit.Equipment>.Codec _map_equipments_codec
|
||||
= new pbc::MapField<uint, global::Blitzkit.Equipment>.Codec(pb::FieldCodec.ForUInt32(8, 0), pb::FieldCodec.ForMessage(18, global::Blitzkit.Equipment.Parser), 18);
|
||||
private readonly pbc::MapField<uint, global::Blitzkit.Equipment> equipments_ = new pbc::MapField<uint, global::Blitzkit.Equipment>();
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public pbc::MapField<uint, global::Blitzkit.Equipment> Equipments {
|
||||
get { return equipments_; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override bool Equals(object other) {
|
||||
return Equals(other as EquipmentDefinitions);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public bool Equals(EquipmentDefinitions other) {
|
||||
if (ReferenceEquals(other, null)) {
|
||||
return false;
|
||||
}
|
||||
if (ReferenceEquals(other, this)) {
|
||||
return true;
|
||||
}
|
||||
if (!Presets.Equals(other.Presets)) return false;
|
||||
if (!Equipments.Equals(other.Equipments)) return false;
|
||||
return Equals(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override int GetHashCode() {
|
||||
int hash = 1;
|
||||
hash ^= Presets.GetHashCode();
|
||||
hash ^= Equipments.GetHashCode();
|
||||
if (_unknownFields != null) {
|
||||
hash ^= _unknownFields.GetHashCode();
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override string ToString() {
|
||||
return pb::JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void WriteTo(pb::CodedOutputStream output) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
output.WriteRawMessage(this);
|
||||
#else
|
||||
presets_.WriteTo(output, _map_presets_codec);
|
||||
equipments_.WriteTo(output, _map_equipments_codec);
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(output);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
|
||||
presets_.WriteTo(ref output, _map_presets_codec);
|
||||
equipments_.WriteTo(ref output, _map_equipments_codec);
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(ref output);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public int CalculateSize() {
|
||||
int size = 0;
|
||||
size += presets_.CalculateSize(_map_presets_codec);
|
||||
size += equipments_.CalculateSize(_map_equipments_codec);
|
||||
if (_unknownFields != null) {
|
||||
size += _unknownFields.CalculateSize();
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(EquipmentDefinitions other) {
|
||||
if (other == null) {
|
||||
return;
|
||||
}
|
||||
presets_.MergeFrom(other.presets_);
|
||||
equipments_.MergeFrom(other.equipments_);
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(pb::CodedInputStream input) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
input.ReadRawMessage(this);
|
||||
#else
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
if ((tag & 7) == 4) {
|
||||
// Abort on any end group tag.
|
||||
return;
|
||||
}
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
|
||||
break;
|
||||
case 10: {
|
||||
presets_.AddEntriesFrom(input, _map_presets_codec);
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
equipments_.AddEntriesFrom(input, _map_equipments_codec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
if ((tag & 7) == 4) {
|
||||
// Abort on any end group tag.
|
||||
return;
|
||||
}
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
|
||||
break;
|
||||
case 10: {
|
||||
presets_.AddEntriesFrom(ref input, _map_presets_codec);
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
equipments_.AddEntriesFrom(ref input, _map_equipments_codec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
|
||||
public sealed partial class Equipment : pb::IMessage<Equipment>
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
, pb::IBufferMessage
|
||||
#endif
|
||||
{
|
||||
private static readonly pb::MessageParser<Equipment> _parser = new pb::MessageParser<Equipment>(() => new Equipment());
|
||||
private pb::UnknownFieldSet _unknownFields;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pb::MessageParser<Equipment> Parser { get { return _parser; } }
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pbr::MessageDescriptor Descriptor {
|
||||
get { return global::Blitzkit.LegacyEquipmentDefinitionsReflection.Descriptor.MessageTypes[1]; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
pbr::MessageDescriptor pb::IMessage.Descriptor {
|
||||
get { return Descriptor; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public Equipment() {
|
||||
OnConstruction();
|
||||
}
|
||||
|
||||
partial void OnConstruction();
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public Equipment(Equipment other) : this() {
|
||||
name_ = other.name_ != null ? other.name_.Clone() : null;
|
||||
description_ = other.description_ != null ? other.description_.Clone() : null;
|
||||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public Equipment Clone() {
|
||||
return new Equipment(this);
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "name" field.</summary>
|
||||
public const int NameFieldNumber = 1;
|
||||
private global::Blitzkit.I18nString name_;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public global::Blitzkit.I18nString Name {
|
||||
get { return name_; }
|
||||
set {
|
||||
name_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "description" field.</summary>
|
||||
public const int DescriptionFieldNumber = 2;
|
||||
private global::Blitzkit.I18nString description_;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public global::Blitzkit.I18nString Description {
|
||||
get { return description_; }
|
||||
set {
|
||||
description_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override bool Equals(object other) {
|
||||
return Equals(other as Equipment);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public bool Equals(Equipment other) {
|
||||
if (ReferenceEquals(other, null)) {
|
||||
return false;
|
||||
}
|
||||
if (ReferenceEquals(other, this)) {
|
||||
return true;
|
||||
}
|
||||
if (!object.Equals(Name, other.Name)) return false;
|
||||
if (!object.Equals(Description, other.Description)) return false;
|
||||
return Equals(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override int GetHashCode() {
|
||||
int hash = 1;
|
||||
if (name_ != null) hash ^= Name.GetHashCode();
|
||||
if (description_ != null) hash ^= Description.GetHashCode();
|
||||
if (_unknownFields != null) {
|
||||
hash ^= _unknownFields.GetHashCode();
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override string ToString() {
|
||||
return pb::JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void WriteTo(pb::CodedOutputStream output) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
output.WriteRawMessage(this);
|
||||
#else
|
||||
if (name_ != null) {
|
||||
output.WriteRawTag(10);
|
||||
output.WriteMessage(Name);
|
||||
}
|
||||
if (description_ != null) {
|
||||
output.WriteRawTag(18);
|
||||
output.WriteMessage(Description);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(output);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
|
||||
if (name_ != null) {
|
||||
output.WriteRawTag(10);
|
||||
output.WriteMessage(Name);
|
||||
}
|
||||
if (description_ != null) {
|
||||
output.WriteRawTag(18);
|
||||
output.WriteMessage(Description);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(ref output);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public int CalculateSize() {
|
||||
int size = 0;
|
||||
if (name_ != null) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeMessageSize(Name);
|
||||
}
|
||||
if (description_ != null) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeMessageSize(Description);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
size += _unknownFields.CalculateSize();
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(Equipment other) {
|
||||
if (other == null) {
|
||||
return;
|
||||
}
|
||||
if (other.name_ != null) {
|
||||
if (name_ == null) {
|
||||
Name = new global::Blitzkit.I18nString();
|
||||
}
|
||||
Name.MergeFrom(other.Name);
|
||||
}
|
||||
if (other.description_ != null) {
|
||||
if (description_ == null) {
|
||||
Description = new global::Blitzkit.I18nString();
|
||||
}
|
||||
Description.MergeFrom(other.Description);
|
||||
}
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(pb::CodedInputStream input) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
input.ReadRawMessage(this);
|
||||
#else
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
if ((tag & 7) == 4) {
|
||||
// Abort on any end group tag.
|
||||
return;
|
||||
}
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
|
||||
break;
|
||||
case 10: {
|
||||
if (name_ == null) {
|
||||
Name = new global::Blitzkit.I18nString();
|
||||
}
|
||||
input.ReadMessage(Name);
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
if (description_ == null) {
|
||||
Description = new global::Blitzkit.I18nString();
|
||||
}
|
||||
input.ReadMessage(Description);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
if ((tag & 7) == 4) {
|
||||
// Abort on any end group tag.
|
||||
return;
|
||||
}
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
|
||||
break;
|
||||
case 10: {
|
||||
if (name_ == null) {
|
||||
Name = new global::Blitzkit.I18nString();
|
||||
}
|
||||
input.ReadMessage(Name);
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
if (description_ == null) {
|
||||
Description = new global::Blitzkit.I18nString();
|
||||
}
|
||||
input.ReadMessage(Description);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
|
||||
public sealed partial class EquipmentPreset : pb::IMessage<EquipmentPreset>
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
, pb::IBufferMessage
|
||||
#endif
|
||||
{
|
||||
private static readonly pb::MessageParser<EquipmentPreset> _parser = new pb::MessageParser<EquipmentPreset>(() => new EquipmentPreset());
|
||||
private pb::UnknownFieldSet _unknownFields;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pb::MessageParser<EquipmentPreset> Parser { get { return _parser; } }
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pbr::MessageDescriptor Descriptor {
|
||||
get { return global::Blitzkit.LegacyEquipmentDefinitionsReflection.Descriptor.MessageTypes[2]; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
pbr::MessageDescriptor pb::IMessage.Descriptor {
|
||||
get { return Descriptor; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public EquipmentPreset() {
|
||||
OnConstruction();
|
||||
}
|
||||
|
||||
partial void OnConstruction();
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public EquipmentPreset(EquipmentPreset other) : this() {
|
||||
slots_ = other.slots_.Clone();
|
||||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public EquipmentPreset Clone() {
|
||||
return new EquipmentPreset(this);
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "slots" field.</summary>
|
||||
public const int SlotsFieldNumber = 1;
|
||||
private static readonly pb::FieldCodec<global::Blitzkit.EquipmentSlot> _repeated_slots_codec
|
||||
= pb::FieldCodec.ForMessage(10, global::Blitzkit.EquipmentSlot.Parser);
|
||||
private readonly pbc::RepeatedField<global::Blitzkit.EquipmentSlot> slots_ = new pbc::RepeatedField<global::Blitzkit.EquipmentSlot>();
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public pbc::RepeatedField<global::Blitzkit.EquipmentSlot> Slots {
|
||||
get { return slots_; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override bool Equals(object other) {
|
||||
return Equals(other as EquipmentPreset);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public bool Equals(EquipmentPreset other) {
|
||||
if (ReferenceEquals(other, null)) {
|
||||
return false;
|
||||
}
|
||||
if (ReferenceEquals(other, this)) {
|
||||
return true;
|
||||
}
|
||||
if(!slots_.Equals(other.slots_)) return false;
|
||||
return Equals(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override int GetHashCode() {
|
||||
int hash = 1;
|
||||
hash ^= slots_.GetHashCode();
|
||||
if (_unknownFields != null) {
|
||||
hash ^= _unknownFields.GetHashCode();
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override string ToString() {
|
||||
return pb::JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void WriteTo(pb::CodedOutputStream output) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
output.WriteRawMessage(this);
|
||||
#else
|
||||
slots_.WriteTo(output, _repeated_slots_codec);
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(output);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
|
||||
slots_.WriteTo(ref output, _repeated_slots_codec);
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(ref output);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public int CalculateSize() {
|
||||
int size = 0;
|
||||
size += slots_.CalculateSize(_repeated_slots_codec);
|
||||
if (_unknownFields != null) {
|
||||
size += _unknownFields.CalculateSize();
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(EquipmentPreset other) {
|
||||
if (other == null) {
|
||||
return;
|
||||
}
|
||||
slots_.Add(other.slots_);
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(pb::CodedInputStream input) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
input.ReadRawMessage(this);
|
||||
#else
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
if ((tag & 7) == 4) {
|
||||
// Abort on any end group tag.
|
||||
return;
|
||||
}
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
|
||||
break;
|
||||
case 10: {
|
||||
slots_.AddEntriesFrom(input, _repeated_slots_codec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
if ((tag & 7) == 4) {
|
||||
// Abort on any end group tag.
|
||||
return;
|
||||
}
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
|
||||
break;
|
||||
case 10: {
|
||||
slots_.AddEntriesFrom(ref input, _repeated_slots_codec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
|
||||
public sealed partial class EquipmentSlot : pb::IMessage<EquipmentSlot>
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
, pb::IBufferMessage
|
||||
#endif
|
||||
{
|
||||
private static readonly pb::MessageParser<EquipmentSlot> _parser = new pb::MessageParser<EquipmentSlot>(() => new EquipmentSlot());
|
||||
private pb::UnknownFieldSet _unknownFields;
|
||||
private int _hasBits0;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pb::MessageParser<EquipmentSlot> Parser { get { return _parser; } }
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pbr::MessageDescriptor Descriptor {
|
||||
get { return global::Blitzkit.LegacyEquipmentDefinitionsReflection.Descriptor.MessageTypes[3]; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
pbr::MessageDescriptor pb::IMessage.Descriptor {
|
||||
get { return Descriptor; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public EquipmentSlot() {
|
||||
OnConstruction();
|
||||
}
|
||||
|
||||
partial void OnConstruction();
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public EquipmentSlot(EquipmentSlot other) : this() {
|
||||
_hasBits0 = other._hasBits0;
|
||||
left_ = other.left_;
|
||||
right_ = other.right_;
|
||||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public EquipmentSlot Clone() {
|
||||
return new EquipmentSlot(this);
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "left" field.</summary>
|
||||
public const int LeftFieldNumber = 1;
|
||||
private readonly static uint LeftDefaultValue = 0;
|
||||
|
||||
private uint left_;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public uint Left {
|
||||
get { if ((_hasBits0 & 1) != 0) { return left_; } else { return LeftDefaultValue; } }
|
||||
set {
|
||||
_hasBits0 |= 1;
|
||||
left_ = value;
|
||||
}
|
||||
}
|
||||
/// <summary>Gets whether the "left" field is set</summary>
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public bool HasLeft {
|
||||
get { return (_hasBits0 & 1) != 0; }
|
||||
}
|
||||
/// <summary>Clears the value of the "left" field</summary>
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void ClearLeft() {
|
||||
_hasBits0 &= ~1;
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "right" field.</summary>
|
||||
public const int RightFieldNumber = 2;
|
||||
private readonly static uint RightDefaultValue = 0;
|
||||
|
||||
private uint right_;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public uint Right {
|
||||
get { if ((_hasBits0 & 2) != 0) { return right_; } else { return RightDefaultValue; } }
|
||||
set {
|
||||
_hasBits0 |= 2;
|
||||
right_ = value;
|
||||
}
|
||||
}
|
||||
/// <summary>Gets whether the "right" field is set</summary>
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public bool HasRight {
|
||||
get { return (_hasBits0 & 2) != 0; }
|
||||
}
|
||||
/// <summary>Clears the value of the "right" field</summary>
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void ClearRight() {
|
||||
_hasBits0 &= ~2;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override bool Equals(object other) {
|
||||
return Equals(other as EquipmentSlot);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public bool Equals(EquipmentSlot other) {
|
||||
if (ReferenceEquals(other, null)) {
|
||||
return false;
|
||||
}
|
||||
if (ReferenceEquals(other, this)) {
|
||||
return true;
|
||||
}
|
||||
if (Left != other.Left) return false;
|
||||
if (Right != other.Right) return false;
|
||||
return Equals(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override int GetHashCode() {
|
||||
int hash = 1;
|
||||
if (HasLeft) hash ^= Left.GetHashCode();
|
||||
if (HasRight) hash ^= Right.GetHashCode();
|
||||
if (_unknownFields != null) {
|
||||
hash ^= _unknownFields.GetHashCode();
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override string ToString() {
|
||||
return pb::JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void WriteTo(pb::CodedOutputStream output) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
output.WriteRawMessage(this);
|
||||
#else
|
||||
if (HasLeft) {
|
||||
output.WriteRawTag(8);
|
||||
output.WriteUInt32(Left);
|
||||
}
|
||||
if (HasRight) {
|
||||
output.WriteRawTag(16);
|
||||
output.WriteUInt32(Right);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(output);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
|
||||
if (HasLeft) {
|
||||
output.WriteRawTag(8);
|
||||
output.WriteUInt32(Left);
|
||||
}
|
||||
if (HasRight) {
|
||||
output.WriteRawTag(16);
|
||||
output.WriteUInt32(Right);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(ref output);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public int CalculateSize() {
|
||||
int size = 0;
|
||||
if (HasLeft) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Left);
|
||||
}
|
||||
if (HasRight) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Right);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
size += _unknownFields.CalculateSize();
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(EquipmentSlot other) {
|
||||
if (other == null) {
|
||||
return;
|
||||
}
|
||||
if (other.HasLeft) {
|
||||
Left = other.Left;
|
||||
}
|
||||
if (other.HasRight) {
|
||||
Right = other.Right;
|
||||
}
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(pb::CodedInputStream input) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
input.ReadRawMessage(this);
|
||||
#else
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
if ((tag & 7) == 4) {
|
||||
// Abort on any end group tag.
|
||||
return;
|
||||
}
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
|
||||
break;
|
||||
case 8: {
|
||||
Left = input.ReadUInt32();
|
||||
break;
|
||||
}
|
||||
case 16: {
|
||||
Right = input.ReadUInt32();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
if ((tag & 7) == 4) {
|
||||
// Abort on any end group tag.
|
||||
return;
|
||||
}
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
|
||||
break;
|
||||
case 8: {
|
||||
Left = input.ReadUInt32();
|
||||
break;
|
||||
}
|
||||
case 16: {
|
||||
Right = input.ReadUInt32();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
#endregion Designer generated code
|
||||
@@ -0,0 +1,769 @@
|
||||
// <auto-generated>
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: packages/core/src/protos/legacy_game_definitions.proto
|
||||
// </auto-generated>
|
||||
#pragma warning disable 1591, 0612, 3021, 8981
|
||||
#region Designer generated code
|
||||
|
||||
using pb = global::Google.Protobuf;
|
||||
using pbc = global::Google.Protobuf.Collections;
|
||||
using pbr = global::Google.Protobuf.Reflection;
|
||||
using scg = global::System.Collections.Generic;
|
||||
namespace Blitzkit {
|
||||
|
||||
/// <summary>Holder for reflection information generated from packages/core/src/protos/legacy_game_definitions.proto</summary>
|
||||
public static partial class LegacyGameDefinitionsReflection {
|
||||
|
||||
#region Descriptor
|
||||
/// <summary>File descriptor for packages/core/src/protos/legacy_game_definitions.proto</summary>
|
||||
public static pbr::FileDescriptor Descriptor {
|
||||
get { return descriptor; }
|
||||
}
|
||||
private static pbr::FileDescriptor descriptor;
|
||||
|
||||
static LegacyGameDefinitionsReflection() {
|
||||
byte[] descriptorData = global::System.Convert.FromBase64String(
|
||||
string.Concat(
|
||||
"CjZwYWNrYWdlcy9jb3JlL3NyYy9wcm90b3MvbGVnYWN5X2dhbWVfZGVmaW5p",
|
||||
"dGlvbnMucHJvdG8SCGJsaXR6a2l0GipwYWNrYWdlcy9jb3JlL3NyYy9wcm90",
|
||||
"b3MvbGVnYWN5X2kxOG4ucHJvdG8isQIKD0dhbWVEZWZpbml0aW9ucxIPCgd2",
|
||||
"ZXJzaW9uGAEgAigJEg8KB25hdGlvbnMYAiADKAkSOwoJZ2FtZU1vZGVzGAMg",
|
||||
"AygLMiguYmxpdHpraXQuR2FtZURlZmluaXRpb25zLkdhbWVNb2Rlc0VudHJ5",
|
||||
"EjMKBXJvbGVzGAQgAygLMiQuYmxpdHpraXQuR2FtZURlZmluaXRpb25zLlJv",
|
||||
"bGVzRW50cnkaRAoOR2FtZU1vZGVzRW50cnkSCwoDa2V5GAEgASgNEiEKBXZh",
|
||||
"bHVlGAIgASgLMhIuYmxpdHpraXQuR2FtZU1vZGU6AjgBGkQKClJvbGVzRW50",
|
||||
"cnkSCwoDa2V5GAEgASgNEiUKBXZhbHVlGAIgASgLMhYuYmxpdHpraXQuR2Ft",
|
||||
"ZU1vZGVSb2xlOgI4ASIuCghHYW1lTW9kZRIiCgRuYW1lGAEgAigLMhQuYmxp",
|
||||
"dHpraXQuSTE4blN0cmluZyI3CgxHYW1lTW9kZVJvbGUSEgoKcHJvdmlzaW9u",
|
||||
"cxgBIAMoDRITCgtjb25zdW1hYmxlcxgCIAMoDQ=="));
|
||||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
|
||||
new pbr::FileDescriptor[] { global::Blitzkit.LegacyI18NReflection.Descriptor, },
|
||||
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.GameDefinitions), global::Blitzkit.GameDefinitions.Parser, new[]{ "Version", "Nations", "GameModes", "Roles" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, null, }),
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.GameMode), global::Blitzkit.GameMode.Parser, new[]{ "Name" }, null, null, null, null),
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.GameModeRole), global::Blitzkit.GameModeRole.Parser, new[]{ "Provisions", "Consumables" }, null, null, null, null)
|
||||
}));
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
#region Messages
|
||||
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
|
||||
public sealed partial class GameDefinitions : pb::IMessage<GameDefinitions>
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
, pb::IBufferMessage
|
||||
#endif
|
||||
{
|
||||
private static readonly pb::MessageParser<GameDefinitions> _parser = new pb::MessageParser<GameDefinitions>(() => new GameDefinitions());
|
||||
private pb::UnknownFieldSet _unknownFields;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pb::MessageParser<GameDefinitions> Parser { get { return _parser; } }
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pbr::MessageDescriptor Descriptor {
|
||||
get { return global::Blitzkit.LegacyGameDefinitionsReflection.Descriptor.MessageTypes[0]; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
pbr::MessageDescriptor pb::IMessage.Descriptor {
|
||||
get { return Descriptor; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public GameDefinitions() {
|
||||
OnConstruction();
|
||||
}
|
||||
|
||||
partial void OnConstruction();
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public GameDefinitions(GameDefinitions other) : this() {
|
||||
version_ = other.version_;
|
||||
nations_ = other.nations_.Clone();
|
||||
gameModes_ = other.gameModes_.Clone();
|
||||
roles_ = other.roles_.Clone();
|
||||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public GameDefinitions Clone() {
|
||||
return new GameDefinitions(this);
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "version" field.</summary>
|
||||
public const int VersionFieldNumber = 1;
|
||||
private readonly static string VersionDefaultValue = "";
|
||||
|
||||
private string version_;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public string Version {
|
||||
get { return version_ ?? VersionDefaultValue; }
|
||||
set {
|
||||
version_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
|
||||
}
|
||||
}
|
||||
/// <summary>Gets whether the "version" field is set</summary>
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public bool HasVersion {
|
||||
get { return version_ != null; }
|
||||
}
|
||||
/// <summary>Clears the value of the "version" field</summary>
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void ClearVersion() {
|
||||
version_ = null;
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "nations" field.</summary>
|
||||
public const int NationsFieldNumber = 2;
|
||||
private static readonly pb::FieldCodec<string> _repeated_nations_codec
|
||||
= pb::FieldCodec.ForString(18);
|
||||
private readonly pbc::RepeatedField<string> nations_ = new pbc::RepeatedField<string>();
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public pbc::RepeatedField<string> Nations {
|
||||
get { return nations_; }
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "gameModes" field.</summary>
|
||||
public const int GameModesFieldNumber = 3;
|
||||
private static readonly pbc::MapField<uint, global::Blitzkit.GameMode>.Codec _map_gameModes_codec
|
||||
= new pbc::MapField<uint, global::Blitzkit.GameMode>.Codec(pb::FieldCodec.ForUInt32(8, 0), pb::FieldCodec.ForMessage(18, global::Blitzkit.GameMode.Parser), 26);
|
||||
private readonly pbc::MapField<uint, global::Blitzkit.GameMode> gameModes_ = new pbc::MapField<uint, global::Blitzkit.GameMode>();
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public pbc::MapField<uint, global::Blitzkit.GameMode> GameModes {
|
||||
get { return gameModes_; }
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "roles" field.</summary>
|
||||
public const int RolesFieldNumber = 4;
|
||||
private static readonly pbc::MapField<uint, global::Blitzkit.GameModeRole>.Codec _map_roles_codec
|
||||
= new pbc::MapField<uint, global::Blitzkit.GameModeRole>.Codec(pb::FieldCodec.ForUInt32(8, 0), pb::FieldCodec.ForMessage(18, global::Blitzkit.GameModeRole.Parser), 34);
|
||||
private readonly pbc::MapField<uint, global::Blitzkit.GameModeRole> roles_ = new pbc::MapField<uint, global::Blitzkit.GameModeRole>();
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public pbc::MapField<uint, global::Blitzkit.GameModeRole> Roles {
|
||||
get { return roles_; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override bool Equals(object other) {
|
||||
return Equals(other as GameDefinitions);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public bool Equals(GameDefinitions other) {
|
||||
if (ReferenceEquals(other, null)) {
|
||||
return false;
|
||||
}
|
||||
if (ReferenceEquals(other, this)) {
|
||||
return true;
|
||||
}
|
||||
if (Version != other.Version) return false;
|
||||
if(!nations_.Equals(other.nations_)) return false;
|
||||
if (!GameModes.Equals(other.GameModes)) return false;
|
||||
if (!Roles.Equals(other.Roles)) return false;
|
||||
return Equals(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override int GetHashCode() {
|
||||
int hash = 1;
|
||||
if (HasVersion) hash ^= Version.GetHashCode();
|
||||
hash ^= nations_.GetHashCode();
|
||||
hash ^= GameModes.GetHashCode();
|
||||
hash ^= Roles.GetHashCode();
|
||||
if (_unknownFields != null) {
|
||||
hash ^= _unknownFields.GetHashCode();
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override string ToString() {
|
||||
return pb::JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void WriteTo(pb::CodedOutputStream output) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
output.WriteRawMessage(this);
|
||||
#else
|
||||
if (HasVersion) {
|
||||
output.WriteRawTag(10);
|
||||
output.WriteString(Version);
|
||||
}
|
||||
nations_.WriteTo(output, _repeated_nations_codec);
|
||||
gameModes_.WriteTo(output, _map_gameModes_codec);
|
||||
roles_.WriteTo(output, _map_roles_codec);
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(output);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
|
||||
if (HasVersion) {
|
||||
output.WriteRawTag(10);
|
||||
output.WriteString(Version);
|
||||
}
|
||||
nations_.WriteTo(ref output, _repeated_nations_codec);
|
||||
gameModes_.WriteTo(ref output, _map_gameModes_codec);
|
||||
roles_.WriteTo(ref output, _map_roles_codec);
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(ref output);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public int CalculateSize() {
|
||||
int size = 0;
|
||||
if (HasVersion) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeStringSize(Version);
|
||||
}
|
||||
size += nations_.CalculateSize(_repeated_nations_codec);
|
||||
size += gameModes_.CalculateSize(_map_gameModes_codec);
|
||||
size += roles_.CalculateSize(_map_roles_codec);
|
||||
if (_unknownFields != null) {
|
||||
size += _unknownFields.CalculateSize();
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(GameDefinitions other) {
|
||||
if (other == null) {
|
||||
return;
|
||||
}
|
||||
if (other.HasVersion) {
|
||||
Version = other.Version;
|
||||
}
|
||||
nations_.Add(other.nations_);
|
||||
gameModes_.MergeFrom(other.gameModes_);
|
||||
roles_.MergeFrom(other.roles_);
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(pb::CodedInputStream input) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
input.ReadRawMessage(this);
|
||||
#else
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
if ((tag & 7) == 4) {
|
||||
// Abort on any end group tag.
|
||||
return;
|
||||
}
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
|
||||
break;
|
||||
case 10: {
|
||||
Version = input.ReadString();
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
nations_.AddEntriesFrom(input, _repeated_nations_codec);
|
||||
break;
|
||||
}
|
||||
case 26: {
|
||||
gameModes_.AddEntriesFrom(input, _map_gameModes_codec);
|
||||
break;
|
||||
}
|
||||
case 34: {
|
||||
roles_.AddEntriesFrom(input, _map_roles_codec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
if ((tag & 7) == 4) {
|
||||
// Abort on any end group tag.
|
||||
return;
|
||||
}
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
|
||||
break;
|
||||
case 10: {
|
||||
Version = input.ReadString();
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
nations_.AddEntriesFrom(ref input, _repeated_nations_codec);
|
||||
break;
|
||||
}
|
||||
case 26: {
|
||||
gameModes_.AddEntriesFrom(ref input, _map_gameModes_codec);
|
||||
break;
|
||||
}
|
||||
case 34: {
|
||||
roles_.AddEntriesFrom(ref input, _map_roles_codec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
|
||||
public sealed partial class GameMode : pb::IMessage<GameMode>
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
, pb::IBufferMessage
|
||||
#endif
|
||||
{
|
||||
private static readonly pb::MessageParser<GameMode> _parser = new pb::MessageParser<GameMode>(() => new GameMode());
|
||||
private pb::UnknownFieldSet _unknownFields;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pb::MessageParser<GameMode> Parser { get { return _parser; } }
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pbr::MessageDescriptor Descriptor {
|
||||
get { return global::Blitzkit.LegacyGameDefinitionsReflection.Descriptor.MessageTypes[1]; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
pbr::MessageDescriptor pb::IMessage.Descriptor {
|
||||
get { return Descriptor; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public GameMode() {
|
||||
OnConstruction();
|
||||
}
|
||||
|
||||
partial void OnConstruction();
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public GameMode(GameMode other) : this() {
|
||||
name_ = other.name_ != null ? other.name_.Clone() : null;
|
||||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public GameMode Clone() {
|
||||
return new GameMode(this);
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "name" field.</summary>
|
||||
public const int NameFieldNumber = 1;
|
||||
private global::Blitzkit.I18nString name_;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public global::Blitzkit.I18nString Name {
|
||||
get { return name_; }
|
||||
set {
|
||||
name_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override bool Equals(object other) {
|
||||
return Equals(other as GameMode);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public bool Equals(GameMode other) {
|
||||
if (ReferenceEquals(other, null)) {
|
||||
return false;
|
||||
}
|
||||
if (ReferenceEquals(other, this)) {
|
||||
return true;
|
||||
}
|
||||
if (!object.Equals(Name, other.Name)) return false;
|
||||
return Equals(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override int GetHashCode() {
|
||||
int hash = 1;
|
||||
if (name_ != null) hash ^= Name.GetHashCode();
|
||||
if (_unknownFields != null) {
|
||||
hash ^= _unknownFields.GetHashCode();
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override string ToString() {
|
||||
return pb::JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void WriteTo(pb::CodedOutputStream output) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
output.WriteRawMessage(this);
|
||||
#else
|
||||
if (name_ != null) {
|
||||
output.WriteRawTag(10);
|
||||
output.WriteMessage(Name);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(output);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
|
||||
if (name_ != null) {
|
||||
output.WriteRawTag(10);
|
||||
output.WriteMessage(Name);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(ref output);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public int CalculateSize() {
|
||||
int size = 0;
|
||||
if (name_ != null) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeMessageSize(Name);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
size += _unknownFields.CalculateSize();
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(GameMode other) {
|
||||
if (other == null) {
|
||||
return;
|
||||
}
|
||||
if (other.name_ != null) {
|
||||
if (name_ == null) {
|
||||
Name = new global::Blitzkit.I18nString();
|
||||
}
|
||||
Name.MergeFrom(other.Name);
|
||||
}
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(pb::CodedInputStream input) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
input.ReadRawMessage(this);
|
||||
#else
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
if ((tag & 7) == 4) {
|
||||
// Abort on any end group tag.
|
||||
return;
|
||||
}
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
|
||||
break;
|
||||
case 10: {
|
||||
if (name_ == null) {
|
||||
Name = new global::Blitzkit.I18nString();
|
||||
}
|
||||
input.ReadMessage(Name);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
if ((tag & 7) == 4) {
|
||||
// Abort on any end group tag.
|
||||
return;
|
||||
}
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
|
||||
break;
|
||||
case 10: {
|
||||
if (name_ == null) {
|
||||
Name = new global::Blitzkit.I18nString();
|
||||
}
|
||||
input.ReadMessage(Name);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
|
||||
public sealed partial class GameModeRole : pb::IMessage<GameModeRole>
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
, pb::IBufferMessage
|
||||
#endif
|
||||
{
|
||||
private static readonly pb::MessageParser<GameModeRole> _parser = new pb::MessageParser<GameModeRole>(() => new GameModeRole());
|
||||
private pb::UnknownFieldSet _unknownFields;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pb::MessageParser<GameModeRole> Parser { get { return _parser; } }
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pbr::MessageDescriptor Descriptor {
|
||||
get { return global::Blitzkit.LegacyGameDefinitionsReflection.Descriptor.MessageTypes[2]; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
pbr::MessageDescriptor pb::IMessage.Descriptor {
|
||||
get { return Descriptor; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public GameModeRole() {
|
||||
OnConstruction();
|
||||
}
|
||||
|
||||
partial void OnConstruction();
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public GameModeRole(GameModeRole other) : this() {
|
||||
provisions_ = other.provisions_.Clone();
|
||||
consumables_ = other.consumables_.Clone();
|
||||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public GameModeRole Clone() {
|
||||
return new GameModeRole(this);
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "provisions" field.</summary>
|
||||
public const int ProvisionsFieldNumber = 1;
|
||||
private static readonly pb::FieldCodec<uint> _repeated_provisions_codec
|
||||
= pb::FieldCodec.ForUInt32(8);
|
||||
private readonly pbc::RepeatedField<uint> provisions_ = new pbc::RepeatedField<uint>();
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public pbc::RepeatedField<uint> Provisions {
|
||||
get { return provisions_; }
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "consumables" field.</summary>
|
||||
public const int ConsumablesFieldNumber = 2;
|
||||
private static readonly pb::FieldCodec<uint> _repeated_consumables_codec
|
||||
= pb::FieldCodec.ForUInt32(16);
|
||||
private readonly pbc::RepeatedField<uint> consumables_ = new pbc::RepeatedField<uint>();
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public pbc::RepeatedField<uint> Consumables {
|
||||
get { return consumables_; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override bool Equals(object other) {
|
||||
return Equals(other as GameModeRole);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public bool Equals(GameModeRole other) {
|
||||
if (ReferenceEquals(other, null)) {
|
||||
return false;
|
||||
}
|
||||
if (ReferenceEquals(other, this)) {
|
||||
return true;
|
||||
}
|
||||
if(!provisions_.Equals(other.provisions_)) return false;
|
||||
if(!consumables_.Equals(other.consumables_)) return false;
|
||||
return Equals(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override int GetHashCode() {
|
||||
int hash = 1;
|
||||
hash ^= provisions_.GetHashCode();
|
||||
hash ^= consumables_.GetHashCode();
|
||||
if (_unknownFields != null) {
|
||||
hash ^= _unknownFields.GetHashCode();
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override string ToString() {
|
||||
return pb::JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void WriteTo(pb::CodedOutputStream output) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
output.WriteRawMessage(this);
|
||||
#else
|
||||
provisions_.WriteTo(output, _repeated_provisions_codec);
|
||||
consumables_.WriteTo(output, _repeated_consumables_codec);
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(output);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
|
||||
provisions_.WriteTo(ref output, _repeated_provisions_codec);
|
||||
consumables_.WriteTo(ref output, _repeated_consumables_codec);
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(ref output);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public int CalculateSize() {
|
||||
int size = 0;
|
||||
size += provisions_.CalculateSize(_repeated_provisions_codec);
|
||||
size += consumables_.CalculateSize(_repeated_consumables_codec);
|
||||
if (_unknownFields != null) {
|
||||
size += _unknownFields.CalculateSize();
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(GameModeRole other) {
|
||||
if (other == null) {
|
||||
return;
|
||||
}
|
||||
provisions_.Add(other.provisions_);
|
||||
consumables_.Add(other.consumables_);
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(pb::CodedInputStream input) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
input.ReadRawMessage(this);
|
||||
#else
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
if ((tag & 7) == 4) {
|
||||
// Abort on any end group tag.
|
||||
return;
|
||||
}
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
|
||||
break;
|
||||
case 10:
|
||||
case 8: {
|
||||
provisions_.AddEntriesFrom(input, _repeated_provisions_codec);
|
||||
break;
|
||||
}
|
||||
case 18:
|
||||
case 16: {
|
||||
consumables_.AddEntriesFrom(input, _repeated_consumables_codec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
if ((tag & 7) == 4) {
|
||||
// Abort on any end group tag.
|
||||
return;
|
||||
}
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
|
||||
break;
|
||||
case 10:
|
||||
case 8: {
|
||||
provisions_.AddEntriesFrom(ref input, _repeated_provisions_codec);
|
||||
break;
|
||||
}
|
||||
case 18:
|
||||
case 16: {
|
||||
consumables_.AddEntriesFrom(ref input, _repeated_consumables_codec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
#endregion Designer generated code
|
||||
@@ -0,0 +1,232 @@
|
||||
// <auto-generated>
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: packages/core/src/protos/legacy_i18n.proto
|
||||
// </auto-generated>
|
||||
#pragma warning disable 1591, 0612, 3021, 8981
|
||||
#region Designer generated code
|
||||
|
||||
using pb = global::Google.Protobuf;
|
||||
using pbc = global::Google.Protobuf.Collections;
|
||||
using pbr = global::Google.Protobuf.Reflection;
|
||||
using scg = global::System.Collections.Generic;
|
||||
namespace Blitzkit {
|
||||
|
||||
/// <summary>Holder for reflection information generated from packages/core/src/protos/legacy_i18n.proto</summary>
|
||||
public static partial class LegacyI18NReflection {
|
||||
|
||||
#region Descriptor
|
||||
/// <summary>File descriptor for packages/core/src/protos/legacy_i18n.proto</summary>
|
||||
public static pbr::FileDescriptor Descriptor {
|
||||
get { return descriptor; }
|
||||
}
|
||||
private static pbr::FileDescriptor descriptor;
|
||||
|
||||
static LegacyI18NReflection() {
|
||||
byte[] descriptorData = global::System.Convert.FromBase64String(
|
||||
string.Concat(
|
||||
"CipwYWNrYWdlcy9jb3JlL3NyYy9wcm90b3MvbGVnYWN5X2kxOG4ucHJvdG8S",
|
||||
"CGJsaXR6a2l0InAKCkkxOG5TdHJpbmcSMgoHbG9jYWxlcxgBIAMoCzIhLmJs",
|
||||
"aXR6a2l0LkkxOG5TdHJpbmcuTG9jYWxlc0VudHJ5Gi4KDExvY2FsZXNFbnRy",
|
||||
"eRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAk6AjgB"));
|
||||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
|
||||
new pbr::FileDescriptor[] { },
|
||||
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.I18nString), global::Blitzkit.I18nString.Parser, new[]{ "Locales" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, })
|
||||
}));
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
#region Messages
|
||||
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
|
||||
public sealed partial class I18nString : pb::IMessage<I18nString>
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
, pb::IBufferMessage
|
||||
#endif
|
||||
{
|
||||
private static readonly pb::MessageParser<I18nString> _parser = new pb::MessageParser<I18nString>(() => new I18nString());
|
||||
private pb::UnknownFieldSet _unknownFields;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pb::MessageParser<I18nString> Parser { get { return _parser; } }
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pbr::MessageDescriptor Descriptor {
|
||||
get { return global::Blitzkit.LegacyI18NReflection.Descriptor.MessageTypes[0]; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
pbr::MessageDescriptor pb::IMessage.Descriptor {
|
||||
get { return Descriptor; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public I18nString() {
|
||||
OnConstruction();
|
||||
}
|
||||
|
||||
partial void OnConstruction();
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public I18nString(I18nString other) : this() {
|
||||
locales_ = other.locales_.Clone();
|
||||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public I18nString Clone() {
|
||||
return new I18nString(this);
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "locales" field.</summary>
|
||||
public const int LocalesFieldNumber = 1;
|
||||
private static readonly pbc::MapField<string, string>.Codec _map_locales_codec
|
||||
= new pbc::MapField<string, string>.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForString(18, ""), 10);
|
||||
private readonly pbc::MapField<string, string> locales_ = new pbc::MapField<string, string>();
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public pbc::MapField<string, string> Locales {
|
||||
get { return locales_; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override bool Equals(object other) {
|
||||
return Equals(other as I18nString);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public bool Equals(I18nString other) {
|
||||
if (ReferenceEquals(other, null)) {
|
||||
return false;
|
||||
}
|
||||
if (ReferenceEquals(other, this)) {
|
||||
return true;
|
||||
}
|
||||
if (!Locales.Equals(other.Locales)) return false;
|
||||
return Equals(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override int GetHashCode() {
|
||||
int hash = 1;
|
||||
hash ^= Locales.GetHashCode();
|
||||
if (_unknownFields != null) {
|
||||
hash ^= _unknownFields.GetHashCode();
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override string ToString() {
|
||||
return pb::JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void WriteTo(pb::CodedOutputStream output) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
output.WriteRawMessage(this);
|
||||
#else
|
||||
locales_.WriteTo(output, _map_locales_codec);
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(output);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
|
||||
locales_.WriteTo(ref output, _map_locales_codec);
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(ref output);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public int CalculateSize() {
|
||||
int size = 0;
|
||||
size += locales_.CalculateSize(_map_locales_codec);
|
||||
if (_unknownFields != null) {
|
||||
size += _unknownFields.CalculateSize();
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(I18nString other) {
|
||||
if (other == null) {
|
||||
return;
|
||||
}
|
||||
locales_.MergeFrom(other.locales_);
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(pb::CodedInputStream input) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
input.ReadRawMessage(this);
|
||||
#else
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
if ((tag & 7) == 4) {
|
||||
// Abort on any end group tag.
|
||||
return;
|
||||
}
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
|
||||
break;
|
||||
case 10: {
|
||||
locales_.AddEntriesFrom(input, _map_locales_codec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
if ((tag & 7) == 4) {
|
||||
// Abort on any end group tag.
|
||||
return;
|
||||
}
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
|
||||
break;
|
||||
case 10: {
|
||||
locales_.AddEntriesFrom(ref input, _map_locales_codec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
#endregion Designer generated code
|
||||
@@ -0,0 +1,497 @@
|
||||
// <auto-generated>
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: packages/core/src/protos/legacy_map_definitions.proto
|
||||
// </auto-generated>
|
||||
#pragma warning disable 1591, 0612, 3021, 8981
|
||||
#region Designer generated code
|
||||
|
||||
using pb = global::Google.Protobuf;
|
||||
using pbc = global::Google.Protobuf.Collections;
|
||||
using pbr = global::Google.Protobuf.Reflection;
|
||||
using scg = global::System.Collections.Generic;
|
||||
namespace Blitzkit {
|
||||
|
||||
/// <summary>Holder for reflection information generated from packages/core/src/protos/legacy_map_definitions.proto</summary>
|
||||
public static partial class LegacyMapDefinitionsReflection {
|
||||
|
||||
#region Descriptor
|
||||
/// <summary>File descriptor for packages/core/src/protos/legacy_map_definitions.proto</summary>
|
||||
public static pbr::FileDescriptor Descriptor {
|
||||
get { return descriptor; }
|
||||
}
|
||||
private static pbr::FileDescriptor descriptor;
|
||||
|
||||
static LegacyMapDefinitionsReflection() {
|
||||
byte[] descriptorData = global::System.Convert.FromBase64String(
|
||||
string.Concat(
|
||||
"CjVwYWNrYWdlcy9jb3JlL3NyYy9wcm90b3MvbGVnYWN5X21hcF9kZWZpbml0",
|
||||
"aW9ucy5wcm90bxIIYmxpdHpraXQaKnBhY2thZ2VzL2NvcmUvc3JjL3Byb3Rv",
|
||||
"cy9sZWdhY3lfaTE4bi5wcm90byKIAQoOTWFwRGVmaW5pdGlvbnMSMAoEbWFw",
|
||||
"cxgBIAMoCzIiLmJsaXR6a2l0Lk1hcERlZmluaXRpb25zLk1hcHNFbnRyeRpE",
|
||||
"CglNYXBzRW50cnkSCwoDa2V5GAEgASgFEiYKBXZhbHVlGAIgASgLMhcuYmxp",
|
||||
"dHpraXQuTWFwRGVmaW5pdGlvbjoCOAEiPwoNTWFwRGVmaW5pdGlvbhIKCgJp",
|
||||
"ZBgBIAIoDRIiCgRuYW1lGAIgAigLMhQuYmxpdHpraXQuSTE4blN0cmluZw=="));
|
||||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
|
||||
new pbr::FileDescriptor[] { global::Blitzkit.LegacyI18NReflection.Descriptor, },
|
||||
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.MapDefinitions), global::Blitzkit.MapDefinitions.Parser, new[]{ "Maps" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }),
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.MapDefinition), global::Blitzkit.MapDefinition.Parser, new[]{ "Id", "Name" }, null, null, null, null)
|
||||
}));
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
#region Messages
|
||||
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
|
||||
public sealed partial class MapDefinitions : pb::IMessage<MapDefinitions>
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
, pb::IBufferMessage
|
||||
#endif
|
||||
{
|
||||
private static readonly pb::MessageParser<MapDefinitions> _parser = new pb::MessageParser<MapDefinitions>(() => new MapDefinitions());
|
||||
private pb::UnknownFieldSet _unknownFields;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pb::MessageParser<MapDefinitions> Parser { get { return _parser; } }
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pbr::MessageDescriptor Descriptor {
|
||||
get { return global::Blitzkit.LegacyMapDefinitionsReflection.Descriptor.MessageTypes[0]; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
pbr::MessageDescriptor pb::IMessage.Descriptor {
|
||||
get { return Descriptor; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public MapDefinitions() {
|
||||
OnConstruction();
|
||||
}
|
||||
|
||||
partial void OnConstruction();
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public MapDefinitions(MapDefinitions other) : this() {
|
||||
maps_ = other.maps_.Clone();
|
||||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public MapDefinitions Clone() {
|
||||
return new MapDefinitions(this);
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "maps" field.</summary>
|
||||
public const int MapsFieldNumber = 1;
|
||||
private static readonly pbc::MapField<int, global::Blitzkit.MapDefinition>.Codec _map_maps_codec
|
||||
= new pbc::MapField<int, global::Blitzkit.MapDefinition>.Codec(pb::FieldCodec.ForInt32(8, 0), pb::FieldCodec.ForMessage(18, global::Blitzkit.MapDefinition.Parser), 10);
|
||||
private readonly pbc::MapField<int, global::Blitzkit.MapDefinition> maps_ = new pbc::MapField<int, global::Blitzkit.MapDefinition>();
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public pbc::MapField<int, global::Blitzkit.MapDefinition> Maps {
|
||||
get { return maps_; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override bool Equals(object other) {
|
||||
return Equals(other as MapDefinitions);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public bool Equals(MapDefinitions other) {
|
||||
if (ReferenceEquals(other, null)) {
|
||||
return false;
|
||||
}
|
||||
if (ReferenceEquals(other, this)) {
|
||||
return true;
|
||||
}
|
||||
if (!Maps.Equals(other.Maps)) return false;
|
||||
return Equals(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override int GetHashCode() {
|
||||
int hash = 1;
|
||||
hash ^= Maps.GetHashCode();
|
||||
if (_unknownFields != null) {
|
||||
hash ^= _unknownFields.GetHashCode();
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override string ToString() {
|
||||
return pb::JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void WriteTo(pb::CodedOutputStream output) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
output.WriteRawMessage(this);
|
||||
#else
|
||||
maps_.WriteTo(output, _map_maps_codec);
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(output);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
|
||||
maps_.WriteTo(ref output, _map_maps_codec);
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(ref output);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public int CalculateSize() {
|
||||
int size = 0;
|
||||
size += maps_.CalculateSize(_map_maps_codec);
|
||||
if (_unknownFields != null) {
|
||||
size += _unknownFields.CalculateSize();
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(MapDefinitions other) {
|
||||
if (other == null) {
|
||||
return;
|
||||
}
|
||||
maps_.MergeFrom(other.maps_);
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(pb::CodedInputStream input) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
input.ReadRawMessage(this);
|
||||
#else
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
if ((tag & 7) == 4) {
|
||||
// Abort on any end group tag.
|
||||
return;
|
||||
}
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
|
||||
break;
|
||||
case 10: {
|
||||
maps_.AddEntriesFrom(input, _map_maps_codec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
if ((tag & 7) == 4) {
|
||||
// Abort on any end group tag.
|
||||
return;
|
||||
}
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
|
||||
break;
|
||||
case 10: {
|
||||
maps_.AddEntriesFrom(ref input, _map_maps_codec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
|
||||
public sealed partial class MapDefinition : pb::IMessage<MapDefinition>
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
, pb::IBufferMessage
|
||||
#endif
|
||||
{
|
||||
private static readonly pb::MessageParser<MapDefinition> _parser = new pb::MessageParser<MapDefinition>(() => new MapDefinition());
|
||||
private pb::UnknownFieldSet _unknownFields;
|
||||
private int _hasBits0;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pb::MessageParser<MapDefinition> Parser { get { return _parser; } }
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pbr::MessageDescriptor Descriptor {
|
||||
get { return global::Blitzkit.LegacyMapDefinitionsReflection.Descriptor.MessageTypes[1]; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
pbr::MessageDescriptor pb::IMessage.Descriptor {
|
||||
get { return Descriptor; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public MapDefinition() {
|
||||
OnConstruction();
|
||||
}
|
||||
|
||||
partial void OnConstruction();
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public MapDefinition(MapDefinition other) : this() {
|
||||
_hasBits0 = other._hasBits0;
|
||||
id_ = other.id_;
|
||||
name_ = other.name_ != null ? other.name_.Clone() : null;
|
||||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public MapDefinition Clone() {
|
||||
return new MapDefinition(this);
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "id" field.</summary>
|
||||
public const int IdFieldNumber = 1;
|
||||
private readonly static uint IdDefaultValue = 0;
|
||||
|
||||
private uint id_;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public uint Id {
|
||||
get { if ((_hasBits0 & 1) != 0) { return id_; } else { return IdDefaultValue; } }
|
||||
set {
|
||||
_hasBits0 |= 1;
|
||||
id_ = value;
|
||||
}
|
||||
}
|
||||
/// <summary>Gets whether the "id" field is set</summary>
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public bool HasId {
|
||||
get { return (_hasBits0 & 1) != 0; }
|
||||
}
|
||||
/// <summary>Clears the value of the "id" field</summary>
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void ClearId() {
|
||||
_hasBits0 &= ~1;
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "name" field.</summary>
|
||||
public const int NameFieldNumber = 2;
|
||||
private global::Blitzkit.I18nString name_;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public global::Blitzkit.I18nString Name {
|
||||
get { return name_; }
|
||||
set {
|
||||
name_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override bool Equals(object other) {
|
||||
return Equals(other as MapDefinition);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public bool Equals(MapDefinition other) {
|
||||
if (ReferenceEquals(other, null)) {
|
||||
return false;
|
||||
}
|
||||
if (ReferenceEquals(other, this)) {
|
||||
return true;
|
||||
}
|
||||
if (Id != other.Id) return false;
|
||||
if (!object.Equals(Name, other.Name)) return false;
|
||||
return Equals(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override int GetHashCode() {
|
||||
int hash = 1;
|
||||
if (HasId) hash ^= Id.GetHashCode();
|
||||
if (name_ != null) hash ^= Name.GetHashCode();
|
||||
if (_unknownFields != null) {
|
||||
hash ^= _unknownFields.GetHashCode();
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override string ToString() {
|
||||
return pb::JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void WriteTo(pb::CodedOutputStream output) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
output.WriteRawMessage(this);
|
||||
#else
|
||||
if (HasId) {
|
||||
output.WriteRawTag(8);
|
||||
output.WriteUInt32(Id);
|
||||
}
|
||||
if (name_ != null) {
|
||||
output.WriteRawTag(18);
|
||||
output.WriteMessage(Name);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(output);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
|
||||
if (HasId) {
|
||||
output.WriteRawTag(8);
|
||||
output.WriteUInt32(Id);
|
||||
}
|
||||
if (name_ != null) {
|
||||
output.WriteRawTag(18);
|
||||
output.WriteMessage(Name);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(ref output);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public int CalculateSize() {
|
||||
int size = 0;
|
||||
if (HasId) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Id);
|
||||
}
|
||||
if (name_ != null) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeMessageSize(Name);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
size += _unknownFields.CalculateSize();
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(MapDefinition other) {
|
||||
if (other == null) {
|
||||
return;
|
||||
}
|
||||
if (other.HasId) {
|
||||
Id = other.Id;
|
||||
}
|
||||
if (other.name_ != null) {
|
||||
if (name_ == null) {
|
||||
Name = new global::Blitzkit.I18nString();
|
||||
}
|
||||
Name.MergeFrom(other.Name);
|
||||
}
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(pb::CodedInputStream input) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
input.ReadRawMessage(this);
|
||||
#else
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
if ((tag & 7) == 4) {
|
||||
// Abort on any end group tag.
|
||||
return;
|
||||
}
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
|
||||
break;
|
||||
case 8: {
|
||||
Id = input.ReadUInt32();
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
if (name_ == null) {
|
||||
Name = new global::Blitzkit.I18nString();
|
||||
}
|
||||
input.ReadMessage(Name);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
if ((tag & 7) == 4) {
|
||||
// Abort on any end group tag.
|
||||
return;
|
||||
}
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
|
||||
break;
|
||||
case 8: {
|
||||
Id = input.ReadUInt32();
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
if (name_ == null) {
|
||||
Name = new global::Blitzkit.I18nString();
|
||||
}
|
||||
input.ReadMessage(Name);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
#endregion Designer generated code
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,659 @@
|
||||
// <auto-generated>
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: packages/core/src/protos/legacy_provision_definitions.proto
|
||||
// </auto-generated>
|
||||
#pragma warning disable 1591, 0612, 3021, 8981
|
||||
#region Designer generated code
|
||||
|
||||
using pb = global::Google.Protobuf;
|
||||
using pbc = global::Google.Protobuf.Collections;
|
||||
using pbr = global::Google.Protobuf.Reflection;
|
||||
using scg = global::System.Collections.Generic;
|
||||
namespace Blitzkit {
|
||||
|
||||
/// <summary>Holder for reflection information generated from packages/core/src/protos/legacy_provision_definitions.proto</summary>
|
||||
public static partial class LegacyProvisionDefinitionsReflection {
|
||||
|
||||
#region Descriptor
|
||||
/// <summary>File descriptor for packages/core/src/protos/legacy_provision_definitions.proto</summary>
|
||||
public static pbr::FileDescriptor Descriptor {
|
||||
get { return descriptor; }
|
||||
}
|
||||
private static pbr::FileDescriptor descriptor;
|
||||
|
||||
static LegacyProvisionDefinitionsReflection() {
|
||||
byte[] descriptorData = global::System.Convert.FromBase64String(
|
||||
string.Concat(
|
||||
"CjtwYWNrYWdlcy9jb3JlL3NyYy9wcm90b3MvbGVnYWN5X3Byb3Zpc2lvbl9k",
|
||||
"ZWZpbml0aW9ucy5wcm90bxIIYmxpdHpraXQaPHBhY2thZ2VzL2NvcmUvc3Jj",
|
||||
"L3Byb3Rvcy9sZWdhY3lfY29uc3VtYWJsZV9kZWZpbml0aW9ucy5wcm90bxoq",
|
||||
"cGFja2FnZXMvY29yZS9zcmMvcHJvdG9zL2xlZ2FjeV9pMThuLnByb3RvIqIB",
|
||||
"ChRQcm92aXNpb25EZWZpbml0aW9ucxJCCgpwcm92aXNpb25zGAEgAygLMi4u",
|
||||
"YmxpdHpraXQuUHJvdmlzaW9uRGVmaW5pdGlvbnMuUHJvdmlzaW9uc0VudHJ5",
|
||||
"GkYKD1Byb3Zpc2lvbnNFbnRyeRILCgNrZXkYASABKA0SIgoFdmFsdWUYAiAB",
|
||||
"KAsyEy5ibGl0emtpdC5Qcm92aXNpb246AjgBIsgBCglQcm92aXNpb24SCgoC",
|
||||
"aWQYASACKA0SIgoEbmFtZRgCIAIoCzIULmJsaXR6a2l0LkkxOG5TdHJpbmcS",
|
||||
"DAoEY3JldxgDIAEoAhIbChNnYW1lX21vZGVfZXhjbHVzaXZlGAUgAigIEi8K",
|
||||
"B2luY2x1ZGUYBiADKAsyHi5ibGl0emtpdC5Db25zdW1hYmxlVGFua0ZpbHRl",
|
||||
"chIvCgdleGNsdWRlGAcgAygLMh4uYmxpdHpraXQuQ29uc3VtYWJsZVRhbmtG",
|
||||
"aWx0ZXI="));
|
||||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
|
||||
new pbr::FileDescriptor[] { global::Blitzkit.LegacyConsumableDefinitionsReflection.Descriptor, global::Blitzkit.LegacyI18NReflection.Descriptor, },
|
||||
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.ProvisionDefinitions), global::Blitzkit.ProvisionDefinitions.Parser, new[]{ "Provisions" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }),
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.Provision), global::Blitzkit.Provision.Parser, new[]{ "Id", "Name", "Crew", "GameModeExclusive", "Include", "Exclude" }, null, null, null, null)
|
||||
}));
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
#region Messages
|
||||
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
|
||||
public sealed partial class ProvisionDefinitions : pb::IMessage<ProvisionDefinitions>
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
, pb::IBufferMessage
|
||||
#endif
|
||||
{
|
||||
private static readonly pb::MessageParser<ProvisionDefinitions> _parser = new pb::MessageParser<ProvisionDefinitions>(() => new ProvisionDefinitions());
|
||||
private pb::UnknownFieldSet _unknownFields;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pb::MessageParser<ProvisionDefinitions> Parser { get { return _parser; } }
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pbr::MessageDescriptor Descriptor {
|
||||
get { return global::Blitzkit.LegacyProvisionDefinitionsReflection.Descriptor.MessageTypes[0]; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
pbr::MessageDescriptor pb::IMessage.Descriptor {
|
||||
get { return Descriptor; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public ProvisionDefinitions() {
|
||||
OnConstruction();
|
||||
}
|
||||
|
||||
partial void OnConstruction();
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public ProvisionDefinitions(ProvisionDefinitions other) : this() {
|
||||
provisions_ = other.provisions_.Clone();
|
||||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public ProvisionDefinitions Clone() {
|
||||
return new ProvisionDefinitions(this);
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "provisions" field.</summary>
|
||||
public const int ProvisionsFieldNumber = 1;
|
||||
private static readonly pbc::MapField<uint, global::Blitzkit.Provision>.Codec _map_provisions_codec
|
||||
= new pbc::MapField<uint, global::Blitzkit.Provision>.Codec(pb::FieldCodec.ForUInt32(8, 0), pb::FieldCodec.ForMessage(18, global::Blitzkit.Provision.Parser), 10);
|
||||
private readonly pbc::MapField<uint, global::Blitzkit.Provision> provisions_ = new pbc::MapField<uint, global::Blitzkit.Provision>();
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public pbc::MapField<uint, global::Blitzkit.Provision> Provisions {
|
||||
get { return provisions_; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override bool Equals(object other) {
|
||||
return Equals(other as ProvisionDefinitions);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public bool Equals(ProvisionDefinitions other) {
|
||||
if (ReferenceEquals(other, null)) {
|
||||
return false;
|
||||
}
|
||||
if (ReferenceEquals(other, this)) {
|
||||
return true;
|
||||
}
|
||||
if (!Provisions.Equals(other.Provisions)) return false;
|
||||
return Equals(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override int GetHashCode() {
|
||||
int hash = 1;
|
||||
hash ^= Provisions.GetHashCode();
|
||||
if (_unknownFields != null) {
|
||||
hash ^= _unknownFields.GetHashCode();
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override string ToString() {
|
||||
return pb::JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void WriteTo(pb::CodedOutputStream output) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
output.WriteRawMessage(this);
|
||||
#else
|
||||
provisions_.WriteTo(output, _map_provisions_codec);
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(output);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
|
||||
provisions_.WriteTo(ref output, _map_provisions_codec);
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(ref output);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public int CalculateSize() {
|
||||
int size = 0;
|
||||
size += provisions_.CalculateSize(_map_provisions_codec);
|
||||
if (_unknownFields != null) {
|
||||
size += _unknownFields.CalculateSize();
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(ProvisionDefinitions other) {
|
||||
if (other == null) {
|
||||
return;
|
||||
}
|
||||
provisions_.MergeFrom(other.provisions_);
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(pb::CodedInputStream input) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
input.ReadRawMessage(this);
|
||||
#else
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
if ((tag & 7) == 4) {
|
||||
// Abort on any end group tag.
|
||||
return;
|
||||
}
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
|
||||
break;
|
||||
case 10: {
|
||||
provisions_.AddEntriesFrom(input, _map_provisions_codec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
if ((tag & 7) == 4) {
|
||||
// Abort on any end group tag.
|
||||
return;
|
||||
}
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
|
||||
break;
|
||||
case 10: {
|
||||
provisions_.AddEntriesFrom(ref input, _map_provisions_codec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
|
||||
public sealed partial class Provision : pb::IMessage<Provision>
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
, pb::IBufferMessage
|
||||
#endif
|
||||
{
|
||||
private static readonly pb::MessageParser<Provision> _parser = new pb::MessageParser<Provision>(() => new Provision());
|
||||
private pb::UnknownFieldSet _unknownFields;
|
||||
private int _hasBits0;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pb::MessageParser<Provision> Parser { get { return _parser; } }
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pbr::MessageDescriptor Descriptor {
|
||||
get { return global::Blitzkit.LegacyProvisionDefinitionsReflection.Descriptor.MessageTypes[1]; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
pbr::MessageDescriptor pb::IMessage.Descriptor {
|
||||
get { return Descriptor; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public Provision() {
|
||||
OnConstruction();
|
||||
}
|
||||
|
||||
partial void OnConstruction();
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public Provision(Provision other) : this() {
|
||||
_hasBits0 = other._hasBits0;
|
||||
id_ = other.id_;
|
||||
name_ = other.name_ != null ? other.name_.Clone() : null;
|
||||
crew_ = other.crew_;
|
||||
gameModeExclusive_ = other.gameModeExclusive_;
|
||||
include_ = other.include_.Clone();
|
||||
exclude_ = other.exclude_.Clone();
|
||||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public Provision Clone() {
|
||||
return new Provision(this);
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "id" field.</summary>
|
||||
public const int IdFieldNumber = 1;
|
||||
private readonly static uint IdDefaultValue = 0;
|
||||
|
||||
private uint id_;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public uint Id {
|
||||
get { if ((_hasBits0 & 1) != 0) { return id_; } else { return IdDefaultValue; } }
|
||||
set {
|
||||
_hasBits0 |= 1;
|
||||
id_ = value;
|
||||
}
|
||||
}
|
||||
/// <summary>Gets whether the "id" field is set</summary>
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public bool HasId {
|
||||
get { return (_hasBits0 & 1) != 0; }
|
||||
}
|
||||
/// <summary>Clears the value of the "id" field</summary>
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void ClearId() {
|
||||
_hasBits0 &= ~1;
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "name" field.</summary>
|
||||
public const int NameFieldNumber = 2;
|
||||
private global::Blitzkit.I18nString name_;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public global::Blitzkit.I18nString Name {
|
||||
get { return name_; }
|
||||
set {
|
||||
name_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "crew" field.</summary>
|
||||
public const int CrewFieldNumber = 3;
|
||||
private readonly static float CrewDefaultValue = 0F;
|
||||
|
||||
private float crew_;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public float Crew {
|
||||
get { if ((_hasBits0 & 2) != 0) { return crew_; } else { return CrewDefaultValue; } }
|
||||
set {
|
||||
_hasBits0 |= 2;
|
||||
crew_ = value;
|
||||
}
|
||||
}
|
||||
/// <summary>Gets whether the "crew" field is set</summary>
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public bool HasCrew {
|
||||
get { return (_hasBits0 & 2) != 0; }
|
||||
}
|
||||
/// <summary>Clears the value of the "crew" field</summary>
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void ClearCrew() {
|
||||
_hasBits0 &= ~2;
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "game_mode_exclusive" field.</summary>
|
||||
public const int GameModeExclusiveFieldNumber = 5;
|
||||
private readonly static bool GameModeExclusiveDefaultValue = false;
|
||||
|
||||
private bool gameModeExclusive_;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public bool GameModeExclusive {
|
||||
get { if ((_hasBits0 & 4) != 0) { return gameModeExclusive_; } else { return GameModeExclusiveDefaultValue; } }
|
||||
set {
|
||||
_hasBits0 |= 4;
|
||||
gameModeExclusive_ = value;
|
||||
}
|
||||
}
|
||||
/// <summary>Gets whether the "game_mode_exclusive" field is set</summary>
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public bool HasGameModeExclusive {
|
||||
get { return (_hasBits0 & 4) != 0; }
|
||||
}
|
||||
/// <summary>Clears the value of the "game_mode_exclusive" field</summary>
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void ClearGameModeExclusive() {
|
||||
_hasBits0 &= ~4;
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "include" field.</summary>
|
||||
public const int IncludeFieldNumber = 6;
|
||||
private static readonly pb::FieldCodec<global::Blitzkit.ConsumableTankFilter> _repeated_include_codec
|
||||
= pb::FieldCodec.ForMessage(50, global::Blitzkit.ConsumableTankFilter.Parser);
|
||||
private readonly pbc::RepeatedField<global::Blitzkit.ConsumableTankFilter> include_ = new pbc::RepeatedField<global::Blitzkit.ConsumableTankFilter>();
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public pbc::RepeatedField<global::Blitzkit.ConsumableTankFilter> Include {
|
||||
get { return include_; }
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "exclude" field.</summary>
|
||||
public const int ExcludeFieldNumber = 7;
|
||||
private static readonly pb::FieldCodec<global::Blitzkit.ConsumableTankFilter> _repeated_exclude_codec
|
||||
= pb::FieldCodec.ForMessage(58, global::Blitzkit.ConsumableTankFilter.Parser);
|
||||
private readonly pbc::RepeatedField<global::Blitzkit.ConsumableTankFilter> exclude_ = new pbc::RepeatedField<global::Blitzkit.ConsumableTankFilter>();
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public pbc::RepeatedField<global::Blitzkit.ConsumableTankFilter> Exclude {
|
||||
get { return exclude_; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override bool Equals(object other) {
|
||||
return Equals(other as Provision);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public bool Equals(Provision other) {
|
||||
if (ReferenceEquals(other, null)) {
|
||||
return false;
|
||||
}
|
||||
if (ReferenceEquals(other, this)) {
|
||||
return true;
|
||||
}
|
||||
if (Id != other.Id) return false;
|
||||
if (!object.Equals(Name, other.Name)) return false;
|
||||
if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Crew, other.Crew)) return false;
|
||||
if (GameModeExclusive != other.GameModeExclusive) return false;
|
||||
if(!include_.Equals(other.include_)) return false;
|
||||
if(!exclude_.Equals(other.exclude_)) return false;
|
||||
return Equals(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override int GetHashCode() {
|
||||
int hash = 1;
|
||||
if (HasId) hash ^= Id.GetHashCode();
|
||||
if (name_ != null) hash ^= Name.GetHashCode();
|
||||
if (HasCrew) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Crew);
|
||||
if (HasGameModeExclusive) hash ^= GameModeExclusive.GetHashCode();
|
||||
hash ^= include_.GetHashCode();
|
||||
hash ^= exclude_.GetHashCode();
|
||||
if (_unknownFields != null) {
|
||||
hash ^= _unknownFields.GetHashCode();
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override string ToString() {
|
||||
return pb::JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void WriteTo(pb::CodedOutputStream output) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
output.WriteRawMessage(this);
|
||||
#else
|
||||
if (HasId) {
|
||||
output.WriteRawTag(8);
|
||||
output.WriteUInt32(Id);
|
||||
}
|
||||
if (name_ != null) {
|
||||
output.WriteRawTag(18);
|
||||
output.WriteMessage(Name);
|
||||
}
|
||||
if (HasCrew) {
|
||||
output.WriteRawTag(29);
|
||||
output.WriteFloat(Crew);
|
||||
}
|
||||
if (HasGameModeExclusive) {
|
||||
output.WriteRawTag(40);
|
||||
output.WriteBool(GameModeExclusive);
|
||||
}
|
||||
include_.WriteTo(output, _repeated_include_codec);
|
||||
exclude_.WriteTo(output, _repeated_exclude_codec);
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(output);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
|
||||
if (HasId) {
|
||||
output.WriteRawTag(8);
|
||||
output.WriteUInt32(Id);
|
||||
}
|
||||
if (name_ != null) {
|
||||
output.WriteRawTag(18);
|
||||
output.WriteMessage(Name);
|
||||
}
|
||||
if (HasCrew) {
|
||||
output.WriteRawTag(29);
|
||||
output.WriteFloat(Crew);
|
||||
}
|
||||
if (HasGameModeExclusive) {
|
||||
output.WriteRawTag(40);
|
||||
output.WriteBool(GameModeExclusive);
|
||||
}
|
||||
include_.WriteTo(ref output, _repeated_include_codec);
|
||||
exclude_.WriteTo(ref output, _repeated_exclude_codec);
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(ref output);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public int CalculateSize() {
|
||||
int size = 0;
|
||||
if (HasId) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Id);
|
||||
}
|
||||
if (name_ != null) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeMessageSize(Name);
|
||||
}
|
||||
if (HasCrew) {
|
||||
size += 1 + 4;
|
||||
}
|
||||
if (HasGameModeExclusive) {
|
||||
size += 1 + 1;
|
||||
}
|
||||
size += include_.CalculateSize(_repeated_include_codec);
|
||||
size += exclude_.CalculateSize(_repeated_exclude_codec);
|
||||
if (_unknownFields != null) {
|
||||
size += _unknownFields.CalculateSize();
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(Provision other) {
|
||||
if (other == null) {
|
||||
return;
|
||||
}
|
||||
if (other.HasId) {
|
||||
Id = other.Id;
|
||||
}
|
||||
if (other.name_ != null) {
|
||||
if (name_ == null) {
|
||||
Name = new global::Blitzkit.I18nString();
|
||||
}
|
||||
Name.MergeFrom(other.Name);
|
||||
}
|
||||
if (other.HasCrew) {
|
||||
Crew = other.Crew;
|
||||
}
|
||||
if (other.HasGameModeExclusive) {
|
||||
GameModeExclusive = other.GameModeExclusive;
|
||||
}
|
||||
include_.Add(other.include_);
|
||||
exclude_.Add(other.exclude_);
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(pb::CodedInputStream input) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
input.ReadRawMessage(this);
|
||||
#else
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
if ((tag & 7) == 4) {
|
||||
// Abort on any end group tag.
|
||||
return;
|
||||
}
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
|
||||
break;
|
||||
case 8: {
|
||||
Id = input.ReadUInt32();
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
if (name_ == null) {
|
||||
Name = new global::Blitzkit.I18nString();
|
||||
}
|
||||
input.ReadMessage(Name);
|
||||
break;
|
||||
}
|
||||
case 29: {
|
||||
Crew = input.ReadFloat();
|
||||
break;
|
||||
}
|
||||
case 40: {
|
||||
GameModeExclusive = input.ReadBool();
|
||||
break;
|
||||
}
|
||||
case 50: {
|
||||
include_.AddEntriesFrom(input, _repeated_include_codec);
|
||||
break;
|
||||
}
|
||||
case 58: {
|
||||
exclude_.AddEntriesFrom(input, _repeated_exclude_codec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
if ((tag & 7) == 4) {
|
||||
// Abort on any end group tag.
|
||||
return;
|
||||
}
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
|
||||
break;
|
||||
case 8: {
|
||||
Id = input.ReadUInt32();
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
if (name_ == null) {
|
||||
Name = new global::Blitzkit.I18nString();
|
||||
}
|
||||
input.ReadMessage(Name);
|
||||
break;
|
||||
}
|
||||
case 29: {
|
||||
Crew = input.ReadFloat();
|
||||
break;
|
||||
}
|
||||
case 40: {
|
||||
GameModeExclusive = input.ReadBool();
|
||||
break;
|
||||
}
|
||||
case 50: {
|
||||
include_.AddEntriesFrom(ref input, _repeated_include_codec);
|
||||
break;
|
||||
}
|
||||
case 58: {
|
||||
exclude_.AddEntriesFrom(ref input, _repeated_exclude_codec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
#endregion Designer generated code
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,425 @@
|
||||
// <auto-generated>
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: packages/core/src/protos/legacy_skill_definitions.proto
|
||||
// </auto-generated>
|
||||
#pragma warning disable 1591, 0612, 3021, 8981
|
||||
#region Designer generated code
|
||||
|
||||
using pb = global::Google.Protobuf;
|
||||
using pbc = global::Google.Protobuf.Collections;
|
||||
using pbr = global::Google.Protobuf.Reflection;
|
||||
using scg = global::System.Collections.Generic;
|
||||
namespace Blitzkit {
|
||||
|
||||
/// <summary>Holder for reflection information generated from packages/core/src/protos/legacy_skill_definitions.proto</summary>
|
||||
public static partial class LegacySkillDefinitionsReflection {
|
||||
|
||||
#region Descriptor
|
||||
/// <summary>File descriptor for packages/core/src/protos/legacy_skill_definitions.proto</summary>
|
||||
public static pbr::FileDescriptor Descriptor {
|
||||
get { return descriptor; }
|
||||
}
|
||||
private static pbr::FileDescriptor descriptor;
|
||||
|
||||
static LegacySkillDefinitionsReflection() {
|
||||
byte[] descriptorData = global::System.Convert.FromBase64String(
|
||||
string.Concat(
|
||||
"CjdwYWNrYWdlcy9jb3JlL3NyYy9wcm90b3MvbGVnYWN5X3NraWxsX2RlZmlu",
|
||||
"aXRpb25zLnByb3RvEghibGl0emtpdCKNAQoQU2tpbGxEZWZpbml0aW9ucxI4",
|
||||
"CgdjbGFzc2VzGAEgAygLMicuYmxpdHpraXQuU2tpbGxEZWZpbml0aW9ucy5D",
|
||||
"bGFzc2VzRW50cnkaPwoMQ2xhc3Nlc0VudHJ5EgsKA2tleRgBIAEoDRIeCgV2",
|
||||
"YWx1ZRgCIAEoCzIPLmJsaXR6a2l0LlNraWxsOgI4ASIXCgVTa2lsbBIOCgZz",
|
||||
"a2lsbHMYASADKAk="));
|
||||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
|
||||
new pbr::FileDescriptor[] { },
|
||||
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.SkillDefinitions), global::Blitzkit.SkillDefinitions.Parser, new[]{ "Classes" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }),
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.Skill), global::Blitzkit.Skill.Parser, new[]{ "Skills" }, null, null, null, null)
|
||||
}));
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
#region Messages
|
||||
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
|
||||
public sealed partial class SkillDefinitions : pb::IMessage<SkillDefinitions>
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
, pb::IBufferMessage
|
||||
#endif
|
||||
{
|
||||
private static readonly pb::MessageParser<SkillDefinitions> _parser = new pb::MessageParser<SkillDefinitions>(() => new SkillDefinitions());
|
||||
private pb::UnknownFieldSet _unknownFields;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pb::MessageParser<SkillDefinitions> Parser { get { return _parser; } }
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pbr::MessageDescriptor Descriptor {
|
||||
get { return global::Blitzkit.LegacySkillDefinitionsReflection.Descriptor.MessageTypes[0]; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
pbr::MessageDescriptor pb::IMessage.Descriptor {
|
||||
get { return Descriptor; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public SkillDefinitions() {
|
||||
OnConstruction();
|
||||
}
|
||||
|
||||
partial void OnConstruction();
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public SkillDefinitions(SkillDefinitions other) : this() {
|
||||
classes_ = other.classes_.Clone();
|
||||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public SkillDefinitions Clone() {
|
||||
return new SkillDefinitions(this);
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "classes" field.</summary>
|
||||
public const int ClassesFieldNumber = 1;
|
||||
private static readonly pbc::MapField<uint, global::Blitzkit.Skill>.Codec _map_classes_codec
|
||||
= new pbc::MapField<uint, global::Blitzkit.Skill>.Codec(pb::FieldCodec.ForUInt32(8, 0), pb::FieldCodec.ForMessage(18, global::Blitzkit.Skill.Parser), 10);
|
||||
private readonly pbc::MapField<uint, global::Blitzkit.Skill> classes_ = new pbc::MapField<uint, global::Blitzkit.Skill>();
|
||||
/// <summary>
|
||||
/// enums are disallowed as keys so using uint32; convert run-time
|
||||
/// </summary>
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public pbc::MapField<uint, global::Blitzkit.Skill> Classes {
|
||||
get { return classes_; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override bool Equals(object other) {
|
||||
return Equals(other as SkillDefinitions);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public bool Equals(SkillDefinitions other) {
|
||||
if (ReferenceEquals(other, null)) {
|
||||
return false;
|
||||
}
|
||||
if (ReferenceEquals(other, this)) {
|
||||
return true;
|
||||
}
|
||||
if (!Classes.Equals(other.Classes)) return false;
|
||||
return Equals(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override int GetHashCode() {
|
||||
int hash = 1;
|
||||
hash ^= Classes.GetHashCode();
|
||||
if (_unknownFields != null) {
|
||||
hash ^= _unknownFields.GetHashCode();
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override string ToString() {
|
||||
return pb::JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void WriteTo(pb::CodedOutputStream output) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
output.WriteRawMessage(this);
|
||||
#else
|
||||
classes_.WriteTo(output, _map_classes_codec);
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(output);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
|
||||
classes_.WriteTo(ref output, _map_classes_codec);
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(ref output);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public int CalculateSize() {
|
||||
int size = 0;
|
||||
size += classes_.CalculateSize(_map_classes_codec);
|
||||
if (_unknownFields != null) {
|
||||
size += _unknownFields.CalculateSize();
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(SkillDefinitions other) {
|
||||
if (other == null) {
|
||||
return;
|
||||
}
|
||||
classes_.MergeFrom(other.classes_);
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(pb::CodedInputStream input) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
input.ReadRawMessage(this);
|
||||
#else
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
if ((tag & 7) == 4) {
|
||||
// Abort on any end group tag.
|
||||
return;
|
||||
}
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
|
||||
break;
|
||||
case 10: {
|
||||
classes_.AddEntriesFrom(input, _map_classes_codec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
if ((tag & 7) == 4) {
|
||||
// Abort on any end group tag.
|
||||
return;
|
||||
}
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
|
||||
break;
|
||||
case 10: {
|
||||
classes_.AddEntriesFrom(ref input, _map_classes_codec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
|
||||
public sealed partial class Skill : pb::IMessage<Skill>
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
, pb::IBufferMessage
|
||||
#endif
|
||||
{
|
||||
private static readonly pb::MessageParser<Skill> _parser = new pb::MessageParser<Skill>(() => new Skill());
|
||||
private pb::UnknownFieldSet _unknownFields;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pb::MessageParser<Skill> Parser { get { return _parser; } }
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pbr::MessageDescriptor Descriptor {
|
||||
get { return global::Blitzkit.LegacySkillDefinitionsReflection.Descriptor.MessageTypes[1]; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
pbr::MessageDescriptor pb::IMessage.Descriptor {
|
||||
get { return Descriptor; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public Skill() {
|
||||
OnConstruction();
|
||||
}
|
||||
|
||||
partial void OnConstruction();
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public Skill(Skill other) : this() {
|
||||
skills_ = other.skills_.Clone();
|
||||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public Skill Clone() {
|
||||
return new Skill(this);
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "skills" field.</summary>
|
||||
public const int SkillsFieldNumber = 1;
|
||||
private static readonly pb::FieldCodec<string> _repeated_skills_codec
|
||||
= pb::FieldCodec.ForString(10);
|
||||
private readonly pbc::RepeatedField<string> skills_ = new pbc::RepeatedField<string>();
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public pbc::RepeatedField<string> Skills {
|
||||
get { return skills_; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override bool Equals(object other) {
|
||||
return Equals(other as Skill);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public bool Equals(Skill other) {
|
||||
if (ReferenceEquals(other, null)) {
|
||||
return false;
|
||||
}
|
||||
if (ReferenceEquals(other, this)) {
|
||||
return true;
|
||||
}
|
||||
if(!skills_.Equals(other.skills_)) return false;
|
||||
return Equals(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override int GetHashCode() {
|
||||
int hash = 1;
|
||||
hash ^= skills_.GetHashCode();
|
||||
if (_unknownFields != null) {
|
||||
hash ^= _unknownFields.GetHashCode();
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override string ToString() {
|
||||
return pb::JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void WriteTo(pb::CodedOutputStream output) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
output.WriteRawMessage(this);
|
||||
#else
|
||||
skills_.WriteTo(output, _repeated_skills_codec);
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(output);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
|
||||
skills_.WriteTo(ref output, _repeated_skills_codec);
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(ref output);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public int CalculateSize() {
|
||||
int size = 0;
|
||||
size += skills_.CalculateSize(_repeated_skills_codec);
|
||||
if (_unknownFields != null) {
|
||||
size += _unknownFields.CalculateSize();
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(Skill other) {
|
||||
if (other == null) {
|
||||
return;
|
||||
}
|
||||
skills_.Add(other.skills_);
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(pb::CodedInputStream input) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
input.ReadRawMessage(this);
|
||||
#else
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
if ((tag & 7) == 4) {
|
||||
// Abort on any end group tag.
|
||||
return;
|
||||
}
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
|
||||
break;
|
||||
case 10: {
|
||||
skills_.AddEntriesFrom(input, _repeated_skills_codec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
if ((tag & 7) == 4) {
|
||||
// Abort on any end group tag.
|
||||
return;
|
||||
}
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
|
||||
break;
|
||||
case 10: {
|
||||
skills_.AddEntriesFrom(ref input, _repeated_skills_codec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
#endregion Designer generated code
|
||||
File diff suppressed because it is too large.
Load diff
@@ -25,56 +25,17 @@ namespace Blitzkit {
|
||||
byte[] descriptorData = global::System.Convert.FromBase64String(
|
||||
string.Concat(
|
||||
"CiNwYWNrYWdlcy9jb3JlL3NyYy9wcm90b3MvdGFuay5wcm90bxIIYmxpdHpr",
|
||||
"aXQaI3BhY2thZ2VzL2NvcmUvc3JjL3Byb3Rvcy9pMThuLnByb3RvInYKBFRh",
|
||||
"bmsSCgoCaWQYASACKAkSHAoEbmFtZRgCIAIoCzIOLmJsaXR6a2l0LkkxOG4S",
|
||||
"IgoFY2xhc3MYAyACKA4yEy5ibGl0emtpdC5UYW5rQ2xhc3MSIAoEdHlwZRgE",
|
||||
"IAIoDjISLmJsaXR6a2l0LlRhbmtUeXBlKkEKCVRhbmtDbGFzcxIJCgVMSUdI",
|
||||
"VBABEgoKBk1FRElVTRACEgkKBUhFQVZZEAMSEgoOVEFOS19ERVNUUk9ZRVIQ",
|
||||
"BCo4CghUYW5rVHlwZRIQCgxSRVNFQVJDSEFCTEUQARILCgdQUkVNSVVNEAIS",
|
||||
"DQoJQ09MTEVDVE9SEAMqLwoJU2hlbGxUeXBlEgYKAkFQEAESCAoEQVBDUhAC",
|
||||
"EggKBEhFQVQQAxIGCgJIRRAEKksKCENyZXdUeXBlEg0KCUNPTU1BTkRFUhAB",
|
||||
"EgoKBkRSSVZFUhACEgoKBkdVTk5FUhADEgoKBkxPQURFUhAEEgwKCFJBRElP",
|
||||
"TUFOEAU="));
|
||||
"aXQaI3BhY2thZ2VzL2NvcmUvc3JjL3Byb3Rvcy9pMThuLnByb3RvIjAKBFRh",
|
||||
"bmsSCgoCaWQYASACKAkSHAoEbmFtZRgCIAIoCzIOLmJsaXR6a2l0LkkxOG4="));
|
||||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
|
||||
new pbr::FileDescriptor[] { global::Blitzkit.I18NReflection.Descriptor, },
|
||||
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Blitzkit.TankClass), typeof(global::Blitzkit.TankType), typeof(global::Blitzkit.ShellType), typeof(global::Blitzkit.CrewType), }, null, new pbr::GeneratedClrTypeInfo[] {
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.Tank), global::Blitzkit.Tank.Parser, new[]{ "Id", "Name", "Class", "Type" }, null, null, null, null)
|
||||
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.Tank), global::Blitzkit.Tank.Parser, new[]{ "Id", "Name" }, null, null, null, null)
|
||||
}));
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
#region Enums
|
||||
public enum TankClass {
|
||||
[pbr::OriginalName("LIGHT")] Light = 1,
|
||||
[pbr::OriginalName("MEDIUM")] Medium = 2,
|
||||
[pbr::OriginalName("HEAVY")] Heavy = 3,
|
||||
[pbr::OriginalName("TANK_DESTROYER")] TankDestroyer = 4,
|
||||
}
|
||||
|
||||
public enum TankType {
|
||||
[pbr::OriginalName("RESEARCHABLE")] Researchable = 1,
|
||||
[pbr::OriginalName("PREMIUM")] Premium = 2,
|
||||
[pbr::OriginalName("COLLECTOR")] Collector = 3,
|
||||
}
|
||||
|
||||
public enum ShellType {
|
||||
[pbr::OriginalName("AP")] Ap = 1,
|
||||
[pbr::OriginalName("APCR")] Apcr = 2,
|
||||
[pbr::OriginalName("HEAT")] Heat = 3,
|
||||
[pbr::OriginalName("HE")] He = 4,
|
||||
}
|
||||
|
||||
public enum CrewType {
|
||||
[pbr::OriginalName("COMMANDER")] Commander = 1,
|
||||
[pbr::OriginalName("DRIVER")] Driver = 2,
|
||||
[pbr::OriginalName("GUNNER")] Gunner = 3,
|
||||
[pbr::OriginalName("LOADER")] Loader = 4,
|
||||
[pbr::OriginalName("RADIOMAN")] Radioman = 5,
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Messages
|
||||
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
|
||||
public sealed partial class Tank : pb::IMessage<Tank>
|
||||
@@ -84,7 +45,6 @@ namespace Blitzkit {
|
||||
{
|
||||
private static readonly pb::MessageParser<Tank> _parser = new pb::MessageParser<Tank>(() => new Tank());
|
||||
private pb::UnknownFieldSet _unknownFields;
|
||||
private int _hasBits0;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pb::MessageParser<Tank> Parser { get { return _parser; } }
|
||||
@@ -112,11 +72,8 @@ namespace Blitzkit {
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public Tank(Tank other) : this() {
|
||||
_hasBits0 = other._hasBits0;
|
||||
id_ = other.id_;
|
||||
name_ = other.name_ != null ? other.name_.Clone() : null;
|
||||
class_ = other.class_;
|
||||
type_ = other.type_;
|
||||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
||||
}
|
||||
|
||||
@@ -164,60 +121,6 @@ namespace Blitzkit {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "class" field.</summary>
|
||||
public const int ClassFieldNumber = 3;
|
||||
private readonly static global::Blitzkit.TankClass ClassDefaultValue = global::Blitzkit.TankClass.Light;
|
||||
|
||||
private global::Blitzkit.TankClass class_;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public global::Blitzkit.TankClass Class {
|
||||
get { if ((_hasBits0 & 1) != 0) { return class_; } else { return ClassDefaultValue; } }
|
||||
set {
|
||||
_hasBits0 |= 1;
|
||||
class_ = value;
|
||||
}
|
||||
}
|
||||
/// <summary>Gets whether the "class" field is set</summary>
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public bool HasClass {
|
||||
get { return (_hasBits0 & 1) != 0; }
|
||||
}
|
||||
/// <summary>Clears the value of the "class" field</summary>
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void ClearClass() {
|
||||
_hasBits0 &= ~1;
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "type" field.</summary>
|
||||
public const int TypeFieldNumber = 4;
|
||||
private readonly static global::Blitzkit.TankType TypeDefaultValue = global::Blitzkit.TankType.Researchable;
|
||||
|
||||
private global::Blitzkit.TankType type_;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public global::Blitzkit.TankType Type {
|
||||
get { if ((_hasBits0 & 2) != 0) { return type_; } else { return TypeDefaultValue; } }
|
||||
set {
|
||||
_hasBits0 |= 2;
|
||||
type_ = value;
|
||||
}
|
||||
}
|
||||
/// <summary>Gets whether the "type" field is set</summary>
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public bool HasType {
|
||||
get { return (_hasBits0 & 2) != 0; }
|
||||
}
|
||||
/// <summary>Clears the value of the "type" field</summary>
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void ClearType() {
|
||||
_hasBits0 &= ~2;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override bool Equals(object other) {
|
||||
@@ -235,8 +138,6 @@ namespace Blitzkit {
|
||||
}
|
||||
if (Id != other.Id) return false;
|
||||
if (!object.Equals(Name, other.Name)) return false;
|
||||
if (Class != other.Class) return false;
|
||||
if (Type != other.Type) return false;
|
||||
return Equals(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
@@ -246,8 +147,6 @@ namespace Blitzkit {
|
||||
int hash = 1;
|
||||
if (HasId) hash ^= Id.GetHashCode();
|
||||
if (name_ != null) hash ^= Name.GetHashCode();
|
||||
if (HasClass) hash ^= Class.GetHashCode();
|
||||
if (HasType) hash ^= Type.GetHashCode();
|
||||
if (_unknownFields != null) {
|
||||
hash ^= _unknownFields.GetHashCode();
|
||||
}
|
||||
@@ -274,14 +173,6 @@ namespace Blitzkit {
|
||||
output.WriteRawTag(18);
|
||||
output.WriteMessage(Name);
|
||||
}
|
||||
if (HasClass) {
|
||||
output.WriteRawTag(24);
|
||||
output.WriteEnum((int) Class);
|
||||
}
|
||||
if (HasType) {
|
||||
output.WriteRawTag(32);
|
||||
output.WriteEnum((int) Type);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(output);
|
||||
}
|
||||
@@ -300,14 +191,6 @@ namespace Blitzkit {
|
||||
output.WriteRawTag(18);
|
||||
output.WriteMessage(Name);
|
||||
}
|
||||
if (HasClass) {
|
||||
output.WriteRawTag(24);
|
||||
output.WriteEnum((int) Class);
|
||||
}
|
||||
if (HasType) {
|
||||
output.WriteRawTag(32);
|
||||
output.WriteEnum((int) Type);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(ref output);
|
||||
}
|
||||
@@ -324,12 +207,6 @@ namespace Blitzkit {
|
||||
if (name_ != null) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeMessageSize(Name);
|
||||
}
|
||||
if (HasClass) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Class);
|
||||
}
|
||||
if (HasType) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
size += _unknownFields.CalculateSize();
|
||||
}
|
||||
@@ -351,12 +228,6 @@ namespace Blitzkit {
|
||||
}
|
||||
Name.MergeFrom(other.Name);
|
||||
}
|
||||
if (other.HasClass) {
|
||||
Class = other.Class;
|
||||
}
|
||||
if (other.HasType) {
|
||||
Type = other.Type;
|
||||
}
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
@@ -387,14 +258,6 @@ namespace Blitzkit {
|
||||
input.ReadMessage(Name);
|
||||
break;
|
||||
}
|
||||
case 24: {
|
||||
Class = (global::Blitzkit.TankClass) input.ReadEnum();
|
||||
break;
|
||||
}
|
||||
case 32: {
|
||||
Type = (global::Blitzkit.TankType) input.ReadEnum();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -425,14 +288,6 @@ namespace Blitzkit {
|
||||
input.ReadMessage(Name);
|
||||
break;
|
||||
}
|
||||
case 24: {
|
||||
Class = (global::Blitzkit.TankClass) input.ReadEnum();
|
||||
break;
|
||||
}
|
||||
case 32: {
|
||||
Type = (global::Blitzkit.TankType) input.ReadEnum();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user