diff --git a/packages/core/src/protos/index.ts b/packages/core/src/protos/index.ts index f87d3c6e4..e1c0cba22 100644 --- a/packages/core/src/protos/index.ts +++ b/packages/core/src/protos/index.ts @@ -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'; \ No newline at end of file diff --git a/packages/core/src/protos/legacy_average_definitions.proto b/packages/core/src/protos/legacy_average_definitions.proto new file mode 100644 index 000000000..3844b4738 --- /dev/null +++ b/packages/core/src/protos/legacy_average_definitions.proto @@ -0,0 +1,47 @@ +syntax = "proto2"; + +package blitzkit; + +message AverageDefinitions { + map 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; +} \ No newline at end of file diff --git a/packages/core/src/protos/legacy_average_definitions.ts b/packages/core/src/protos/legacy_average_definitions.ts new file mode 100644 index 000000000..ebf15ee3e --- /dev/null +++ b/packages/core/src/protos/legacy_average_definitions.ts @@ -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 = { + 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>>(base?: I): AverageDefinitions { + return AverageDefinitions.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 = { + 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>>( + base?: I, + ): AverageDefinitions_AveragesEntry { + return AverageDefinitions_AveragesEntry.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 = { + 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>>(base?: I): AverageDefinitionsEntry { + return AverageDefinitionsEntry.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 = { + 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>>(base?: I): AverageDefinitionsAllStats { + return AverageDefinitionsAllStats.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 = { + 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>>(base?: I): Samples { + return Samples.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends { $case: string; value: unknown } ? { $case: T["$case"]; value?: DeepPartial } + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: 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(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 { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; + fromJSON(object: any): T; + toJSON(message: T): unknown; + create, I>>(base?: I): T; + fromPartial, I>>(object: I): T; +} diff --git a/packages/core/src/protos/legacy_camouflage_definitions.proto b/packages/core/src/protos/legacy_camouflage_definitions.proto new file mode 100644 index 000000000..b5a09387e --- /dev/null +++ b/packages/core/src/protos/legacy_camouflage_definitions.proto @@ -0,0 +1,16 @@ +syntax = "proto2"; + +package blitzkit; + +import "packages/core/src/protos/legacy_i18n.proto"; + +message CamouflageDefinitions { + map camouflages = 1; +} + +message Camouflage { + required uint32 id = 1; + required I18nString name = 2; + optional I18nString tank_name = 3; + optional I18nString tank_name_full = 4; +} \ No newline at end of file diff --git a/packages/core/src/protos/legacy_camouflage_definitions.ts b/packages/core/src/protos/legacy_camouflage_definitions.ts new file mode 100644 index 000000000..70c5a4727 --- /dev/null +++ b/packages/core/src/protos/legacy_camouflage_definitions.ts @@ -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 = { + 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>>(base?: I): CamouflageDefinitions { + return CamouflageDefinitions.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 = { + 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>>( + base?: I, + ): CamouflageDefinitions_CamouflagesEntry { + return CamouflageDefinitions_CamouflagesEntry.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 = { + 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>>(base?: I): Camouflage { + return Camouflage.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends { $case: string; value: unknown } ? { $case: T["$case"]; value?: DeepPartial } + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isObject(value: any): boolean { + return typeof value === "object" && value !== null; +} + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} + +function assertSet(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 { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; + fromJSON(object: any): T; + toJSON(message: T): unknown; + create, I>>(base?: I): T; + fromPartial, I>>(object: I): T; +} diff --git a/packages/core/src/protos/legacy_consumable_definitions.proto b/packages/core/src/protos/legacy_consumable_definitions.proto new file mode 100644 index 000000000..fedf222ed --- /dev/null +++ b/packages/core/src/protos/legacy_consumable_definitions.proto @@ -0,0 +1,49 @@ +syntax = "proto2"; + +package blitzkit; + +import "packages/core/src/protos/legacy_i18n.proto"; + +message ConsumableDefinitions { + map 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; +} \ No newline at end of file diff --git a/packages/core/src/protos/legacy_consumable_definitions.ts b/packages/core/src/protos/legacy_consumable_definitions.ts new file mode 100644 index 000000000..41352715c --- /dev/null +++ b/packages/core/src/protos/legacy_consumable_definitions.ts @@ -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 = { + 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>>(base?: I): ConsumableDefinitions { + return ConsumableDefinitions.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 = { + 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>>( + base?: I, + ): ConsumableDefinitions_ConsumablesEntry { + return ConsumableDefinitions_ConsumablesEntry.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 = { + 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>>(base?: I): Consumable { + return Consumable.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 = { + 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>>(base?: I): ConsumableTankFilter { + return ConsumableTankFilter.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 = { + 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>>(base?: I): ConsumableTankTierFilter { + return ConsumableTankTierFilter.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 = { + 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>>(base?: I): ConsumableTankIdsFilter { + return ConsumableTankIdsFilter.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 = { + 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>>(base?: I): ConsumableTankCategoryFilter { + return ConsumableTankCategoryFilter.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 = { + 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>>(base?: I): ConsumableTankNationFilter { + return ConsumableTankNationFilter.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends { $case: string; value: unknown } ? { $case: T["$case"]; value?: DeepPartial } + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isObject(value: any): boolean { + return typeof value === "object" && value !== null; +} + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} + +function assertSet(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 { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; + fromJSON(object: any): T; + toJSON(message: T): unknown; + create, I>>(base?: I): T; + fromPartial, I>>(object: I): T; +} diff --git a/packages/core/src/protos/legacy_equipment_definitions.proto b/packages/core/src/protos/legacy_equipment_definitions.proto new file mode 100644 index 000000000..bf78ebe2c --- /dev/null +++ b/packages/core/src/protos/legacy_equipment_definitions.proto @@ -0,0 +1,24 @@ +syntax = "proto2"; + +package blitzkit; + +import "packages/core/src/protos/legacy_i18n.proto"; + +message EquipmentDefinitions { + map presets = 1; + map 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; +} \ No newline at end of file diff --git a/packages/core/src/protos/legacy_equipment_definitions.ts b/packages/core/src/protos/legacy_equipment_definitions.ts new file mode 100644 index 000000000..18276dc7d --- /dev/null +++ b/packages/core/src/protos/legacy_equipment_definitions.ts @@ -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 = { + 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>>(base?: I): EquipmentDefinitions { + return EquipmentDefinitions.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 = { + 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>>( + base?: I, + ): EquipmentDefinitions_PresetsEntry { + return EquipmentDefinitions_PresetsEntry.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 = { + 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>>( + base?: I, + ): EquipmentDefinitions_EquipmentsEntry { + return EquipmentDefinitions_EquipmentsEntry.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 = { + 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>>(base?: I): Equipment { + return Equipment.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 = { + 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>>(base?: I): EquipmentPreset { + return EquipmentPreset.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 = { + 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>>(base?: I): EquipmentSlot { + return EquipmentSlot.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends { $case: string; value: unknown } ? { $case: T["$case"]; value?: DeepPartial } + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isObject(value: any): boolean { + return typeof value === "object" && value !== null; +} + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} + +function assertSet(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 { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; + fromJSON(object: any): T; + toJSON(message: T): unknown; + create, I>>(base?: I): T; + fromPartial, I>>(object: I): T; +} diff --git a/packages/core/src/protos/legacy_game_definitions.proto b/packages/core/src/protos/legacy_game_definitions.proto new file mode 100644 index 000000000..24fe993ce --- /dev/null +++ b/packages/core/src/protos/legacy_game_definitions.proto @@ -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 gameModes = 3; + map roles = 4; +} + +message GameMode { + required I18nString name = 1; +} + +message GameModeRole { + repeated uint32 provisions = 1; + repeated uint32 consumables = 2; +} \ No newline at end of file diff --git a/packages/core/src/protos/legacy_game_definitions.ts b/packages/core/src/protos/legacy_game_definitions.ts new file mode 100644 index 000000000..71762e823 --- /dev/null +++ b/packages/core/src/protos/legacy_game_definitions.ts @@ -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 = { + 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>>(base?: I): GameDefinitions { + return GameDefinitions.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 = { + 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>>(base?: I): GameDefinitions_GameModesEntry { + return GameDefinitions_GameModesEntry.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 = { + 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>>(base?: I): GameDefinitions_RolesEntry { + return GameDefinitions_RolesEntry.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 = { + 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>>(base?: I): GameMode { + return GameMode.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 = { + 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>>(base?: I): GameModeRole { + return GameModeRole.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends { $case: string; value: unknown } ? { $case: T["$case"]; value?: DeepPartial } + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isObject(value: any): boolean { + return typeof value === "object" && value !== null; +} + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} + +function assertSet(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 { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; + fromJSON(object: any): T; + toJSON(message: T): unknown; + create, I>>(base?: I): T; + fromPartial, I>>(object: I): T; +} diff --git a/packages/core/src/protos/legacy_i18n.proto b/packages/core/src/protos/legacy_i18n.proto new file mode 100644 index 000000000..2c31070df --- /dev/null +++ b/packages/core/src/protos/legacy_i18n.proto @@ -0,0 +1,7 @@ +syntax = "proto2"; + +package blitzkit; + +message I18nString { + map locales = 1; +} \ No newline at end of file diff --git a/packages/core/src/protos/legacy_i18n.ts b/packages/core/src/protos/legacy_i18n.ts new file mode 100644 index 000000000..bc7203097 --- /dev/null +++ b/packages/core/src/protos/legacy_i18n.ts @@ -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 = { + 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>>(base?: I): I18nString { + return I18nString.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 = { + 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>>(base?: I): I18nString_LocalesEntry { + return I18nString_LocalesEntry.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends { $case: string; value: unknown } ? { $case: T["$case"]; value?: DeepPartial } + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isObject(value: any): boolean { + return typeof value === "object" && value !== null; +} + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} + +function assertSet(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 { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; + fromJSON(object: any): T; + toJSON(message: T): unknown; + create, I>>(base?: I): T; + fromPartial, I>>(object: I): T; +} diff --git a/packages/core/src/protos/legacy_map_definitions.proto b/packages/core/src/protos/legacy_map_definitions.proto new file mode 100644 index 000000000..8c98e3efa --- /dev/null +++ b/packages/core/src/protos/legacy_map_definitions.proto @@ -0,0 +1,14 @@ +syntax = "proto2"; + +package blitzkit; + +import "packages/core/src/protos/legacy_i18n.proto"; + +message MapDefinitions { + map maps = 1; +} + +message MapDefinition { + required uint32 id = 1; + required I18nString name = 2; +} \ No newline at end of file diff --git a/packages/core/src/protos/legacy_map_definitions.ts b/packages/core/src/protos/legacy_map_definitions.ts new file mode 100644 index 000000000..c09dc4584 --- /dev/null +++ b/packages/core/src/protos/legacy_map_definitions.ts @@ -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 = { + 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>>(base?: I): MapDefinitions { + return MapDefinitions.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 = { + 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>>(base?: I): MapDefinitions_MapsEntry { + return MapDefinitions_MapsEntry.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 = { + 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>>(base?: I): MapDefinition { + return MapDefinition.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends { $case: string; value: unknown } ? { $case: T["$case"]; value?: DeepPartial } + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isObject(value: any): boolean { + return typeof value === "object" && value !== null; +} + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} + +function assertSet(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 { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; + fromJSON(object: any): T; + toJSON(message: T): unknown; + create, I>>(base?: I): T; + fromPartial, I>>(object: I): T; +} diff --git a/packages/core/src/protos/legacy_model_definitions.proto b/packages/core/src/protos/legacy_model_definitions.proto new file mode 100644 index 000000000..170141c14 --- /dev/null +++ b/packages/core/src/protos/legacy_model_definitions.proto @@ -0,0 +1,79 @@ +syntax = "proto2"; + +package blitzkit; + +message ModelDefinitions { + map models = 1; +} + +message ModelDefinition { + required Armor armor = 1; + required Vector3 turret_origin = 2; + optional InitialTurretRotation initial_turret_rotation = 3; + map turrets = 4; + map tracks = 5; + required BoundingBox bounding_box = 6; +} + +message Armor { + map 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 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; +} \ No newline at end of file diff --git a/packages/core/src/protos/legacy_model_definitions.ts b/packages/core/src/protos/legacy_model_definitions.ts new file mode 100644 index 000000000..a04ca542f --- /dev/null +++ b/packages/core/src/protos/legacy_model_definitions.ts @@ -0,0 +1,1874 @@ +// 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_model_definitions.proto + +/* eslint-disable */ +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; + +export const protobufPackage = "blitzkit"; + +export interface ModelDefinitions { + models: { [key: number]: ModelDefinition }; +} + +export interface ModelDefinitions_ModelsEntry { + key: number; + value: ModelDefinition | undefined; +} + +export interface ModelDefinition { + armor: Armor; + turret_origin: Vector3; + initial_turret_rotation?: InitialTurretRotation | undefined; + turrets: { [key: number]: TurretModelDefinition }; + tracks: { [key: number]: TrackModelDefinition }; + bounding_box: BoundingBox; +} + +export interface ModelDefinition_TurretsEntry { + key: number; + value: TurretModelDefinition | undefined; +} + +export interface ModelDefinition_TracksEntry { + key: number; + value: TrackModelDefinition | undefined; +} + +export interface Armor { + thickness: { [key: number]: number }; + spaced: number[]; +} + +export interface Armor_ThicknessEntry { + key: number; + value: number; +} + +export interface Vector3 { + x: number; + y: number; + z: number; +} + +export interface InitialTurretRotation { + yaw: number; + pitch: number; + roll: number; +} + +export interface TurretModelDefinition { + bounding_box: BoundingBox; + armor: Armor; + model_id: number; + gun_origin: Vector3; + guns: { [key: number]: GunModelDefinition }; + yaw?: YawLimits | undefined; +} + +export interface TurretModelDefinition_GunsEntry { + key: number; + value: GunModelDefinition | undefined; +} + +export interface YawLimits { + min: number; + max: number; +} + +export interface BoundingBox { + min: Vector3; + max: Vector3; +} + +export interface TrackModelDefinition { + thickness: number; + origin: Vector3; +} + +export interface GunModelDefinition { + armor: Armor; + thickness: number; + model_id: number; + pitch: PitchLimits; + mask?: number | undefined; +} + +export interface PitchLimits { + min: number; + max: number; + front?: PitchLimitsExtrema | undefined; + back?: PitchLimitsExtrema | undefined; + transition?: number | undefined; +} + +export interface PitchLimitsExtrema { + min: number; + max: number; + range: number; +} + +function createBaseModelDefinitions(): ModelDefinitions { + return { models: {} }; +} + +export const ModelDefinitions: MessageFns = { + encode(message: ModelDefinitions, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + Object.entries(message.models).forEach(([key, value]) => { + ModelDefinitions_ModelsEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join(); + }); + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): ModelDefinitions { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseModelDefinitions(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break; + } + + const entry1 = ModelDefinitions_ModelsEntry.decode(reader, reader.uint32()); + if (entry1.value !== undefined) { + message.models[entry1.key] = entry1.value; + } + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): ModelDefinitions { + return { + models: isObject(object.models) + ? Object.entries(object.models).reduce<{ [key: number]: ModelDefinition }>((acc, [key, value]) => { + acc[globalThis.Number(key)] = ModelDefinition.fromJSON(value); + return acc; + }, {}) + : {}, + }; + }, + + toJSON(message: ModelDefinitions): unknown { + const obj: any = {}; + if (message.models) { + const entries = Object.entries(message.models); + if (entries.length > 0) { + obj.models = {}; + entries.forEach(([k, v]) => { + obj.models[k] = ModelDefinition.toJSON(v); + }); + } + } + return obj; + }, + + create, I>>(base?: I): ModelDefinitions { + return ModelDefinitions.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): ModelDefinitions { + const message = createBaseModelDefinitions(); + message.models = Object.entries(object.models ?? {}).reduce<{ [key: number]: ModelDefinition }>( + (acc, [key, value]) => { + if (value !== undefined) { + acc[globalThis.Number(key)] = ModelDefinition.fromPartial(value); + } + return acc; + }, + {}, + ); + return message; + }, +}; + +function createBaseModelDefinitions_ModelsEntry(): ModelDefinitions_ModelsEntry { + return { key: 0, value: createBaseModelDefinition() }; +} + +export const ModelDefinitions_ModelsEntry: MessageFns = { + encode(message: ModelDefinitions_ModelsEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.key !== undefined) { + writer.uint32(8).uint32(message.key); + } + if (message.value !== undefined) { + ModelDefinition.encode(message.value, writer.uint32(18).fork()).join(); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): ModelDefinitions_ModelsEntry { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseModelDefinitions_ModelsEntry(); + 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 = ModelDefinition.decode(reader, reader.uint32()); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): ModelDefinitions_ModelsEntry { + return { + key: globalThis.Number(assertSet("ModelDefinitions_ModelsEntry.key", object.key)), + value: ModelDefinition.fromJSON(assertSet("ModelDefinitions_ModelsEntry.value", object.value)), + }; + }, + + toJSON(message: ModelDefinitions_ModelsEntry): unknown { + const obj: any = {}; + if (message.key !== undefined) { + obj.key = Math.round(message.key); + } + if (message.value !== undefined) { + obj.value = ModelDefinition.toJSON(message.value); + } + return obj; + }, + + create, I>>(base?: I): ModelDefinitions_ModelsEntry { + return ModelDefinitions_ModelsEntry.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): ModelDefinitions_ModelsEntry { + const message = createBaseModelDefinitions_ModelsEntry(); + message.key = object.key ?? 0; + message.value = (object.value !== undefined && object.value !== null) + ? ModelDefinition.fromPartial(object.value) + : undefined; + return message; + }, +}; + +function createBaseModelDefinition(): ModelDefinition { + return { + armor: createBaseArmor(), + turret_origin: createBaseVector3(), + initial_turret_rotation: undefined, + turrets: {}, + tracks: {}, + bounding_box: createBaseBoundingBox(), + }; +} + +export const ModelDefinition: MessageFns = { + encode(message: ModelDefinition, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.armor !== undefined) { + Armor.encode(message.armor, writer.uint32(10).fork()).join(); + } + if (message.turret_origin !== undefined) { + Vector3.encode(message.turret_origin, writer.uint32(18).fork()).join(); + } + if (message.initial_turret_rotation !== undefined) { + InitialTurretRotation.encode(message.initial_turret_rotation, writer.uint32(26).fork()).join(); + } + Object.entries(message.turrets).forEach(([key, value]) => { + ModelDefinition_TurretsEntry.encode({ key: key as any, value }, writer.uint32(34).fork()).join(); + }); + Object.entries(message.tracks).forEach(([key, value]) => { + ModelDefinition_TracksEntry.encode({ key: key as any, value }, writer.uint32(42).fork()).join(); + }); + if (message.bounding_box !== undefined) { + BoundingBox.encode(message.bounding_box, writer.uint32(50).fork()).join(); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): ModelDefinition { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseModelDefinition(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break; + } + + message.armor = Armor.decode(reader, reader.uint32()); + continue; + } + case 2: { + if (tag !== 18) { + break; + } + + message.turret_origin = Vector3.decode(reader, reader.uint32()); + continue; + } + case 3: { + if (tag !== 26) { + break; + } + + message.initial_turret_rotation = InitialTurretRotation.decode(reader, reader.uint32()); + continue; + } + case 4: { + if (tag !== 34) { + break; + } + + const entry4 = ModelDefinition_TurretsEntry.decode(reader, reader.uint32()); + if (entry4.value !== undefined) { + message.turrets[entry4.key] = entry4.value; + } + continue; + } + case 5: { + if (tag !== 42) { + break; + } + + const entry5 = ModelDefinition_TracksEntry.decode(reader, reader.uint32()); + if (entry5.value !== undefined) { + message.tracks[entry5.key] = entry5.value; + } + continue; + } + case 6: { + if (tag !== 50) { + break; + } + + message.bounding_box = BoundingBox.decode(reader, reader.uint32()); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): ModelDefinition { + return { + armor: Armor.fromJSON(assertSet("ModelDefinition.armor", object.armor)), + turret_origin: Vector3.fromJSON(assertSet("ModelDefinition.turret_origin", object.turret_origin)), + initial_turret_rotation: isSet(object.initial_turret_rotation) + ? InitialTurretRotation.fromJSON(object.initial_turret_rotation) + : undefined, + turrets: isObject(object.turrets) + ? Object.entries(object.turrets).reduce<{ [key: number]: TurretModelDefinition }>((acc, [key, value]) => { + acc[globalThis.Number(key)] = TurretModelDefinition.fromJSON(value); + return acc; + }, {}) + : {}, + tracks: isObject(object.tracks) + ? Object.entries(object.tracks).reduce<{ [key: number]: TrackModelDefinition }>((acc, [key, value]) => { + acc[globalThis.Number(key)] = TrackModelDefinition.fromJSON(value); + return acc; + }, {}) + : {}, + bounding_box: BoundingBox.fromJSON(assertSet("ModelDefinition.bounding_box", object.bounding_box)), + }; + }, + + toJSON(message: ModelDefinition): unknown { + const obj: any = {}; + if (message.armor !== undefined) { + obj.armor = Armor.toJSON(message.armor); + } + if (message.turret_origin !== undefined) { + obj.turret_origin = Vector3.toJSON(message.turret_origin); + } + if (message.initial_turret_rotation !== undefined) { + obj.initial_turret_rotation = InitialTurretRotation.toJSON(message.initial_turret_rotation); + } + if (message.turrets) { + const entries = Object.entries(message.turrets); + if (entries.length > 0) { + obj.turrets = {}; + entries.forEach(([k, v]) => { + obj.turrets[k] = TurretModelDefinition.toJSON(v); + }); + } + } + if (message.tracks) { + const entries = Object.entries(message.tracks); + if (entries.length > 0) { + obj.tracks = {}; + entries.forEach(([k, v]) => { + obj.tracks[k] = TrackModelDefinition.toJSON(v); + }); + } + } + if (message.bounding_box !== undefined) { + obj.bounding_box = BoundingBox.toJSON(message.bounding_box); + } + return obj; + }, + + create, I>>(base?: I): ModelDefinition { + return ModelDefinition.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): ModelDefinition { + const message = createBaseModelDefinition(); + message.armor = (object.armor !== undefined && object.armor !== null) + ? Armor.fromPartial(object.armor) + : createBaseArmor(); + message.turret_origin = (object.turret_origin !== undefined && object.turret_origin !== null) + ? Vector3.fromPartial(object.turret_origin) + : createBaseVector3(); + message.initial_turret_rotation = + (object.initial_turret_rotation !== undefined && object.initial_turret_rotation !== null) + ? InitialTurretRotation.fromPartial(object.initial_turret_rotation) + : undefined; + message.turrets = Object.entries(object.turrets ?? {}).reduce<{ [key: number]: TurretModelDefinition }>( + (acc, [key, value]) => { + if (value !== undefined) { + acc[globalThis.Number(key)] = TurretModelDefinition.fromPartial(value); + } + return acc; + }, + {}, + ); + message.tracks = Object.entries(object.tracks ?? {}).reduce<{ [key: number]: TrackModelDefinition }>( + (acc, [key, value]) => { + if (value !== undefined) { + acc[globalThis.Number(key)] = TrackModelDefinition.fromPartial(value); + } + return acc; + }, + {}, + ); + message.bounding_box = (object.bounding_box !== undefined && object.bounding_box !== null) + ? BoundingBox.fromPartial(object.bounding_box) + : createBaseBoundingBox(); + return message; + }, +}; + +function createBaseModelDefinition_TurretsEntry(): ModelDefinition_TurretsEntry { + return { key: 0, value: createBaseTurretModelDefinition() }; +} + +export const ModelDefinition_TurretsEntry: MessageFns = { + encode(message: ModelDefinition_TurretsEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.key !== undefined) { + writer.uint32(8).uint32(message.key); + } + if (message.value !== undefined) { + TurretModelDefinition.encode(message.value, writer.uint32(18).fork()).join(); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): ModelDefinition_TurretsEntry { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseModelDefinition_TurretsEntry(); + 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 = TurretModelDefinition.decode(reader, reader.uint32()); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): ModelDefinition_TurretsEntry { + return { + key: globalThis.Number(assertSet("ModelDefinition_TurretsEntry.key", object.key)), + value: TurretModelDefinition.fromJSON(assertSet("ModelDefinition_TurretsEntry.value", object.value)), + }; + }, + + toJSON(message: ModelDefinition_TurretsEntry): unknown { + const obj: any = {}; + if (message.key !== undefined) { + obj.key = Math.round(message.key); + } + if (message.value !== undefined) { + obj.value = TurretModelDefinition.toJSON(message.value); + } + return obj; + }, + + create, I>>(base?: I): ModelDefinition_TurretsEntry { + return ModelDefinition_TurretsEntry.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): ModelDefinition_TurretsEntry { + const message = createBaseModelDefinition_TurretsEntry(); + message.key = object.key ?? 0; + message.value = (object.value !== undefined && object.value !== null) + ? TurretModelDefinition.fromPartial(object.value) + : undefined; + return message; + }, +}; + +function createBaseModelDefinition_TracksEntry(): ModelDefinition_TracksEntry { + return { key: 0, value: createBaseTrackModelDefinition() }; +} + +export const ModelDefinition_TracksEntry: MessageFns = { + encode(message: ModelDefinition_TracksEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.key !== undefined) { + writer.uint32(8).uint32(message.key); + } + if (message.value !== undefined) { + TrackModelDefinition.encode(message.value, writer.uint32(18).fork()).join(); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): ModelDefinition_TracksEntry { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseModelDefinition_TracksEntry(); + 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 = TrackModelDefinition.decode(reader, reader.uint32()); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): ModelDefinition_TracksEntry { + return { + key: globalThis.Number(assertSet("ModelDefinition_TracksEntry.key", object.key)), + value: TrackModelDefinition.fromJSON(assertSet("ModelDefinition_TracksEntry.value", object.value)), + }; + }, + + toJSON(message: ModelDefinition_TracksEntry): unknown { + const obj: any = {}; + if (message.key !== undefined) { + obj.key = Math.round(message.key); + } + if (message.value !== undefined) { + obj.value = TrackModelDefinition.toJSON(message.value); + } + return obj; + }, + + create, I>>(base?: I): ModelDefinition_TracksEntry { + return ModelDefinition_TracksEntry.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): ModelDefinition_TracksEntry { + const message = createBaseModelDefinition_TracksEntry(); + message.key = object.key ?? 0; + message.value = (object.value !== undefined && object.value !== null) + ? TrackModelDefinition.fromPartial(object.value) + : undefined; + return message; + }, +}; + +function createBaseArmor(): Armor { + return { thickness: {}, spaced: [] }; +} + +export const Armor: MessageFns = { + encode(message: Armor, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + Object.entries(message.thickness).forEach(([key, value]) => { + Armor_ThicknessEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join(); + }); + writer.uint32(18).fork(); + for (const v of message.spaced) { + writer.uint32(v); + } + writer.join(); + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): Armor { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseArmor(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break; + } + + const entry1 = Armor_ThicknessEntry.decode(reader, reader.uint32()); + if (entry1.value !== undefined) { + message.thickness[entry1.key] = entry1.value; + } + continue; + } + case 2: { + if (tag === 16) { + message.spaced.push(reader.uint32()); + + continue; + } + + if (tag === 18) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + message.spaced.push(reader.uint32()); + } + + continue; + } + + break; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): Armor { + return { + thickness: isObject(object.thickness) + ? Object.entries(object.thickness).reduce<{ [key: number]: number }>((acc, [key, value]) => { + acc[globalThis.Number(key)] = Number(value); + return acc; + }, {}) + : {}, + spaced: globalThis.Array.isArray(object?.spaced) ? object.spaced.map((e: any) => globalThis.Number(e)) : [], + }; + }, + + toJSON(message: Armor): unknown { + const obj: any = {}; + if (message.thickness) { + const entries = Object.entries(message.thickness); + if (entries.length > 0) { + obj.thickness = {}; + entries.forEach(([k, v]) => { + obj.thickness[k] = v; + }); + } + } + if (message.spaced?.length) { + obj.spaced = message.spaced.map((e) => Math.round(e)); + } + return obj; + }, + + create, I>>(base?: I): Armor { + return Armor.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Armor { + const message = createBaseArmor(); + message.thickness = Object.entries(object.thickness ?? {}).reduce<{ [key: number]: number }>( + (acc, [key, value]) => { + if (value !== undefined) { + acc[globalThis.Number(key)] = globalThis.Number(value); + } + return acc; + }, + {}, + ); + message.spaced = object.spaced?.map((e) => e) || []; + return message; + }, +}; + +function createBaseArmor_ThicknessEntry(): Armor_ThicknessEntry { + return { key: 0, value: 0 }; +} + +export const Armor_ThicknessEntry: MessageFns = { + encode(message: Armor_ThicknessEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.key !== undefined) { + writer.uint32(8).uint32(message.key); + } + if (message.value !== undefined) { + writer.uint32(21).float(message.value); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): Armor_ThicknessEntry { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseArmor_ThicknessEntry(); + 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 !== 21) { + break; + } + + message.value = reader.float(); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): Armor_ThicknessEntry { + return { + key: globalThis.Number(assertSet("Armor_ThicknessEntry.key", object.key)), + value: globalThis.Number(assertSet("Armor_ThicknessEntry.value", object.value)), + }; + }, + + toJSON(message: Armor_ThicknessEntry): unknown { + const obj: any = {}; + if (message.key !== undefined) { + obj.key = Math.round(message.key); + } + if (message.value !== undefined) { + obj.value = message.value; + } + return obj; + }, + + create, I>>(base?: I): Armor_ThicknessEntry { + return Armor_ThicknessEntry.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Armor_ThicknessEntry { + const message = createBaseArmor_ThicknessEntry(); + message.key = object.key ?? 0; + message.value = object.value ?? 0; + return message; + }, +}; + +function createBaseVector3(): Vector3 { + return { x: 0, y: 0, z: 0 }; +} + +export const Vector3: MessageFns = { + encode(message: Vector3, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.x !== 0) { + writer.uint32(13).float(message.x); + } + if (message.y !== 0) { + writer.uint32(21).float(message.y); + } + if (message.z !== 0) { + writer.uint32(29).float(message.z); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): Vector3 { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseVector3(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 13) { + break; + } + + message.x = reader.float(); + continue; + } + case 2: { + if (tag !== 21) { + break; + } + + message.y = reader.float(); + continue; + } + case 3: { + if (tag !== 29) { + break; + } + + message.z = reader.float(); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): Vector3 { + return { + x: globalThis.Number(assertSet("Vector3.x", object.x)), + y: globalThis.Number(assertSet("Vector3.y", object.y)), + z: globalThis.Number(assertSet("Vector3.z", object.z)), + }; + }, + + toJSON(message: Vector3): unknown { + const obj: any = {}; + if (message.x !== 0) { + obj.x = message.x; + } + if (message.y !== 0) { + obj.y = message.y; + } + if (message.z !== 0) { + obj.z = message.z; + } + return obj; + }, + + create, I>>(base?: I): Vector3 { + return Vector3.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Vector3 { + const message = createBaseVector3(); + message.x = object.x ?? 0; + message.y = object.y ?? 0; + message.z = object.z ?? 0; + return message; + }, +}; + +function createBaseInitialTurretRotation(): InitialTurretRotation { + return { yaw: 0, pitch: 0, roll: 0 }; +} + +export const InitialTurretRotation: MessageFns = { + encode(message: InitialTurretRotation, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.yaw !== 0) { + writer.uint32(13).float(message.yaw); + } + if (message.pitch !== 0) { + writer.uint32(21).float(message.pitch); + } + if (message.roll !== 0) { + writer.uint32(29).float(message.roll); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): InitialTurretRotation { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseInitialTurretRotation(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 13) { + break; + } + + message.yaw = reader.float(); + continue; + } + case 2: { + if (tag !== 21) { + break; + } + + message.pitch = reader.float(); + continue; + } + case 3: { + if (tag !== 29) { + break; + } + + message.roll = reader.float(); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): InitialTurretRotation { + return { + yaw: globalThis.Number(assertSet("InitialTurretRotation.yaw", object.yaw)), + pitch: globalThis.Number(assertSet("InitialTurretRotation.pitch", object.pitch)), + roll: globalThis.Number(assertSet("InitialTurretRotation.roll", object.roll)), + }; + }, + + toJSON(message: InitialTurretRotation): unknown { + const obj: any = {}; + if (message.yaw !== 0) { + obj.yaw = message.yaw; + } + if (message.pitch !== 0) { + obj.pitch = message.pitch; + } + if (message.roll !== 0) { + obj.roll = message.roll; + } + return obj; + }, + + create, I>>(base?: I): InitialTurretRotation { + return InitialTurretRotation.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): InitialTurretRotation { + const message = createBaseInitialTurretRotation(); + message.yaw = object.yaw ?? 0; + message.pitch = object.pitch ?? 0; + message.roll = object.roll ?? 0; + return message; + }, +}; + +function createBaseTurretModelDefinition(): TurretModelDefinition { + return { + bounding_box: createBaseBoundingBox(), + armor: createBaseArmor(), + model_id: 0, + gun_origin: createBaseVector3(), + guns: {}, + yaw: undefined, + }; +} + +export const TurretModelDefinition: MessageFns = { + encode(message: TurretModelDefinition, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.bounding_box !== undefined) { + BoundingBox.encode(message.bounding_box, writer.uint32(10).fork()).join(); + } + if (message.armor !== undefined) { + Armor.encode(message.armor, writer.uint32(18).fork()).join(); + } + if (message.model_id !== 0) { + writer.uint32(24).uint32(message.model_id); + } + if (message.gun_origin !== undefined) { + Vector3.encode(message.gun_origin, writer.uint32(34).fork()).join(); + } + Object.entries(message.guns).forEach(([key, value]) => { + TurretModelDefinition_GunsEntry.encode({ key: key as any, value }, writer.uint32(42).fork()).join(); + }); + if (message.yaw !== undefined) { + YawLimits.encode(message.yaw, writer.uint32(50).fork()).join(); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): TurretModelDefinition { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTurretModelDefinition(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break; + } + + message.bounding_box = BoundingBox.decode(reader, reader.uint32()); + continue; + } + case 2: { + if (tag !== 18) { + break; + } + + message.armor = Armor.decode(reader, reader.uint32()); + continue; + } + case 3: { + if (tag !== 24) { + break; + } + + message.model_id = reader.uint32(); + continue; + } + case 4: { + if (tag !== 34) { + break; + } + + message.gun_origin = Vector3.decode(reader, reader.uint32()); + continue; + } + case 5: { + if (tag !== 42) { + break; + } + + const entry5 = TurretModelDefinition_GunsEntry.decode(reader, reader.uint32()); + if (entry5.value !== undefined) { + message.guns[entry5.key] = entry5.value; + } + continue; + } + case 6: { + if (tag !== 50) { + break; + } + + message.yaw = YawLimits.decode(reader, reader.uint32()); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): TurretModelDefinition { + return { + bounding_box: BoundingBox.fromJSON(assertSet("TurretModelDefinition.bounding_box", object.bounding_box)), + armor: Armor.fromJSON(assertSet("TurretModelDefinition.armor", object.armor)), + model_id: globalThis.Number(assertSet("TurretModelDefinition.model_id", object.model_id)), + gun_origin: Vector3.fromJSON(assertSet("TurretModelDefinition.gun_origin", object.gun_origin)), + guns: isObject(object.guns) + ? Object.entries(object.guns).reduce<{ [key: number]: GunModelDefinition }>((acc, [key, value]) => { + acc[globalThis.Number(key)] = GunModelDefinition.fromJSON(value); + return acc; + }, {}) + : {}, + yaw: isSet(object.yaw) ? YawLimits.fromJSON(object.yaw) : undefined, + }; + }, + + toJSON(message: TurretModelDefinition): unknown { + const obj: any = {}; + if (message.bounding_box !== undefined) { + obj.bounding_box = BoundingBox.toJSON(message.bounding_box); + } + if (message.armor !== undefined) { + obj.armor = Armor.toJSON(message.armor); + } + if (message.model_id !== 0) { + obj.model_id = Math.round(message.model_id); + } + if (message.gun_origin !== undefined) { + obj.gun_origin = Vector3.toJSON(message.gun_origin); + } + if (message.guns) { + const entries = Object.entries(message.guns); + if (entries.length > 0) { + obj.guns = {}; + entries.forEach(([k, v]) => { + obj.guns[k] = GunModelDefinition.toJSON(v); + }); + } + } + if (message.yaw !== undefined) { + obj.yaw = YawLimits.toJSON(message.yaw); + } + return obj; + }, + + create, I>>(base?: I): TurretModelDefinition { + return TurretModelDefinition.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): TurretModelDefinition { + const message = createBaseTurretModelDefinition(); + message.bounding_box = (object.bounding_box !== undefined && object.bounding_box !== null) + ? BoundingBox.fromPartial(object.bounding_box) + : createBaseBoundingBox(); + message.armor = (object.armor !== undefined && object.armor !== null) + ? Armor.fromPartial(object.armor) + : createBaseArmor(); + message.model_id = object.model_id ?? 0; + message.gun_origin = (object.gun_origin !== undefined && object.gun_origin !== null) + ? Vector3.fromPartial(object.gun_origin) + : createBaseVector3(); + message.guns = Object.entries(object.guns ?? {}).reduce<{ [key: number]: GunModelDefinition }>( + (acc, [key, value]) => { + if (value !== undefined) { + acc[globalThis.Number(key)] = GunModelDefinition.fromPartial(value); + } + return acc; + }, + {}, + ); + message.yaw = (object.yaw !== undefined && object.yaw !== null) ? YawLimits.fromPartial(object.yaw) : undefined; + return message; + }, +}; + +function createBaseTurretModelDefinition_GunsEntry(): TurretModelDefinition_GunsEntry { + return { key: 0, value: createBaseGunModelDefinition() }; +} + +export const TurretModelDefinition_GunsEntry: MessageFns = { + encode(message: TurretModelDefinition_GunsEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.key !== undefined) { + writer.uint32(8).uint32(message.key); + } + if (message.value !== undefined) { + GunModelDefinition.encode(message.value, writer.uint32(18).fork()).join(); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): TurretModelDefinition_GunsEntry { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTurretModelDefinition_GunsEntry(); + 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 = GunModelDefinition.decode(reader, reader.uint32()); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): TurretModelDefinition_GunsEntry { + return { + key: globalThis.Number(assertSet("TurretModelDefinition_GunsEntry.key", object.key)), + value: GunModelDefinition.fromJSON(assertSet("TurretModelDefinition_GunsEntry.value", object.value)), + }; + }, + + toJSON(message: TurretModelDefinition_GunsEntry): unknown { + const obj: any = {}; + if (message.key !== undefined) { + obj.key = Math.round(message.key); + } + if (message.value !== undefined) { + obj.value = GunModelDefinition.toJSON(message.value); + } + return obj; + }, + + create, I>>(base?: I): TurretModelDefinition_GunsEntry { + return TurretModelDefinition_GunsEntry.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): TurretModelDefinition_GunsEntry { + const message = createBaseTurretModelDefinition_GunsEntry(); + message.key = object.key ?? 0; + message.value = (object.value !== undefined && object.value !== null) + ? GunModelDefinition.fromPartial(object.value) + : undefined; + return message; + }, +}; + +function createBaseYawLimits(): YawLimits { + return { min: 0, max: 0 }; +} + +export const YawLimits: MessageFns = { + encode(message: YawLimits, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.min !== 0) { + writer.uint32(13).float(message.min); + } + if (message.max !== 0) { + writer.uint32(21).float(message.max); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): YawLimits { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseYawLimits(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 13) { + break; + } + + message.min = reader.float(); + continue; + } + case 2: { + if (tag !== 21) { + break; + } + + message.max = reader.float(); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): YawLimits { + return { + min: globalThis.Number(assertSet("YawLimits.min", object.min)), + max: globalThis.Number(assertSet("YawLimits.max", object.max)), + }; + }, + + toJSON(message: YawLimits): unknown { + const obj: any = {}; + if (message.min !== 0) { + obj.min = message.min; + } + if (message.max !== 0) { + obj.max = message.max; + } + return obj; + }, + + create, I>>(base?: I): YawLimits { + return YawLimits.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): YawLimits { + const message = createBaseYawLimits(); + message.min = object.min ?? 0; + message.max = object.max ?? 0; + return message; + }, +}; + +function createBaseBoundingBox(): BoundingBox { + return { min: createBaseVector3(), max: createBaseVector3() }; +} + +export const BoundingBox: MessageFns = { + encode(message: BoundingBox, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.min !== undefined) { + Vector3.encode(message.min, writer.uint32(10).fork()).join(); + } + if (message.max !== undefined) { + Vector3.encode(message.max, writer.uint32(18).fork()).join(); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): BoundingBox { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseBoundingBox(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break; + } + + message.min = Vector3.decode(reader, reader.uint32()); + continue; + } + case 2: { + if (tag !== 18) { + break; + } + + message.max = Vector3.decode(reader, reader.uint32()); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): BoundingBox { + return { + min: Vector3.fromJSON(assertSet("BoundingBox.min", object.min)), + max: Vector3.fromJSON(assertSet("BoundingBox.max", object.max)), + }; + }, + + toJSON(message: BoundingBox): unknown { + const obj: any = {}; + if (message.min !== undefined) { + obj.min = Vector3.toJSON(message.min); + } + if (message.max !== undefined) { + obj.max = Vector3.toJSON(message.max); + } + return obj; + }, + + create, I>>(base?: I): BoundingBox { + return BoundingBox.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): BoundingBox { + const message = createBaseBoundingBox(); + message.min = (object.min !== undefined && object.min !== null) + ? Vector3.fromPartial(object.min) + : createBaseVector3(); + message.max = (object.max !== undefined && object.max !== null) + ? Vector3.fromPartial(object.max) + : createBaseVector3(); + return message; + }, +}; + +function createBaseTrackModelDefinition(): TrackModelDefinition { + return { thickness: 0, origin: createBaseVector3() }; +} + +export const TrackModelDefinition: MessageFns = { + encode(message: TrackModelDefinition, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.thickness !== 0) { + writer.uint32(13).float(message.thickness); + } + if (message.origin !== undefined) { + Vector3.encode(message.origin, writer.uint32(18).fork()).join(); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): TrackModelDefinition { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTrackModelDefinition(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 13) { + break; + } + + message.thickness = reader.float(); + continue; + } + case 2: { + if (tag !== 18) { + break; + } + + message.origin = Vector3.decode(reader, reader.uint32()); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): TrackModelDefinition { + return { + thickness: globalThis.Number(assertSet("TrackModelDefinition.thickness", object.thickness)), + origin: Vector3.fromJSON(assertSet("TrackModelDefinition.origin", object.origin)), + }; + }, + + toJSON(message: TrackModelDefinition): unknown { + const obj: any = {}; + if (message.thickness !== 0) { + obj.thickness = message.thickness; + } + if (message.origin !== undefined) { + obj.origin = Vector3.toJSON(message.origin); + } + return obj; + }, + + create, I>>(base?: I): TrackModelDefinition { + return TrackModelDefinition.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): TrackModelDefinition { + const message = createBaseTrackModelDefinition(); + message.thickness = object.thickness ?? 0; + message.origin = (object.origin !== undefined && object.origin !== null) + ? Vector3.fromPartial(object.origin) + : createBaseVector3(); + return message; + }, +}; + +function createBaseGunModelDefinition(): GunModelDefinition { + return { armor: createBaseArmor(), thickness: 0, model_id: 0, pitch: createBasePitchLimits(), mask: undefined }; +} + +export const GunModelDefinition: MessageFns = { + encode(message: GunModelDefinition, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.armor !== undefined) { + Armor.encode(message.armor, writer.uint32(10).fork()).join(); + } + if (message.thickness !== 0) { + writer.uint32(21).float(message.thickness); + } + if (message.model_id !== 0) { + writer.uint32(24).uint32(message.model_id); + } + if (message.pitch !== undefined) { + PitchLimits.encode(message.pitch, writer.uint32(34).fork()).join(); + } + if (message.mask !== undefined && message.mask !== undefined) { + writer.uint32(45).float(message.mask); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): GunModelDefinition { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGunModelDefinition(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break; + } + + message.armor = Armor.decode(reader, reader.uint32()); + continue; + } + case 2: { + if (tag !== 21) { + break; + } + + message.thickness = reader.float(); + continue; + } + case 3: { + if (tag !== 24) { + break; + } + + message.model_id = reader.uint32(); + continue; + } + case 4: { + if (tag !== 34) { + break; + } + + message.pitch = PitchLimits.decode(reader, reader.uint32()); + continue; + } + case 5: { + if (tag !== 45) { + break; + } + + message.mask = reader.float(); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): GunModelDefinition { + return { + armor: Armor.fromJSON(assertSet("GunModelDefinition.armor", object.armor)), + thickness: globalThis.Number(assertSet("GunModelDefinition.thickness", object.thickness)), + model_id: globalThis.Number(assertSet("GunModelDefinition.model_id", object.model_id)), + pitch: PitchLimits.fromJSON(assertSet("GunModelDefinition.pitch", object.pitch)), + mask: isSet(object.mask) ? globalThis.Number(object.mask) : undefined, + }; + }, + + toJSON(message: GunModelDefinition): unknown { + const obj: any = {}; + if (message.armor !== undefined) { + obj.armor = Armor.toJSON(message.armor); + } + if (message.thickness !== 0) { + obj.thickness = message.thickness; + } + if (message.model_id !== 0) { + obj.model_id = Math.round(message.model_id); + } + if (message.pitch !== undefined) { + obj.pitch = PitchLimits.toJSON(message.pitch); + } + if (message.mask !== undefined && message.mask !== undefined) { + obj.mask = message.mask; + } + return obj; + }, + + create, I>>(base?: I): GunModelDefinition { + return GunModelDefinition.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): GunModelDefinition { + const message = createBaseGunModelDefinition(); + message.armor = (object.armor !== undefined && object.armor !== null) + ? Armor.fromPartial(object.armor) + : createBaseArmor(); + message.thickness = object.thickness ?? 0; + message.model_id = object.model_id ?? 0; + message.pitch = (object.pitch !== undefined && object.pitch !== null) + ? PitchLimits.fromPartial(object.pitch) + : createBasePitchLimits(); + message.mask = object.mask ?? undefined; + return message; + }, +}; + +function createBasePitchLimits(): PitchLimits { + return { min: 0, max: 0, front: undefined, back: undefined, transition: undefined }; +} + +export const PitchLimits: MessageFns = { + encode(message: PitchLimits, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.min !== 0) { + writer.uint32(13).float(message.min); + } + if (message.max !== 0) { + writer.uint32(21).float(message.max); + } + if (message.front !== undefined) { + PitchLimitsExtrema.encode(message.front, writer.uint32(26).fork()).join(); + } + if (message.back !== undefined) { + PitchLimitsExtrema.encode(message.back, writer.uint32(34).fork()).join(); + } + if (message.transition !== undefined && message.transition !== undefined) { + writer.uint32(45).float(message.transition); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): PitchLimits { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePitchLimits(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 13) { + break; + } + + message.min = reader.float(); + continue; + } + case 2: { + if (tag !== 21) { + break; + } + + message.max = reader.float(); + continue; + } + case 3: { + if (tag !== 26) { + break; + } + + message.front = PitchLimitsExtrema.decode(reader, reader.uint32()); + continue; + } + case 4: { + if (tag !== 34) { + break; + } + + message.back = PitchLimitsExtrema.decode(reader, reader.uint32()); + continue; + } + case 5: { + if (tag !== 45) { + break; + } + + message.transition = reader.float(); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): PitchLimits { + return { + min: globalThis.Number(assertSet("PitchLimits.min", object.min)), + max: globalThis.Number(assertSet("PitchLimits.max", object.max)), + front: isSet(object.front) ? PitchLimitsExtrema.fromJSON(object.front) : undefined, + back: isSet(object.back) ? PitchLimitsExtrema.fromJSON(object.back) : undefined, + transition: isSet(object.transition) ? globalThis.Number(object.transition) : undefined, + }; + }, + + toJSON(message: PitchLimits): unknown { + const obj: any = {}; + if (message.min !== 0) { + obj.min = message.min; + } + if (message.max !== 0) { + obj.max = message.max; + } + if (message.front !== undefined) { + obj.front = PitchLimitsExtrema.toJSON(message.front); + } + if (message.back !== undefined) { + obj.back = PitchLimitsExtrema.toJSON(message.back); + } + if (message.transition !== undefined && message.transition !== undefined) { + obj.transition = message.transition; + } + return obj; + }, + + create, I>>(base?: I): PitchLimits { + return PitchLimits.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): PitchLimits { + const message = createBasePitchLimits(); + message.min = object.min ?? 0; + message.max = object.max ?? 0; + message.front = (object.front !== undefined && object.front !== null) + ? PitchLimitsExtrema.fromPartial(object.front) + : undefined; + message.back = (object.back !== undefined && object.back !== null) + ? PitchLimitsExtrema.fromPartial(object.back) + : undefined; + message.transition = object.transition ?? undefined; + return message; + }, +}; + +function createBasePitchLimitsExtrema(): PitchLimitsExtrema { + return { min: 0, max: 0, range: 0 }; +} + +export const PitchLimitsExtrema: MessageFns = { + encode(message: PitchLimitsExtrema, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.min !== 0) { + writer.uint32(13).float(message.min); + } + if (message.max !== 0) { + writer.uint32(21).float(message.max); + } + if (message.range !== 0) { + writer.uint32(29).float(message.range); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): PitchLimitsExtrema { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePitchLimitsExtrema(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 13) { + break; + } + + message.min = reader.float(); + continue; + } + case 2: { + if (tag !== 21) { + break; + } + + message.max = reader.float(); + continue; + } + case 3: { + if (tag !== 29) { + break; + } + + message.range = reader.float(); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): PitchLimitsExtrema { + return { + min: globalThis.Number(assertSet("PitchLimitsExtrema.min", object.min)), + max: globalThis.Number(assertSet("PitchLimitsExtrema.max", object.max)), + range: globalThis.Number(assertSet("PitchLimitsExtrema.range", object.range)), + }; + }, + + toJSON(message: PitchLimitsExtrema): unknown { + const obj: any = {}; + if (message.min !== 0) { + obj.min = message.min; + } + if (message.max !== 0) { + obj.max = message.max; + } + if (message.range !== 0) { + obj.range = message.range; + } + return obj; + }, + + create, I>>(base?: I): PitchLimitsExtrema { + return PitchLimitsExtrema.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): PitchLimitsExtrema { + const message = createBasePitchLimitsExtrema(); + message.min = object.min ?? 0; + message.max = object.max ?? 0; + message.range = object.range ?? 0; + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends { $case: string; value: unknown } ? { $case: T["$case"]; value?: DeepPartial } + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isObject(value: any): boolean { + return typeof value === "object" && value !== null; +} + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} + +function assertSet(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 { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; + fromJSON(object: any): T; + toJSON(message: T): unknown; + create, I>>(base?: I): T; + fromPartial, I>>(object: I): T; +} diff --git a/packages/core/src/protos/legacy_provision_definitions.proto b/packages/core/src/protos/legacy_provision_definitions.proto new file mode 100644 index 000000000..16d61e881 --- /dev/null +++ b/packages/core/src/protos/legacy_provision_definitions.proto @@ -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 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; +} \ No newline at end of file diff --git a/packages/core/src/protos/legacy_provision_definitions.ts b/packages/core/src/protos/legacy_provision_definitions.ts new file mode 100644 index 000000000..0eb58ec25 --- /dev/null +++ b/packages/core/src/protos/legacy_provision_definitions.ts @@ -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 = { + 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>>(base?: I): ProvisionDefinitions { + return ProvisionDefinitions.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 = { + 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>>( + base?: I, + ): ProvisionDefinitions_ProvisionsEntry { + return ProvisionDefinitions_ProvisionsEntry.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 = { + 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>>(base?: I): Provision { + return Provision.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends { $case: string; value: unknown } ? { $case: T["$case"]; value?: DeepPartial } + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isObject(value: any): boolean { + return typeof value === "object" && value !== null; +} + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} + +function assertSet(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 { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; + fromJSON(object: any): T; + toJSON(message: T): unknown; + create, I>>(base?: I): T; + fromPartial, I>>(object: I): T; +} diff --git a/packages/core/src/protos/legacy_rating_leaderboard.proto b/packages/core/src/protos/legacy_rating_leaderboard.proto new file mode 100644 index 000000000..ee504c090 --- /dev/null +++ b/packages/core/src/protos/legacy_rating_leaderboard.proto @@ -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; +} \ No newline at end of file diff --git a/packages/core/src/protos/legacy_rating_leaderboard.ts b/packages/core/src/protos/legacy_rating_leaderboard.ts new file mode 100644 index 000000000..4b6ac7f00 --- /dev/null +++ b/packages/core/src/protos/legacy_rating_leaderboard.ts @@ -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 = { + 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>>(base?: I): RatingLeaderboard { + return RatingLeaderboard.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 = { + 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>>(base?: I): RatingLeaderboardV1 { + return RatingLeaderboardV1.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 = { + 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>>(base?: I): RatingLeaderboardEntryV1 { + return RatingLeaderboardEntryV1.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 = { + 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>>(base?: I): RatingLeaderboardV2 { + return RatingLeaderboardV2.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 = { + 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>>(base?: I): RatingLeaderboardEntryV2 { + return RatingLeaderboardEntryV2.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends { $case: string; value: unknown } ? { $case: T["$case"]; value?: DeepPartial } + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} + +function assertSet(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 { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; + fromJSON(object: any): T; + toJSON(message: T): unknown; + create, I>>(base?: I): T; + fromPartial, I>>(object: I): T; +} diff --git a/packages/core/src/protos/legacy_skill_definitions.proto b/packages/core/src/protos/legacy_skill_definitions.proto new file mode 100644 index 000000000..b22f19046 --- /dev/null +++ b/packages/core/src/protos/legacy_skill_definitions.proto @@ -0,0 +1,12 @@ +syntax = "proto2"; + +package blitzkit; + +message SkillDefinitions { + // enums are disallowed as keys so using uint32; convert run-time + map classes = 1; +} + +message Skill { + repeated string skills = 1; +} \ No newline at end of file diff --git a/packages/core/src/protos/legacy_skill_definitions.ts b/packages/core/src/protos/legacy_skill_definitions.ts new file mode 100644 index 000000000..d218ffff7 --- /dev/null +++ b/packages/core/src/protos/legacy_skill_definitions.ts @@ -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 = { + 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>>(base?: I): SkillDefinitions { + return SkillDefinitions.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 = { + 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>>(base?: I): SkillDefinitions_ClassesEntry { + return SkillDefinitions_ClassesEntry.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 = { + 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>>(base?: I): Skill { + return Skill.fromPartial(base ?? ({} as any)); + }, + fromPartial, 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 extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends { $case: string; value: unknown } ? { $case: T["$case"]; value?: DeepPartial } + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isObject(value: any): boolean { + return typeof value === "object" && value !== null; +} + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} + +function assertSet(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 { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; + fromJSON(object: any): T; + toJSON(message: T): unknown; + create, I>>(base?: I): T; + fromPartial, I>>(object: I): T; +} diff --git a/packages/core/src/protos/legacy_tank_definitions.proto b/packages/core/src/protos/legacy_tank_definitions.proto new file mode 100644 index 000000000..1cf40f3fb --- /dev/null +++ b/packages/core/src/protos/legacy_tank_definitions.proto @@ -0,0 +1,234 @@ +syntax = "proto2"; + +package blitzkit; + +import "packages/core/src/protos/legacy_i18n.proto"; + +message TankDefinitions { + map tanks = 1; +} + +message TankDefinition { + required uint32 id = 1; + map 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; +} \ No newline at end of file diff --git a/packages/core/src/protos/legacy_tank_definitions.ts b/packages/core/src/protos/legacy_tank_definitions.ts new file mode 100644 index 000000000..664b00f74 --- /dev/null +++ b/packages/core/src/protos/legacy_tank_definitions.ts @@ -0,0 +1,3825 @@ +// 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_tank_definitions.proto + +/* eslint-disable */ +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; +import { I18nString, createBaseI18nString } from "./legacy_i18n"; + +export const protobufPackage = "blitzkit"; + +export enum TankPriceType { + CREDITS = 0, + GOLD = 1, +} + +export function tankPriceTypeFromJSON(object: any): TankPriceType { + switch (object) { + case 0: + case "TANK_PRICE_TYPE_CREDITS": + return TankPriceType.CREDITS; + case 1: + case "TANK_PRICE_TYPE_GOLD": + return TankPriceType.GOLD; + default: + throw new globalThis.Error("Unrecognized enum value " + object + " for enum TankPriceType"); + } +} + +export function tankPriceTypeToJSON(object: TankPriceType): string { + switch (object) { + case TankPriceType.CREDITS: + return "TANK_PRICE_TYPE_CREDITS"; + case TankPriceType.GOLD: + return "TANK_PRICE_TYPE_GOLD"; + default: + throw new globalThis.Error("Unrecognized enum value " + object + " for enum TankPriceType"); + } +} + +export enum ShellType { + AP = 0, + APCR = 1, + HEAT = 2, + HE = 3, +} + +export function shellTypeFromJSON(object: any): ShellType { + switch (object) { + case 0: + case "SHELL_TYPE_AP": + return ShellType.AP; + case 1: + case "SHELL_TYPE_APCR": + return ShellType.APCR; + case 2: + case "SHELL_TYPE_HEAT": + return ShellType.HEAT; + case 3: + case "SHELL_TYPE_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 "SHELL_TYPE_AP"; + case ShellType.APCR: + return "SHELL_TYPE_APCR"; + case ShellType.HEAT: + return "SHELL_TYPE_HEAT"; + case ShellType.HE: + return "SHELL_TYPE_HE"; + default: + throw new globalThis.Error("Unrecognized enum value " + object + " for enum ShellType"); + } +} + +export enum ModuleType { + VEHICLE = 0, + ENGINE = 1, + TRACKS = 2, + TURRET = 3, + GUN = 4, +} + +export function moduleTypeFromJSON(object: any): ModuleType { + switch (object) { + case 0: + case "MODULE_TYPE_VEHICLE": + return ModuleType.VEHICLE; + case 1: + case "MODULE_TYPE_ENGINE": + return ModuleType.ENGINE; + case 2: + case "MODULE_TYPE_TRACKS": + return ModuleType.TRACKS; + case 3: + case "MODULE_TYPE_TURRET": + return ModuleType.TURRET; + case 4: + case "MODULE_TYPE_GUN": + return ModuleType.GUN; + default: + throw new globalThis.Error("Unrecognized enum value " + object + " for enum ModuleType"); + } +} + +export function moduleTypeToJSON(object: ModuleType): string { + switch (object) { + case ModuleType.VEHICLE: + return "MODULE_TYPE_VEHICLE"; + case ModuleType.ENGINE: + return "MODULE_TYPE_ENGINE"; + case ModuleType.TRACKS: + return "MODULE_TYPE_TRACKS"; + case ModuleType.TURRET: + return "MODULE_TYPE_TURRET"; + case ModuleType.GUN: + return "MODULE_TYPE_GUN"; + default: + throw new globalThis.Error("Unrecognized enum value " + object + " for enum ModuleType"); + } +} + +export enum TankClass { + LIGHT = 0, + MEDIUM = 1, + HEAVY = 2, + TANK_DESTROYER = 3, +} + +export function tankClassFromJSON(object: any): TankClass { + switch (object) { + case 0: + case "TANK_CLASS_LIGHT": + return TankClass.LIGHT; + case 1: + case "TANK_CLASS_MEDIUM": + return TankClass.MEDIUM; + case 2: + case "TANK_CLASS_HEAVY": + return TankClass.HEAVY; + case 3: + case "TANK_CLASS_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 "TANK_CLASS_LIGHT"; + case TankClass.MEDIUM: + return "TANK_CLASS_MEDIUM"; + case TankClass.HEAVY: + return "TANK_CLASS_HEAVY"; + case TankClass.TANK_DESTROYER: + return "TANK_CLASS_TANK_DESTROYER"; + default: + throw new globalThis.Error("Unrecognized enum value " + object + " for enum TankClass"); + } +} + +export enum TankType { + RESEARCHABLE = 0, + PREMIUM = 1, + COLLECTOR = 2, +} + +export function tankTypeFromJSON(object: any): TankType { + switch (object) { + case 0: + case "TANK_TYPE_RESEARCHABLE": + return TankType.RESEARCHABLE; + case 1: + case "TANK_TYPE_PREMIUM": + return TankType.PREMIUM; + case 2: + case "TANK_TYPE_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 "TANK_TYPE_RESEARCHABLE"; + case TankType.PREMIUM: + return "TANK_TYPE_PREMIUM"; + case TankType.COLLECTOR: + return "TANK_TYPE_COLLECTOR"; + default: + throw new globalThis.Error("Unrecognized enum value " + object + " for enum TankType"); + } +} + +export enum CrewType { + COMMANDER = 0, + RADIOMAN = 1, + GUNNER = 2, + DRIVER = 3, + LOADER = 4, +} + +export function crewTypeFromJSON(object: any): CrewType { + switch (object) { + case 0: + case "CREW_TYPE_COMMANDER": + return CrewType.COMMANDER; + case 1: + case "CREW_TYPE_RADIOMAN": + return CrewType.RADIOMAN; + case 2: + case "CREW_TYPE_GUNNER": + return CrewType.GUNNER; + case 3: + case "CREW_TYPE_DRIVER": + return CrewType.DRIVER; + case 4: + case "CREW_TYPE_LOADER": + return CrewType.LOADER; + default: + throw new globalThis.Error("Unrecognized enum value " + object + " for enum CrewType"); + } +} + +export function crewTypeToJSON(object: CrewType): string { + switch (object) { + case CrewType.COMMANDER: + return "CREW_TYPE_COMMANDER"; + case CrewType.RADIOMAN: + return "CREW_TYPE_RADIOMAN"; + case CrewType.GUNNER: + return "CREW_TYPE_GUNNER"; + case CrewType.DRIVER: + return "CREW_TYPE_DRIVER"; + case CrewType.LOADER: + return "CREW_TYPE_LOADER"; + default: + throw new globalThis.Error("Unrecognized enum value " + object + " for enum CrewType"); + } +} + +export interface TankDefinitions { + tanks: { [key: number]: TankDefinition }; +} + +export interface TankDefinitions_TanksEntry { + key: number; + value: TankDefinition | undefined; +} + +export interface TankDefinition { + id: number; + roles: { [key: number]: number }; + fixed_camouflage: boolean; + camouflages: number[]; + ancestors: number[]; + successors: number[]; + crew: Crew[]; + health: number; + nation: string; + name: I18nString; + name_full?: I18nString | undefined; + type: TankType; + max_consumables: number; + max_provisions: number; + tier: number; + class: TankClass; + testing: boolean; + deprecated: boolean; + turrets: TurretDefinition[]; + engines: EngineDefinition[]; + tracks: TrackDefinition[]; + price: TankPrice; + research_cost?: ResearchCost | undefined; + speed_forwards: number; + speed_backwards: number; + camouflage_still: number; + camouflage_moving: number; + camouflage_onFire: number; + equipment_preset: string; + weight: number; +} + +export interface TankDefinition_RolesEntry { + key: number; + value: number; +} + +export interface ResearchCost { + research_cost_type?: + | { $case: "xp"; value: number } + | { $case: "seasonal_tokens"; value: ResearchCostSeasonalTokens } + | undefined; +} + +export interface ResearchCostSeasonalTokens { + season: number; + tokens: number; +} + +export interface TankPrice { + type: TankPriceType; + value: number; +} + +export interface TrackDefinition { + id: number; + tier: number; + name: I18nString; + weight: number; + traverse_speed: number; + research_cost?: ResearchCost | undefined; + dispersion_move: number; + dispersion_traverse: number; + resistance_hard: number; + resistance_medium: number; + resistance_soft: number; + unlocks: Unlock[]; +} + +export interface EngineDefinition { + id: number; + name: I18nString; + research_cost?: ResearchCost | undefined; + tier: number; + fire_chance: number; + power: number; + weight: number; + unlocks: Unlock[]; +} + +export interface TurretDefinition { + id: number; + health: number; + view_range: number; + traverse_speed: number; + research_cost?: ResearchCost | undefined; + name: I18nString; + tier: number; + weight: number; + guns: GunDefinition[]; + unlocks: Unlock[]; +} + +export interface GunDefinition { + gun_type?: + | { $case: "regular"; value: GunDefinitionRegular } + | { $case: "auto_loader"; value: GunDefinitionAutoLoader } + | { $case: "auto_reloader"; value: GunDefinitionAutoReloader } + | undefined; +} + +export interface GunDefinitionRegular { + base: GunDefinitionBase; + extension: GunDefinitionRegularProperties; +} + +export interface GunDefinitionRegularProperties { + reload: number; +} + +export interface GunDefinitionAutoLoader { + base: GunDefinitionBase; + extension: GunDefinitionAutoLoaderProperties; +} + +export interface GunDefinitionAutoLoaderProperties { + clip_reload: number; + intra_clip: number; + shell_count: number; +} + +export interface GunDefinitionAutoReloader { + base: GunDefinitionBase; + extension: GunDefinitionAutoReloaderProperties; +} + +export interface GunDefinitionAutoReloaderProperties { + shell_reloads: number[]; + intra_clip: number; + shell_count: number; +} + +export interface GunDefinitionBase { + id: number; + rotation_speed: number; + research_cost?: ResearchCost | undefined; + weight: number; + name: I18nString; + tier: number; + shells: ShellDefinition[]; + camouflage_loss: number; + aim_time: number; + dispersion_base: number; + dispersion_traverse: number; + dispersion_shot: number; + dispersion_damaged: number; + unlocks: Unlock[]; + shell_capacity: number; +} + +export interface ShellDefinition { + id: number; + name: I18nString; + velocity: number; + armor_damage: number; + module_damage: number; + caliber: number; + icon: string; + penetration: ShellPenetration; + type: ShellType; + normalization?: number | undefined; + ricochet?: number | undefined; + explosion_radius?: number | undefined; + range: number; +} + +export interface ShellPenetration { + near: number; + far: number; +} + +export interface Unlock { + id: number; + type: ModuleType; + cost: UnlockCost; +} + +export interface UnlockCost { + type: string; + value: number; +} + +export interface Crew { + type: CrewType; + count: number; + substitute: CrewType[]; +} + +function createBaseTankDefinitions(): TankDefinitions { + return { tanks: {} }; +} + +export const TankDefinitions: MessageFns = { + encode(message: TankDefinitions, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + Object.entries(message.tanks).forEach(([key, value]) => { + TankDefinitions_TanksEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join(); + }); + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): TankDefinitions { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTankDefinitions(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break; + } + + const entry1 = TankDefinitions_TanksEntry.decode(reader, reader.uint32()); + if (entry1.value !== undefined) { + message.tanks[entry1.key] = entry1.value; + } + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): TankDefinitions { + return { + tanks: isObject(object.tanks) + ? Object.entries(object.tanks).reduce<{ [key: number]: TankDefinition }>((acc, [key, value]) => { + acc[globalThis.Number(key)] = TankDefinition.fromJSON(value); + return acc; + }, {}) + : {}, + }; + }, + + toJSON(message: TankDefinitions): unknown { + const obj: any = {}; + if (message.tanks) { + const entries = Object.entries(message.tanks); + if (entries.length > 0) { + obj.tanks = {}; + entries.forEach(([k, v]) => { + obj.tanks[k] = TankDefinition.toJSON(v); + }); + } + } + return obj; + }, + + create, I>>(base?: I): TankDefinitions { + return TankDefinitions.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): TankDefinitions { + const message = createBaseTankDefinitions(); + message.tanks = Object.entries(object.tanks ?? {}).reduce<{ [key: number]: TankDefinition }>( + (acc, [key, value]) => { + if (value !== undefined) { + acc[globalThis.Number(key)] = TankDefinition.fromPartial(value); + } + return acc; + }, + {}, + ); + return message; + }, +}; + +function createBaseTankDefinitions_TanksEntry(): TankDefinitions_TanksEntry { + return { key: 0, value: createBaseTankDefinition() }; +} + +export const TankDefinitions_TanksEntry: MessageFns = { + encode(message: TankDefinitions_TanksEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.key !== undefined) { + writer.uint32(8).uint32(message.key); + } + if (message.value !== undefined) { + TankDefinition.encode(message.value, writer.uint32(18).fork()).join(); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): TankDefinitions_TanksEntry { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTankDefinitions_TanksEntry(); + 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 = TankDefinition.decode(reader, reader.uint32()); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): TankDefinitions_TanksEntry { + return { + key: globalThis.Number(assertSet("TankDefinitions_TanksEntry.key", object.key)), + value: TankDefinition.fromJSON(assertSet("TankDefinitions_TanksEntry.value", object.value)), + }; + }, + + toJSON(message: TankDefinitions_TanksEntry): unknown { + const obj: any = {}; + if (message.key !== undefined) { + obj.key = Math.round(message.key); + } + if (message.value !== undefined) { + obj.value = TankDefinition.toJSON(message.value); + } + return obj; + }, + + create, I>>(base?: I): TankDefinitions_TanksEntry { + return TankDefinitions_TanksEntry.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): TankDefinitions_TanksEntry { + const message = createBaseTankDefinitions_TanksEntry(); + message.key = object.key ?? 0; + message.value = (object.value !== undefined && object.value !== null) + ? TankDefinition.fromPartial(object.value) + : undefined; + return message; + }, +}; + +function createBaseTankDefinition(): TankDefinition { + return { + id: 0, + roles: {}, + fixed_camouflage: false, + camouflages: [], + ancestors: [], + successors: [], + crew: [], + health: 0, + nation: "", + name: createBaseI18nString(), + name_full: undefined, + type: 0, + max_consumables: 0, + max_provisions: 0, + tier: 0, + class: 0, + testing: false, + deprecated: false, + turrets: [], + engines: [], + tracks: [], + price: createBaseTankPrice(), + research_cost: undefined, + speed_forwards: 0, + speed_backwards: 0, + camouflage_still: 0, + camouflage_moving: 0, + camouflage_onFire: 0, + equipment_preset: "", + weight: 0, + }; +} + +export const TankDefinition: MessageFns = { + encode(message: TankDefinition, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.id !== 0) { + writer.uint32(8).uint32(message.id); + } + Object.entries(message.roles).forEach(([key, value]) => { + TankDefinition_RolesEntry.encode({ key: key as any, value }, writer.uint32(18).fork()).join(); + }); + if (message.fixed_camouflage !== false) { + writer.uint32(32).bool(message.fixed_camouflage); + } + writer.uint32(42).fork(); + for (const v of message.camouflages) { + writer.int32(v); + } + writer.join(); + writer.uint32(50).fork(); + for (const v of message.ancestors) { + writer.int32(v); + } + writer.join(); + writer.uint32(58).fork(); + for (const v of message.successors) { + writer.int32(v); + } + writer.join(); + for (const v of message.crew) { + Crew.encode(v!, writer.uint32(66).fork()).join(); + } + if (message.health !== 0) { + writer.uint32(72).uint32(message.health); + } + if (message.nation !== "") { + writer.uint32(82).string(message.nation); + } + if (message.name !== undefined) { + I18nString.encode(message.name, writer.uint32(90).fork()).join(); + } + if (message.name_full !== undefined) { + I18nString.encode(message.name_full, writer.uint32(98).fork()).join(); + } + if (message.type !== 0) { + writer.uint32(104).int32(message.type); + } + if (message.max_consumables !== 0) { + writer.uint32(112).uint32(message.max_consumables); + } + if (message.max_provisions !== 0) { + writer.uint32(120).uint32(message.max_provisions); + } + if (message.tier !== 0) { + writer.uint32(128).uint32(message.tier); + } + if (message.class !== 0) { + writer.uint32(136).int32(message.class); + } + if (message.testing !== false) { + writer.uint32(144).bool(message.testing); + } + if (message.deprecated !== false) { + writer.uint32(152).bool(message.deprecated); + } + for (const v of message.turrets) { + TurretDefinition.encode(v!, writer.uint32(162).fork()).join(); + } + for (const v of message.engines) { + EngineDefinition.encode(v!, writer.uint32(170).fork()).join(); + } + for (const v of message.tracks) { + TrackDefinition.encode(v!, writer.uint32(178).fork()).join(); + } + if (message.price !== undefined) { + TankPrice.encode(message.price, writer.uint32(186).fork()).join(); + } + if (message.research_cost !== undefined) { + ResearchCost.encode(message.research_cost, writer.uint32(194).fork()).join(); + } + if (message.speed_forwards !== 0) { + writer.uint32(205).float(message.speed_forwards); + } + if (message.speed_backwards !== 0) { + writer.uint32(213).float(message.speed_backwards); + } + if (message.camouflage_still !== 0) { + writer.uint32(221).float(message.camouflage_still); + } + if (message.camouflage_moving !== 0) { + writer.uint32(229).float(message.camouflage_moving); + } + if (message.camouflage_onFire !== 0) { + writer.uint32(237).float(message.camouflage_onFire); + } + if (message.equipment_preset !== "") { + writer.uint32(242).string(message.equipment_preset); + } + if (message.weight !== 0) { + writer.uint32(248).uint32(message.weight); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): TankDefinition { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTankDefinition(); + 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; + } + + const entry2 = TankDefinition_RolesEntry.decode(reader, reader.uint32()); + if (entry2.value !== undefined) { + message.roles[entry2.key] = entry2.value; + } + continue; + } + case 4: { + if (tag !== 32) { + break; + } + + message.fixed_camouflage = reader.bool(); + continue; + } + case 5: { + if (tag === 40) { + message.camouflages.push(reader.int32()); + + continue; + } + + if (tag === 42) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + message.camouflages.push(reader.int32()); + } + + continue; + } + + break; + } + case 6: { + if (tag === 48) { + message.ancestors.push(reader.int32()); + + continue; + } + + if (tag === 50) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + message.ancestors.push(reader.int32()); + } + + continue; + } + + break; + } + case 7: { + if (tag === 56) { + message.successors.push(reader.int32()); + + continue; + } + + if (tag === 58) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + message.successors.push(reader.int32()); + } + + continue; + } + + break; + } + case 8: { + if (tag !== 66) { + break; + } + + message.crew.push(Crew.decode(reader, reader.uint32())); + continue; + } + case 9: { + if (tag !== 72) { + break; + } + + message.health = reader.uint32(); + continue; + } + case 10: { + if (tag !== 82) { + break; + } + + message.nation = reader.string(); + continue; + } + case 11: { + if (tag !== 90) { + break; + } + + message.name = I18nString.decode(reader, reader.uint32()); + continue; + } + case 12: { + if (tag !== 98) { + break; + } + + message.name_full = I18nString.decode(reader, reader.uint32()); + continue; + } + case 13: { + if (tag !== 104) { + break; + } + + message.type = reader.int32() as any; + continue; + } + case 14: { + if (tag !== 112) { + break; + } + + message.max_consumables = reader.uint32(); + continue; + } + case 15: { + if (tag !== 120) { + break; + } + + message.max_provisions = reader.uint32(); + continue; + } + case 16: { + if (tag !== 128) { + break; + } + + message.tier = reader.uint32(); + continue; + } + case 17: { + if (tag !== 136) { + break; + } + + message.class = reader.int32() as any; + continue; + } + case 18: { + if (tag !== 144) { + break; + } + + message.testing = reader.bool(); + continue; + } + case 19: { + if (tag !== 152) { + break; + } + + message.deprecated = reader.bool(); + continue; + } + case 20: { + if (tag !== 162) { + break; + } + + message.turrets.push(TurretDefinition.decode(reader, reader.uint32())); + continue; + } + case 21: { + if (tag !== 170) { + break; + } + + message.engines.push(EngineDefinition.decode(reader, reader.uint32())); + continue; + } + case 22: { + if (tag !== 178) { + break; + } + + message.tracks.push(TrackDefinition.decode(reader, reader.uint32())); + continue; + } + case 23: { + if (tag !== 186) { + break; + } + + message.price = TankPrice.decode(reader, reader.uint32()); + continue; + } + case 24: { + if (tag !== 194) { + break; + } + + message.research_cost = ResearchCost.decode(reader, reader.uint32()); + continue; + } + case 25: { + if (tag !== 205) { + break; + } + + message.speed_forwards = reader.float(); + continue; + } + case 26: { + if (tag !== 213) { + break; + } + + message.speed_backwards = reader.float(); + continue; + } + case 27: { + if (tag !== 221) { + break; + } + + message.camouflage_still = reader.float(); + continue; + } + case 28: { + if (tag !== 229) { + break; + } + + message.camouflage_moving = reader.float(); + continue; + } + case 29: { + if (tag !== 237) { + break; + } + + message.camouflage_onFire = reader.float(); + continue; + } + case 30: { + if (tag !== 242) { + break; + } + + message.equipment_preset = reader.string(); + continue; + } + case 31: { + if (tag !== 248) { + break; + } + + message.weight = reader.uint32(); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): TankDefinition { + return { + id: globalThis.Number(assertSet("TankDefinition.id", object.id)), + roles: isObject(object.roles) + ? Object.entries(object.roles).reduce<{ [key: number]: number }>((acc, [key, value]) => { + acc[globalThis.Number(key)] = Number(value); + return acc; + }, {}) + : {}, + fixed_camouflage: globalThis.Boolean(assertSet("TankDefinition.fixed_camouflage", object.fixed_camouflage)), + camouflages: globalThis.Array.isArray(object?.camouflages) + ? object.camouflages.map((e: any) => globalThis.Number(e)) + : [], + ancestors: globalThis.Array.isArray(object?.ancestors) + ? object.ancestors.map((e: any) => globalThis.Number(e)) + : [], + successors: globalThis.Array.isArray(object?.successors) + ? object.successors.map((e: any) => globalThis.Number(e)) + : [], + crew: globalThis.Array.isArray(object?.crew) ? object.crew.map((e: any) => Crew.fromJSON(e)) : [], + health: globalThis.Number(assertSet("TankDefinition.health", object.health)), + nation: globalThis.String(assertSet("TankDefinition.nation", object.nation)), + name: I18nString.fromJSON(assertSet("TankDefinition.name", object.name)), + name_full: isSet(object.name_full) ? I18nString.fromJSON(object.name_full) : undefined, + type: tankTypeFromJSON(assertSet("TankDefinition.type", object.type)), + max_consumables: globalThis.Number(assertSet("TankDefinition.max_consumables", object.max_consumables)), + max_provisions: globalThis.Number(assertSet("TankDefinition.max_provisions", object.max_provisions)), + tier: globalThis.Number(assertSet("TankDefinition.tier", object.tier)), + class: tankClassFromJSON(assertSet("TankDefinition.class", object.class)), + testing: globalThis.Boolean(assertSet("TankDefinition.testing", object.testing)), + deprecated: globalThis.Boolean(assertSet("TankDefinition.deprecated", object.deprecated)), + turrets: globalThis.Array.isArray(object?.turrets) + ? object.turrets.map((e: any) => TurretDefinition.fromJSON(e)) + : [], + engines: globalThis.Array.isArray(object?.engines) + ? object.engines.map((e: any) => EngineDefinition.fromJSON(e)) + : [], + tracks: globalThis.Array.isArray(object?.tracks) + ? object.tracks.map((e: any) => TrackDefinition.fromJSON(e)) + : [], + price: TankPrice.fromJSON(assertSet("TankDefinition.price", object.price)), + research_cost: isSet(object.research_cost) ? ResearchCost.fromJSON(object.research_cost) : undefined, + speed_forwards: globalThis.Number(assertSet("TankDefinition.speed_forwards", object.speed_forwards)), + speed_backwards: globalThis.Number(assertSet("TankDefinition.speed_backwards", object.speed_backwards)), + camouflage_still: globalThis.Number(assertSet("TankDefinition.camouflage_still", object.camouflage_still)), + camouflage_moving: globalThis.Number(assertSet("TankDefinition.camouflage_moving", object.camouflage_moving)), + camouflage_onFire: globalThis.Number(assertSet("TankDefinition.camouflage_onFire", object.camouflage_onFire)), + equipment_preset: globalThis.String(assertSet("TankDefinition.equipment_preset", object.equipment_preset)), + weight: globalThis.Number(assertSet("TankDefinition.weight", object.weight)), + }; + }, + + toJSON(message: TankDefinition): unknown { + const obj: any = {}; + if (message.id !== 0) { + obj.id = Math.round(message.id); + } + if (message.roles) { + const entries = Object.entries(message.roles); + if (entries.length > 0) { + obj.roles = {}; + entries.forEach(([k, v]) => { + obj.roles[k] = Math.round(v); + }); + } + } + if (message.fixed_camouflage !== false) { + obj.fixed_camouflage = message.fixed_camouflage; + } + if (message.camouflages?.length) { + obj.camouflages = message.camouflages.map((e) => Math.round(e)); + } + if (message.ancestors?.length) { + obj.ancestors = message.ancestors.map((e) => Math.round(e)); + } + if (message.successors?.length) { + obj.successors = message.successors.map((e) => Math.round(e)); + } + if (message.crew?.length) { + obj.crew = message.crew.map((e) => Crew.toJSON(e)); + } + if (message.health !== 0) { + obj.health = Math.round(message.health); + } + if (message.nation !== "") { + obj.nation = message.nation; + } + if (message.name !== undefined) { + obj.name = I18nString.toJSON(message.name); + } + if (message.name_full !== undefined) { + obj.name_full = I18nString.toJSON(message.name_full); + } + if (message.type !== 0) { + obj.type = tankTypeToJSON(message.type); + } + if (message.max_consumables !== 0) { + obj.max_consumables = Math.round(message.max_consumables); + } + if (message.max_provisions !== 0) { + obj.max_provisions = Math.round(message.max_provisions); + } + if (message.tier !== 0) { + obj.tier = Math.round(message.tier); + } + if (message.class !== 0) { + obj.class = tankClassToJSON(message.class); + } + if (message.testing !== false) { + obj.testing = message.testing; + } + if (message.deprecated !== false) { + obj.deprecated = message.deprecated; + } + if (message.turrets?.length) { + obj.turrets = message.turrets.map((e) => TurretDefinition.toJSON(e)); + } + if (message.engines?.length) { + obj.engines = message.engines.map((e) => EngineDefinition.toJSON(e)); + } + if (message.tracks?.length) { + obj.tracks = message.tracks.map((e) => TrackDefinition.toJSON(e)); + } + if (message.price !== undefined) { + obj.price = TankPrice.toJSON(message.price); + } + if (message.research_cost !== undefined) { + obj.research_cost = ResearchCost.toJSON(message.research_cost); + } + if (message.speed_forwards !== 0) { + obj.speed_forwards = message.speed_forwards; + } + if (message.speed_backwards !== 0) { + obj.speed_backwards = message.speed_backwards; + } + if (message.camouflage_still !== 0) { + obj.camouflage_still = message.camouflage_still; + } + if (message.camouflage_moving !== 0) { + obj.camouflage_moving = message.camouflage_moving; + } + if (message.camouflage_onFire !== 0) { + obj.camouflage_onFire = message.camouflage_onFire; + } + if (message.equipment_preset !== "") { + obj.equipment_preset = message.equipment_preset; + } + if (message.weight !== 0) { + obj.weight = Math.round(message.weight); + } + return obj; + }, + + create, I>>(base?: I): TankDefinition { + return TankDefinition.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): TankDefinition { + const message = createBaseTankDefinition(); + message.id = object.id ?? 0; + message.roles = Object.entries(object.roles ?? {}).reduce<{ [key: number]: number }>((acc, [key, value]) => { + if (value !== undefined) { + acc[globalThis.Number(key)] = globalThis.Number(value); + } + return acc; + }, {}); + message.fixed_camouflage = object.fixed_camouflage ?? false; + message.camouflages = object.camouflages?.map((e) => e) || []; + message.ancestors = object.ancestors?.map((e) => e) || []; + message.successors = object.successors?.map((e) => e) || []; + message.crew = object.crew?.map((e) => Crew.fromPartial(e)) || []; + message.health = object.health ?? 0; + message.nation = object.nation ?? ""; + message.name = (object.name !== undefined && object.name !== null) + ? I18nString.fromPartial(object.name) + : createBaseI18nString(); + message.name_full = (object.name_full !== undefined && object.name_full !== null) + ? I18nString.fromPartial(object.name_full) + : undefined; + message.type = object.type ?? 0; + message.max_consumables = object.max_consumables ?? 0; + message.max_provisions = object.max_provisions ?? 0; + message.tier = object.tier ?? 0; + message.class = object.class ?? 0; + message.testing = object.testing ?? false; + message.deprecated = object.deprecated ?? false; + message.turrets = object.turrets?.map((e) => TurretDefinition.fromPartial(e)) || []; + message.engines = object.engines?.map((e) => EngineDefinition.fromPartial(e)) || []; + message.tracks = object.tracks?.map((e) => TrackDefinition.fromPartial(e)) || []; + message.price = (object.price !== undefined && object.price !== null) + ? TankPrice.fromPartial(object.price) + : createBaseTankPrice(); + message.research_cost = (object.research_cost !== undefined && object.research_cost !== null) + ? ResearchCost.fromPartial(object.research_cost) + : undefined; + message.speed_forwards = object.speed_forwards ?? 0; + message.speed_backwards = object.speed_backwards ?? 0; + message.camouflage_still = object.camouflage_still ?? 0; + message.camouflage_moving = object.camouflage_moving ?? 0; + message.camouflage_onFire = object.camouflage_onFire ?? 0; + message.equipment_preset = object.equipment_preset ?? ""; + message.weight = object.weight ?? 0; + return message; + }, +}; + +function createBaseTankDefinition_RolesEntry(): TankDefinition_RolesEntry { + return { key: 0, value: 0 }; +} + +export const TankDefinition_RolesEntry: MessageFns = { + encode(message: TankDefinition_RolesEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.key !== undefined) { + writer.uint32(8).uint32(message.key); + } + if (message.value !== undefined) { + writer.uint32(16).uint32(message.value); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): TankDefinition_RolesEntry { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTankDefinition_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 !== 16) { + break; + } + + message.value = reader.uint32(); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): TankDefinition_RolesEntry { + return { + key: globalThis.Number(assertSet("TankDefinition_RolesEntry.key", object.key)), + value: globalThis.Number(assertSet("TankDefinition_RolesEntry.value", object.value)), + }; + }, + + toJSON(message: TankDefinition_RolesEntry): unknown { + const obj: any = {}; + if (message.key !== undefined) { + obj.key = Math.round(message.key); + } + if (message.value !== undefined) { + obj.value = Math.round(message.value); + } + return obj; + }, + + create, I>>(base?: I): TankDefinition_RolesEntry { + return TankDefinition_RolesEntry.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): TankDefinition_RolesEntry { + const message = createBaseTankDefinition_RolesEntry(); + message.key = object.key ?? 0; + message.value = object.value ?? 0; + return message; + }, +}; + +function createBaseResearchCost(): ResearchCost { + return { research_cost_type: undefined }; +} + +export const ResearchCost: MessageFns = { + encode(message: ResearchCost, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + switch (message.research_cost_type?.$case) { + case "xp": + writer.uint32(8).uint32(message.research_cost_type.value); + break; + case "seasonal_tokens": + ResearchCostSeasonalTokens.encode(message.research_cost_type.value, writer.uint32(18).fork()).join(); + break; + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): ResearchCost { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseResearchCost(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 8) { + break; + } + + message.research_cost_type = { $case: "xp", value: reader.uint32() }; + continue; + } + case 2: { + if (tag !== 18) { + break; + } + + message.research_cost_type = { + $case: "seasonal_tokens", + value: ResearchCostSeasonalTokens.decode(reader, reader.uint32()), + }; + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): ResearchCost { + return { + research_cost_type: isSet(object.xp) + ? { $case: "xp", value: globalThis.Number(object.xp) } + : isSet(object.seasonal_tokens) + ? { $case: "seasonal_tokens", value: ResearchCostSeasonalTokens.fromJSON(object.seasonal_tokens) } + : undefined, + }; + }, + + toJSON(message: ResearchCost): unknown { + const obj: any = {}; + if (message.research_cost_type?.$case === "xp") { + obj.xp = Math.round(message.research_cost_type.value); + } + if (message.research_cost_type?.$case === "seasonal_tokens") { + obj.seasonal_tokens = ResearchCostSeasonalTokens.toJSON(message.research_cost_type.value); + } + return obj; + }, + + create, I>>(base?: I): ResearchCost { + return ResearchCost.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): ResearchCost { + const message = createBaseResearchCost(); + if ( + object.research_cost_type?.$case === "xp" && + object.research_cost_type?.value !== undefined && + object.research_cost_type?.value !== null + ) { + message.research_cost_type = { $case: "xp", value: object.research_cost_type.value }; + } + if ( + object.research_cost_type?.$case === "seasonal_tokens" && + object.research_cost_type?.value !== undefined && + object.research_cost_type?.value !== null + ) { + message.research_cost_type = { + $case: "seasonal_tokens", + value: ResearchCostSeasonalTokens.fromPartial(object.research_cost_type.value), + }; + } + return message; + }, +}; + +function createBaseResearchCostSeasonalTokens(): ResearchCostSeasonalTokens { + return { season: 0, tokens: 0 }; +} + +export const ResearchCostSeasonalTokens: MessageFns = { + encode(message: ResearchCostSeasonalTokens, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.season !== 0) { + writer.uint32(8).uint32(message.season); + } + if (message.tokens !== 0) { + writer.uint32(16).uint32(message.tokens); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): ResearchCostSeasonalTokens { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseResearchCostSeasonalTokens(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 8) { + break; + } + + message.season = reader.uint32(); + continue; + } + case 2: { + if (tag !== 16) { + break; + } + + message.tokens = reader.uint32(); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): ResearchCostSeasonalTokens { + return { + season: globalThis.Number(assertSet("ResearchCostSeasonalTokens.season", object.season)), + tokens: globalThis.Number(assertSet("ResearchCostSeasonalTokens.tokens", object.tokens)), + }; + }, + + toJSON(message: ResearchCostSeasonalTokens): unknown { + const obj: any = {}; + if (message.season !== 0) { + obj.season = Math.round(message.season); + } + if (message.tokens !== 0) { + obj.tokens = Math.round(message.tokens); + } + return obj; + }, + + create, I>>(base?: I): ResearchCostSeasonalTokens { + return ResearchCostSeasonalTokens.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): ResearchCostSeasonalTokens { + const message = createBaseResearchCostSeasonalTokens(); + message.season = object.season ?? 0; + message.tokens = object.tokens ?? 0; + return message; + }, +}; + +function createBaseTankPrice(): TankPrice { + return { type: 0, value: 0 }; +} + +export const TankPrice: MessageFns = { + encode(message: TankPrice, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.type !== 0) { + writer.uint32(8).int32(message.type); + } + if (message.value !== 0) { + writer.uint32(16).uint32(message.value); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): TankPrice { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTankPrice(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 8) { + break; + } + + message.type = reader.int32() as any; + continue; + } + case 2: { + if (tag !== 16) { + break; + } + + message.value = reader.uint32(); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): TankPrice { + return { + type: tankPriceTypeFromJSON(assertSet("TankPrice.type", object.type)), + value: globalThis.Number(assertSet("TankPrice.value", object.value)), + }; + }, + + toJSON(message: TankPrice): unknown { + const obj: any = {}; + if (message.type !== 0) { + obj.type = tankPriceTypeToJSON(message.type); + } + if (message.value !== 0) { + obj.value = Math.round(message.value); + } + return obj; + }, + + create, I>>(base?: I): TankPrice { + return TankPrice.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): TankPrice { + const message = createBaseTankPrice(); + message.type = object.type ?? 0; + message.value = object.value ?? 0; + return message; + }, +}; + +function createBaseTrackDefinition(): TrackDefinition { + return { + id: 0, + tier: 0, + name: createBaseI18nString(), + weight: 0, + traverse_speed: 0, + research_cost: undefined, + dispersion_move: 0, + dispersion_traverse: 0, + resistance_hard: 0, + resistance_medium: 0, + resistance_soft: 0, + unlocks: [], + }; +} + +export const TrackDefinition: MessageFns = { + encode(message: TrackDefinition, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.id !== 0) { + writer.uint32(8).uint32(message.id); + } + if (message.tier !== 0) { + writer.uint32(16).uint32(message.tier); + } + if (message.name !== undefined) { + I18nString.encode(message.name, writer.uint32(26).fork()).join(); + } + if (message.weight !== 0) { + writer.uint32(32).uint32(message.weight); + } + if (message.traverse_speed !== 0) { + writer.uint32(45).float(message.traverse_speed); + } + if (message.research_cost !== undefined) { + ResearchCost.encode(message.research_cost, writer.uint32(50).fork()).join(); + } + if (message.dispersion_move !== 0) { + writer.uint32(61).float(message.dispersion_move); + } + if (message.dispersion_traverse !== 0) { + writer.uint32(69).float(message.dispersion_traverse); + } + if (message.resistance_hard !== 0) { + writer.uint32(77).float(message.resistance_hard); + } + if (message.resistance_medium !== 0) { + writer.uint32(85).float(message.resistance_medium); + } + if (message.resistance_soft !== 0) { + writer.uint32(93).float(message.resistance_soft); + } + for (const v of message.unlocks) { + Unlock.encode(v!, writer.uint32(98).fork()).join(); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): TrackDefinition { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTrackDefinition(); + 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.tier = reader.uint32(); + continue; + } + case 3: { + if (tag !== 26) { + break; + } + + message.name = I18nString.decode(reader, reader.uint32()); + continue; + } + case 4: { + if (tag !== 32) { + break; + } + + message.weight = reader.uint32(); + continue; + } + case 5: { + if (tag !== 45) { + break; + } + + message.traverse_speed = reader.float(); + continue; + } + case 6: { + if (tag !== 50) { + break; + } + + message.research_cost = ResearchCost.decode(reader, reader.uint32()); + continue; + } + case 7: { + if (tag !== 61) { + break; + } + + message.dispersion_move = reader.float(); + continue; + } + case 8: { + if (tag !== 69) { + break; + } + + message.dispersion_traverse = reader.float(); + continue; + } + case 9: { + if (tag !== 77) { + break; + } + + message.resistance_hard = reader.float(); + continue; + } + case 10: { + if (tag !== 85) { + break; + } + + message.resistance_medium = reader.float(); + continue; + } + case 11: { + if (tag !== 93) { + break; + } + + message.resistance_soft = reader.float(); + continue; + } + case 12: { + if (tag !== 98) { + break; + } + + message.unlocks.push(Unlock.decode(reader, reader.uint32())); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): TrackDefinition { + return { + id: globalThis.Number(assertSet("TrackDefinition.id", object.id)), + tier: globalThis.Number(assertSet("TrackDefinition.tier", object.tier)), + name: I18nString.fromJSON(assertSet("TrackDefinition.name", object.name)), + weight: globalThis.Number(assertSet("TrackDefinition.weight", object.weight)), + traverse_speed: globalThis.Number(assertSet("TrackDefinition.traverse_speed", object.traverse_speed)), + research_cost: isSet(object.research_cost) ? ResearchCost.fromJSON(object.research_cost) : undefined, + dispersion_move: globalThis.Number(assertSet("TrackDefinition.dispersion_move", object.dispersion_move)), + dispersion_traverse: globalThis.Number( + assertSet("TrackDefinition.dispersion_traverse", object.dispersion_traverse), + ), + resistance_hard: globalThis.Number(assertSet("TrackDefinition.resistance_hard", object.resistance_hard)), + resistance_medium: globalThis.Number(assertSet("TrackDefinition.resistance_medium", object.resistance_medium)), + resistance_soft: globalThis.Number(assertSet("TrackDefinition.resistance_soft", object.resistance_soft)), + unlocks: globalThis.Array.isArray(object?.unlocks) ? object.unlocks.map((e: any) => Unlock.fromJSON(e)) : [], + }; + }, + + toJSON(message: TrackDefinition): unknown { + const obj: any = {}; + if (message.id !== 0) { + obj.id = Math.round(message.id); + } + if (message.tier !== 0) { + obj.tier = Math.round(message.tier); + } + if (message.name !== undefined) { + obj.name = I18nString.toJSON(message.name); + } + if (message.weight !== 0) { + obj.weight = Math.round(message.weight); + } + if (message.traverse_speed !== 0) { + obj.traverse_speed = message.traverse_speed; + } + if (message.research_cost !== undefined) { + obj.research_cost = ResearchCost.toJSON(message.research_cost); + } + if (message.dispersion_move !== 0) { + obj.dispersion_move = message.dispersion_move; + } + if (message.dispersion_traverse !== 0) { + obj.dispersion_traverse = message.dispersion_traverse; + } + if (message.resistance_hard !== 0) { + obj.resistance_hard = message.resistance_hard; + } + if (message.resistance_medium !== 0) { + obj.resistance_medium = message.resistance_medium; + } + if (message.resistance_soft !== 0) { + obj.resistance_soft = message.resistance_soft; + } + if (message.unlocks?.length) { + obj.unlocks = message.unlocks.map((e) => Unlock.toJSON(e)); + } + return obj; + }, + + create, I>>(base?: I): TrackDefinition { + return TrackDefinition.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): TrackDefinition { + const message = createBaseTrackDefinition(); + message.id = object.id ?? 0; + message.tier = object.tier ?? 0; + message.name = (object.name !== undefined && object.name !== null) + ? I18nString.fromPartial(object.name) + : createBaseI18nString(); + message.weight = object.weight ?? 0; + message.traverse_speed = object.traverse_speed ?? 0; + message.research_cost = (object.research_cost !== undefined && object.research_cost !== null) + ? ResearchCost.fromPartial(object.research_cost) + : undefined; + message.dispersion_move = object.dispersion_move ?? 0; + message.dispersion_traverse = object.dispersion_traverse ?? 0; + message.resistance_hard = object.resistance_hard ?? 0; + message.resistance_medium = object.resistance_medium ?? 0; + message.resistance_soft = object.resistance_soft ?? 0; + message.unlocks = object.unlocks?.map((e) => Unlock.fromPartial(e)) || []; + return message; + }, +}; + +function createBaseEngineDefinition(): EngineDefinition { + return { + id: 0, + name: createBaseI18nString(), + research_cost: undefined, + tier: 0, + fire_chance: 0, + power: 0, + weight: 0, + unlocks: [], + }; +} + +export const EngineDefinition: MessageFns = { + encode(message: EngineDefinition, 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.research_cost !== undefined) { + ResearchCost.encode(message.research_cost, writer.uint32(26).fork()).join(); + } + if (message.tier !== 0) { + writer.uint32(32).uint32(message.tier); + } + if (message.fire_chance !== 0) { + writer.uint32(45).float(message.fire_chance); + } + if (message.power !== 0) { + writer.uint32(48).uint32(message.power); + } + if (message.weight !== 0) { + writer.uint32(56).uint32(message.weight); + } + for (const v of message.unlocks) { + Unlock.encode(v!, writer.uint32(66).fork()).join(); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): EngineDefinition { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseEngineDefinition(); + 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.research_cost = ResearchCost.decode(reader, reader.uint32()); + continue; + } + case 4: { + if (tag !== 32) { + break; + } + + message.tier = reader.uint32(); + continue; + } + case 5: { + if (tag !== 45) { + break; + } + + message.fire_chance = reader.float(); + continue; + } + case 6: { + if (tag !== 48) { + break; + } + + message.power = reader.uint32(); + continue; + } + case 7: { + if (tag !== 56) { + break; + } + + message.weight = reader.uint32(); + continue; + } + case 8: { + if (tag !== 66) { + break; + } + + message.unlocks.push(Unlock.decode(reader, reader.uint32())); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): EngineDefinition { + return { + id: globalThis.Number(assertSet("EngineDefinition.id", object.id)), + name: I18nString.fromJSON(assertSet("EngineDefinition.name", object.name)), + research_cost: isSet(object.research_cost) ? ResearchCost.fromJSON(object.research_cost) : undefined, + tier: globalThis.Number(assertSet("EngineDefinition.tier", object.tier)), + fire_chance: globalThis.Number(assertSet("EngineDefinition.fire_chance", object.fire_chance)), + power: globalThis.Number(assertSet("EngineDefinition.power", object.power)), + weight: globalThis.Number(assertSet("EngineDefinition.weight", object.weight)), + unlocks: globalThis.Array.isArray(object?.unlocks) ? object.unlocks.map((e: any) => Unlock.fromJSON(e)) : [], + }; + }, + + toJSON(message: EngineDefinition): 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.research_cost !== undefined) { + obj.research_cost = ResearchCost.toJSON(message.research_cost); + } + if (message.tier !== 0) { + obj.tier = Math.round(message.tier); + } + if (message.fire_chance !== 0) { + obj.fire_chance = message.fire_chance; + } + if (message.power !== 0) { + obj.power = Math.round(message.power); + } + if (message.weight !== 0) { + obj.weight = Math.round(message.weight); + } + if (message.unlocks?.length) { + obj.unlocks = message.unlocks.map((e) => Unlock.toJSON(e)); + } + return obj; + }, + + create, I>>(base?: I): EngineDefinition { + return EngineDefinition.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): EngineDefinition { + const message = createBaseEngineDefinition(); + message.id = object.id ?? 0; + message.name = (object.name !== undefined && object.name !== null) + ? I18nString.fromPartial(object.name) + : createBaseI18nString(); + message.research_cost = (object.research_cost !== undefined && object.research_cost !== null) + ? ResearchCost.fromPartial(object.research_cost) + : undefined; + message.tier = object.tier ?? 0; + message.fire_chance = object.fire_chance ?? 0; + message.power = object.power ?? 0; + message.weight = object.weight ?? 0; + message.unlocks = object.unlocks?.map((e) => Unlock.fromPartial(e)) || []; + return message; + }, +}; + +function createBaseTurretDefinition(): TurretDefinition { + return { + id: 0, + health: 0, + view_range: 0, + traverse_speed: 0, + research_cost: undefined, + name: createBaseI18nString(), + tier: 0, + weight: 0, + guns: [], + unlocks: [], + }; +} + +export const TurretDefinition: MessageFns = { + encode(message: TurretDefinition, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.id !== 0) { + writer.uint32(8).uint32(message.id); + } + if (message.health !== 0) { + writer.uint32(16).uint32(message.health); + } + if (message.view_range !== 0) { + writer.uint32(24).uint32(message.view_range); + } + if (message.traverse_speed !== 0) { + writer.uint32(37).float(message.traverse_speed); + } + if (message.research_cost !== undefined) { + ResearchCost.encode(message.research_cost, writer.uint32(42).fork()).join(); + } + if (message.name !== undefined) { + I18nString.encode(message.name, writer.uint32(50).fork()).join(); + } + if (message.tier !== 0) { + writer.uint32(56).uint32(message.tier); + } + if (message.weight !== 0) { + writer.uint32(64).uint32(message.weight); + } + for (const v of message.guns) { + GunDefinition.encode(v!, writer.uint32(74).fork()).join(); + } + for (const v of message.unlocks) { + Unlock.encode(v!, writer.uint32(82).fork()).join(); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): TurretDefinition { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTurretDefinition(); + 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.health = reader.uint32(); + continue; + } + case 3: { + if (tag !== 24) { + break; + } + + message.view_range = reader.uint32(); + continue; + } + case 4: { + if (tag !== 37) { + break; + } + + message.traverse_speed = reader.float(); + continue; + } + case 5: { + if (tag !== 42) { + break; + } + + message.research_cost = ResearchCost.decode(reader, reader.uint32()); + continue; + } + case 6: { + if (tag !== 50) { + break; + } + + message.name = I18nString.decode(reader, reader.uint32()); + continue; + } + case 7: { + if (tag !== 56) { + break; + } + + message.tier = reader.uint32(); + continue; + } + case 8: { + if (tag !== 64) { + break; + } + + message.weight = reader.uint32(); + continue; + } + case 9: { + if (tag !== 74) { + break; + } + + message.guns.push(GunDefinition.decode(reader, reader.uint32())); + continue; + } + case 10: { + if (tag !== 82) { + break; + } + + message.unlocks.push(Unlock.decode(reader, reader.uint32())); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): TurretDefinition { + return { + id: globalThis.Number(assertSet("TurretDefinition.id", object.id)), + health: globalThis.Number(assertSet("TurretDefinition.health", object.health)), + view_range: globalThis.Number(assertSet("TurretDefinition.view_range", object.view_range)), + traverse_speed: globalThis.Number(assertSet("TurretDefinition.traverse_speed", object.traverse_speed)), + research_cost: isSet(object.research_cost) ? ResearchCost.fromJSON(object.research_cost) : undefined, + name: I18nString.fromJSON(assertSet("TurretDefinition.name", object.name)), + tier: globalThis.Number(assertSet("TurretDefinition.tier", object.tier)), + weight: globalThis.Number(assertSet("TurretDefinition.weight", object.weight)), + guns: globalThis.Array.isArray(object?.guns) ? object.guns.map((e: any) => GunDefinition.fromJSON(e)) : [], + unlocks: globalThis.Array.isArray(object?.unlocks) ? object.unlocks.map((e: any) => Unlock.fromJSON(e)) : [], + }; + }, + + toJSON(message: TurretDefinition): unknown { + const obj: any = {}; + if (message.id !== 0) { + obj.id = Math.round(message.id); + } + if (message.health !== 0) { + obj.health = Math.round(message.health); + } + if (message.view_range !== 0) { + obj.view_range = Math.round(message.view_range); + } + if (message.traverse_speed !== 0) { + obj.traverse_speed = message.traverse_speed; + } + if (message.research_cost !== undefined) { + obj.research_cost = ResearchCost.toJSON(message.research_cost); + } + if (message.name !== undefined) { + obj.name = I18nString.toJSON(message.name); + } + if (message.tier !== 0) { + obj.tier = Math.round(message.tier); + } + if (message.weight !== 0) { + obj.weight = Math.round(message.weight); + } + if (message.guns?.length) { + obj.guns = message.guns.map((e) => GunDefinition.toJSON(e)); + } + if (message.unlocks?.length) { + obj.unlocks = message.unlocks.map((e) => Unlock.toJSON(e)); + } + return obj; + }, + + create, I>>(base?: I): TurretDefinition { + return TurretDefinition.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): TurretDefinition { + const message = createBaseTurretDefinition(); + message.id = object.id ?? 0; + message.health = object.health ?? 0; + message.view_range = object.view_range ?? 0; + message.traverse_speed = object.traverse_speed ?? 0; + message.research_cost = (object.research_cost !== undefined && object.research_cost !== null) + ? ResearchCost.fromPartial(object.research_cost) + : undefined; + message.name = (object.name !== undefined && object.name !== null) + ? I18nString.fromPartial(object.name) + : createBaseI18nString(); + message.tier = object.tier ?? 0; + message.weight = object.weight ?? 0; + message.guns = object.guns?.map((e) => GunDefinition.fromPartial(e)) || []; + message.unlocks = object.unlocks?.map((e) => Unlock.fromPartial(e)) || []; + return message; + }, +}; + +function createBaseGunDefinition(): GunDefinition { + return { gun_type: undefined }; +} + +export const GunDefinition: MessageFns = { + encode(message: GunDefinition, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + switch (message.gun_type?.$case) { + case "regular": + GunDefinitionRegular.encode(message.gun_type.value, writer.uint32(10).fork()).join(); + break; + case "auto_loader": + GunDefinitionAutoLoader.encode(message.gun_type.value, writer.uint32(18).fork()).join(); + break; + case "auto_reloader": + GunDefinitionAutoReloader.encode(message.gun_type.value, writer.uint32(26).fork()).join(); + break; + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): GunDefinition { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGunDefinition(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break; + } + + message.gun_type = { $case: "regular", value: GunDefinitionRegular.decode(reader, reader.uint32()) }; + continue; + } + case 2: { + if (tag !== 18) { + break; + } + + message.gun_type = { $case: "auto_loader", value: GunDefinitionAutoLoader.decode(reader, reader.uint32()) }; + continue; + } + case 3: { + if (tag !== 26) { + break; + } + + message.gun_type = { + $case: "auto_reloader", + value: GunDefinitionAutoReloader.decode(reader, reader.uint32()), + }; + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): GunDefinition { + return { + gun_type: isSet(object.regular) + ? { $case: "regular", value: GunDefinitionRegular.fromJSON(object.regular) } + : isSet(object.auto_loader) + ? { $case: "auto_loader", value: GunDefinitionAutoLoader.fromJSON(object.auto_loader) } + : isSet(object.auto_reloader) + ? { $case: "auto_reloader", value: GunDefinitionAutoReloader.fromJSON(object.auto_reloader) } + : undefined, + }; + }, + + toJSON(message: GunDefinition): unknown { + const obj: any = {}; + if (message.gun_type?.$case === "regular") { + obj.regular = GunDefinitionRegular.toJSON(message.gun_type.value); + } + if (message.gun_type?.$case === "auto_loader") { + obj.auto_loader = GunDefinitionAutoLoader.toJSON(message.gun_type.value); + } + if (message.gun_type?.$case === "auto_reloader") { + obj.auto_reloader = GunDefinitionAutoReloader.toJSON(message.gun_type.value); + } + return obj; + }, + + create, I>>(base?: I): GunDefinition { + return GunDefinition.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): GunDefinition { + const message = createBaseGunDefinition(); + if ( + object.gun_type?.$case === "regular" && object.gun_type?.value !== undefined && object.gun_type?.value !== null + ) { + message.gun_type = { $case: "regular", value: GunDefinitionRegular.fromPartial(object.gun_type.value) }; + } + if ( + object.gun_type?.$case === "auto_loader" && + object.gun_type?.value !== undefined && + object.gun_type?.value !== null + ) { + message.gun_type = { $case: "auto_loader", value: GunDefinitionAutoLoader.fromPartial(object.gun_type.value) }; + } + if ( + object.gun_type?.$case === "auto_reloader" && + object.gun_type?.value !== undefined && + object.gun_type?.value !== null + ) { + message.gun_type = { + $case: "auto_reloader", + value: GunDefinitionAutoReloader.fromPartial(object.gun_type.value), + }; + } + return message; + }, +}; + +function createBaseGunDefinitionRegular(): GunDefinitionRegular { + return { base: createBaseGunDefinitionBase(), extension: createBaseGunDefinitionRegularProperties() }; +} + +export const GunDefinitionRegular: MessageFns = { + encode(message: GunDefinitionRegular, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.base !== undefined) { + GunDefinitionBase.encode(message.base, writer.uint32(10).fork()).join(); + } + if (message.extension !== undefined) { + GunDefinitionRegularProperties.encode(message.extension, writer.uint32(18).fork()).join(); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): GunDefinitionRegular { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGunDefinitionRegular(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break; + } + + message.base = GunDefinitionBase.decode(reader, reader.uint32()); + continue; + } + case 2: { + if (tag !== 18) { + break; + } + + message.extension = GunDefinitionRegularProperties.decode(reader, reader.uint32()); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): GunDefinitionRegular { + return { + base: GunDefinitionBase.fromJSON(assertSet("GunDefinitionRegular.base", object.base)), + extension: GunDefinitionRegularProperties.fromJSON(assertSet("GunDefinitionRegular.extension", object.extension)), + }; + }, + + toJSON(message: GunDefinitionRegular): unknown { + const obj: any = {}; + if (message.base !== undefined) { + obj.base = GunDefinitionBase.toJSON(message.base); + } + if (message.extension !== undefined) { + obj.extension = GunDefinitionRegularProperties.toJSON(message.extension); + } + return obj; + }, + + create, I>>(base?: I): GunDefinitionRegular { + return GunDefinitionRegular.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): GunDefinitionRegular { + const message = createBaseGunDefinitionRegular(); + message.base = (object.base !== undefined && object.base !== null) + ? GunDefinitionBase.fromPartial(object.base) + : createBaseGunDefinitionBase(); + message.extension = (object.extension !== undefined && object.extension !== null) + ? GunDefinitionRegularProperties.fromPartial(object.extension) + : createBaseGunDefinitionRegularProperties(); + return message; + }, +}; + +function createBaseGunDefinitionRegularProperties(): GunDefinitionRegularProperties { + return { reload: 0 }; +} + +export const GunDefinitionRegularProperties: MessageFns = { + encode(message: GunDefinitionRegularProperties, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.reload !== 0) { + writer.uint32(13).float(message.reload); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): GunDefinitionRegularProperties { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGunDefinitionRegularProperties(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 13) { + break; + } + + message.reload = reader.float(); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): GunDefinitionRegularProperties { + return { reload: globalThis.Number(assertSet("GunDefinitionRegularProperties.reload", object.reload)) }; + }, + + toJSON(message: GunDefinitionRegularProperties): unknown { + const obj: any = {}; + if (message.reload !== 0) { + obj.reload = message.reload; + } + return obj; + }, + + create, I>>(base?: I): GunDefinitionRegularProperties { + return GunDefinitionRegularProperties.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): GunDefinitionRegularProperties { + const message = createBaseGunDefinitionRegularProperties(); + message.reload = object.reload ?? 0; + return message; + }, +}; + +function createBaseGunDefinitionAutoLoader(): GunDefinitionAutoLoader { + return { base: createBaseGunDefinitionBase(), extension: createBaseGunDefinitionAutoLoaderProperties() }; +} + +export const GunDefinitionAutoLoader: MessageFns = { + encode(message: GunDefinitionAutoLoader, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.base !== undefined) { + GunDefinitionBase.encode(message.base, writer.uint32(10).fork()).join(); + } + if (message.extension !== undefined) { + GunDefinitionAutoLoaderProperties.encode(message.extension, writer.uint32(18).fork()).join(); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): GunDefinitionAutoLoader { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGunDefinitionAutoLoader(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break; + } + + message.base = GunDefinitionBase.decode(reader, reader.uint32()); + continue; + } + case 2: { + if (tag !== 18) { + break; + } + + message.extension = GunDefinitionAutoLoaderProperties.decode(reader, reader.uint32()); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): GunDefinitionAutoLoader { + return { + base: GunDefinitionBase.fromJSON(assertSet("GunDefinitionAutoLoader.base", object.base)), + extension: GunDefinitionAutoLoaderProperties.fromJSON( + assertSet("GunDefinitionAutoLoader.extension", object.extension), + ), + }; + }, + + toJSON(message: GunDefinitionAutoLoader): unknown { + const obj: any = {}; + if (message.base !== undefined) { + obj.base = GunDefinitionBase.toJSON(message.base); + } + if (message.extension !== undefined) { + obj.extension = GunDefinitionAutoLoaderProperties.toJSON(message.extension); + } + return obj; + }, + + create, I>>(base?: I): GunDefinitionAutoLoader { + return GunDefinitionAutoLoader.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): GunDefinitionAutoLoader { + const message = createBaseGunDefinitionAutoLoader(); + message.base = (object.base !== undefined && object.base !== null) + ? GunDefinitionBase.fromPartial(object.base) + : createBaseGunDefinitionBase(); + message.extension = (object.extension !== undefined && object.extension !== null) + ? GunDefinitionAutoLoaderProperties.fromPartial(object.extension) + : createBaseGunDefinitionAutoLoaderProperties(); + return message; + }, +}; + +function createBaseGunDefinitionAutoLoaderProperties(): GunDefinitionAutoLoaderProperties { + return { clip_reload: 0, intra_clip: 0, shell_count: 0 }; +} + +export const GunDefinitionAutoLoaderProperties: MessageFns = { + encode(message: GunDefinitionAutoLoaderProperties, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.clip_reload !== 0) { + writer.uint32(13).float(message.clip_reload); + } + if (message.intra_clip !== 0) { + writer.uint32(21).float(message.intra_clip); + } + if (message.shell_count !== 0) { + writer.uint32(29).float(message.shell_count); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): GunDefinitionAutoLoaderProperties { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGunDefinitionAutoLoaderProperties(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 13) { + break; + } + + message.clip_reload = reader.float(); + continue; + } + case 2: { + if (tag !== 21) { + break; + } + + message.intra_clip = reader.float(); + continue; + } + case 3: { + if (tag !== 29) { + break; + } + + message.shell_count = reader.float(); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): GunDefinitionAutoLoaderProperties { + return { + clip_reload: globalThis.Number(assertSet("GunDefinitionAutoLoaderProperties.clip_reload", object.clip_reload)), + intra_clip: globalThis.Number(assertSet("GunDefinitionAutoLoaderProperties.intra_clip", object.intra_clip)), + shell_count: globalThis.Number(assertSet("GunDefinitionAutoLoaderProperties.shell_count", object.shell_count)), + }; + }, + + toJSON(message: GunDefinitionAutoLoaderProperties): unknown { + const obj: any = {}; + if (message.clip_reload !== 0) { + obj.clip_reload = message.clip_reload; + } + if (message.intra_clip !== 0) { + obj.intra_clip = message.intra_clip; + } + if (message.shell_count !== 0) { + obj.shell_count = message.shell_count; + } + return obj; + }, + + create, I>>( + base?: I, + ): GunDefinitionAutoLoaderProperties { + return GunDefinitionAutoLoaderProperties.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): GunDefinitionAutoLoaderProperties { + const message = createBaseGunDefinitionAutoLoaderProperties(); + message.clip_reload = object.clip_reload ?? 0; + message.intra_clip = object.intra_clip ?? 0; + message.shell_count = object.shell_count ?? 0; + return message; + }, +}; + +function createBaseGunDefinitionAutoReloader(): GunDefinitionAutoReloader { + return { base: createBaseGunDefinitionBase(), extension: createBaseGunDefinitionAutoReloaderProperties() }; +} + +export const GunDefinitionAutoReloader: MessageFns = { + encode(message: GunDefinitionAutoReloader, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.base !== undefined) { + GunDefinitionBase.encode(message.base, writer.uint32(10).fork()).join(); + } + if (message.extension !== undefined) { + GunDefinitionAutoReloaderProperties.encode(message.extension, writer.uint32(18).fork()).join(); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): GunDefinitionAutoReloader { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGunDefinitionAutoReloader(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break; + } + + message.base = GunDefinitionBase.decode(reader, reader.uint32()); + continue; + } + case 2: { + if (tag !== 18) { + break; + } + + message.extension = GunDefinitionAutoReloaderProperties.decode(reader, reader.uint32()); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): GunDefinitionAutoReloader { + return { + base: GunDefinitionBase.fromJSON(assertSet("GunDefinitionAutoReloader.base", object.base)), + extension: GunDefinitionAutoReloaderProperties.fromJSON( + assertSet("GunDefinitionAutoReloader.extension", object.extension), + ), + }; + }, + + toJSON(message: GunDefinitionAutoReloader): unknown { + const obj: any = {}; + if (message.base !== undefined) { + obj.base = GunDefinitionBase.toJSON(message.base); + } + if (message.extension !== undefined) { + obj.extension = GunDefinitionAutoReloaderProperties.toJSON(message.extension); + } + return obj; + }, + + create, I>>(base?: I): GunDefinitionAutoReloader { + return GunDefinitionAutoReloader.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): GunDefinitionAutoReloader { + const message = createBaseGunDefinitionAutoReloader(); + message.base = (object.base !== undefined && object.base !== null) + ? GunDefinitionBase.fromPartial(object.base) + : createBaseGunDefinitionBase(); + message.extension = (object.extension !== undefined && object.extension !== null) + ? GunDefinitionAutoReloaderProperties.fromPartial(object.extension) + : createBaseGunDefinitionAutoReloaderProperties(); + return message; + }, +}; + +function createBaseGunDefinitionAutoReloaderProperties(): GunDefinitionAutoReloaderProperties { + return { shell_reloads: [], intra_clip: 0, shell_count: 0 }; +} + +export const GunDefinitionAutoReloaderProperties: MessageFns = { + encode(message: GunDefinitionAutoReloaderProperties, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + writer.uint32(10).fork(); + for (const v of message.shell_reloads) { + writer.float(v); + } + writer.join(); + if (message.intra_clip !== 0) { + writer.uint32(21).float(message.intra_clip); + } + if (message.shell_count !== 0) { + writer.uint32(29).float(message.shell_count); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): GunDefinitionAutoReloaderProperties { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGunDefinitionAutoReloaderProperties(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag === 13) { + message.shell_reloads.push(reader.float()); + + continue; + } + + if (tag === 10) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + message.shell_reloads.push(reader.float()); + } + + continue; + } + + break; + } + case 2: { + if (tag !== 21) { + break; + } + + message.intra_clip = reader.float(); + continue; + } + case 3: { + if (tag !== 29) { + break; + } + + message.shell_count = reader.float(); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): GunDefinitionAutoReloaderProperties { + return { + shell_reloads: globalThis.Array.isArray(object?.shell_reloads) + ? object.shell_reloads.map((e: any) => globalThis.Number(e)) + : [], + intra_clip: globalThis.Number(assertSet("GunDefinitionAutoReloaderProperties.intra_clip", object.intra_clip)), + shell_count: globalThis.Number(assertSet("GunDefinitionAutoReloaderProperties.shell_count", object.shell_count)), + }; + }, + + toJSON(message: GunDefinitionAutoReloaderProperties): unknown { + const obj: any = {}; + if (message.shell_reloads?.length) { + obj.shell_reloads = message.shell_reloads; + } + if (message.intra_clip !== 0) { + obj.intra_clip = message.intra_clip; + } + if (message.shell_count !== 0) { + obj.shell_count = message.shell_count; + } + return obj; + }, + + create, I>>( + base?: I, + ): GunDefinitionAutoReloaderProperties { + return GunDefinitionAutoReloaderProperties.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): GunDefinitionAutoReloaderProperties { + const message = createBaseGunDefinitionAutoReloaderProperties(); + message.shell_reloads = object.shell_reloads?.map((e) => e) || []; + message.intra_clip = object.intra_clip ?? 0; + message.shell_count = object.shell_count ?? 0; + return message; + }, +}; + +function createBaseGunDefinitionBase(): GunDefinitionBase { + return { + id: 0, + rotation_speed: 0, + research_cost: undefined, + weight: 0, + name: createBaseI18nString(), + tier: 0, + shells: [], + camouflage_loss: 0, + aim_time: 0, + dispersion_base: 0, + dispersion_traverse: 0, + dispersion_shot: 0, + dispersion_damaged: 0, + unlocks: [], + shell_capacity: 0, + }; +} + +export const GunDefinitionBase: MessageFns = { + encode(message: GunDefinitionBase, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.id !== 0) { + writer.uint32(8).uint32(message.id); + } + if (message.rotation_speed !== 0) { + writer.uint32(21).float(message.rotation_speed); + } + if (message.research_cost !== undefined) { + ResearchCost.encode(message.research_cost, writer.uint32(26).fork()).join(); + } + if (message.weight !== 0) { + writer.uint32(32).uint32(message.weight); + } + if (message.name !== undefined) { + I18nString.encode(message.name, writer.uint32(42).fork()).join(); + } + if (message.tier !== 0) { + writer.uint32(48).uint32(message.tier); + } + for (const v of message.shells) { + ShellDefinition.encode(v!, writer.uint32(58).fork()).join(); + } + if (message.camouflage_loss !== 0) { + writer.uint32(69).float(message.camouflage_loss); + } + if (message.aim_time !== 0) { + writer.uint32(77).float(message.aim_time); + } + if (message.dispersion_base !== 0) { + writer.uint32(85).float(message.dispersion_base); + } + if (message.dispersion_traverse !== 0) { + writer.uint32(93).float(message.dispersion_traverse); + } + if (message.dispersion_shot !== 0) { + writer.uint32(101).float(message.dispersion_shot); + } + if (message.dispersion_damaged !== 0) { + writer.uint32(109).float(message.dispersion_damaged); + } + for (const v of message.unlocks) { + Unlock.encode(v!, writer.uint32(114).fork()).join(); + } + if (message.shell_capacity !== 0) { + writer.uint32(120).uint32(message.shell_capacity); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): GunDefinitionBase { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGunDefinitionBase(); + 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 !== 21) { + break; + } + + message.rotation_speed = reader.float(); + continue; + } + case 3: { + if (tag !== 26) { + break; + } + + message.research_cost = ResearchCost.decode(reader, reader.uint32()); + continue; + } + case 4: { + if (tag !== 32) { + break; + } + + message.weight = reader.uint32(); + continue; + } + case 5: { + if (tag !== 42) { + break; + } + + message.name = I18nString.decode(reader, reader.uint32()); + continue; + } + case 6: { + if (tag !== 48) { + break; + } + + message.tier = reader.uint32(); + continue; + } + case 7: { + if (tag !== 58) { + break; + } + + message.shells.push(ShellDefinition.decode(reader, reader.uint32())); + continue; + } + case 8: { + if (tag !== 69) { + break; + } + + message.camouflage_loss = reader.float(); + continue; + } + case 9: { + if (tag !== 77) { + break; + } + + message.aim_time = reader.float(); + continue; + } + case 10: { + if (tag !== 85) { + break; + } + + message.dispersion_base = reader.float(); + continue; + } + case 11: { + if (tag !== 93) { + break; + } + + message.dispersion_traverse = reader.float(); + continue; + } + case 12: { + if (tag !== 101) { + break; + } + + message.dispersion_shot = reader.float(); + continue; + } + case 13: { + if (tag !== 109) { + break; + } + + message.dispersion_damaged = reader.float(); + continue; + } + case 14: { + if (tag !== 114) { + break; + } + + message.unlocks.push(Unlock.decode(reader, reader.uint32())); + continue; + } + case 15: { + if (tag !== 120) { + break; + } + + message.shell_capacity = reader.uint32(); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): GunDefinitionBase { + return { + id: globalThis.Number(assertSet("GunDefinitionBase.id", object.id)), + rotation_speed: globalThis.Number(assertSet("GunDefinitionBase.rotation_speed", object.rotation_speed)), + research_cost: isSet(object.research_cost) ? ResearchCost.fromJSON(object.research_cost) : undefined, + weight: globalThis.Number(assertSet("GunDefinitionBase.weight", object.weight)), + name: I18nString.fromJSON(assertSet("GunDefinitionBase.name", object.name)), + tier: globalThis.Number(assertSet("GunDefinitionBase.tier", object.tier)), + shells: globalThis.Array.isArray(object?.shells) + ? object.shells.map((e: any) => ShellDefinition.fromJSON(e)) + : [], + camouflage_loss: globalThis.Number(assertSet("GunDefinitionBase.camouflage_loss", object.camouflage_loss)), + aim_time: globalThis.Number(assertSet("GunDefinitionBase.aim_time", object.aim_time)), + dispersion_base: globalThis.Number(assertSet("GunDefinitionBase.dispersion_base", object.dispersion_base)), + dispersion_traverse: globalThis.Number( + assertSet("GunDefinitionBase.dispersion_traverse", object.dispersion_traverse), + ), + dispersion_shot: globalThis.Number(assertSet("GunDefinitionBase.dispersion_shot", object.dispersion_shot)), + dispersion_damaged: globalThis.Number( + assertSet("GunDefinitionBase.dispersion_damaged", object.dispersion_damaged), + ), + unlocks: globalThis.Array.isArray(object?.unlocks) ? object.unlocks.map((e: any) => Unlock.fromJSON(e)) : [], + shell_capacity: globalThis.Number(assertSet("GunDefinitionBase.shell_capacity", object.shell_capacity)), + }; + }, + + toJSON(message: GunDefinitionBase): unknown { + const obj: any = {}; + if (message.id !== 0) { + obj.id = Math.round(message.id); + } + if (message.rotation_speed !== 0) { + obj.rotation_speed = message.rotation_speed; + } + if (message.research_cost !== undefined) { + obj.research_cost = ResearchCost.toJSON(message.research_cost); + } + if (message.weight !== 0) { + obj.weight = Math.round(message.weight); + } + if (message.name !== undefined) { + obj.name = I18nString.toJSON(message.name); + } + if (message.tier !== 0) { + obj.tier = Math.round(message.tier); + } + if (message.shells?.length) { + obj.shells = message.shells.map((e) => ShellDefinition.toJSON(e)); + } + if (message.camouflage_loss !== 0) { + obj.camouflage_loss = message.camouflage_loss; + } + if (message.aim_time !== 0) { + obj.aim_time = message.aim_time; + } + if (message.dispersion_base !== 0) { + obj.dispersion_base = message.dispersion_base; + } + if (message.dispersion_traverse !== 0) { + obj.dispersion_traverse = message.dispersion_traverse; + } + if (message.dispersion_shot !== 0) { + obj.dispersion_shot = message.dispersion_shot; + } + if (message.dispersion_damaged !== 0) { + obj.dispersion_damaged = message.dispersion_damaged; + } + if (message.unlocks?.length) { + obj.unlocks = message.unlocks.map((e) => Unlock.toJSON(e)); + } + if (message.shell_capacity !== 0) { + obj.shell_capacity = Math.round(message.shell_capacity); + } + return obj; + }, + + create, I>>(base?: I): GunDefinitionBase { + return GunDefinitionBase.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): GunDefinitionBase { + const message = createBaseGunDefinitionBase(); + message.id = object.id ?? 0; + message.rotation_speed = object.rotation_speed ?? 0; + message.research_cost = (object.research_cost !== undefined && object.research_cost !== null) + ? ResearchCost.fromPartial(object.research_cost) + : undefined; + message.weight = object.weight ?? 0; + message.name = (object.name !== undefined && object.name !== null) + ? I18nString.fromPartial(object.name) + : createBaseI18nString(); + message.tier = object.tier ?? 0; + message.shells = object.shells?.map((e) => ShellDefinition.fromPartial(e)) || []; + message.camouflage_loss = object.camouflage_loss ?? 0; + message.aim_time = object.aim_time ?? 0; + message.dispersion_base = object.dispersion_base ?? 0; + message.dispersion_traverse = object.dispersion_traverse ?? 0; + message.dispersion_shot = object.dispersion_shot ?? 0; + message.dispersion_damaged = object.dispersion_damaged ?? 0; + message.unlocks = object.unlocks?.map((e) => Unlock.fromPartial(e)) || []; + message.shell_capacity = object.shell_capacity ?? 0; + return message; + }, +}; + +function createBaseShellDefinition(): ShellDefinition { + return { + id: 0, + name: createBaseI18nString(), + velocity: 0, + armor_damage: 0, + module_damage: 0, + caliber: 0, + icon: "", + penetration: createBaseShellPenetration(), + type: 0, + normalization: undefined, + ricochet: undefined, + explosion_radius: undefined, + range: 0, + }; +} + +export const ShellDefinition: MessageFns = { + encode(message: ShellDefinition, 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.velocity !== 0) { + writer.uint32(24).uint32(message.velocity); + } + if (message.armor_damage !== 0) { + writer.uint32(32).uint32(message.armor_damage); + } + if (message.module_damage !== 0) { + writer.uint32(40).uint32(message.module_damage); + } + if (message.caliber !== 0) { + writer.uint32(53).float(message.caliber); + } + if (message.icon !== "") { + writer.uint32(58).string(message.icon); + } + if (message.penetration !== undefined) { + ShellPenetration.encode(message.penetration, writer.uint32(66).fork()).join(); + } + if (message.type !== 0) { + writer.uint32(72).int32(message.type); + } + if (message.normalization !== undefined && message.normalization !== undefined) { + writer.uint32(85).float(message.normalization); + } + if (message.ricochet !== undefined && message.ricochet !== undefined) { + writer.uint32(93).float(message.ricochet); + } + if (message.explosion_radius !== undefined && message.explosion_radius !== undefined) { + writer.uint32(101).float(message.explosion_radius); + } + if (message.range !== 0) { + writer.uint32(104).uint32(message.range); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): ShellDefinition { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseShellDefinition(); + 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.velocity = reader.uint32(); + continue; + } + case 4: { + if (tag !== 32) { + break; + } + + message.armor_damage = reader.uint32(); + continue; + } + case 5: { + if (tag !== 40) { + break; + } + + message.module_damage = reader.uint32(); + continue; + } + case 6: { + if (tag !== 53) { + break; + } + + message.caliber = reader.float(); + continue; + } + case 7: { + if (tag !== 58) { + break; + } + + message.icon = reader.string(); + continue; + } + case 8: { + if (tag !== 66) { + break; + } + + message.penetration = ShellPenetration.decode(reader, reader.uint32()); + continue; + } + case 9: { + if (tag !== 72) { + break; + } + + message.type = reader.int32() as any; + continue; + } + case 10: { + if (tag !== 85) { + break; + } + + message.normalization = reader.float(); + continue; + } + case 11: { + if (tag !== 93) { + break; + } + + message.ricochet = reader.float(); + continue; + } + case 12: { + if (tag !== 101) { + break; + } + + message.explosion_radius = reader.float(); + continue; + } + case 13: { + if (tag !== 104) { + break; + } + + message.range = reader.uint32(); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): ShellDefinition { + return { + id: globalThis.Number(assertSet("ShellDefinition.id", object.id)), + name: I18nString.fromJSON(assertSet("ShellDefinition.name", object.name)), + velocity: globalThis.Number(assertSet("ShellDefinition.velocity", object.velocity)), + armor_damage: globalThis.Number(assertSet("ShellDefinition.armor_damage", object.armor_damage)), + module_damage: globalThis.Number(assertSet("ShellDefinition.module_damage", object.module_damage)), + caliber: globalThis.Number(assertSet("ShellDefinition.caliber", object.caliber)), + icon: globalThis.String(assertSet("ShellDefinition.icon", object.icon)), + penetration: ShellPenetration.fromJSON(assertSet("ShellDefinition.penetration", object.penetration)), + type: shellTypeFromJSON(assertSet("ShellDefinition.type", object.type)), + normalization: isSet(object.normalization) ? globalThis.Number(object.normalization) : undefined, + ricochet: isSet(object.ricochet) ? globalThis.Number(object.ricochet) : undefined, + explosion_radius: isSet(object.explosion_radius) ? globalThis.Number(object.explosion_radius) : undefined, + range: globalThis.Number(assertSet("ShellDefinition.range", object.range)), + }; + }, + + toJSON(message: ShellDefinition): 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.velocity !== 0) { + obj.velocity = Math.round(message.velocity); + } + if (message.armor_damage !== 0) { + obj.armor_damage = Math.round(message.armor_damage); + } + if (message.module_damage !== 0) { + obj.module_damage = Math.round(message.module_damage); + } + if (message.caliber !== 0) { + obj.caliber = message.caliber; + } + if (message.icon !== "") { + obj.icon = message.icon; + } + if (message.penetration !== undefined) { + obj.penetration = ShellPenetration.toJSON(message.penetration); + } + if (message.type !== 0) { + obj.type = shellTypeToJSON(message.type); + } + if (message.normalization !== undefined && message.normalization !== undefined) { + obj.normalization = message.normalization; + } + if (message.ricochet !== undefined && message.ricochet !== undefined) { + obj.ricochet = message.ricochet; + } + if (message.explosion_radius !== undefined && message.explosion_radius !== undefined) { + obj.explosion_radius = message.explosion_radius; + } + if (message.range !== 0) { + obj.range = Math.round(message.range); + } + return obj; + }, + + create, I>>(base?: I): ShellDefinition { + return ShellDefinition.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): ShellDefinition { + const message = createBaseShellDefinition(); + message.id = object.id ?? 0; + message.name = (object.name !== undefined && object.name !== null) + ? I18nString.fromPartial(object.name) + : createBaseI18nString(); + message.velocity = object.velocity ?? 0; + message.armor_damage = object.armor_damage ?? 0; + message.module_damage = object.module_damage ?? 0; + message.caliber = object.caliber ?? 0; + message.icon = object.icon ?? ""; + message.penetration = (object.penetration !== undefined && object.penetration !== null) + ? ShellPenetration.fromPartial(object.penetration) + : createBaseShellPenetration(); + message.type = object.type ?? 0; + message.normalization = object.normalization ?? undefined; + message.ricochet = object.ricochet ?? undefined; + message.explosion_radius = object.explosion_radius ?? undefined; + message.range = object.range ?? 0; + return message; + }, +}; + +function createBaseShellPenetration(): ShellPenetration { + return { near: 0, far: 0 }; +} + +export const ShellPenetration: MessageFns = { + encode(message: ShellPenetration, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.near !== 0) { + writer.uint32(13).float(message.near); + } + if (message.far !== 0) { + writer.uint32(21).float(message.far); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): ShellPenetration { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseShellPenetration(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 13) { + break; + } + + message.near = reader.float(); + continue; + } + case 2: { + if (tag !== 21) { + break; + } + + message.far = reader.float(); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): ShellPenetration { + return { + near: globalThis.Number(assertSet("ShellPenetration.near", object.near)), + far: globalThis.Number(assertSet("ShellPenetration.far", object.far)), + }; + }, + + toJSON(message: ShellPenetration): unknown { + const obj: any = {}; + if (message.near !== 0) { + obj.near = message.near; + } + if (message.far !== 0) { + obj.far = message.far; + } + return obj; + }, + + create, I>>(base?: I): ShellPenetration { + return ShellPenetration.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): ShellPenetration { + const message = createBaseShellPenetration(); + message.near = object.near ?? 0; + message.far = object.far ?? 0; + return message; + }, +}; + +function createBaseUnlock(): Unlock { + return { id: 0, type: 0, cost: createBaseUnlockCost() }; +} + +export const Unlock: MessageFns = { + encode(message: Unlock, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.id !== 0) { + writer.uint32(8).int32(message.id); + } + if (message.type !== 0) { + writer.uint32(16).int32(message.type); + } + if (message.cost !== undefined) { + UnlockCost.encode(message.cost, writer.uint32(26).fork()).join(); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): Unlock { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUnlock(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 8) { + break; + } + + message.id = reader.int32(); + continue; + } + case 2: { + if (tag !== 16) { + break; + } + + message.type = reader.int32() as any; + continue; + } + case 3: { + if (tag !== 26) { + break; + } + + message.cost = UnlockCost.decode(reader, reader.uint32()); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): Unlock { + return { + id: globalThis.Number(assertSet("Unlock.id", object.id)), + type: moduleTypeFromJSON(assertSet("Unlock.type", object.type)), + cost: UnlockCost.fromJSON(assertSet("Unlock.cost", object.cost)), + }; + }, + + toJSON(message: Unlock): unknown { + const obj: any = {}; + if (message.id !== 0) { + obj.id = Math.round(message.id); + } + if (message.type !== 0) { + obj.type = moduleTypeToJSON(message.type); + } + if (message.cost !== undefined) { + obj.cost = UnlockCost.toJSON(message.cost); + } + return obj; + }, + + create, I>>(base?: I): Unlock { + return Unlock.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Unlock { + const message = createBaseUnlock(); + message.id = object.id ?? 0; + message.type = object.type ?? 0; + message.cost = (object.cost !== undefined && object.cost !== null) + ? UnlockCost.fromPartial(object.cost) + : createBaseUnlockCost(); + return message; + }, +}; + +function createBaseUnlockCost(): UnlockCost { + return { type: "", value: 0 }; +} + +export const UnlockCost: MessageFns = { + encode(message: UnlockCost, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.type !== "") { + writer.uint32(10).string(message.type); + } + if (message.value !== 0) { + writer.uint32(16).int32(message.value); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): UnlockCost { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUnlockCost(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break; + } + + message.type = reader.string(); + continue; + } + case 2: { + if (tag !== 16) { + break; + } + + message.value = reader.int32(); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): UnlockCost { + return { + type: globalThis.String(assertSet("UnlockCost.type", object.type)), + value: globalThis.Number(assertSet("UnlockCost.value", object.value)), + }; + }, + + toJSON(message: UnlockCost): unknown { + const obj: any = {}; + if (message.type !== "") { + obj.type = message.type; + } + if (message.value !== 0) { + obj.value = Math.round(message.value); + } + return obj; + }, + + create, I>>(base?: I): UnlockCost { + return UnlockCost.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): UnlockCost { + const message = createBaseUnlockCost(); + message.type = object.type ?? ""; + message.value = object.value ?? 0; + return message; + }, +}; + +function createBaseCrew(): Crew { + return { type: 0, count: 0, substitute: [] }; +} + +export const Crew: MessageFns = { + encode(message: Crew, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.type !== 0) { + writer.uint32(8).int32(message.type); + } + if (message.count !== 0) { + writer.uint32(16).uint32(message.count); + } + writer.uint32(26).fork(); + for (const v of message.substitute) { + writer.int32(v); + } + writer.join(); + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): Crew { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCrew(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 8) { + break; + } + + message.type = reader.int32() as any; + continue; + } + case 2: { + if (tag !== 16) { + break; + } + + message.count = reader.uint32(); + continue; + } + case 3: { + if (tag === 24) { + message.substitute.push(reader.int32() as any); + + continue; + } + + if (tag === 26) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + message.substitute.push(reader.int32() as any); + } + + continue; + } + + break; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): Crew { + return { + type: crewTypeFromJSON(assertSet("Crew.type", object.type)), + count: globalThis.Number(assertSet("Crew.count", object.count)), + substitute: globalThis.Array.isArray(object?.substitute) + ? object.substitute.map((e: any) => crewTypeFromJSON(e)) + : [], + }; + }, + + toJSON(message: Crew): unknown { + const obj: any = {}; + if (message.type !== 0) { + obj.type = crewTypeToJSON(message.type); + } + if (message.count !== 0) { + obj.count = Math.round(message.count); + } + if (message.substitute?.length) { + obj.substitute = message.substitute.map((e) => crewTypeToJSON(e)); + } + return obj; + }, + + create, I>>(base?: I): Crew { + return Crew.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): Crew { + const message = createBaseCrew(); + message.type = object.type ?? 0; + message.count = object.count ?? 0; + message.substitute = object.substitute?.map((e) => e) || []; + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends { $case: string; value: unknown } ? { $case: T["$case"]; value?: DeepPartial } + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isObject(value: any): boolean { + return typeof value === "object" && value !== null; +} + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} + +function assertSet(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 { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; + fromJSON(object: any): T; + toJSON(message: T): unknown; + create, I>>(base?: I): T; + fromPartial, I>>(object: I): T; +} diff --git a/packages/core/src/protos/tank.proto b/packages/core/src/protos/tank.proto index 2b73ead16..f198d5c9e 100644 --- a/packages/core/src/protos/tank.proto +++ b/packages/core/src/protos/tank.proto @@ -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; } \ No newline at end of file diff --git a/packages/core/src/protos/tank.ts b/packages/core/src/protos/tank.ts index ac11e13c9..0f074d05b 100644 --- a/packages/core/src/protos/tank.ts +++ b/packages/core/src/protos/tank.ts @@ -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 = { @@ -193,12 +27,6 @@ export const Tank: MessageFns = { 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 = { 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 = { 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 = { 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 = { 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; }, }; diff --git a/src/BlitzKit.CLI/Protos/LegacyAverageDefinitions.cs b/src/BlitzKit.CLI/Protos/LegacyAverageDefinitions.cs new file mode 100644 index 000000000..330e4f7cf --- /dev/null +++ b/src/BlitzKit.CLI/Protos/LegacyAverageDefinitions.cs @@ -0,0 +1,2325 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: packages/core/src/protos/legacy_average_definitions.proto +// +#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 { + + /// Holder for reflection information generated from packages/core/src/protos/legacy_average_definitions.proto + public static partial class LegacyAverageDefinitionsReflection { + + #region Descriptor + /// File descriptor for packages/core/src/protos/legacy_average_definitions.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static LegacyAverageDefinitionsReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CjlwYWNrYWdlcy9jb3JlL3NyYy9wcm90b3MvbGVnYWN5X2F2ZXJhZ2VfZGVm", + "aW5pdGlvbnMucHJvdG8SCGJsaXR6a2l0ItgBChJBdmVyYWdlRGVmaW5pdGlv", + "bnMSPAoIYXZlcmFnZXMYASADKAsyKi5ibGl0emtpdC5BdmVyYWdlRGVmaW5p", + "dGlvbnMuQXZlcmFnZXNFbnRyeRIiCgdzYW1wbGVzGAIgAigLMhEuYmxpdHpr", + "aXQuU2FtcGxlcxIMCgR0aW1lGAMgAigEGlIKDUF2ZXJhZ2VzRW50cnkSCwoD", + "a2V5GAEgASgNEjAKBXZhbHVlGAIgASgLMiEuYmxpdHpraXQuQXZlcmFnZURl", + "ZmluaXRpb25zRW50cnk6AjgBItUBChdBdmVyYWdlRGVmaW5pdGlvbnNFbnRy", + "eRIwCgJtdRgBIAIoCzIkLmJsaXR6a2l0LkF2ZXJhZ2VEZWZpbml0aW9uc0Fs", + "bFN0YXRzEjMKBXNpZ21hGAIgAigLMiQuYmxpdHpraXQuQXZlcmFnZURlZmlu", + "aXRpb25zQWxsU3RhdHMSLwoBchgDIAIoCzIkLmJsaXR6a2l0LkF2ZXJhZ2VE", + "ZWZpbml0aW9uc0FsbFN0YXRzEiIKB3NhbXBsZXMYBCACKAsyES5ibGl0emtp", + "dC5TYW1wbGVzIv0CChpBdmVyYWdlRGVmaW5pdGlvbnNBbGxTdGF0cxIPCgdi", + "YXR0bGVzGAEgAigCEhYKDmNhcHR1cmVfcG9pbnRzGAIgAigCEhQKDGRhbWFn", + "ZV9kZWFsdBgDIAIoAhIXCg9kYW1hZ2VfcmVjZWl2ZWQYBCACKAISHgoWZHJv", + "cHBlZF9jYXB0dXJlX3BvaW50cxgFIAIoAhINCgVmcmFncxgGIAIoAhIPCgdm", + "cmFnczhwGAcgAigCEgwKBGhpdHMYCCACKAISDgoGbG9zc2VzGAkgAigCEhEK", + "CW1heF9mcmFncxgKIAIoAhIOCgZtYXhfeHAYCyACKAISDQoFc2hvdHMYDCAC", + "KAISDwoHc3BvdHRlZBgNIAIoAhIYChBzdXJ2aXZlZF9iYXR0bGVzGA4gAigC", + "EhgKEHdpbl9hbmRfc3Vydml2ZWQYDyACKAISDAoEd2lucxgQIAIoAhIKCgJ4", + "cBgRIAIoAhIYChBiYXR0bGVfbGlmZV90aW1lGBIgAigCImsKB1NhbXBsZXMS", + "CwoDZF8xGAEgAigNEgsKA2RfNxgCIAIoDRIMCgRkXzMwGAMgAigNEgwKBGRf", + "NjAYBCACKA0SDAoEZF85MBgFIAIoDRINCgVkXzEyMBgGIAIoDRINCgV0b3Rh", + "bBgHIAIoDQ==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.AverageDefinitions), global::Blitzkit.AverageDefinitions.Parser, new[]{ "Averages", "Samples", "Time" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.AverageDefinitionsEntry), global::Blitzkit.AverageDefinitionsEntry.Parser, new[]{ "Mu", "Sigma", "R", "Samples" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.AverageDefinitionsAllStats), global::Blitzkit.AverageDefinitionsAllStats.Parser, new[]{ "Battles", "CapturePoints", "DamageDealt", "DamageReceived", "DroppedCapturePoints", "Frags", "Frags8P", "Hits", "Losses", "MaxFrags", "MaxXp", "Shots", "Spotted", "SurvivedBattles", "WinAndSurvived", "Wins", "Xp", "BattleLifeTime" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.Samples), global::Blitzkit.Samples.Parser, new[]{ "D1", "D7", "D30", "D60", "D90", "D120", "Total" }, null, null, null, null) + })); + } + #endregion + + } + #region Messages + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class AverageDefinitions : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AverageDefinitions()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyAverageDefinitionsReflection.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 AverageDefinitions() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AverageDefinitions(AverageDefinitions other) : this() { + _hasBits0 = other._hasBits0; + averages_ = other.averages_.Clone(); + samples_ = other.samples_ != null ? other.samples_.Clone() : null; + time_ = other.time_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AverageDefinitions Clone() { + return new AverageDefinitions(this); + } + + /// Field number for the "averages" field. + public const int AveragesFieldNumber = 1; + private static readonly pbc::MapField.Codec _map_averages_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForUInt32(8, 0), pb::FieldCodec.ForMessage(18, global::Blitzkit.AverageDefinitionsEntry.Parser), 10); + private readonly pbc::MapField averages_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField Averages { + get { return averages_; } + } + + /// Field number for the "samples" field. + public const int SamplesFieldNumber = 2; + private global::Blitzkit.Samples samples_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.Samples Samples { + get { return samples_; } + set { + samples_ = value; + } + } + + /// Field number for the "time" field. + public const int TimeFieldNumber = 3; + private readonly static ulong TimeDefaultValue = 0UL; + + private ulong time_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ulong Time { + get { if ((_hasBits0 & 1) != 0) { return time_; } else { return TimeDefaultValue; } } + set { + _hasBits0 |= 1; + time_ = value; + } + } + /// Gets whether the "time" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasTime { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "time" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearTime() { + _hasBits0 &= ~1; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as AverageDefinitions); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(AverageDefinitions other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!Averages.Equals(other.Averages)) return false; + if (!object.Equals(Samples, other.Samples)) return false; + if (Time != other.Time) 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 ^= Averages.GetHashCode(); + if (samples_ != null) hash ^= Samples.GetHashCode(); + if (HasTime) hash ^= Time.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 + averages_.WriteTo(output, _map_averages_codec); + if (samples_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Samples); + } + if (HasTime) { + output.WriteRawTag(24); + output.WriteUInt64(Time); + } + 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) { + averages_.WriteTo(ref output, _map_averages_codec); + if (samples_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Samples); + } + if (HasTime) { + output.WriteRawTag(24); + output.WriteUInt64(Time); + } + 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 += averages_.CalculateSize(_map_averages_codec); + if (samples_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Samples); + } + if (HasTime) { + size += 1 + pb::CodedOutputStream.ComputeUInt64Size(Time); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(AverageDefinitions other) { + if (other == null) { + return; + } + averages_.MergeFrom(other.averages_); + if (other.samples_ != null) { + if (samples_ == null) { + Samples = new global::Blitzkit.Samples(); + } + Samples.MergeFrom(other.Samples); + } + if (other.HasTime) { + Time = other.Time; + } + _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: { + averages_.AddEntriesFrom(input, _map_averages_codec); + break; + } + case 18: { + if (samples_ == null) { + Samples = new global::Blitzkit.Samples(); + } + input.ReadMessage(Samples); + break; + } + case 24: { + Time = input.ReadUInt64(); + 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: { + averages_.AddEntriesFrom(ref input, _map_averages_codec); + break; + } + case 18: { + if (samples_ == null) { + Samples = new global::Blitzkit.Samples(); + } + input.ReadMessage(Samples); + break; + } + case 24: { + Time = input.ReadUInt64(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class AverageDefinitionsEntry : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AverageDefinitionsEntry()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyAverageDefinitionsReflection.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 AverageDefinitionsEntry() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AverageDefinitionsEntry(AverageDefinitionsEntry other) : this() { + mu_ = other.mu_ != null ? other.mu_.Clone() : null; + sigma_ = other.sigma_ != null ? other.sigma_.Clone() : null; + r_ = other.r_ != null ? other.r_.Clone() : null; + samples_ = other.samples_ != null ? other.samples_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AverageDefinitionsEntry Clone() { + return new AverageDefinitionsEntry(this); + } + + /// Field number for the "mu" field. + public const int MuFieldNumber = 1; + private global::Blitzkit.AverageDefinitionsAllStats mu_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.AverageDefinitionsAllStats Mu { + get { return mu_; } + set { + mu_ = value; + } + } + + /// Field number for the "sigma" field. + public const int SigmaFieldNumber = 2; + private global::Blitzkit.AverageDefinitionsAllStats sigma_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.AverageDefinitionsAllStats Sigma { + get { return sigma_; } + set { + sigma_ = value; + } + } + + /// Field number for the "r" field. + public const int RFieldNumber = 3; + private global::Blitzkit.AverageDefinitionsAllStats r_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.AverageDefinitionsAllStats R { + get { return r_; } + set { + r_ = value; + } + } + + /// Field number for the "samples" field. + public const int SamplesFieldNumber = 4; + private global::Blitzkit.Samples samples_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.Samples Samples { + get { return samples_; } + set { + samples_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as AverageDefinitionsEntry); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(AverageDefinitionsEntry other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(Mu, other.Mu)) return false; + if (!object.Equals(Sigma, other.Sigma)) return false; + if (!object.Equals(R, other.R)) return false; + if (!object.Equals(Samples, other.Samples)) 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 (mu_ != null) hash ^= Mu.GetHashCode(); + if (sigma_ != null) hash ^= Sigma.GetHashCode(); + if (r_ != null) hash ^= R.GetHashCode(); + if (samples_ != null) hash ^= Samples.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 (mu_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Mu); + } + if (sigma_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Sigma); + } + if (r_ != null) { + output.WriteRawTag(26); + output.WriteMessage(R); + } + if (samples_ != null) { + output.WriteRawTag(34); + output.WriteMessage(Samples); + } + 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 (mu_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Mu); + } + if (sigma_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Sigma); + } + if (r_ != null) { + output.WriteRawTag(26); + output.WriteMessage(R); + } + if (samples_ != null) { + output.WriteRawTag(34); + output.WriteMessage(Samples); + } + 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 (mu_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Mu); + } + if (sigma_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Sigma); + } + if (r_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(R); + } + if (samples_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Samples); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(AverageDefinitionsEntry other) { + if (other == null) { + return; + } + if (other.mu_ != null) { + if (mu_ == null) { + Mu = new global::Blitzkit.AverageDefinitionsAllStats(); + } + Mu.MergeFrom(other.Mu); + } + if (other.sigma_ != null) { + if (sigma_ == null) { + Sigma = new global::Blitzkit.AverageDefinitionsAllStats(); + } + Sigma.MergeFrom(other.Sigma); + } + if (other.r_ != null) { + if (r_ == null) { + R = new global::Blitzkit.AverageDefinitionsAllStats(); + } + R.MergeFrom(other.R); + } + if (other.samples_ != null) { + if (samples_ == null) { + Samples = new global::Blitzkit.Samples(); + } + Samples.MergeFrom(other.Samples); + } + _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 (mu_ == null) { + Mu = new global::Blitzkit.AverageDefinitionsAllStats(); + } + input.ReadMessage(Mu); + break; + } + case 18: { + if (sigma_ == null) { + Sigma = new global::Blitzkit.AverageDefinitionsAllStats(); + } + input.ReadMessage(Sigma); + break; + } + case 26: { + if (r_ == null) { + R = new global::Blitzkit.AverageDefinitionsAllStats(); + } + input.ReadMessage(R); + break; + } + case 34: { + if (samples_ == null) { + Samples = new global::Blitzkit.Samples(); + } + input.ReadMessage(Samples); + 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 (mu_ == null) { + Mu = new global::Blitzkit.AverageDefinitionsAllStats(); + } + input.ReadMessage(Mu); + break; + } + case 18: { + if (sigma_ == null) { + Sigma = new global::Blitzkit.AverageDefinitionsAllStats(); + } + input.ReadMessage(Sigma); + break; + } + case 26: { + if (r_ == null) { + R = new global::Blitzkit.AverageDefinitionsAllStats(); + } + input.ReadMessage(R); + break; + } + case 34: { + if (samples_ == null) { + Samples = new global::Blitzkit.Samples(); + } + input.ReadMessage(Samples); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class AverageDefinitionsAllStats : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AverageDefinitionsAllStats()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyAverageDefinitionsReflection.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 AverageDefinitionsAllStats() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AverageDefinitionsAllStats(AverageDefinitionsAllStats other) : this() { + _hasBits0 = other._hasBits0; + battles_ = other.battles_; + capturePoints_ = other.capturePoints_; + damageDealt_ = other.damageDealt_; + damageReceived_ = other.damageReceived_; + droppedCapturePoints_ = other.droppedCapturePoints_; + frags_ = other.frags_; + frags8P_ = other.frags8P_; + hits_ = other.hits_; + losses_ = other.losses_; + maxFrags_ = other.maxFrags_; + maxXp_ = other.maxXp_; + shots_ = other.shots_; + spotted_ = other.spotted_; + survivedBattles_ = other.survivedBattles_; + winAndSurvived_ = other.winAndSurvived_; + wins_ = other.wins_; + xp_ = other.xp_; + battleLifeTime_ = other.battleLifeTime_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AverageDefinitionsAllStats Clone() { + return new AverageDefinitionsAllStats(this); + } + + /// Field number for the "battles" field. + public const int BattlesFieldNumber = 1; + private readonly static float BattlesDefaultValue = 0F; + + private float battles_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Battles { + get { if ((_hasBits0 & 1) != 0) { return battles_; } else { return BattlesDefaultValue; } } + set { + _hasBits0 |= 1; + battles_ = value; + } + } + /// Gets whether the "battles" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasBattles { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "battles" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearBattles() { + _hasBits0 &= ~1; + } + + /// Field number for the "capture_points" field. + public const int CapturePointsFieldNumber = 2; + private readonly static float CapturePointsDefaultValue = 0F; + + private float capturePoints_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float CapturePoints { + get { if ((_hasBits0 & 2) != 0) { return capturePoints_; } else { return CapturePointsDefaultValue; } } + set { + _hasBits0 |= 2; + capturePoints_ = value; + } + } + /// Gets whether the "capture_points" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasCapturePoints { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "capture_points" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearCapturePoints() { + _hasBits0 &= ~2; + } + + /// Field number for the "damage_dealt" field. + public const int DamageDealtFieldNumber = 3; + private readonly static float DamageDealtDefaultValue = 0F; + + private float damageDealt_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float DamageDealt { + get { if ((_hasBits0 & 4) != 0) { return damageDealt_; } else { return DamageDealtDefaultValue; } } + set { + _hasBits0 |= 4; + damageDealt_ = value; + } + } + /// Gets whether the "damage_dealt" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasDamageDealt { + get { return (_hasBits0 & 4) != 0; } + } + /// Clears the value of the "damage_dealt" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearDamageDealt() { + _hasBits0 &= ~4; + } + + /// Field number for the "damage_received" field. + public const int DamageReceivedFieldNumber = 4; + private readonly static float DamageReceivedDefaultValue = 0F; + + private float damageReceived_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float DamageReceived { + get { if ((_hasBits0 & 8) != 0) { return damageReceived_; } else { return DamageReceivedDefaultValue; } } + set { + _hasBits0 |= 8; + damageReceived_ = value; + } + } + /// Gets whether the "damage_received" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasDamageReceived { + get { return (_hasBits0 & 8) != 0; } + } + /// Clears the value of the "damage_received" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearDamageReceived() { + _hasBits0 &= ~8; + } + + /// Field number for the "dropped_capture_points" field. + public const int DroppedCapturePointsFieldNumber = 5; + private readonly static float DroppedCapturePointsDefaultValue = 0F; + + private float droppedCapturePoints_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float DroppedCapturePoints { + get { if ((_hasBits0 & 16) != 0) { return droppedCapturePoints_; } else { return DroppedCapturePointsDefaultValue; } } + set { + _hasBits0 |= 16; + droppedCapturePoints_ = value; + } + } + /// Gets whether the "dropped_capture_points" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasDroppedCapturePoints { + get { return (_hasBits0 & 16) != 0; } + } + /// Clears the value of the "dropped_capture_points" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearDroppedCapturePoints() { + _hasBits0 &= ~16; + } + + /// Field number for the "frags" field. + public const int FragsFieldNumber = 6; + private readonly static float FragsDefaultValue = 0F; + + private float frags_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Frags { + get { if ((_hasBits0 & 32) != 0) { return frags_; } else { return FragsDefaultValue; } } + set { + _hasBits0 |= 32; + frags_ = value; + } + } + /// Gets whether the "frags" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasFrags { + get { return (_hasBits0 & 32) != 0; } + } + /// Clears the value of the "frags" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearFrags() { + _hasBits0 &= ~32; + } + + /// Field number for the "frags8p" field. + public const int Frags8PFieldNumber = 7; + private readonly static float Frags8PDefaultValue = 0F; + + private float frags8P_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Frags8P { + get { if ((_hasBits0 & 64) != 0) { return frags8P_; } else { return Frags8PDefaultValue; } } + set { + _hasBits0 |= 64; + frags8P_ = value; + } + } + /// Gets whether the "frags8p" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasFrags8P { + get { return (_hasBits0 & 64) != 0; } + } + /// Clears the value of the "frags8p" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearFrags8P() { + _hasBits0 &= ~64; + } + + /// Field number for the "hits" field. + public const int HitsFieldNumber = 8; + private readonly static float HitsDefaultValue = 0F; + + private float hits_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Hits { + get { if ((_hasBits0 & 128) != 0) { return hits_; } else { return HitsDefaultValue; } } + set { + _hasBits0 |= 128; + hits_ = value; + } + } + /// Gets whether the "hits" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasHits { + get { return (_hasBits0 & 128) != 0; } + } + /// Clears the value of the "hits" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearHits() { + _hasBits0 &= ~128; + } + + /// Field number for the "losses" field. + public const int LossesFieldNumber = 9; + private readonly static float LossesDefaultValue = 0F; + + private float losses_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Losses { + get { if ((_hasBits0 & 256) != 0) { return losses_; } else { return LossesDefaultValue; } } + set { + _hasBits0 |= 256; + losses_ = value; + } + } + /// Gets whether the "losses" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasLosses { + get { return (_hasBits0 & 256) != 0; } + } + /// Clears the value of the "losses" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearLosses() { + _hasBits0 &= ~256; + } + + /// Field number for the "max_frags" field. + public const int MaxFragsFieldNumber = 10; + private readonly static float MaxFragsDefaultValue = 0F; + + private float maxFrags_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float MaxFrags { + get { if ((_hasBits0 & 512) != 0) { return maxFrags_; } else { return MaxFragsDefaultValue; } } + set { + _hasBits0 |= 512; + maxFrags_ = value; + } + } + /// Gets whether the "max_frags" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasMaxFrags { + get { return (_hasBits0 & 512) != 0; } + } + /// Clears the value of the "max_frags" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearMaxFrags() { + _hasBits0 &= ~512; + } + + /// Field number for the "max_xp" field. + public const int MaxXpFieldNumber = 11; + private readonly static float MaxXpDefaultValue = 0F; + + private float maxXp_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float MaxXp { + get { if ((_hasBits0 & 1024) != 0) { return maxXp_; } else { return MaxXpDefaultValue; } } + set { + _hasBits0 |= 1024; + maxXp_ = value; + } + } + /// Gets whether the "max_xp" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasMaxXp { + get { return (_hasBits0 & 1024) != 0; } + } + /// Clears the value of the "max_xp" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearMaxXp() { + _hasBits0 &= ~1024; + } + + /// Field number for the "shots" field. + public const int ShotsFieldNumber = 12; + private readonly static float ShotsDefaultValue = 0F; + + private float shots_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Shots { + get { if ((_hasBits0 & 2048) != 0) { return shots_; } else { return ShotsDefaultValue; } } + set { + _hasBits0 |= 2048; + shots_ = value; + } + } + /// Gets whether the "shots" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasShots { + get { return (_hasBits0 & 2048) != 0; } + } + /// Clears the value of the "shots" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearShots() { + _hasBits0 &= ~2048; + } + + /// Field number for the "spotted" field. + public const int SpottedFieldNumber = 13; + private readonly static float SpottedDefaultValue = 0F; + + private float spotted_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Spotted { + get { if ((_hasBits0 & 4096) != 0) { return spotted_; } else { return SpottedDefaultValue; } } + set { + _hasBits0 |= 4096; + spotted_ = value; + } + } + /// Gets whether the "spotted" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasSpotted { + get { return (_hasBits0 & 4096) != 0; } + } + /// Clears the value of the "spotted" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearSpotted() { + _hasBits0 &= ~4096; + } + + /// Field number for the "survived_battles" field. + public const int SurvivedBattlesFieldNumber = 14; + private readonly static float SurvivedBattlesDefaultValue = 0F; + + private float survivedBattles_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float SurvivedBattles { + get { if ((_hasBits0 & 8192) != 0) { return survivedBattles_; } else { return SurvivedBattlesDefaultValue; } } + set { + _hasBits0 |= 8192; + survivedBattles_ = value; + } + } + /// Gets whether the "survived_battles" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasSurvivedBattles { + get { return (_hasBits0 & 8192) != 0; } + } + /// Clears the value of the "survived_battles" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearSurvivedBattles() { + _hasBits0 &= ~8192; + } + + /// Field number for the "win_and_survived" field. + public const int WinAndSurvivedFieldNumber = 15; + private readonly static float WinAndSurvivedDefaultValue = 0F; + + private float winAndSurvived_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float WinAndSurvived { + get { if ((_hasBits0 & 16384) != 0) { return winAndSurvived_; } else { return WinAndSurvivedDefaultValue; } } + set { + _hasBits0 |= 16384; + winAndSurvived_ = value; + } + } + /// Gets whether the "win_and_survived" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasWinAndSurvived { + get { return (_hasBits0 & 16384) != 0; } + } + /// Clears the value of the "win_and_survived" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearWinAndSurvived() { + _hasBits0 &= ~16384; + } + + /// Field number for the "wins" field. + public const int WinsFieldNumber = 16; + private readonly static float WinsDefaultValue = 0F; + + private float wins_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Wins { + get { if ((_hasBits0 & 32768) != 0) { return wins_; } else { return WinsDefaultValue; } } + set { + _hasBits0 |= 32768; + wins_ = value; + } + } + /// Gets whether the "wins" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasWins { + get { return (_hasBits0 & 32768) != 0; } + } + /// Clears the value of the "wins" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearWins() { + _hasBits0 &= ~32768; + } + + /// Field number for the "xp" field. + public const int XpFieldNumber = 17; + private readonly static float XpDefaultValue = 0F; + + private float xp_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Xp { + get { if ((_hasBits0 & 65536) != 0) { return xp_; } else { return XpDefaultValue; } } + set { + _hasBits0 |= 65536; + xp_ = value; + } + } + /// Gets whether the "xp" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasXp { + get { return (_hasBits0 & 65536) != 0; } + } + /// Clears the value of the "xp" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearXp() { + _hasBits0 &= ~65536; + } + + /// Field number for the "battle_life_time" field. + public const int BattleLifeTimeFieldNumber = 18; + private readonly static float BattleLifeTimeDefaultValue = 0F; + + private float battleLifeTime_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float BattleLifeTime { + get { if ((_hasBits0 & 131072) != 0) { return battleLifeTime_; } else { return BattleLifeTimeDefaultValue; } } + set { + _hasBits0 |= 131072; + battleLifeTime_ = value; + } + } + /// Gets whether the "battle_life_time" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasBattleLifeTime { + get { return (_hasBits0 & 131072) != 0; } + } + /// Clears the value of the "battle_life_time" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearBattleLifeTime() { + _hasBits0 &= ~131072; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as AverageDefinitionsAllStats); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(AverageDefinitionsAllStats other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Battles, other.Battles)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(CapturePoints, other.CapturePoints)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(DamageDealt, other.DamageDealt)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(DamageReceived, other.DamageReceived)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(DroppedCapturePoints, other.DroppedCapturePoints)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Frags, other.Frags)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Frags8P, other.Frags8P)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Hits, other.Hits)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Losses, other.Losses)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MaxFrags, other.MaxFrags)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MaxXp, other.MaxXp)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Shots, other.Shots)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Spotted, other.Spotted)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(SurvivedBattles, other.SurvivedBattles)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(WinAndSurvived, other.WinAndSurvived)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Wins, other.Wins)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Xp, other.Xp)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(BattleLifeTime, other.BattleLifeTime)) 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 (HasBattles) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Battles); + if (HasCapturePoints) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(CapturePoints); + if (HasDamageDealt) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(DamageDealt); + if (HasDamageReceived) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(DamageReceived); + if (HasDroppedCapturePoints) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(DroppedCapturePoints); + if (HasFrags) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Frags); + if (HasFrags8P) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Frags8P); + if (HasHits) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Hits); + if (HasLosses) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Losses); + if (HasMaxFrags) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MaxFrags); + if (HasMaxXp) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MaxXp); + if (HasShots) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Shots); + if (HasSpotted) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Spotted); + if (HasSurvivedBattles) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(SurvivedBattles); + if (HasWinAndSurvived) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(WinAndSurvived); + if (HasWins) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Wins); + if (HasXp) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Xp); + if (HasBattleLifeTime) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(BattleLifeTime); + 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 (HasBattles) { + output.WriteRawTag(13); + output.WriteFloat(Battles); + } + if (HasCapturePoints) { + output.WriteRawTag(21); + output.WriteFloat(CapturePoints); + } + if (HasDamageDealt) { + output.WriteRawTag(29); + output.WriteFloat(DamageDealt); + } + if (HasDamageReceived) { + output.WriteRawTag(37); + output.WriteFloat(DamageReceived); + } + if (HasDroppedCapturePoints) { + output.WriteRawTag(45); + output.WriteFloat(DroppedCapturePoints); + } + if (HasFrags) { + output.WriteRawTag(53); + output.WriteFloat(Frags); + } + if (HasFrags8P) { + output.WriteRawTag(61); + output.WriteFloat(Frags8P); + } + if (HasHits) { + output.WriteRawTag(69); + output.WriteFloat(Hits); + } + if (HasLosses) { + output.WriteRawTag(77); + output.WriteFloat(Losses); + } + if (HasMaxFrags) { + output.WriteRawTag(85); + output.WriteFloat(MaxFrags); + } + if (HasMaxXp) { + output.WriteRawTag(93); + output.WriteFloat(MaxXp); + } + if (HasShots) { + output.WriteRawTag(101); + output.WriteFloat(Shots); + } + if (HasSpotted) { + output.WriteRawTag(109); + output.WriteFloat(Spotted); + } + if (HasSurvivedBattles) { + output.WriteRawTag(117); + output.WriteFloat(SurvivedBattles); + } + if (HasWinAndSurvived) { + output.WriteRawTag(125); + output.WriteFloat(WinAndSurvived); + } + if (HasWins) { + output.WriteRawTag(133, 1); + output.WriteFloat(Wins); + } + if (HasXp) { + output.WriteRawTag(141, 1); + output.WriteFloat(Xp); + } + if (HasBattleLifeTime) { + output.WriteRawTag(149, 1); + output.WriteFloat(BattleLifeTime); + } + 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 (HasBattles) { + output.WriteRawTag(13); + output.WriteFloat(Battles); + } + if (HasCapturePoints) { + output.WriteRawTag(21); + output.WriteFloat(CapturePoints); + } + if (HasDamageDealt) { + output.WriteRawTag(29); + output.WriteFloat(DamageDealt); + } + if (HasDamageReceived) { + output.WriteRawTag(37); + output.WriteFloat(DamageReceived); + } + if (HasDroppedCapturePoints) { + output.WriteRawTag(45); + output.WriteFloat(DroppedCapturePoints); + } + if (HasFrags) { + output.WriteRawTag(53); + output.WriteFloat(Frags); + } + if (HasFrags8P) { + output.WriteRawTag(61); + output.WriteFloat(Frags8P); + } + if (HasHits) { + output.WriteRawTag(69); + output.WriteFloat(Hits); + } + if (HasLosses) { + output.WriteRawTag(77); + output.WriteFloat(Losses); + } + if (HasMaxFrags) { + output.WriteRawTag(85); + output.WriteFloat(MaxFrags); + } + if (HasMaxXp) { + output.WriteRawTag(93); + output.WriteFloat(MaxXp); + } + if (HasShots) { + output.WriteRawTag(101); + output.WriteFloat(Shots); + } + if (HasSpotted) { + output.WriteRawTag(109); + output.WriteFloat(Spotted); + } + if (HasSurvivedBattles) { + output.WriteRawTag(117); + output.WriteFloat(SurvivedBattles); + } + if (HasWinAndSurvived) { + output.WriteRawTag(125); + output.WriteFloat(WinAndSurvived); + } + if (HasWins) { + output.WriteRawTag(133, 1); + output.WriteFloat(Wins); + } + if (HasXp) { + output.WriteRawTag(141, 1); + output.WriteFloat(Xp); + } + if (HasBattleLifeTime) { + output.WriteRawTag(149, 1); + output.WriteFloat(BattleLifeTime); + } + 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 (HasBattles) { + size += 1 + 4; + } + if (HasCapturePoints) { + size += 1 + 4; + } + if (HasDamageDealt) { + size += 1 + 4; + } + if (HasDamageReceived) { + size += 1 + 4; + } + if (HasDroppedCapturePoints) { + size += 1 + 4; + } + if (HasFrags) { + size += 1 + 4; + } + if (HasFrags8P) { + size += 1 + 4; + } + if (HasHits) { + size += 1 + 4; + } + if (HasLosses) { + size += 1 + 4; + } + if (HasMaxFrags) { + size += 1 + 4; + } + if (HasMaxXp) { + size += 1 + 4; + } + if (HasShots) { + size += 1 + 4; + } + if (HasSpotted) { + size += 1 + 4; + } + if (HasSurvivedBattles) { + size += 1 + 4; + } + if (HasWinAndSurvived) { + size += 1 + 4; + } + if (HasWins) { + size += 2 + 4; + } + if (HasXp) { + size += 2 + 4; + } + if (HasBattleLifeTime) { + size += 2 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(AverageDefinitionsAllStats other) { + if (other == null) { + return; + } + if (other.HasBattles) { + Battles = other.Battles; + } + if (other.HasCapturePoints) { + CapturePoints = other.CapturePoints; + } + if (other.HasDamageDealt) { + DamageDealt = other.DamageDealt; + } + if (other.HasDamageReceived) { + DamageReceived = other.DamageReceived; + } + if (other.HasDroppedCapturePoints) { + DroppedCapturePoints = other.DroppedCapturePoints; + } + if (other.HasFrags) { + Frags = other.Frags; + } + if (other.HasFrags8P) { + Frags8P = other.Frags8P; + } + if (other.HasHits) { + Hits = other.Hits; + } + if (other.HasLosses) { + Losses = other.Losses; + } + if (other.HasMaxFrags) { + MaxFrags = other.MaxFrags; + } + if (other.HasMaxXp) { + MaxXp = other.MaxXp; + } + if (other.HasShots) { + Shots = other.Shots; + } + if (other.HasSpotted) { + Spotted = other.Spotted; + } + if (other.HasSurvivedBattles) { + SurvivedBattles = other.SurvivedBattles; + } + if (other.HasWinAndSurvived) { + WinAndSurvived = other.WinAndSurvived; + } + if (other.HasWins) { + Wins = other.Wins; + } + if (other.HasXp) { + Xp = other.Xp; + } + if (other.HasBattleLifeTime) { + BattleLifeTime = other.BattleLifeTime; + } + _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 13: { + Battles = input.ReadFloat(); + break; + } + case 21: { + CapturePoints = input.ReadFloat(); + break; + } + case 29: { + DamageDealt = input.ReadFloat(); + break; + } + case 37: { + DamageReceived = input.ReadFloat(); + break; + } + case 45: { + DroppedCapturePoints = input.ReadFloat(); + break; + } + case 53: { + Frags = input.ReadFloat(); + break; + } + case 61: { + Frags8P = input.ReadFloat(); + break; + } + case 69: { + Hits = input.ReadFloat(); + break; + } + case 77: { + Losses = input.ReadFloat(); + break; + } + case 85: { + MaxFrags = input.ReadFloat(); + break; + } + case 93: { + MaxXp = input.ReadFloat(); + break; + } + case 101: { + Shots = input.ReadFloat(); + break; + } + case 109: { + Spotted = input.ReadFloat(); + break; + } + case 117: { + SurvivedBattles = input.ReadFloat(); + break; + } + case 125: { + WinAndSurvived = input.ReadFloat(); + break; + } + case 133: { + Wins = input.ReadFloat(); + break; + } + case 141: { + Xp = input.ReadFloat(); + break; + } + case 149: { + BattleLifeTime = input.ReadFloat(); + 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 13: { + Battles = input.ReadFloat(); + break; + } + case 21: { + CapturePoints = input.ReadFloat(); + break; + } + case 29: { + DamageDealt = input.ReadFloat(); + break; + } + case 37: { + DamageReceived = input.ReadFloat(); + break; + } + case 45: { + DroppedCapturePoints = input.ReadFloat(); + break; + } + case 53: { + Frags = input.ReadFloat(); + break; + } + case 61: { + Frags8P = input.ReadFloat(); + break; + } + case 69: { + Hits = input.ReadFloat(); + break; + } + case 77: { + Losses = input.ReadFloat(); + break; + } + case 85: { + MaxFrags = input.ReadFloat(); + break; + } + case 93: { + MaxXp = input.ReadFloat(); + break; + } + case 101: { + Shots = input.ReadFloat(); + break; + } + case 109: { + Spotted = input.ReadFloat(); + break; + } + case 117: { + SurvivedBattles = input.ReadFloat(); + break; + } + case 125: { + WinAndSurvived = input.ReadFloat(); + break; + } + case 133: { + Wins = input.ReadFloat(); + break; + } + case 141: { + Xp = input.ReadFloat(); + break; + } + case 149: { + BattleLifeTime = input.ReadFloat(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Samples : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Samples()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyAverageDefinitionsReflection.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 Samples() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Samples(Samples other) : this() { + _hasBits0 = other._hasBits0; + d1_ = other.d1_; + d7_ = other.d7_; + d30_ = other.d30_; + d60_ = other.d60_; + d90_ = other.d90_; + d120_ = other.d120_; + total_ = other.total_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Samples Clone() { + return new Samples(this); + } + + /// Field number for the "d_1" field. + public const int D1FieldNumber = 1; + private readonly static uint D1DefaultValue = 0; + + private uint d1_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint D1 { + get { if ((_hasBits0 & 1) != 0) { return d1_; } else { return D1DefaultValue; } } + set { + _hasBits0 |= 1; + d1_ = value; + } + } + /// Gets whether the "d_1" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasD1 { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "d_1" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearD1() { + _hasBits0 &= ~1; + } + + /// Field number for the "d_7" field. + public const int D7FieldNumber = 2; + private readonly static uint D7DefaultValue = 0; + + private uint d7_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint D7 { + get { if ((_hasBits0 & 2) != 0) { return d7_; } else { return D7DefaultValue; } } + set { + _hasBits0 |= 2; + d7_ = value; + } + } + /// Gets whether the "d_7" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasD7 { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "d_7" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearD7() { + _hasBits0 &= ~2; + } + + /// Field number for the "d_30" field. + public const int D30FieldNumber = 3; + private readonly static uint D30DefaultValue = 0; + + private uint d30_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint D30 { + get { if ((_hasBits0 & 4) != 0) { return d30_; } else { return D30DefaultValue; } } + set { + _hasBits0 |= 4; + d30_ = value; + } + } + /// Gets whether the "d_30" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasD30 { + get { return (_hasBits0 & 4) != 0; } + } + /// Clears the value of the "d_30" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearD30() { + _hasBits0 &= ~4; + } + + /// Field number for the "d_60" field. + public const int D60FieldNumber = 4; + private readonly static uint D60DefaultValue = 0; + + private uint d60_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint D60 { + get { if ((_hasBits0 & 8) != 0) { return d60_; } else { return D60DefaultValue; } } + set { + _hasBits0 |= 8; + d60_ = value; + } + } + /// Gets whether the "d_60" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasD60 { + get { return (_hasBits0 & 8) != 0; } + } + /// Clears the value of the "d_60" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearD60() { + _hasBits0 &= ~8; + } + + /// Field number for the "d_90" field. + public const int D90FieldNumber = 5; + private readonly static uint D90DefaultValue = 0; + + private uint d90_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint D90 { + get { if ((_hasBits0 & 16) != 0) { return d90_; } else { return D90DefaultValue; } } + set { + _hasBits0 |= 16; + d90_ = value; + } + } + /// Gets whether the "d_90" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasD90 { + get { return (_hasBits0 & 16) != 0; } + } + /// Clears the value of the "d_90" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearD90() { + _hasBits0 &= ~16; + } + + /// Field number for the "d_120" field. + public const int D120FieldNumber = 6; + private readonly static uint D120DefaultValue = 0; + + private uint d120_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint D120 { + get { if ((_hasBits0 & 32) != 0) { return d120_; } else { return D120DefaultValue; } } + set { + _hasBits0 |= 32; + d120_ = value; + } + } + /// Gets whether the "d_120" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasD120 { + get { return (_hasBits0 & 32) != 0; } + } + /// Clears the value of the "d_120" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearD120() { + _hasBits0 &= ~32; + } + + /// Field number for the "total" field. + public const int TotalFieldNumber = 7; + private readonly static uint TotalDefaultValue = 0; + + private uint total_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint Total { + get { if ((_hasBits0 & 64) != 0) { return total_; } else { return TotalDefaultValue; } } + set { + _hasBits0 |= 64; + total_ = value; + } + } + /// Gets whether the "total" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasTotal { + get { return (_hasBits0 & 64) != 0; } + } + /// Clears the value of the "total" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearTotal() { + _hasBits0 &= ~64; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Samples); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Samples other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (D1 != other.D1) return false; + if (D7 != other.D7) return false; + if (D30 != other.D30) return false; + if (D60 != other.D60) return false; + if (D90 != other.D90) return false; + if (D120 != other.D120) return false; + if (Total != other.Total) 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 (HasD1) hash ^= D1.GetHashCode(); + if (HasD7) hash ^= D7.GetHashCode(); + if (HasD30) hash ^= D30.GetHashCode(); + if (HasD60) hash ^= D60.GetHashCode(); + if (HasD90) hash ^= D90.GetHashCode(); + if (HasD120) hash ^= D120.GetHashCode(); + if (HasTotal) hash ^= Total.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 (HasD1) { + output.WriteRawTag(8); + output.WriteUInt32(D1); + } + if (HasD7) { + output.WriteRawTag(16); + output.WriteUInt32(D7); + } + if (HasD30) { + output.WriteRawTag(24); + output.WriteUInt32(D30); + } + if (HasD60) { + output.WriteRawTag(32); + output.WriteUInt32(D60); + } + if (HasD90) { + output.WriteRawTag(40); + output.WriteUInt32(D90); + } + if (HasD120) { + output.WriteRawTag(48); + output.WriteUInt32(D120); + } + if (HasTotal) { + output.WriteRawTag(56); + output.WriteUInt32(Total); + } + 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 (HasD1) { + output.WriteRawTag(8); + output.WriteUInt32(D1); + } + if (HasD7) { + output.WriteRawTag(16); + output.WriteUInt32(D7); + } + if (HasD30) { + output.WriteRawTag(24); + output.WriteUInt32(D30); + } + if (HasD60) { + output.WriteRawTag(32); + output.WriteUInt32(D60); + } + if (HasD90) { + output.WriteRawTag(40); + output.WriteUInt32(D90); + } + if (HasD120) { + output.WriteRawTag(48); + output.WriteUInt32(D120); + } + if (HasTotal) { + output.WriteRawTag(56); + output.WriteUInt32(Total); + } + 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 (HasD1) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(D1); + } + if (HasD7) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(D7); + } + if (HasD30) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(D30); + } + if (HasD60) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(D60); + } + if (HasD90) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(D90); + } + if (HasD120) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(D120); + } + if (HasTotal) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Total); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Samples other) { + if (other == null) { + return; + } + if (other.HasD1) { + D1 = other.D1; + } + if (other.HasD7) { + D7 = other.D7; + } + if (other.HasD30) { + D30 = other.D30; + } + if (other.HasD60) { + D60 = other.D60; + } + if (other.HasD90) { + D90 = other.D90; + } + if (other.HasD120) { + D120 = other.D120; + } + if (other.HasTotal) { + Total = other.Total; + } + _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: { + D1 = input.ReadUInt32(); + break; + } + case 16: { + D7 = input.ReadUInt32(); + break; + } + case 24: { + D30 = input.ReadUInt32(); + break; + } + case 32: { + D60 = input.ReadUInt32(); + break; + } + case 40: { + D90 = input.ReadUInt32(); + break; + } + case 48: { + D120 = input.ReadUInt32(); + break; + } + case 56: { + Total = 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: { + D1 = input.ReadUInt32(); + break; + } + case 16: { + D7 = input.ReadUInt32(); + break; + } + case 24: { + D30 = input.ReadUInt32(); + break; + } + case 32: { + D60 = input.ReadUInt32(); + break; + } + case 40: { + D90 = input.ReadUInt32(); + break; + } + case 48: { + D120 = input.ReadUInt32(); + break; + } + case 56: { + Total = input.ReadUInt32(); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/BlitzKit.CLI/Protos/LegacyCamouflageDefinitions.cs b/src/BlitzKit.CLI/Protos/LegacyCamouflageDefinitions.cs new file mode 100644 index 000000000..a6f9ec389 --- /dev/null +++ b/src/BlitzKit.CLI/Protos/LegacyCamouflageDefinitions.cs @@ -0,0 +1,592 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: packages/core/src/protos/legacy_camouflage_definitions.proto +// +#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 { + + /// Holder for reflection information generated from packages/core/src/protos/legacy_camouflage_definitions.proto + public static partial class LegacyCamouflageDefinitionsReflection { + + #region Descriptor + /// File descriptor for packages/core/src/protos/legacy_camouflage_definitions.proto + 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 + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CamouflageDefinitions()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser 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); + } + + /// Field number for the "camouflages" field. + public const int CamouflagesFieldNumber = 1; + private static readonly pbc::MapField.Codec _map_camouflages_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForUInt32(8, 0), pb::FieldCodec.ForMessage(18, global::Blitzkit.Camouflage.Parser), 10); + private readonly pbc::MapField camouflages_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField 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 + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Camouflage()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser 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); + } + + /// Field number for the "id" field. + 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; + } + } + /// Gets whether the "id" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasId { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "id" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearId() { + _hasBits0 &= ~1; + } + + /// Field number for the "name" field. + 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; + } + } + + /// Field number for the "tank_name" field. + 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; + } + } + + /// Field number for the "tank_name_full" field. + 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 diff --git a/src/BlitzKit.CLI/Protos/LegacyConsumableDefinitions.cs b/src/BlitzKit.CLI/Protos/LegacyConsumableDefinitions.cs new file mode 100644 index 000000000..0f34ca320 --- /dev/null +++ b/src/BlitzKit.CLI/Protos/LegacyConsumableDefinitions.cs @@ -0,0 +1,1967 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: packages/core/src/protos/legacy_consumable_definitions.proto +// +#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 { + + /// Holder for reflection information generated from packages/core/src/protos/legacy_consumable_definitions.proto + public static partial class LegacyConsumableDefinitionsReflection { + + #region Descriptor + /// File descriptor for packages/core/src/protos/legacy_consumable_definitions.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static LegacyConsumableDefinitionsReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CjxwYWNrYWdlcy9jb3JlL3NyYy9wcm90b3MvbGVnYWN5X2NvbnN1bWFibGVf", + "ZGVmaW5pdGlvbnMucHJvdG8SCGJsaXR6a2l0GipwYWNrYWdlcy9jb3JlL3Ny", + "Yy9wcm90b3MvbGVnYWN5X2kxOG4ucHJvdG8iqAEKFUNvbnN1bWFibGVEZWZp", + "bml0aW9ucxJFCgtjb25zdW1hYmxlcxgBIAMoCzIwLmJsaXR6a2l0LkNvbnN1", + "bWFibGVEZWZpbml0aW9ucy5Db25zdW1hYmxlc0VudHJ5GkgKEENvbnN1bWFi", + "bGVzRW50cnkSCwoDa2V5GAEgASgNEiMKBXZhbHVlGAIgASgLMhQuYmxpdHpr", + "aXQuQ29uc3VtYWJsZToCOAEi3wEKCkNvbnN1bWFibGUSCgoCaWQYASACKA0S", + "IgoEbmFtZRgCIAIoCzIULmJsaXR6a2l0LkkxOG5TdHJpbmcSEAoIY29vbGRv", + "d24YAyACKA0SEAoIZHVyYXRpb24YBCABKAISGwoTZ2FtZV9tb2RlX2V4Y2x1", + "c2l2ZRgFIAIoCBIvCgdpbmNsdWRlGAYgAygLMh4uYmxpdHpraXQuQ29uc3Vt", + "YWJsZVRhbmtGaWx0ZXISLwoHZXhjbHVkZRgHIAMoCzIeLmJsaXR6a2l0LkNv", + "bnN1bWFibGVUYW5rRmlsdGVyIoMCChRDb25zdW1hYmxlVGFua0ZpbHRlchIz", + "CgV0aWVycxgBIAEoCzIiLmJsaXR6a2l0LkNvbnN1bWFibGVUYW5rVGllckZp", + "bHRlckgAEjAKA2lkcxgCIAEoCzIhLmJsaXR6a2l0LkNvbnN1bWFibGVUYW5r", + "SWRzRmlsdGVySAASPAoKY2F0ZWdvcmllcxgDIAEoCzImLmJsaXR6a2l0LkNv", + "bnN1bWFibGVUYW5rQ2F0ZWdvcnlGaWx0ZXJIABI3CgduYXRpb25zGAQgASgL", + "MiQuYmxpdHpraXQuQ29uc3VtYWJsZVRhbmtOYXRpb25GaWx0ZXJIAEINCgtm", + "aWx0ZXJfdHlwZSI0ChhDb25zdW1hYmxlVGFua1RpZXJGaWx0ZXISCwoDbWlu", + "GAEgAigNEgsKA21heBgCIAIoDSImChdDb25zdW1hYmxlVGFua0lkc0ZpbHRl", + "chILCgNpZHMYASADKA0iYgocQ29uc3VtYWJsZVRhbmtDYXRlZ29yeUZpbHRl", + "chJCCgpjYXRlZ29yaWVzGAEgAygOMi4uYmxpdHpraXQuQ29uc3VtYWJsZVRh", + "bmtDYXRlZ29yeUZpbHRlckNhdGVnb3J5Ii0KGkNvbnN1bWFibGVUYW5rTmF0", + "aW9uRmlsdGVyEg8KB25hdGlvbnMYASADKAkqWQokQ29uc3VtYWJsZVRhbmtD", + "YXRlZ29yeUZpbHRlckNhdGVnb3J5EjEKLUNPTlNVTUFCTEVfVEFOS19DQVRF", + "R09SWV9GSUxURVJfQ0FURUdPUllfQ0xJUBAA")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Blitzkit.LegacyI18NReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Blitzkit.ConsumableTankCategoryFilterCategory), }, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.ConsumableDefinitions), global::Blitzkit.ConsumableDefinitions.Parser, new[]{ "Consumables" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.Consumable), global::Blitzkit.Consumable.Parser, new[]{ "Id", "Name", "Cooldown", "Duration", "GameModeExclusive", "Include", "Exclude" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.ConsumableTankFilter), global::Blitzkit.ConsumableTankFilter.Parser, new[]{ "Tiers", "Ids", "Categories", "Nations" }, new[]{ "FilterType" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.ConsumableTankTierFilter), global::Blitzkit.ConsumableTankTierFilter.Parser, new[]{ "Min", "Max" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.ConsumableTankIdsFilter), global::Blitzkit.ConsumableTankIdsFilter.Parser, new[]{ "Ids" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.ConsumableTankCategoryFilter), global::Blitzkit.ConsumableTankCategoryFilter.Parser, new[]{ "Categories" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.ConsumableTankNationFilter), global::Blitzkit.ConsumableTankNationFilter.Parser, new[]{ "Nations" }, null, null, null, null) + })); + } + #endregion + + } + #region Enums + public enum ConsumableTankCategoryFilterCategory { + [pbr::OriginalName("CONSUMABLE_TANK_CATEGORY_FILTER_CATEGORY_CLIP")] Clip = 0, + } + + #endregion + + #region Messages + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ConsumableDefinitions : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ConsumableDefinitions()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyConsumableDefinitionsReflection.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 ConsumableDefinitions() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ConsumableDefinitions(ConsumableDefinitions other) : this() { + consumables_ = other.consumables_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ConsumableDefinitions Clone() { + return new ConsumableDefinitions(this); + } + + /// Field number for the "consumables" field. + public const int ConsumablesFieldNumber = 1; + private static readonly pbc::MapField.Codec _map_consumables_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForUInt32(8, 0), pb::FieldCodec.ForMessage(18, global::Blitzkit.Consumable.Parser), 10); + private readonly pbc::MapField consumables_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField 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 ConsumableDefinitions); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ConsumableDefinitions other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + 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 ^= 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 + consumables_.WriteTo(output, _map_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) { + consumables_.WriteTo(ref output, _map_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 += consumables_.CalculateSize(_map_consumables_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ConsumableDefinitions other) { + if (other == null) { + return; + } + consumables_.MergeFrom(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: { + consumables_.AddEntriesFrom(input, _map_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: { + consumables_.AddEntriesFrom(ref input, _map_consumables_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Consumable : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Consumable()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyConsumableDefinitionsReflection.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 Consumable() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Consumable(Consumable other) : this() { + _hasBits0 = other._hasBits0; + id_ = other.id_; + name_ = other.name_ != null ? other.name_.Clone() : null; + cooldown_ = other.cooldown_; + duration_ = other.duration_; + 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 Consumable Clone() { + return new Consumable(this); + } + + /// Field number for the "id" field. + 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; + } + } + /// Gets whether the "id" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasId { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "id" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearId() { + _hasBits0 &= ~1; + } + + /// Field number for the "name" field. + 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; + } + } + + /// Field number for the "cooldown" field. + public const int CooldownFieldNumber = 3; + private readonly static uint CooldownDefaultValue = 0; + + private uint cooldown_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint Cooldown { + get { if ((_hasBits0 & 2) != 0) { return cooldown_; } else { return CooldownDefaultValue; } } + set { + _hasBits0 |= 2; + cooldown_ = value; + } + } + /// Gets whether the "cooldown" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasCooldown { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "cooldown" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearCooldown() { + _hasBits0 &= ~2; + } + + /// Field number for the "duration" field. + public const int DurationFieldNumber = 4; + private readonly static float DurationDefaultValue = 0F; + + private float duration_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Duration { + get { if ((_hasBits0 & 4) != 0) { return duration_; } else { return DurationDefaultValue; } } + set { + _hasBits0 |= 4; + duration_ = value; + } + } + /// Gets whether the "duration" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasDuration { + get { return (_hasBits0 & 4) != 0; } + } + /// Clears the value of the "duration" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearDuration() { + _hasBits0 &= ~4; + } + + /// Field number for the "game_mode_exclusive" field. + 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 & 8) != 0) { return gameModeExclusive_; } else { return GameModeExclusiveDefaultValue; } } + set { + _hasBits0 |= 8; + gameModeExclusive_ = value; + } + } + /// Gets whether the "game_mode_exclusive" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasGameModeExclusive { + get { return (_hasBits0 & 8) != 0; } + } + /// Clears the value of the "game_mode_exclusive" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearGameModeExclusive() { + _hasBits0 &= ~8; + } + + /// Field number for the "include" field. + public const int IncludeFieldNumber = 6; + private static readonly pb::FieldCodec _repeated_include_codec + = pb::FieldCodec.ForMessage(50, global::Blitzkit.ConsumableTankFilter.Parser); + private readonly pbc::RepeatedField include_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Include { + get { return include_; } + } + + /// Field number for the "exclude" field. + public const int ExcludeFieldNumber = 7; + private static readonly pb::FieldCodec _repeated_exclude_codec + = pb::FieldCodec.ForMessage(58, global::Blitzkit.ConsumableTankFilter.Parser); + private readonly pbc::RepeatedField exclude_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField 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 Consumable); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Consumable 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 (Cooldown != other.Cooldown) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Duration, other.Duration)) 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 (HasCooldown) hash ^= Cooldown.GetHashCode(); + if (HasDuration) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Duration); + 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 (HasCooldown) { + output.WriteRawTag(24); + output.WriteUInt32(Cooldown); + } + if (HasDuration) { + output.WriteRawTag(37); + output.WriteFloat(Duration); + } + 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 (HasCooldown) { + output.WriteRawTag(24); + output.WriteUInt32(Cooldown); + } + if (HasDuration) { + output.WriteRawTag(37); + output.WriteFloat(Duration); + } + 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 (HasCooldown) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Cooldown); + } + if (HasDuration) { + 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(Consumable 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.HasCooldown) { + Cooldown = other.Cooldown; + } + if (other.HasDuration) { + Duration = other.Duration; + } + 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 24: { + Cooldown = input.ReadUInt32(); + break; + } + case 37: { + Duration = 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 24: { + Cooldown = input.ReadUInt32(); + break; + } + case 37: { + Duration = 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 + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ConsumableTankFilter : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ConsumableTankFilter()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyConsumableDefinitionsReflection.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 ConsumableTankFilter() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ConsumableTankFilter(ConsumableTankFilter other) : this() { + switch (other.FilterTypeCase) { + case FilterTypeOneofCase.Tiers: + Tiers = other.Tiers.Clone(); + break; + case FilterTypeOneofCase.Ids: + Ids = other.Ids.Clone(); + break; + case FilterTypeOneofCase.Categories: + Categories = other.Categories.Clone(); + break; + case FilterTypeOneofCase.Nations: + Nations = other.Nations.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ConsumableTankFilter Clone() { + return new ConsumableTankFilter(this); + } + + /// Field number for the "tiers" field. + public const int TiersFieldNumber = 1; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.ConsumableTankTierFilter Tiers { + get { return filterTypeCase_ == FilterTypeOneofCase.Tiers ? (global::Blitzkit.ConsumableTankTierFilter) filterType_ : null; } + set { + filterType_ = value; + filterTypeCase_ = value == null ? FilterTypeOneofCase.None : FilterTypeOneofCase.Tiers; + } + } + + /// Field number for the "ids" field. + public const int IdsFieldNumber = 2; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.ConsumableTankIdsFilter Ids { + get { return filterTypeCase_ == FilterTypeOneofCase.Ids ? (global::Blitzkit.ConsumableTankIdsFilter) filterType_ : null; } + set { + filterType_ = value; + filterTypeCase_ = value == null ? FilterTypeOneofCase.None : FilterTypeOneofCase.Ids; + } + } + + /// Field number for the "categories" field. + public const int CategoriesFieldNumber = 3; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.ConsumableTankCategoryFilter Categories { + get { return filterTypeCase_ == FilterTypeOneofCase.Categories ? (global::Blitzkit.ConsumableTankCategoryFilter) filterType_ : null; } + set { + filterType_ = value; + filterTypeCase_ = value == null ? FilterTypeOneofCase.None : FilterTypeOneofCase.Categories; + } + } + + /// Field number for the "nations" field. + public const int NationsFieldNumber = 4; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.ConsumableTankNationFilter Nations { + get { return filterTypeCase_ == FilterTypeOneofCase.Nations ? (global::Blitzkit.ConsumableTankNationFilter) filterType_ : null; } + set { + filterType_ = value; + filterTypeCase_ = value == null ? FilterTypeOneofCase.None : FilterTypeOneofCase.Nations; + } + } + + private object filterType_; + /// Enum of possible cases for the "filter_type" oneof. + public enum FilterTypeOneofCase { + None = 0, + Tiers = 1, + Ids = 2, + Categories = 3, + Nations = 4, + } + private FilterTypeOneofCase filterTypeCase_ = FilterTypeOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FilterTypeOneofCase FilterTypeCase { + get { return filterTypeCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearFilterType() { + filterTypeCase_ = FilterTypeOneofCase.None; + filterType_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ConsumableTankFilter); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ConsumableTankFilter other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(Tiers, other.Tiers)) return false; + if (!object.Equals(Ids, other.Ids)) return false; + if (!object.Equals(Categories, other.Categories)) return false; + if (!object.Equals(Nations, other.Nations)) return false; + if (FilterTypeCase != other.FilterTypeCase) 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 (filterTypeCase_ == FilterTypeOneofCase.Tiers) hash ^= Tiers.GetHashCode(); + if (filterTypeCase_ == FilterTypeOneofCase.Ids) hash ^= Ids.GetHashCode(); + if (filterTypeCase_ == FilterTypeOneofCase.Categories) hash ^= Categories.GetHashCode(); + if (filterTypeCase_ == FilterTypeOneofCase.Nations) hash ^= Nations.GetHashCode(); + hash ^= (int) filterTypeCase_; + 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 (filterTypeCase_ == FilterTypeOneofCase.Tiers) { + output.WriteRawTag(10); + output.WriteMessage(Tiers); + } + if (filterTypeCase_ == FilterTypeOneofCase.Ids) { + output.WriteRawTag(18); + output.WriteMessage(Ids); + } + if (filterTypeCase_ == FilterTypeOneofCase.Categories) { + output.WriteRawTag(26); + output.WriteMessage(Categories); + } + if (filterTypeCase_ == FilterTypeOneofCase.Nations) { + output.WriteRawTag(34); + output.WriteMessage(Nations); + } + 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 (filterTypeCase_ == FilterTypeOneofCase.Tiers) { + output.WriteRawTag(10); + output.WriteMessage(Tiers); + } + if (filterTypeCase_ == FilterTypeOneofCase.Ids) { + output.WriteRawTag(18); + output.WriteMessage(Ids); + } + if (filterTypeCase_ == FilterTypeOneofCase.Categories) { + output.WriteRawTag(26); + output.WriteMessage(Categories); + } + if (filterTypeCase_ == FilterTypeOneofCase.Nations) { + output.WriteRawTag(34); + output.WriteMessage(Nations); + } + 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 (filterTypeCase_ == FilterTypeOneofCase.Tiers) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Tiers); + } + if (filterTypeCase_ == FilterTypeOneofCase.Ids) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Ids); + } + if (filterTypeCase_ == FilterTypeOneofCase.Categories) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Categories); + } + if (filterTypeCase_ == FilterTypeOneofCase.Nations) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Nations); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ConsumableTankFilter other) { + if (other == null) { + return; + } + switch (other.FilterTypeCase) { + case FilterTypeOneofCase.Tiers: + if (Tiers == null) { + Tiers = new global::Blitzkit.ConsumableTankTierFilter(); + } + Tiers.MergeFrom(other.Tiers); + break; + case FilterTypeOneofCase.Ids: + if (Ids == null) { + Ids = new global::Blitzkit.ConsumableTankIdsFilter(); + } + Ids.MergeFrom(other.Ids); + break; + case FilterTypeOneofCase.Categories: + if (Categories == null) { + Categories = new global::Blitzkit.ConsumableTankCategoryFilter(); + } + Categories.MergeFrom(other.Categories); + break; + case FilterTypeOneofCase.Nations: + if (Nations == null) { + Nations = new global::Blitzkit.ConsumableTankNationFilter(); + } + Nations.MergeFrom(other.Nations); + break; + } + + _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: { + global::Blitzkit.ConsumableTankTierFilter subBuilder = new global::Blitzkit.ConsumableTankTierFilter(); + if (filterTypeCase_ == FilterTypeOneofCase.Tiers) { + subBuilder.MergeFrom(Tiers); + } + input.ReadMessage(subBuilder); + Tiers = subBuilder; + break; + } + case 18: { + global::Blitzkit.ConsumableTankIdsFilter subBuilder = new global::Blitzkit.ConsumableTankIdsFilter(); + if (filterTypeCase_ == FilterTypeOneofCase.Ids) { + subBuilder.MergeFrom(Ids); + } + input.ReadMessage(subBuilder); + Ids = subBuilder; + break; + } + case 26: { + global::Blitzkit.ConsumableTankCategoryFilter subBuilder = new global::Blitzkit.ConsumableTankCategoryFilter(); + if (filterTypeCase_ == FilterTypeOneofCase.Categories) { + subBuilder.MergeFrom(Categories); + } + input.ReadMessage(subBuilder); + Categories = subBuilder; + break; + } + case 34: { + global::Blitzkit.ConsumableTankNationFilter subBuilder = new global::Blitzkit.ConsumableTankNationFilter(); + if (filterTypeCase_ == FilterTypeOneofCase.Nations) { + subBuilder.MergeFrom(Nations); + } + input.ReadMessage(subBuilder); + Nations = subBuilder; + 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: { + global::Blitzkit.ConsumableTankTierFilter subBuilder = new global::Blitzkit.ConsumableTankTierFilter(); + if (filterTypeCase_ == FilterTypeOneofCase.Tiers) { + subBuilder.MergeFrom(Tiers); + } + input.ReadMessage(subBuilder); + Tiers = subBuilder; + break; + } + case 18: { + global::Blitzkit.ConsumableTankIdsFilter subBuilder = new global::Blitzkit.ConsumableTankIdsFilter(); + if (filterTypeCase_ == FilterTypeOneofCase.Ids) { + subBuilder.MergeFrom(Ids); + } + input.ReadMessage(subBuilder); + Ids = subBuilder; + break; + } + case 26: { + global::Blitzkit.ConsumableTankCategoryFilter subBuilder = new global::Blitzkit.ConsumableTankCategoryFilter(); + if (filterTypeCase_ == FilterTypeOneofCase.Categories) { + subBuilder.MergeFrom(Categories); + } + input.ReadMessage(subBuilder); + Categories = subBuilder; + break; + } + case 34: { + global::Blitzkit.ConsumableTankNationFilter subBuilder = new global::Blitzkit.ConsumableTankNationFilter(); + if (filterTypeCase_ == FilterTypeOneofCase.Nations) { + subBuilder.MergeFrom(Nations); + } + input.ReadMessage(subBuilder); + Nations = subBuilder; + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ConsumableTankTierFilter : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ConsumableTankTierFilter()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyConsumableDefinitionsReflection.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 ConsumableTankTierFilter() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ConsumableTankTierFilter(ConsumableTankTierFilter other) : this() { + _hasBits0 = other._hasBits0; + min_ = other.min_; + max_ = other.max_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ConsumableTankTierFilter Clone() { + return new ConsumableTankTierFilter(this); + } + + /// Field number for the "min" field. + public const int MinFieldNumber = 1; + private readonly static uint MinDefaultValue = 0; + + private uint min_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint Min { + get { if ((_hasBits0 & 1) != 0) { return min_; } else { return MinDefaultValue; } } + set { + _hasBits0 |= 1; + min_ = value; + } + } + /// Gets whether the "min" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasMin { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "min" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearMin() { + _hasBits0 &= ~1; + } + + /// Field number for the "max" field. + public const int MaxFieldNumber = 2; + private readonly static uint MaxDefaultValue = 0; + + private uint max_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint Max { + get { if ((_hasBits0 & 2) != 0) { return max_; } else { return MaxDefaultValue; } } + set { + _hasBits0 |= 2; + max_ = value; + } + } + /// Gets whether the "max" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasMax { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "max" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearMax() { + _hasBits0 &= ~2; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ConsumableTankTierFilter); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ConsumableTankTierFilter other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Min != other.Min) return false; + if (Max != other.Max) 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 (HasMin) hash ^= Min.GetHashCode(); + if (HasMax) hash ^= Max.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 (HasMin) { + output.WriteRawTag(8); + output.WriteUInt32(Min); + } + if (HasMax) { + output.WriteRawTag(16); + output.WriteUInt32(Max); + } + 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 (HasMin) { + output.WriteRawTag(8); + output.WriteUInt32(Min); + } + if (HasMax) { + output.WriteRawTag(16); + output.WriteUInt32(Max); + } + 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 (HasMin) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Min); + } + if (HasMax) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Max); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ConsumableTankTierFilter other) { + if (other == null) { + return; + } + if (other.HasMin) { + Min = other.Min; + } + if (other.HasMax) { + Max = other.Max; + } + _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: { + Min = input.ReadUInt32(); + break; + } + case 16: { + Max = 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: { + Min = input.ReadUInt32(); + break; + } + case 16: { + Max = input.ReadUInt32(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ConsumableTankIdsFilter : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ConsumableTankIdsFilter()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyConsumableDefinitionsReflection.Descriptor.MessageTypes[4]; } + } + + [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 ConsumableTankIdsFilter() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ConsumableTankIdsFilter(ConsumableTankIdsFilter other) : this() { + ids_ = other.ids_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ConsumableTankIdsFilter Clone() { + return new ConsumableTankIdsFilter(this); + } + + /// Field number for the "ids" field. + public const int IdsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_ids_codec + = pb::FieldCodec.ForUInt32(8); + private readonly pbc::RepeatedField ids_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Ids { + get { return ids_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ConsumableTankIdsFilter); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ConsumableTankIdsFilter other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!ids_.Equals(other.ids_)) 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 ^= ids_.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 + ids_.WriteTo(output, _repeated_ids_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) { + ids_.WriteTo(ref output, _repeated_ids_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 += ids_.CalculateSize(_repeated_ids_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ConsumableTankIdsFilter other) { + if (other == null) { + return; + } + ids_.Add(other.ids_); + _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: { + ids_.AddEntriesFrom(input, _repeated_ids_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: { + ids_.AddEntriesFrom(ref input, _repeated_ids_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ConsumableTankCategoryFilter : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ConsumableTankCategoryFilter()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyConsumableDefinitionsReflection.Descriptor.MessageTypes[5]; } + } + + [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 ConsumableTankCategoryFilter() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ConsumableTankCategoryFilter(ConsumableTankCategoryFilter other) : this() { + categories_ = other.categories_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ConsumableTankCategoryFilter Clone() { + return new ConsumableTankCategoryFilter(this); + } + + /// Field number for the "categories" field. + public const int CategoriesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_categories_codec + = pb::FieldCodec.ForEnum(8, x => (int) x, x => (global::Blitzkit.ConsumableTankCategoryFilterCategory) x); + private readonly pbc::RepeatedField categories_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Categories { + get { return categories_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ConsumableTankCategoryFilter); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ConsumableTankCategoryFilter other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!categories_.Equals(other.categories_)) 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 ^= categories_.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 + categories_.WriteTo(output, _repeated_categories_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) { + categories_.WriteTo(ref output, _repeated_categories_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 += categories_.CalculateSize(_repeated_categories_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ConsumableTankCategoryFilter other) { + if (other == null) { + return; + } + categories_.Add(other.categories_); + _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: { + categories_.AddEntriesFrom(input, _repeated_categories_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: { + categories_.AddEntriesFrom(ref input, _repeated_categories_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ConsumableTankNationFilter : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ConsumableTankNationFilter()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyConsumableDefinitionsReflection.Descriptor.MessageTypes[6]; } + } + + [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 ConsumableTankNationFilter() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ConsumableTankNationFilter(ConsumableTankNationFilter other) : this() { + nations_ = other.nations_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ConsumableTankNationFilter Clone() { + return new ConsumableTankNationFilter(this); + } + + /// Field number for the "nations" field. + public const int NationsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_nations_codec + = pb::FieldCodec.ForString(10); + private readonly pbc::RepeatedField nations_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Nations { + get { return nations_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ConsumableTankNationFilter); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ConsumableTankNationFilter other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!nations_.Equals(other.nations_)) 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 ^= nations_.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 + nations_.WriteTo(output, _repeated_nations_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) { + nations_.WriteTo(ref output, _repeated_nations_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 += nations_.CalculateSize(_repeated_nations_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ConsumableTankNationFilter other) { + if (other == null) { + return; + } + nations_.Add(other.nations_); + _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: { + nations_.AddEntriesFrom(input, _repeated_nations_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: { + nations_.AddEntriesFrom(ref input, _repeated_nations_codec); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/BlitzKit.CLI/Protos/LegacyEquipmentDefinitions.cs b/src/BlitzKit.CLI/Protos/LegacyEquipmentDefinitions.cs new file mode 100644 index 000000000..f5baa481e --- /dev/null +++ b/src/BlitzKit.CLI/Protos/LegacyEquipmentDefinitions.cs @@ -0,0 +1,978 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: packages/core/src/protos/legacy_equipment_definitions.proto +// +#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 { + + /// Holder for reflection information generated from packages/core/src/protos/legacy_equipment_definitions.proto + public static partial class LegacyEquipmentDefinitionsReflection { + + #region Descriptor + /// File descriptor for packages/core/src/protos/legacy_equipment_definitions.proto + 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 + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EquipmentDefinitions()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser 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); + } + + /// Field number for the "presets" field. + public const int PresetsFieldNumber = 1; + private static readonly pbc::MapField.Codec _map_presets_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForMessage(18, global::Blitzkit.EquipmentPreset.Parser), 10); + private readonly pbc::MapField presets_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField Presets { + get { return presets_; } + } + + /// Field number for the "equipments" field. + public const int EquipmentsFieldNumber = 2; + private static readonly pbc::MapField.Codec _map_equipments_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForUInt32(8, 0), pb::FieldCodec.ForMessage(18, global::Blitzkit.Equipment.Parser), 18); + private readonly pbc::MapField equipments_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField 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 + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Equipment()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser 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); + } + + /// Field number for the "name" field. + 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; + } + } + + /// Field number for the "description" field. + 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 + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EquipmentPreset()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser 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); + } + + /// Field number for the "slots" field. + public const int SlotsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_slots_codec + = pb::FieldCodec.ForMessage(10, global::Blitzkit.EquipmentSlot.Parser); + private readonly pbc::RepeatedField slots_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField 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 + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EquipmentSlot()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser 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); + } + + /// Field number for the "left" field. + 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; + } + } + /// Gets whether the "left" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasLeft { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "left" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearLeft() { + _hasBits0 &= ~1; + } + + /// Field number for the "right" field. + 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; + } + } + /// Gets whether the "right" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasRight { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "right" field + [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 diff --git a/src/BlitzKit.CLI/Protos/LegacyGameDefinitions.cs b/src/BlitzKit.CLI/Protos/LegacyGameDefinitions.cs new file mode 100644 index 000000000..faec9d568 --- /dev/null +++ b/src/BlitzKit.CLI/Protos/LegacyGameDefinitions.cs @@ -0,0 +1,769 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: packages/core/src/protos/legacy_game_definitions.proto +// +#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 { + + /// Holder for reflection information generated from packages/core/src/protos/legacy_game_definitions.proto + public static partial class LegacyGameDefinitionsReflection { + + #region Descriptor + /// File descriptor for packages/core/src/protos/legacy_game_definitions.proto + 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 + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GameDefinitions()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser 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); + } + + /// Field number for the "version" field. + 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"); + } + } + /// Gets whether the "version" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasVersion { + get { return version_ != null; } + } + /// Clears the value of the "version" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearVersion() { + version_ = null; + } + + /// Field number for the "nations" field. + public const int NationsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_nations_codec + = pb::FieldCodec.ForString(18); + private readonly pbc::RepeatedField nations_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Nations { + get { return nations_; } + } + + /// Field number for the "gameModes" field. + public const int GameModesFieldNumber = 3; + private static readonly pbc::MapField.Codec _map_gameModes_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForUInt32(8, 0), pb::FieldCodec.ForMessage(18, global::Blitzkit.GameMode.Parser), 26); + private readonly pbc::MapField gameModes_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField GameModes { + get { return gameModes_; } + } + + /// Field number for the "roles" field. + public const int RolesFieldNumber = 4; + private static readonly pbc::MapField.Codec _map_roles_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForUInt32(8, 0), pb::FieldCodec.ForMessage(18, global::Blitzkit.GameModeRole.Parser), 34); + private readonly pbc::MapField roles_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField 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 + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GameMode()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser 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); + } + + /// Field number for the "name" field. + 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 + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GameModeRole()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser 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); + } + + /// Field number for the "provisions" field. + public const int ProvisionsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_provisions_codec + = pb::FieldCodec.ForUInt32(8); + private readonly pbc::RepeatedField provisions_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Provisions { + get { return provisions_; } + } + + /// Field number for the "consumables" field. + public const int ConsumablesFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_consumables_codec + = pb::FieldCodec.ForUInt32(16); + private readonly pbc::RepeatedField consumables_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField 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 diff --git a/src/BlitzKit.CLI/Protos/LegacyI18N.cs b/src/BlitzKit.CLI/Protos/LegacyI18N.cs new file mode 100644 index 000000000..ca7560139 --- /dev/null +++ b/src/BlitzKit.CLI/Protos/LegacyI18N.cs @@ -0,0 +1,232 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: packages/core/src/protos/legacy_i18n.proto +// +#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 { + + /// Holder for reflection information generated from packages/core/src/protos/legacy_i18n.proto + public static partial class LegacyI18NReflection { + + #region Descriptor + /// File descriptor for packages/core/src/protos/legacy_i18n.proto + 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 + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new I18nString()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser 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); + } + + /// Field number for the "locales" field. + public const int LocalesFieldNumber = 1; + private static readonly pbc::MapField.Codec _map_locales_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForString(18, ""), 10); + private readonly pbc::MapField locales_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField 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 diff --git a/src/BlitzKit.CLI/Protos/LegacyMapDefinitions.cs b/src/BlitzKit.CLI/Protos/LegacyMapDefinitions.cs new file mode 100644 index 000000000..e83738df4 --- /dev/null +++ b/src/BlitzKit.CLI/Protos/LegacyMapDefinitions.cs @@ -0,0 +1,497 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: packages/core/src/protos/legacy_map_definitions.proto +// +#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 { + + /// Holder for reflection information generated from packages/core/src/protos/legacy_map_definitions.proto + public static partial class LegacyMapDefinitionsReflection { + + #region Descriptor + /// File descriptor for packages/core/src/protos/legacy_map_definitions.proto + 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 + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MapDefinitions()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser 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); + } + + /// Field number for the "maps" field. + public const int MapsFieldNumber = 1; + private static readonly pbc::MapField.Codec _map_maps_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForInt32(8, 0), pb::FieldCodec.ForMessage(18, global::Blitzkit.MapDefinition.Parser), 10); + private readonly pbc::MapField maps_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField 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 + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MapDefinition()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser 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); + } + + /// Field number for the "id" field. + 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; + } + } + /// Gets whether the "id" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasId { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "id" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearId() { + _hasBits0 &= ~1; + } + + /// Field number for the "name" field. + 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 diff --git a/src/BlitzKit.CLI/Protos/LegacyModelDefinitions.cs b/src/BlitzKit.CLI/Protos/LegacyModelDefinitions.cs new file mode 100644 index 000000000..c3cb4cba8 --- /dev/null +++ b/src/BlitzKit.CLI/Protos/LegacyModelDefinitions.cs @@ -0,0 +1,3877 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: packages/core/src/protos/legacy_model_definitions.proto +// +#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 { + + /// Holder for reflection information generated from packages/core/src/protos/legacy_model_definitions.proto + public static partial class LegacyModelDefinitionsReflection { + + #region Descriptor + /// File descriptor for packages/core/src/protos/legacy_model_definitions.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static LegacyModelDefinitionsReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CjdwYWNrYWdlcy9jb3JlL3NyYy9wcm90b3MvbGVnYWN5X21vZGVsX2RlZmlu", + "aXRpb25zLnByb3RvEghibGl0emtpdCKUAQoQTW9kZWxEZWZpbml0aW9ucxI2", + "CgZtb2RlbHMYASADKAsyJi5ibGl0emtpdC5Nb2RlbERlZmluaXRpb25zLk1v", + "ZGVsc0VudHJ5GkgKC01vZGVsc0VudHJ5EgsKA2tleRgBIAEoDRIoCgV2YWx1", + "ZRgCIAEoCzIZLmJsaXR6a2l0Lk1vZGVsRGVmaW5pdGlvbjoCOAEi2gMKD01v", + "ZGVsRGVmaW5pdGlvbhIeCgVhcm1vchgBIAIoCzIPLmJsaXR6a2l0LkFybW9y", + "EigKDXR1cnJldF9vcmlnaW4YAiACKAsyES5ibGl0emtpdC5WZWN0b3IzEkAK", + "F2luaXRpYWxfdHVycmV0X3JvdGF0aW9uGAMgASgLMh8uYmxpdHpraXQuSW5p", + "dGlhbFR1cnJldFJvdGF0aW9uEjcKB3R1cnJldHMYBCADKAsyJi5ibGl0emtp", + "dC5Nb2RlbERlZmluaXRpb24uVHVycmV0c0VudHJ5EjUKBnRyYWNrcxgFIAMo", + "CzIlLmJsaXR6a2l0Lk1vZGVsRGVmaW5pdGlvbi5UcmFja3NFbnRyeRIrCgxi", + "b3VuZGluZ19ib3gYBiACKAsyFS5ibGl0emtpdC5Cb3VuZGluZ0JveBpPCgxU", + "dXJyZXRzRW50cnkSCwoDa2V5GAEgASgNEi4KBXZhbHVlGAIgASgLMh8uYmxp", + "dHpraXQuVHVycmV0TW9kZWxEZWZpbml0aW9uOgI4ARpNCgtUcmFja3NFbnRy", + "eRILCgNrZXkYASABKA0SLQoFdmFsdWUYAiABKAsyHi5ibGl0emtpdC5UcmFj", + "a01vZGVsRGVmaW5pdGlvbjoCOAEifAoFQXJtb3ISMQoJdGhpY2tuZXNzGAEg", + "AygLMh4uYmxpdHpraXQuQXJtb3IuVGhpY2tuZXNzRW50cnkSDgoGc3BhY2Vk", + "GAIgAygNGjAKDlRoaWNrbmVzc0VudHJ5EgsKA2tleRgBIAEoDRINCgV2YWx1", + "ZRgCIAEoAjoCOAEiKgoHVmVjdG9yMxIJCgF4GAEgAigCEgkKAXkYAiACKAIS", + "CQoBehgDIAIoAiJBChVJbml0aWFsVHVycmV0Um90YXRpb24SCwoDeWF3GAEg", + "AigCEg0KBXBpdGNoGAIgAigCEgwKBHJvbGwYAyACKAIiwwIKFVR1cnJldE1v", + "ZGVsRGVmaW5pdGlvbhIrCgxib3VuZGluZ19ib3gYASACKAsyFS5ibGl0emtp", + "dC5Cb3VuZGluZ0JveBIeCgVhcm1vchgCIAIoCzIPLmJsaXR6a2l0LkFybW9y", + "EhAKCG1vZGVsX2lkGAMgAigNEiUKCmd1bl9vcmlnaW4YBCACKAsyES5ibGl0", + "emtpdC5WZWN0b3IzEjcKBGd1bnMYBSADKAsyKS5ibGl0emtpdC5UdXJyZXRN", + "b2RlbERlZmluaXRpb24uR3Vuc0VudHJ5EiAKA3lhdxgGIAEoCzITLmJsaXR6", + "a2l0Lllhd0xpbWl0cxpJCglHdW5zRW50cnkSCwoDa2V5GAEgASgNEisKBXZh", + "bHVlGAIgASgLMhwuYmxpdHpraXQuR3VuTW9kZWxEZWZpbml0aW9uOgI4ASIl", + "CglZYXdMaW1pdHMSCwoDbWluGAEgAigCEgsKA21heBgCIAIoAiJNCgtCb3Vu", + "ZGluZ0JveBIeCgNtaW4YASACKAsyES5ibGl0emtpdC5WZWN0b3IzEh4KA21h", + "eBgCIAIoCzIRLmJsaXR6a2l0LlZlY3RvcjMiTAoUVHJhY2tNb2RlbERlZmlu", + "aXRpb24SEQoJdGhpY2tuZXNzGAEgAigCEiEKBm9yaWdpbhgCIAIoCzIRLmJs", + "aXR6a2l0LlZlY3RvcjMijQEKEkd1bk1vZGVsRGVmaW5pdGlvbhIeCgVhcm1v", + "chgBIAIoCzIPLmJsaXR6a2l0LkFybW9yEhEKCXRoaWNrbmVzcxgCIAIoAhIQ", + "Cghtb2RlbF9pZBgDIAIoDRIkCgVwaXRjaBgEIAIoCzIVLmJsaXR6a2l0LlBp", + "dGNoTGltaXRzEgwKBG1hc2sYBSABKAIilAEKC1BpdGNoTGltaXRzEgsKA21p", + "bhgBIAIoAhILCgNtYXgYAiACKAISKwoFZnJvbnQYAyABKAsyHC5ibGl0emtp", + "dC5QaXRjaExpbWl0c0V4dHJlbWESKgoEYmFjaxgEIAEoCzIcLmJsaXR6a2l0", + "LlBpdGNoTGltaXRzRXh0cmVtYRISCgp0cmFuc2l0aW9uGAUgASgCIj0KElBp", + "dGNoTGltaXRzRXh0cmVtYRILCgNtaW4YASACKAISCwoDbWF4GAIgAigCEg0K", + "BXJhbmdlGAMgAigC")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.ModelDefinitions), global::Blitzkit.ModelDefinitions.Parser, new[]{ "Models" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.ModelDefinition), global::Blitzkit.ModelDefinition.Parser, new[]{ "Armor", "TurretOrigin", "InitialTurretRotation", "Turrets", "Tracks", "BoundingBox" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, null, }), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.Armor), global::Blitzkit.Armor.Parser, new[]{ "Thickness", "Spaced" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.Vector3), global::Blitzkit.Vector3.Parser, new[]{ "X", "Y", "Z" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.InitialTurretRotation), global::Blitzkit.InitialTurretRotation.Parser, new[]{ "Yaw", "Pitch", "Roll" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.TurretModelDefinition), global::Blitzkit.TurretModelDefinition.Parser, new[]{ "BoundingBox", "Armor", "ModelId", "GunOrigin", "Guns", "Yaw" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.YawLimits), global::Blitzkit.YawLimits.Parser, new[]{ "Min", "Max" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.BoundingBox), global::Blitzkit.BoundingBox.Parser, new[]{ "Min", "Max" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.TrackModelDefinition), global::Blitzkit.TrackModelDefinition.Parser, new[]{ "Thickness", "Origin" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.GunModelDefinition), global::Blitzkit.GunModelDefinition.Parser, new[]{ "Armor", "Thickness", "ModelId", "Pitch", "Mask" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.PitchLimits), global::Blitzkit.PitchLimits.Parser, new[]{ "Min", "Max", "Front", "Back", "Transition" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.PitchLimitsExtrema), global::Blitzkit.PitchLimitsExtrema.Parser, new[]{ "Min", "Max", "Range" }, null, null, null, null) + })); + } + #endregion + + } + #region Messages + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ModelDefinitions : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ModelDefinitions()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyModelDefinitionsReflection.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 ModelDefinitions() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ModelDefinitions(ModelDefinitions other) : this() { + models_ = other.models_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ModelDefinitions Clone() { + return new ModelDefinitions(this); + } + + /// Field number for the "models" field. + public const int ModelsFieldNumber = 1; + private static readonly pbc::MapField.Codec _map_models_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForUInt32(8, 0), pb::FieldCodec.ForMessage(18, global::Blitzkit.ModelDefinition.Parser), 10); + private readonly pbc::MapField models_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField Models { + get { return models_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ModelDefinitions); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ModelDefinitions other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!Models.Equals(other.Models)) 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 ^= Models.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 + models_.WriteTo(output, _map_models_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) { + models_.WriteTo(ref output, _map_models_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 += models_.CalculateSize(_map_models_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ModelDefinitions other) { + if (other == null) { + return; + } + models_.MergeFrom(other.models_); + _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: { + models_.AddEntriesFrom(input, _map_models_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: { + models_.AddEntriesFrom(ref input, _map_models_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ModelDefinition : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ModelDefinition()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyModelDefinitionsReflection.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 ModelDefinition() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ModelDefinition(ModelDefinition other) : this() { + armor_ = other.armor_ != null ? other.armor_.Clone() : null; + turretOrigin_ = other.turretOrigin_ != null ? other.turretOrigin_.Clone() : null; + initialTurretRotation_ = other.initialTurretRotation_ != null ? other.initialTurretRotation_.Clone() : null; + turrets_ = other.turrets_.Clone(); + tracks_ = other.tracks_.Clone(); + boundingBox_ = other.boundingBox_ != null ? other.boundingBox_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ModelDefinition Clone() { + return new ModelDefinition(this); + } + + /// Field number for the "armor" field. + public const int ArmorFieldNumber = 1; + private global::Blitzkit.Armor armor_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.Armor Armor { + get { return armor_; } + set { + armor_ = value; + } + } + + /// Field number for the "turret_origin" field. + public const int TurretOriginFieldNumber = 2; + private global::Blitzkit.Vector3 turretOrigin_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.Vector3 TurretOrigin { + get { return turretOrigin_; } + set { + turretOrigin_ = value; + } + } + + /// Field number for the "initial_turret_rotation" field. + public const int InitialTurretRotationFieldNumber = 3; + private global::Blitzkit.InitialTurretRotation initialTurretRotation_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.InitialTurretRotation InitialTurretRotation { + get { return initialTurretRotation_; } + set { + initialTurretRotation_ = value; + } + } + + /// Field number for the "turrets" field. + public const int TurretsFieldNumber = 4; + private static readonly pbc::MapField.Codec _map_turrets_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForUInt32(8, 0), pb::FieldCodec.ForMessage(18, global::Blitzkit.TurretModelDefinition.Parser), 34); + private readonly pbc::MapField turrets_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField Turrets { + get { return turrets_; } + } + + /// Field number for the "tracks" field. + public const int TracksFieldNumber = 5; + private static readonly pbc::MapField.Codec _map_tracks_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForUInt32(8, 0), pb::FieldCodec.ForMessage(18, global::Blitzkit.TrackModelDefinition.Parser), 42); + private readonly pbc::MapField tracks_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField Tracks { + get { return tracks_; } + } + + /// Field number for the "bounding_box" field. + public const int BoundingBoxFieldNumber = 6; + private global::Blitzkit.BoundingBox boundingBox_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.BoundingBox BoundingBox { + get { return boundingBox_; } + set { + boundingBox_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ModelDefinition); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ModelDefinition other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(Armor, other.Armor)) return false; + if (!object.Equals(TurretOrigin, other.TurretOrigin)) return false; + if (!object.Equals(InitialTurretRotation, other.InitialTurretRotation)) return false; + if (!Turrets.Equals(other.Turrets)) return false; + if (!Tracks.Equals(other.Tracks)) return false; + if (!object.Equals(BoundingBox, other.BoundingBox)) 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 (armor_ != null) hash ^= Armor.GetHashCode(); + if (turretOrigin_ != null) hash ^= TurretOrigin.GetHashCode(); + if (initialTurretRotation_ != null) hash ^= InitialTurretRotation.GetHashCode(); + hash ^= Turrets.GetHashCode(); + hash ^= Tracks.GetHashCode(); + if (boundingBox_ != null) hash ^= BoundingBox.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 (armor_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Armor); + } + if (turretOrigin_ != null) { + output.WriteRawTag(18); + output.WriteMessage(TurretOrigin); + } + if (initialTurretRotation_ != null) { + output.WriteRawTag(26); + output.WriteMessage(InitialTurretRotation); + } + turrets_.WriteTo(output, _map_turrets_codec); + tracks_.WriteTo(output, _map_tracks_codec); + if (boundingBox_ != null) { + output.WriteRawTag(50); + output.WriteMessage(BoundingBox); + } + 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 (armor_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Armor); + } + if (turretOrigin_ != null) { + output.WriteRawTag(18); + output.WriteMessage(TurretOrigin); + } + if (initialTurretRotation_ != null) { + output.WriteRawTag(26); + output.WriteMessage(InitialTurretRotation); + } + turrets_.WriteTo(ref output, _map_turrets_codec); + tracks_.WriteTo(ref output, _map_tracks_codec); + if (boundingBox_ != null) { + output.WriteRawTag(50); + output.WriteMessage(BoundingBox); + } + 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 (armor_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Armor); + } + if (turretOrigin_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(TurretOrigin); + } + if (initialTurretRotation_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(InitialTurretRotation); + } + size += turrets_.CalculateSize(_map_turrets_codec); + size += tracks_.CalculateSize(_map_tracks_codec); + if (boundingBox_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(BoundingBox); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ModelDefinition other) { + if (other == null) { + return; + } + if (other.armor_ != null) { + if (armor_ == null) { + Armor = new global::Blitzkit.Armor(); + } + Armor.MergeFrom(other.Armor); + } + if (other.turretOrigin_ != null) { + if (turretOrigin_ == null) { + TurretOrigin = new global::Blitzkit.Vector3(); + } + TurretOrigin.MergeFrom(other.TurretOrigin); + } + if (other.initialTurretRotation_ != null) { + if (initialTurretRotation_ == null) { + InitialTurretRotation = new global::Blitzkit.InitialTurretRotation(); + } + InitialTurretRotation.MergeFrom(other.InitialTurretRotation); + } + turrets_.MergeFrom(other.turrets_); + tracks_.MergeFrom(other.tracks_); + if (other.boundingBox_ != null) { + if (boundingBox_ == null) { + BoundingBox = new global::Blitzkit.BoundingBox(); + } + BoundingBox.MergeFrom(other.BoundingBox); + } + _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 (armor_ == null) { + Armor = new global::Blitzkit.Armor(); + } + input.ReadMessage(Armor); + break; + } + case 18: { + if (turretOrigin_ == null) { + TurretOrigin = new global::Blitzkit.Vector3(); + } + input.ReadMessage(TurretOrigin); + break; + } + case 26: { + if (initialTurretRotation_ == null) { + InitialTurretRotation = new global::Blitzkit.InitialTurretRotation(); + } + input.ReadMessage(InitialTurretRotation); + break; + } + case 34: { + turrets_.AddEntriesFrom(input, _map_turrets_codec); + break; + } + case 42: { + tracks_.AddEntriesFrom(input, _map_tracks_codec); + break; + } + case 50: { + if (boundingBox_ == null) { + BoundingBox = new global::Blitzkit.BoundingBox(); + } + input.ReadMessage(BoundingBox); + 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 (armor_ == null) { + Armor = new global::Blitzkit.Armor(); + } + input.ReadMessage(Armor); + break; + } + case 18: { + if (turretOrigin_ == null) { + TurretOrigin = new global::Blitzkit.Vector3(); + } + input.ReadMessage(TurretOrigin); + break; + } + case 26: { + if (initialTurretRotation_ == null) { + InitialTurretRotation = new global::Blitzkit.InitialTurretRotation(); + } + input.ReadMessage(InitialTurretRotation); + break; + } + case 34: { + turrets_.AddEntriesFrom(ref input, _map_turrets_codec); + break; + } + case 42: { + tracks_.AddEntriesFrom(ref input, _map_tracks_codec); + break; + } + case 50: { + if (boundingBox_ == null) { + BoundingBox = new global::Blitzkit.BoundingBox(); + } + input.ReadMessage(BoundingBox); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Armor : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Armor()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyModelDefinitionsReflection.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 Armor() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Armor(Armor other) : this() { + thickness_ = other.thickness_.Clone(); + spaced_ = other.spaced_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Armor Clone() { + return new Armor(this); + } + + /// Field number for the "thickness" field. + public const int ThicknessFieldNumber = 1; + private static readonly pbc::MapField.Codec _map_thickness_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForUInt32(8, 0), pb::FieldCodec.ForFloat(21, 0F), 10); + private readonly pbc::MapField thickness_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField Thickness { + get { return thickness_; } + } + + /// Field number for the "spaced" field. + public const int SpacedFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_spaced_codec + = pb::FieldCodec.ForUInt32(16); + private readonly pbc::RepeatedField spaced_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Spaced { + get { return spaced_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Armor); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Armor other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!Thickness.Equals(other.Thickness)) return false; + if(!spaced_.Equals(other.spaced_)) 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 ^= Thickness.GetHashCode(); + hash ^= spaced_.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 + thickness_.WriteTo(output, _map_thickness_codec); + spaced_.WriteTo(output, _repeated_spaced_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) { + thickness_.WriteTo(ref output, _map_thickness_codec); + spaced_.WriteTo(ref output, _repeated_spaced_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 += thickness_.CalculateSize(_map_thickness_codec); + size += spaced_.CalculateSize(_repeated_spaced_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Armor other) { + if (other == null) { + return; + } + thickness_.MergeFrom(other.thickness_); + spaced_.Add(other.spaced_); + _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: { + thickness_.AddEntriesFrom(input, _map_thickness_codec); + break; + } + case 18: + case 16: { + spaced_.AddEntriesFrom(input, _repeated_spaced_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: { + thickness_.AddEntriesFrom(ref input, _map_thickness_codec); + break; + } + case 18: + case 16: { + spaced_.AddEntriesFrom(ref input, _repeated_spaced_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Vector3 : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Vector3()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyModelDefinitionsReflection.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 Vector3() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Vector3(Vector3 other) : this() { + _hasBits0 = other._hasBits0; + x_ = other.x_; + y_ = other.y_; + z_ = other.z_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Vector3 Clone() { + return new Vector3(this); + } + + /// Field number for the "x" field. + public const int XFieldNumber = 1; + private readonly static float XDefaultValue = 0F; + + private float x_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float X { + get { if ((_hasBits0 & 1) != 0) { return x_; } else { return XDefaultValue; } } + set { + _hasBits0 |= 1; + x_ = value; + } + } + /// Gets whether the "x" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasX { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "x" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearX() { + _hasBits0 &= ~1; + } + + /// Field number for the "y" field. + public const int YFieldNumber = 2; + private readonly static float YDefaultValue = 0F; + + private float y_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Y { + get { if ((_hasBits0 & 2) != 0) { return y_; } else { return YDefaultValue; } } + set { + _hasBits0 |= 2; + y_ = value; + } + } + /// Gets whether the "y" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasY { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "y" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearY() { + _hasBits0 &= ~2; + } + + /// Field number for the "z" field. + public const int ZFieldNumber = 3; + private readonly static float ZDefaultValue = 0F; + + private float z_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Z { + get { if ((_hasBits0 & 4) != 0) { return z_; } else { return ZDefaultValue; } } + set { + _hasBits0 |= 4; + z_ = value; + } + } + /// Gets whether the "z" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasZ { + get { return (_hasBits0 & 4) != 0; } + } + /// Clears the value of the "z" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearZ() { + _hasBits0 &= ~4; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Vector3); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Vector3 other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(X, other.X)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Y, other.Y)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Z, other.Z)) 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 (HasX) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(X); + if (HasY) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Y); + if (HasZ) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Z); + 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 (HasX) { + output.WriteRawTag(13); + output.WriteFloat(X); + } + if (HasY) { + output.WriteRawTag(21); + output.WriteFloat(Y); + } + if (HasZ) { + output.WriteRawTag(29); + output.WriteFloat(Z); + } + 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 (HasX) { + output.WriteRawTag(13); + output.WriteFloat(X); + } + if (HasY) { + output.WriteRawTag(21); + output.WriteFloat(Y); + } + if (HasZ) { + output.WriteRawTag(29); + output.WriteFloat(Z); + } + 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 (HasX) { + size += 1 + 4; + } + if (HasY) { + size += 1 + 4; + } + if (HasZ) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Vector3 other) { + if (other == null) { + return; + } + if (other.HasX) { + X = other.X; + } + if (other.HasY) { + Y = other.Y; + } + if (other.HasZ) { + Z = other.Z; + } + _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 13: { + X = input.ReadFloat(); + break; + } + case 21: { + Y = input.ReadFloat(); + break; + } + case 29: { + Z = input.ReadFloat(); + 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 13: { + X = input.ReadFloat(); + break; + } + case 21: { + Y = input.ReadFloat(); + break; + } + case 29: { + Z = input.ReadFloat(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class InitialTurretRotation : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new InitialTurretRotation()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyModelDefinitionsReflection.Descriptor.MessageTypes[4]; } + } + + [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 InitialTurretRotation() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public InitialTurretRotation(InitialTurretRotation other) : this() { + _hasBits0 = other._hasBits0; + yaw_ = other.yaw_; + pitch_ = other.pitch_; + roll_ = other.roll_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public InitialTurretRotation Clone() { + return new InitialTurretRotation(this); + } + + /// Field number for the "yaw" field. + public const int YawFieldNumber = 1; + private readonly static float YawDefaultValue = 0F; + + private float yaw_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Yaw { + get { if ((_hasBits0 & 1) != 0) { return yaw_; } else { return YawDefaultValue; } } + set { + _hasBits0 |= 1; + yaw_ = value; + } + } + /// Gets whether the "yaw" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasYaw { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "yaw" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearYaw() { + _hasBits0 &= ~1; + } + + /// Field number for the "pitch" field. + public const int PitchFieldNumber = 2; + private readonly static float PitchDefaultValue = 0F; + + private float pitch_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Pitch { + get { if ((_hasBits0 & 2) != 0) { return pitch_; } else { return PitchDefaultValue; } } + set { + _hasBits0 |= 2; + pitch_ = value; + } + } + /// Gets whether the "pitch" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasPitch { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "pitch" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearPitch() { + _hasBits0 &= ~2; + } + + /// Field number for the "roll" field. + public const int RollFieldNumber = 3; + private readonly static float RollDefaultValue = 0F; + + private float roll_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Roll { + get { if ((_hasBits0 & 4) != 0) { return roll_; } else { return RollDefaultValue; } } + set { + _hasBits0 |= 4; + roll_ = value; + } + } + /// Gets whether the "roll" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasRoll { + get { return (_hasBits0 & 4) != 0; } + } + /// Clears the value of the "roll" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearRoll() { + _hasBits0 &= ~4; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as InitialTurretRotation); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(InitialTurretRotation other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Yaw, other.Yaw)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Pitch, other.Pitch)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Roll, other.Roll)) 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 (HasYaw) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Yaw); + if (HasPitch) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Pitch); + if (HasRoll) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Roll); + 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 (HasYaw) { + output.WriteRawTag(13); + output.WriteFloat(Yaw); + } + if (HasPitch) { + output.WriteRawTag(21); + output.WriteFloat(Pitch); + } + if (HasRoll) { + output.WriteRawTag(29); + output.WriteFloat(Roll); + } + 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 (HasYaw) { + output.WriteRawTag(13); + output.WriteFloat(Yaw); + } + if (HasPitch) { + output.WriteRawTag(21); + output.WriteFloat(Pitch); + } + if (HasRoll) { + output.WriteRawTag(29); + output.WriteFloat(Roll); + } + 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 (HasYaw) { + size += 1 + 4; + } + if (HasPitch) { + size += 1 + 4; + } + if (HasRoll) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(InitialTurretRotation other) { + if (other == null) { + return; + } + if (other.HasYaw) { + Yaw = other.Yaw; + } + if (other.HasPitch) { + Pitch = other.Pitch; + } + if (other.HasRoll) { + Roll = other.Roll; + } + _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 13: { + Yaw = input.ReadFloat(); + break; + } + case 21: { + Pitch = input.ReadFloat(); + break; + } + case 29: { + Roll = input.ReadFloat(); + 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 13: { + Yaw = input.ReadFloat(); + break; + } + case 21: { + Pitch = input.ReadFloat(); + break; + } + case 29: { + Roll = input.ReadFloat(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TurretModelDefinition : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TurretModelDefinition()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyModelDefinitionsReflection.Descriptor.MessageTypes[5]; } + } + + [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 TurretModelDefinition() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TurretModelDefinition(TurretModelDefinition other) : this() { + _hasBits0 = other._hasBits0; + boundingBox_ = other.boundingBox_ != null ? other.boundingBox_.Clone() : null; + armor_ = other.armor_ != null ? other.armor_.Clone() : null; + modelId_ = other.modelId_; + gunOrigin_ = other.gunOrigin_ != null ? other.gunOrigin_.Clone() : null; + guns_ = other.guns_.Clone(); + yaw_ = other.yaw_ != null ? other.yaw_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TurretModelDefinition Clone() { + return new TurretModelDefinition(this); + } + + /// Field number for the "bounding_box" field. + public const int BoundingBoxFieldNumber = 1; + private global::Blitzkit.BoundingBox boundingBox_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.BoundingBox BoundingBox { + get { return boundingBox_; } + set { + boundingBox_ = value; + } + } + + /// Field number for the "armor" field. + public const int ArmorFieldNumber = 2; + private global::Blitzkit.Armor armor_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.Armor Armor { + get { return armor_; } + set { + armor_ = value; + } + } + + /// Field number for the "model_id" field. + public const int ModelIdFieldNumber = 3; + private readonly static uint ModelIdDefaultValue = 0; + + private uint modelId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint ModelId { + get { if ((_hasBits0 & 1) != 0) { return modelId_; } else { return ModelIdDefaultValue; } } + set { + _hasBits0 |= 1; + modelId_ = value; + } + } + /// Gets whether the "model_id" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasModelId { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "model_id" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearModelId() { + _hasBits0 &= ~1; + } + + /// Field number for the "gun_origin" field. + public const int GunOriginFieldNumber = 4; + private global::Blitzkit.Vector3 gunOrigin_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.Vector3 GunOrigin { + get { return gunOrigin_; } + set { + gunOrigin_ = value; + } + } + + /// Field number for the "guns" field. + public const int GunsFieldNumber = 5; + private static readonly pbc::MapField.Codec _map_guns_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForUInt32(8, 0), pb::FieldCodec.ForMessage(18, global::Blitzkit.GunModelDefinition.Parser), 42); + private readonly pbc::MapField guns_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField Guns { + get { return guns_; } + } + + /// Field number for the "yaw" field. + public const int YawFieldNumber = 6; + private global::Blitzkit.YawLimits yaw_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.YawLimits Yaw { + get { return yaw_; } + set { + yaw_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as TurretModelDefinition); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TurretModelDefinition other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(BoundingBox, other.BoundingBox)) return false; + if (!object.Equals(Armor, other.Armor)) return false; + if (ModelId != other.ModelId) return false; + if (!object.Equals(GunOrigin, other.GunOrigin)) return false; + if (!Guns.Equals(other.Guns)) return false; + if (!object.Equals(Yaw, other.Yaw)) 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 (boundingBox_ != null) hash ^= BoundingBox.GetHashCode(); + if (armor_ != null) hash ^= Armor.GetHashCode(); + if (HasModelId) hash ^= ModelId.GetHashCode(); + if (gunOrigin_ != null) hash ^= GunOrigin.GetHashCode(); + hash ^= Guns.GetHashCode(); + if (yaw_ != null) hash ^= Yaw.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 (boundingBox_ != null) { + output.WriteRawTag(10); + output.WriteMessage(BoundingBox); + } + if (armor_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Armor); + } + if (HasModelId) { + output.WriteRawTag(24); + output.WriteUInt32(ModelId); + } + if (gunOrigin_ != null) { + output.WriteRawTag(34); + output.WriteMessage(GunOrigin); + } + guns_.WriteTo(output, _map_guns_codec); + if (yaw_ != null) { + output.WriteRawTag(50); + output.WriteMessage(Yaw); + } + 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 (boundingBox_ != null) { + output.WriteRawTag(10); + output.WriteMessage(BoundingBox); + } + if (armor_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Armor); + } + if (HasModelId) { + output.WriteRawTag(24); + output.WriteUInt32(ModelId); + } + if (gunOrigin_ != null) { + output.WriteRawTag(34); + output.WriteMessage(GunOrigin); + } + guns_.WriteTo(ref output, _map_guns_codec); + if (yaw_ != null) { + output.WriteRawTag(50); + output.WriteMessage(Yaw); + } + 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 (boundingBox_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(BoundingBox); + } + if (armor_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Armor); + } + if (HasModelId) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(ModelId); + } + if (gunOrigin_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(GunOrigin); + } + size += guns_.CalculateSize(_map_guns_codec); + if (yaw_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Yaw); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TurretModelDefinition other) { + if (other == null) { + return; + } + if (other.boundingBox_ != null) { + if (boundingBox_ == null) { + BoundingBox = new global::Blitzkit.BoundingBox(); + } + BoundingBox.MergeFrom(other.BoundingBox); + } + if (other.armor_ != null) { + if (armor_ == null) { + Armor = new global::Blitzkit.Armor(); + } + Armor.MergeFrom(other.Armor); + } + if (other.HasModelId) { + ModelId = other.ModelId; + } + if (other.gunOrigin_ != null) { + if (gunOrigin_ == null) { + GunOrigin = new global::Blitzkit.Vector3(); + } + GunOrigin.MergeFrom(other.GunOrigin); + } + guns_.MergeFrom(other.guns_); + if (other.yaw_ != null) { + if (yaw_ == null) { + Yaw = new global::Blitzkit.YawLimits(); + } + Yaw.MergeFrom(other.Yaw); + } + _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 (boundingBox_ == null) { + BoundingBox = new global::Blitzkit.BoundingBox(); + } + input.ReadMessage(BoundingBox); + break; + } + case 18: { + if (armor_ == null) { + Armor = new global::Blitzkit.Armor(); + } + input.ReadMessage(Armor); + break; + } + case 24: { + ModelId = input.ReadUInt32(); + break; + } + case 34: { + if (gunOrigin_ == null) { + GunOrigin = new global::Blitzkit.Vector3(); + } + input.ReadMessage(GunOrigin); + break; + } + case 42: { + guns_.AddEntriesFrom(input, _map_guns_codec); + break; + } + case 50: { + if (yaw_ == null) { + Yaw = new global::Blitzkit.YawLimits(); + } + input.ReadMessage(Yaw); + 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 (boundingBox_ == null) { + BoundingBox = new global::Blitzkit.BoundingBox(); + } + input.ReadMessage(BoundingBox); + break; + } + case 18: { + if (armor_ == null) { + Armor = new global::Blitzkit.Armor(); + } + input.ReadMessage(Armor); + break; + } + case 24: { + ModelId = input.ReadUInt32(); + break; + } + case 34: { + if (gunOrigin_ == null) { + GunOrigin = new global::Blitzkit.Vector3(); + } + input.ReadMessage(GunOrigin); + break; + } + case 42: { + guns_.AddEntriesFrom(ref input, _map_guns_codec); + break; + } + case 50: { + if (yaw_ == null) { + Yaw = new global::Blitzkit.YawLimits(); + } + input.ReadMessage(Yaw); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class YawLimits : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new YawLimits()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyModelDefinitionsReflection.Descriptor.MessageTypes[6]; } + } + + [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 YawLimits() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public YawLimits(YawLimits other) : this() { + _hasBits0 = other._hasBits0; + min_ = other.min_; + max_ = other.max_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public YawLimits Clone() { + return new YawLimits(this); + } + + /// Field number for the "min" field. + public const int MinFieldNumber = 1; + private readonly static float MinDefaultValue = 0F; + + private float min_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Min { + get { if ((_hasBits0 & 1) != 0) { return min_; } else { return MinDefaultValue; } } + set { + _hasBits0 |= 1; + min_ = value; + } + } + /// Gets whether the "min" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasMin { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "min" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearMin() { + _hasBits0 &= ~1; + } + + /// Field number for the "max" field. + public const int MaxFieldNumber = 2; + private readonly static float MaxDefaultValue = 0F; + + private float max_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Max { + get { if ((_hasBits0 & 2) != 0) { return max_; } else { return MaxDefaultValue; } } + set { + _hasBits0 |= 2; + max_ = value; + } + } + /// Gets whether the "max" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasMax { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "max" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearMax() { + _hasBits0 &= ~2; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as YawLimits); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(YawLimits other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Min, other.Min)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Max, other.Max)) 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 (HasMin) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Min); + if (HasMax) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Max); + 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 (HasMin) { + output.WriteRawTag(13); + output.WriteFloat(Min); + } + if (HasMax) { + output.WriteRawTag(21); + output.WriteFloat(Max); + } + 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 (HasMin) { + output.WriteRawTag(13); + output.WriteFloat(Min); + } + if (HasMax) { + output.WriteRawTag(21); + output.WriteFloat(Max); + } + 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 (HasMin) { + size += 1 + 4; + } + if (HasMax) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(YawLimits other) { + if (other == null) { + return; + } + if (other.HasMin) { + Min = other.Min; + } + if (other.HasMax) { + Max = other.Max; + } + _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 13: { + Min = input.ReadFloat(); + break; + } + case 21: { + Max = input.ReadFloat(); + 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 13: { + Min = input.ReadFloat(); + break; + } + case 21: { + Max = input.ReadFloat(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class BoundingBox : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BoundingBox()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyModelDefinitionsReflection.Descriptor.MessageTypes[7]; } + } + + [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 BoundingBox() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BoundingBox(BoundingBox other) : this() { + min_ = other.min_ != null ? other.min_.Clone() : null; + max_ = other.max_ != null ? other.max_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BoundingBox Clone() { + return new BoundingBox(this); + } + + /// Field number for the "min" field. + public const int MinFieldNumber = 1; + private global::Blitzkit.Vector3 min_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.Vector3 Min { + get { return min_; } + set { + min_ = value; + } + } + + /// Field number for the "max" field. + public const int MaxFieldNumber = 2; + private global::Blitzkit.Vector3 max_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.Vector3 Max { + get { return max_; } + set { + max_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as BoundingBox); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(BoundingBox other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(Min, other.Min)) return false; + if (!object.Equals(Max, other.Max)) 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 (min_ != null) hash ^= Min.GetHashCode(); + if (max_ != null) hash ^= Max.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 (min_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Min); + } + if (max_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Max); + } + 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 (min_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Min); + } + if (max_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Max); + } + 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 (min_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Min); + } + if (max_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Max); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(BoundingBox other) { + if (other == null) { + return; + } + if (other.min_ != null) { + if (min_ == null) { + Min = new global::Blitzkit.Vector3(); + } + Min.MergeFrom(other.Min); + } + if (other.max_ != null) { + if (max_ == null) { + Max = new global::Blitzkit.Vector3(); + } + Max.MergeFrom(other.Max); + } + _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 (min_ == null) { + Min = new global::Blitzkit.Vector3(); + } + input.ReadMessage(Min); + break; + } + case 18: { + if (max_ == null) { + Max = new global::Blitzkit.Vector3(); + } + input.ReadMessage(Max); + 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 (min_ == null) { + Min = new global::Blitzkit.Vector3(); + } + input.ReadMessage(Min); + break; + } + case 18: { + if (max_ == null) { + Max = new global::Blitzkit.Vector3(); + } + input.ReadMessage(Max); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TrackModelDefinition : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TrackModelDefinition()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyModelDefinitionsReflection.Descriptor.MessageTypes[8]; } + } + + [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 TrackModelDefinition() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TrackModelDefinition(TrackModelDefinition other) : this() { + _hasBits0 = other._hasBits0; + thickness_ = other.thickness_; + origin_ = other.origin_ != null ? other.origin_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TrackModelDefinition Clone() { + return new TrackModelDefinition(this); + } + + /// Field number for the "thickness" field. + public const int ThicknessFieldNumber = 1; + private readonly static float ThicknessDefaultValue = 0F; + + private float thickness_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Thickness { + get { if ((_hasBits0 & 1) != 0) { return thickness_; } else { return ThicknessDefaultValue; } } + set { + _hasBits0 |= 1; + thickness_ = value; + } + } + /// Gets whether the "thickness" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasThickness { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "thickness" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearThickness() { + _hasBits0 &= ~1; + } + + /// Field number for the "origin" field. + public const int OriginFieldNumber = 2; + private global::Blitzkit.Vector3 origin_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.Vector3 Origin { + get { return origin_; } + set { + origin_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as TrackModelDefinition); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TrackModelDefinition other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Thickness, other.Thickness)) return false; + if (!object.Equals(Origin, other.Origin)) 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 (HasThickness) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Thickness); + if (origin_ != null) hash ^= Origin.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 (HasThickness) { + output.WriteRawTag(13); + output.WriteFloat(Thickness); + } + if (origin_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Origin); + } + 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 (HasThickness) { + output.WriteRawTag(13); + output.WriteFloat(Thickness); + } + if (origin_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Origin); + } + 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 (HasThickness) { + size += 1 + 4; + } + if (origin_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Origin); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TrackModelDefinition other) { + if (other == null) { + return; + } + if (other.HasThickness) { + Thickness = other.Thickness; + } + if (other.origin_ != null) { + if (origin_ == null) { + Origin = new global::Blitzkit.Vector3(); + } + Origin.MergeFrom(other.Origin); + } + _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 13: { + Thickness = input.ReadFloat(); + break; + } + case 18: { + if (origin_ == null) { + Origin = new global::Blitzkit.Vector3(); + } + input.ReadMessage(Origin); + 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 13: { + Thickness = input.ReadFloat(); + break; + } + case 18: { + if (origin_ == null) { + Origin = new global::Blitzkit.Vector3(); + } + input.ReadMessage(Origin); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GunModelDefinition : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GunModelDefinition()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyModelDefinitionsReflection.Descriptor.MessageTypes[9]; } + } + + [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 GunModelDefinition() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GunModelDefinition(GunModelDefinition other) : this() { + _hasBits0 = other._hasBits0; + armor_ = other.armor_ != null ? other.armor_.Clone() : null; + thickness_ = other.thickness_; + modelId_ = other.modelId_; + pitch_ = other.pitch_ != null ? other.pitch_.Clone() : null; + mask_ = other.mask_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GunModelDefinition Clone() { + return new GunModelDefinition(this); + } + + /// Field number for the "armor" field. + public const int ArmorFieldNumber = 1; + private global::Blitzkit.Armor armor_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.Armor Armor { + get { return armor_; } + set { + armor_ = value; + } + } + + /// Field number for the "thickness" field. + public const int ThicknessFieldNumber = 2; + private readonly static float ThicknessDefaultValue = 0F; + + private float thickness_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Thickness { + get { if ((_hasBits0 & 1) != 0) { return thickness_; } else { return ThicknessDefaultValue; } } + set { + _hasBits0 |= 1; + thickness_ = value; + } + } + /// Gets whether the "thickness" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasThickness { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "thickness" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearThickness() { + _hasBits0 &= ~1; + } + + /// Field number for the "model_id" field. + public const int ModelIdFieldNumber = 3; + private readonly static uint ModelIdDefaultValue = 0; + + private uint modelId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint ModelId { + get { if ((_hasBits0 & 2) != 0) { return modelId_; } else { return ModelIdDefaultValue; } } + set { + _hasBits0 |= 2; + modelId_ = value; + } + } + /// Gets whether the "model_id" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasModelId { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "model_id" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearModelId() { + _hasBits0 &= ~2; + } + + /// Field number for the "pitch" field. + public const int PitchFieldNumber = 4; + private global::Blitzkit.PitchLimits pitch_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.PitchLimits Pitch { + get { return pitch_; } + set { + pitch_ = value; + } + } + + /// Field number for the "mask" field. + public const int MaskFieldNumber = 5; + private readonly static float MaskDefaultValue = 0F; + + private float mask_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Mask { + get { if ((_hasBits0 & 4) != 0) { return mask_; } else { return MaskDefaultValue; } } + set { + _hasBits0 |= 4; + mask_ = value; + } + } + /// Gets whether the "mask" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasMask { + get { return (_hasBits0 & 4) != 0; } + } + /// Clears the value of the "mask" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearMask() { + _hasBits0 &= ~4; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GunModelDefinition); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GunModelDefinition other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(Armor, other.Armor)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Thickness, other.Thickness)) return false; + if (ModelId != other.ModelId) return false; + if (!object.Equals(Pitch, other.Pitch)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Mask, other.Mask)) 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 (armor_ != null) hash ^= Armor.GetHashCode(); + if (HasThickness) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Thickness); + if (HasModelId) hash ^= ModelId.GetHashCode(); + if (pitch_ != null) hash ^= Pitch.GetHashCode(); + if (HasMask) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Mask); + 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 (armor_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Armor); + } + if (HasThickness) { + output.WriteRawTag(21); + output.WriteFloat(Thickness); + } + if (HasModelId) { + output.WriteRawTag(24); + output.WriteUInt32(ModelId); + } + if (pitch_ != null) { + output.WriteRawTag(34); + output.WriteMessage(Pitch); + } + if (HasMask) { + output.WriteRawTag(45); + output.WriteFloat(Mask); + } + 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 (armor_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Armor); + } + if (HasThickness) { + output.WriteRawTag(21); + output.WriteFloat(Thickness); + } + if (HasModelId) { + output.WriteRawTag(24); + output.WriteUInt32(ModelId); + } + if (pitch_ != null) { + output.WriteRawTag(34); + output.WriteMessage(Pitch); + } + if (HasMask) { + output.WriteRawTag(45); + output.WriteFloat(Mask); + } + 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 (armor_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Armor); + } + if (HasThickness) { + size += 1 + 4; + } + if (HasModelId) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(ModelId); + } + if (pitch_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Pitch); + } + if (HasMask) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GunModelDefinition other) { + if (other == null) { + return; + } + if (other.armor_ != null) { + if (armor_ == null) { + Armor = new global::Blitzkit.Armor(); + } + Armor.MergeFrom(other.Armor); + } + if (other.HasThickness) { + Thickness = other.Thickness; + } + if (other.HasModelId) { + ModelId = other.ModelId; + } + if (other.pitch_ != null) { + if (pitch_ == null) { + Pitch = new global::Blitzkit.PitchLimits(); + } + Pitch.MergeFrom(other.Pitch); + } + if (other.HasMask) { + Mask = other.Mask; + } + _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 (armor_ == null) { + Armor = new global::Blitzkit.Armor(); + } + input.ReadMessage(Armor); + break; + } + case 21: { + Thickness = input.ReadFloat(); + break; + } + case 24: { + ModelId = input.ReadUInt32(); + break; + } + case 34: { + if (pitch_ == null) { + Pitch = new global::Blitzkit.PitchLimits(); + } + input.ReadMessage(Pitch); + break; + } + case 45: { + Mask = input.ReadFloat(); + 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 (armor_ == null) { + Armor = new global::Blitzkit.Armor(); + } + input.ReadMessage(Armor); + break; + } + case 21: { + Thickness = input.ReadFloat(); + break; + } + case 24: { + ModelId = input.ReadUInt32(); + break; + } + case 34: { + if (pitch_ == null) { + Pitch = new global::Blitzkit.PitchLimits(); + } + input.ReadMessage(Pitch); + break; + } + case 45: { + Mask = input.ReadFloat(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class PitchLimits : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PitchLimits()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyModelDefinitionsReflection.Descriptor.MessageTypes[10]; } + } + + [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 PitchLimits() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PitchLimits(PitchLimits other) : this() { + _hasBits0 = other._hasBits0; + min_ = other.min_; + max_ = other.max_; + front_ = other.front_ != null ? other.front_.Clone() : null; + back_ = other.back_ != null ? other.back_.Clone() : null; + transition_ = other.transition_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PitchLimits Clone() { + return new PitchLimits(this); + } + + /// Field number for the "min" field. + public const int MinFieldNumber = 1; + private readonly static float MinDefaultValue = 0F; + + private float min_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Min { + get { if ((_hasBits0 & 1) != 0) { return min_; } else { return MinDefaultValue; } } + set { + _hasBits0 |= 1; + min_ = value; + } + } + /// Gets whether the "min" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasMin { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "min" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearMin() { + _hasBits0 &= ~1; + } + + /// Field number for the "max" field. + public const int MaxFieldNumber = 2; + private readonly static float MaxDefaultValue = 0F; + + private float max_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Max { + get { if ((_hasBits0 & 2) != 0) { return max_; } else { return MaxDefaultValue; } } + set { + _hasBits0 |= 2; + max_ = value; + } + } + /// Gets whether the "max" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasMax { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "max" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearMax() { + _hasBits0 &= ~2; + } + + /// Field number for the "front" field. + public const int FrontFieldNumber = 3; + private global::Blitzkit.PitchLimitsExtrema front_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.PitchLimitsExtrema Front { + get { return front_; } + set { + front_ = value; + } + } + + /// Field number for the "back" field. + public const int BackFieldNumber = 4; + private global::Blitzkit.PitchLimitsExtrema back_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.PitchLimitsExtrema Back { + get { return back_; } + set { + back_ = value; + } + } + + /// Field number for the "transition" field. + public const int TransitionFieldNumber = 5; + private readonly static float TransitionDefaultValue = 0F; + + private float transition_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Transition { + get { if ((_hasBits0 & 4) != 0) { return transition_; } else { return TransitionDefaultValue; } } + set { + _hasBits0 |= 4; + transition_ = value; + } + } + /// Gets whether the "transition" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasTransition { + get { return (_hasBits0 & 4) != 0; } + } + /// Clears the value of the "transition" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearTransition() { + _hasBits0 &= ~4; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as PitchLimits); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(PitchLimits other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Min, other.Min)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Max, other.Max)) return false; + if (!object.Equals(Front, other.Front)) return false; + if (!object.Equals(Back, other.Back)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Transition, other.Transition)) 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 (HasMin) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Min); + if (HasMax) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Max); + if (front_ != null) hash ^= Front.GetHashCode(); + if (back_ != null) hash ^= Back.GetHashCode(); + if (HasTransition) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Transition); + 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 (HasMin) { + output.WriteRawTag(13); + output.WriteFloat(Min); + } + if (HasMax) { + output.WriteRawTag(21); + output.WriteFloat(Max); + } + if (front_ != null) { + output.WriteRawTag(26); + output.WriteMessage(Front); + } + if (back_ != null) { + output.WriteRawTag(34); + output.WriteMessage(Back); + } + if (HasTransition) { + output.WriteRawTag(45); + output.WriteFloat(Transition); + } + 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 (HasMin) { + output.WriteRawTag(13); + output.WriteFloat(Min); + } + if (HasMax) { + output.WriteRawTag(21); + output.WriteFloat(Max); + } + if (front_ != null) { + output.WriteRawTag(26); + output.WriteMessage(Front); + } + if (back_ != null) { + output.WriteRawTag(34); + output.WriteMessage(Back); + } + if (HasTransition) { + output.WriteRawTag(45); + output.WriteFloat(Transition); + } + 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 (HasMin) { + size += 1 + 4; + } + if (HasMax) { + size += 1 + 4; + } + if (front_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Front); + } + if (back_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Back); + } + if (HasTransition) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(PitchLimits other) { + if (other == null) { + return; + } + if (other.HasMin) { + Min = other.Min; + } + if (other.HasMax) { + Max = other.Max; + } + if (other.front_ != null) { + if (front_ == null) { + Front = new global::Blitzkit.PitchLimitsExtrema(); + } + Front.MergeFrom(other.Front); + } + if (other.back_ != null) { + if (back_ == null) { + Back = new global::Blitzkit.PitchLimitsExtrema(); + } + Back.MergeFrom(other.Back); + } + if (other.HasTransition) { + Transition = other.Transition; + } + _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 13: { + Min = input.ReadFloat(); + break; + } + case 21: { + Max = input.ReadFloat(); + break; + } + case 26: { + if (front_ == null) { + Front = new global::Blitzkit.PitchLimitsExtrema(); + } + input.ReadMessage(Front); + break; + } + case 34: { + if (back_ == null) { + Back = new global::Blitzkit.PitchLimitsExtrema(); + } + input.ReadMessage(Back); + break; + } + case 45: { + Transition = input.ReadFloat(); + 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 13: { + Min = input.ReadFloat(); + break; + } + case 21: { + Max = input.ReadFloat(); + break; + } + case 26: { + if (front_ == null) { + Front = new global::Blitzkit.PitchLimitsExtrema(); + } + input.ReadMessage(Front); + break; + } + case 34: { + if (back_ == null) { + Back = new global::Blitzkit.PitchLimitsExtrema(); + } + input.ReadMessage(Back); + break; + } + case 45: { + Transition = input.ReadFloat(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class PitchLimitsExtrema : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PitchLimitsExtrema()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyModelDefinitionsReflection.Descriptor.MessageTypes[11]; } + } + + [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 PitchLimitsExtrema() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PitchLimitsExtrema(PitchLimitsExtrema other) : this() { + _hasBits0 = other._hasBits0; + min_ = other.min_; + max_ = other.max_; + range_ = other.range_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PitchLimitsExtrema Clone() { + return new PitchLimitsExtrema(this); + } + + /// Field number for the "min" field. + public const int MinFieldNumber = 1; + private readonly static float MinDefaultValue = 0F; + + private float min_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Min { + get { if ((_hasBits0 & 1) != 0) { return min_; } else { return MinDefaultValue; } } + set { + _hasBits0 |= 1; + min_ = value; + } + } + /// Gets whether the "min" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasMin { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "min" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearMin() { + _hasBits0 &= ~1; + } + + /// Field number for the "max" field. + public const int MaxFieldNumber = 2; + private readonly static float MaxDefaultValue = 0F; + + private float max_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Max { + get { if ((_hasBits0 & 2) != 0) { return max_; } else { return MaxDefaultValue; } } + set { + _hasBits0 |= 2; + max_ = value; + } + } + /// Gets whether the "max" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasMax { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "max" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearMax() { + _hasBits0 &= ~2; + } + + /// Field number for the "range" field. + public const int RangeFieldNumber = 3; + private readonly static float RangeDefaultValue = 0F; + + private float range_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Range { + get { if ((_hasBits0 & 4) != 0) { return range_; } else { return RangeDefaultValue; } } + set { + _hasBits0 |= 4; + range_ = value; + } + } + /// Gets whether the "range" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasRange { + get { return (_hasBits0 & 4) != 0; } + } + /// Clears the value of the "range" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearRange() { + _hasBits0 &= ~4; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as PitchLimitsExtrema); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(PitchLimitsExtrema other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Min, other.Min)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Max, other.Max)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Range, other.Range)) 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 (HasMin) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Min); + if (HasMax) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Max); + if (HasRange) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Range); + 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 (HasMin) { + output.WriteRawTag(13); + output.WriteFloat(Min); + } + if (HasMax) { + output.WriteRawTag(21); + output.WriteFloat(Max); + } + if (HasRange) { + output.WriteRawTag(29); + output.WriteFloat(Range); + } + 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 (HasMin) { + output.WriteRawTag(13); + output.WriteFloat(Min); + } + if (HasMax) { + output.WriteRawTag(21); + output.WriteFloat(Max); + } + if (HasRange) { + output.WriteRawTag(29); + output.WriteFloat(Range); + } + 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 (HasMin) { + size += 1 + 4; + } + if (HasMax) { + size += 1 + 4; + } + if (HasRange) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(PitchLimitsExtrema other) { + if (other == null) { + return; + } + if (other.HasMin) { + Min = other.Min; + } + if (other.HasMax) { + Max = other.Max; + } + if (other.HasRange) { + Range = other.Range; + } + _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 13: { + Min = input.ReadFloat(); + break; + } + case 21: { + Max = input.ReadFloat(); + break; + } + case 29: { + Range = input.ReadFloat(); + 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 13: { + Min = input.ReadFloat(); + break; + } + case 21: { + Max = input.ReadFloat(); + break; + } + case 29: { + Range = input.ReadFloat(); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/BlitzKit.CLI/Protos/LegacyProvisionDefinitions.cs b/src/BlitzKit.CLI/Protos/LegacyProvisionDefinitions.cs new file mode 100644 index 000000000..44adf2fb3 --- /dev/null +++ b/src/BlitzKit.CLI/Protos/LegacyProvisionDefinitions.cs @@ -0,0 +1,659 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: packages/core/src/protos/legacy_provision_definitions.proto +// +#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 { + + /// Holder for reflection information generated from packages/core/src/protos/legacy_provision_definitions.proto + public static partial class LegacyProvisionDefinitionsReflection { + + #region Descriptor + /// File descriptor for packages/core/src/protos/legacy_provision_definitions.proto + 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 + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ProvisionDefinitions()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser 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); + } + + /// Field number for the "provisions" field. + public const int ProvisionsFieldNumber = 1; + private static readonly pbc::MapField.Codec _map_provisions_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForUInt32(8, 0), pb::FieldCodec.ForMessage(18, global::Blitzkit.Provision.Parser), 10); + private readonly pbc::MapField provisions_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField 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 + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Provision()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser 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); + } + + /// Field number for the "id" field. + 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; + } + } + /// Gets whether the "id" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasId { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "id" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearId() { + _hasBits0 &= ~1; + } + + /// Field number for the "name" field. + 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; + } + } + + /// Field number for the "crew" field. + 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; + } + } + /// Gets whether the "crew" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasCrew { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "crew" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearCrew() { + _hasBits0 &= ~2; + } + + /// Field number for the "game_mode_exclusive" field. + 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; + } + } + /// Gets whether the "game_mode_exclusive" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasGameModeExclusive { + get { return (_hasBits0 & 4) != 0; } + } + /// Clears the value of the "game_mode_exclusive" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearGameModeExclusive() { + _hasBits0 &= ~4; + } + + /// Field number for the "include" field. + public const int IncludeFieldNumber = 6; + private static readonly pb::FieldCodec _repeated_include_codec + = pb::FieldCodec.ForMessage(50, global::Blitzkit.ConsumableTankFilter.Parser); + private readonly pbc::RepeatedField include_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Include { + get { return include_; } + } + + /// Field number for the "exclude" field. + public const int ExcludeFieldNumber = 7; + private static readonly pb::FieldCodec _repeated_exclude_codec + = pb::FieldCodec.ForMessage(58, global::Blitzkit.ConsumableTankFilter.Parser); + private readonly pbc::RepeatedField exclude_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField 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 diff --git a/src/BlitzKit.CLI/Protos/LegacyRatingLeaderboard.cs b/src/BlitzKit.CLI/Protos/LegacyRatingLeaderboard.cs new file mode 100644 index 000000000..29872141e --- /dev/null +++ b/src/BlitzKit.CLI/Protos/LegacyRatingLeaderboard.cs @@ -0,0 +1,1519 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: packages/core/src/protos/legacy_rating_leaderboard.proto +// +#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 { + + /// Holder for reflection information generated from packages/core/src/protos/legacy_rating_leaderboard.proto + public static partial class LegacyRatingLeaderboardReflection { + + #region Descriptor + /// File descriptor for packages/core/src/protos/legacy_rating_leaderboard.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static LegacyRatingLeaderboardReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CjhwYWNrYWdlcy9jb3JlL3NyYy9wcm90b3MvbGVnYWN5X3JhdGluZ19sZWFk", + "ZXJib2FyZC5wcm90bxIIYmxpdHpraXQieAoRUmF0aW5nTGVhZGVyYm9hcmQS", + "KwoCdjEYASABKAsyHS5ibGl0emtpdC5SYXRpbmdMZWFkZXJib2FyZFYxSAAS", + "KwoCdjIYAiABKAsyHS5ibGl0emtpdC5SYXRpbmdMZWFkZXJib2FyZFYySABC", + "CQoHdmVyc2lvbiJKChNSYXRpbmdMZWFkZXJib2FyZFYxEjMKB2VudHJpZXMY", + "ASADKAsyIi5ibGl0emtpdC5SYXRpbmdMZWFkZXJib2FyZEVudHJ5VjEiNQoY", + "UmF0aW5nTGVhZGVyYm9hcmRFbnRyeVYxEgoKAmlkGAEgAigNEg0KBXNjb3Jl", + "GAIgAigNIkoKE1JhdGluZ0xlYWRlcmJvYXJkVjISMwoHZW50cmllcxgBIAMo", + "CzIiLmJsaXR6a2l0LlJhdGluZ0xlYWRlcmJvYXJkRW50cnlWMiKFAQoYUmF0", + "aW5nTGVhZGVyYm9hcmRFbnRyeVYyEgoKAmlkGAEgAigNEg0KBXNjb3JlGAIg", + "AigNEg8KB2JhdHRsZXMYAyACKA0SDAoEd2lucxgEIAIoDRIQCghzdXJ2aXZl", + "ZBgFIAIoDRIOCgZkYW1hZ2UYBiACKA0SDQoFa2lsbHMYByACKA0=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.RatingLeaderboard), global::Blitzkit.RatingLeaderboard.Parser, new[]{ "V1", "V2" }, new[]{ "Version" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.RatingLeaderboardV1), global::Blitzkit.RatingLeaderboardV1.Parser, new[]{ "Entries" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.RatingLeaderboardEntryV1), global::Blitzkit.RatingLeaderboardEntryV1.Parser, new[]{ "Id", "Score" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.RatingLeaderboardV2), global::Blitzkit.RatingLeaderboardV2.Parser, new[]{ "Entries" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.RatingLeaderboardEntryV2), global::Blitzkit.RatingLeaderboardEntryV2.Parser, new[]{ "Id", "Score", "Battles", "Wins", "Survived", "Damage", "Kills" }, null, null, null, null) + })); + } + #endregion + + } + #region Messages + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RatingLeaderboard : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RatingLeaderboard()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyRatingLeaderboardReflection.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 RatingLeaderboard() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RatingLeaderboard(RatingLeaderboard other) : this() { + switch (other.VersionCase) { + case VersionOneofCase.V1: + V1 = other.V1.Clone(); + break; + case VersionOneofCase.V2: + V2 = other.V2.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RatingLeaderboard Clone() { + return new RatingLeaderboard(this); + } + + /// Field number for the "v1" field. + public const int V1FieldNumber = 1; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.RatingLeaderboardV1 V1 { + get { return versionCase_ == VersionOneofCase.V1 ? (global::Blitzkit.RatingLeaderboardV1) version_ : null; } + set { + version_ = value; + versionCase_ = value == null ? VersionOneofCase.None : VersionOneofCase.V1; + } + } + + /// Field number for the "v2" field. + public const int V2FieldNumber = 2; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.RatingLeaderboardV2 V2 { + get { return versionCase_ == VersionOneofCase.V2 ? (global::Blitzkit.RatingLeaderboardV2) version_ : null; } + set { + version_ = value; + versionCase_ = value == null ? VersionOneofCase.None : VersionOneofCase.V2; + } + } + + private object version_; + /// Enum of possible cases for the "version" oneof. + public enum VersionOneofCase { + None = 0, + V1 = 1, + V2 = 2, + } + private VersionOneofCase versionCase_ = VersionOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public VersionOneofCase VersionCase { + get { return versionCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearVersion() { + versionCase_ = VersionOneofCase.None; + version_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RatingLeaderboard); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RatingLeaderboard other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(V1, other.V1)) return false; + if (!object.Equals(V2, other.V2)) return false; + if (VersionCase != other.VersionCase) 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 (versionCase_ == VersionOneofCase.V1) hash ^= V1.GetHashCode(); + if (versionCase_ == VersionOneofCase.V2) hash ^= V2.GetHashCode(); + hash ^= (int) versionCase_; + 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 (versionCase_ == VersionOneofCase.V1) { + output.WriteRawTag(10); + output.WriteMessage(V1); + } + if (versionCase_ == VersionOneofCase.V2) { + output.WriteRawTag(18); + output.WriteMessage(V2); + } + 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 (versionCase_ == VersionOneofCase.V1) { + output.WriteRawTag(10); + output.WriteMessage(V1); + } + if (versionCase_ == VersionOneofCase.V2) { + output.WriteRawTag(18); + output.WriteMessage(V2); + } + 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 (versionCase_ == VersionOneofCase.V1) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(V1); + } + if (versionCase_ == VersionOneofCase.V2) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(V2); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RatingLeaderboard other) { + if (other == null) { + return; + } + switch (other.VersionCase) { + case VersionOneofCase.V1: + if (V1 == null) { + V1 = new global::Blitzkit.RatingLeaderboardV1(); + } + V1.MergeFrom(other.V1); + break; + case VersionOneofCase.V2: + if (V2 == null) { + V2 = new global::Blitzkit.RatingLeaderboardV2(); + } + V2.MergeFrom(other.V2); + break; + } + + _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: { + global::Blitzkit.RatingLeaderboardV1 subBuilder = new global::Blitzkit.RatingLeaderboardV1(); + if (versionCase_ == VersionOneofCase.V1) { + subBuilder.MergeFrom(V1); + } + input.ReadMessage(subBuilder); + V1 = subBuilder; + break; + } + case 18: { + global::Blitzkit.RatingLeaderboardV2 subBuilder = new global::Blitzkit.RatingLeaderboardV2(); + if (versionCase_ == VersionOneofCase.V2) { + subBuilder.MergeFrom(V2); + } + input.ReadMessage(subBuilder); + V2 = subBuilder; + 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: { + global::Blitzkit.RatingLeaderboardV1 subBuilder = new global::Blitzkit.RatingLeaderboardV1(); + if (versionCase_ == VersionOneofCase.V1) { + subBuilder.MergeFrom(V1); + } + input.ReadMessage(subBuilder); + V1 = subBuilder; + break; + } + case 18: { + global::Blitzkit.RatingLeaderboardV2 subBuilder = new global::Blitzkit.RatingLeaderboardV2(); + if (versionCase_ == VersionOneofCase.V2) { + subBuilder.MergeFrom(V2); + } + input.ReadMessage(subBuilder); + V2 = subBuilder; + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RatingLeaderboardV1 : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RatingLeaderboardV1()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyRatingLeaderboardReflection.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 RatingLeaderboardV1() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RatingLeaderboardV1(RatingLeaderboardV1 other) : this() { + entries_ = other.entries_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RatingLeaderboardV1 Clone() { + return new RatingLeaderboardV1(this); + } + + /// Field number for the "entries" field. + public const int EntriesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_entries_codec + = pb::FieldCodec.ForMessage(10, global::Blitzkit.RatingLeaderboardEntryV1.Parser); + private readonly pbc::RepeatedField entries_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Entries { + get { return entries_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RatingLeaderboardV1); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RatingLeaderboardV1 other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!entries_.Equals(other.entries_)) 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 ^= entries_.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 + entries_.WriteTo(output, _repeated_entries_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) { + entries_.WriteTo(ref output, _repeated_entries_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 += entries_.CalculateSize(_repeated_entries_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RatingLeaderboardV1 other) { + if (other == null) { + return; + } + entries_.Add(other.entries_); + _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: { + entries_.AddEntriesFrom(input, _repeated_entries_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: { + entries_.AddEntriesFrom(ref input, _repeated_entries_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RatingLeaderboardEntryV1 : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RatingLeaderboardEntryV1()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyRatingLeaderboardReflection.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 RatingLeaderboardEntryV1() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RatingLeaderboardEntryV1(RatingLeaderboardEntryV1 other) : this() { + _hasBits0 = other._hasBits0; + id_ = other.id_; + score_ = other.score_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RatingLeaderboardEntryV1 Clone() { + return new RatingLeaderboardEntryV1(this); + } + + /// Field number for the "id" field. + 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; + } + } + /// Gets whether the "id" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasId { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "id" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearId() { + _hasBits0 &= ~1; + } + + /// Field number for the "score" field. + public const int ScoreFieldNumber = 2; + private readonly static uint ScoreDefaultValue = 0; + + private uint score_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint Score { + get { if ((_hasBits0 & 2) != 0) { return score_; } else { return ScoreDefaultValue; } } + set { + _hasBits0 |= 2; + score_ = value; + } + } + /// Gets whether the "score" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasScore { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "score" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearScore() { + _hasBits0 &= ~2; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RatingLeaderboardEntryV1); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RatingLeaderboardEntryV1 other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Id != other.Id) return false; + if (Score != other.Score) 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 (HasScore) hash ^= Score.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 (HasScore) { + output.WriteRawTag(16); + output.WriteUInt32(Score); + } + 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 (HasScore) { + output.WriteRawTag(16); + output.WriteUInt32(Score); + } + 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 (HasScore) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Score); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RatingLeaderboardEntryV1 other) { + if (other == null) { + return; + } + if (other.HasId) { + Id = other.Id; + } + if (other.HasScore) { + Score = other.Score; + } + _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 16: { + Score = 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: { + Id = input.ReadUInt32(); + break; + } + case 16: { + Score = input.ReadUInt32(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RatingLeaderboardV2 : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RatingLeaderboardV2()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyRatingLeaderboardReflection.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 RatingLeaderboardV2() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RatingLeaderboardV2(RatingLeaderboardV2 other) : this() { + entries_ = other.entries_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RatingLeaderboardV2 Clone() { + return new RatingLeaderboardV2(this); + } + + /// Field number for the "entries" field. + public const int EntriesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_entries_codec + = pb::FieldCodec.ForMessage(10, global::Blitzkit.RatingLeaderboardEntryV2.Parser); + private readonly pbc::RepeatedField entries_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Entries { + get { return entries_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RatingLeaderboardV2); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RatingLeaderboardV2 other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!entries_.Equals(other.entries_)) 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 ^= entries_.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 + entries_.WriteTo(output, _repeated_entries_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) { + entries_.WriteTo(ref output, _repeated_entries_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 += entries_.CalculateSize(_repeated_entries_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RatingLeaderboardV2 other) { + if (other == null) { + return; + } + entries_.Add(other.entries_); + _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: { + entries_.AddEntriesFrom(input, _repeated_entries_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: { + entries_.AddEntriesFrom(ref input, _repeated_entries_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RatingLeaderboardEntryV2 : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RatingLeaderboardEntryV2()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyRatingLeaderboardReflection.Descriptor.MessageTypes[4]; } + } + + [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 RatingLeaderboardEntryV2() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RatingLeaderboardEntryV2(RatingLeaderboardEntryV2 other) : this() { + _hasBits0 = other._hasBits0; + id_ = other.id_; + score_ = other.score_; + battles_ = other.battles_; + wins_ = other.wins_; + survived_ = other.survived_; + damage_ = other.damage_; + kills_ = other.kills_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RatingLeaderboardEntryV2 Clone() { + return new RatingLeaderboardEntryV2(this); + } + + /// Field number for the "id" field. + 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; + } + } + /// Gets whether the "id" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasId { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "id" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearId() { + _hasBits0 &= ~1; + } + + /// Field number for the "score" field. + public const int ScoreFieldNumber = 2; + private readonly static uint ScoreDefaultValue = 0; + + private uint score_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint Score { + get { if ((_hasBits0 & 2) != 0) { return score_; } else { return ScoreDefaultValue; } } + set { + _hasBits0 |= 2; + score_ = value; + } + } + /// Gets whether the "score" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasScore { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "score" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearScore() { + _hasBits0 &= ~2; + } + + /// Field number for the "battles" field. + public const int BattlesFieldNumber = 3; + private readonly static uint BattlesDefaultValue = 0; + + private uint battles_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint Battles { + get { if ((_hasBits0 & 4) != 0) { return battles_; } else { return BattlesDefaultValue; } } + set { + _hasBits0 |= 4; + battles_ = value; + } + } + /// Gets whether the "battles" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasBattles { + get { return (_hasBits0 & 4) != 0; } + } + /// Clears the value of the "battles" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearBattles() { + _hasBits0 &= ~4; + } + + /// Field number for the "wins" field. + public const int WinsFieldNumber = 4; + private readonly static uint WinsDefaultValue = 0; + + private uint wins_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint Wins { + get { if ((_hasBits0 & 8) != 0) { return wins_; } else { return WinsDefaultValue; } } + set { + _hasBits0 |= 8; + wins_ = value; + } + } + /// Gets whether the "wins" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasWins { + get { return (_hasBits0 & 8) != 0; } + } + /// Clears the value of the "wins" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearWins() { + _hasBits0 &= ~8; + } + + /// Field number for the "survived" field. + public const int SurvivedFieldNumber = 5; + private readonly static uint SurvivedDefaultValue = 0; + + private uint survived_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint Survived { + get { if ((_hasBits0 & 16) != 0) { return survived_; } else { return SurvivedDefaultValue; } } + set { + _hasBits0 |= 16; + survived_ = value; + } + } + /// Gets whether the "survived" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasSurvived { + get { return (_hasBits0 & 16) != 0; } + } + /// Clears the value of the "survived" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearSurvived() { + _hasBits0 &= ~16; + } + + /// Field number for the "damage" field. + public const int DamageFieldNumber = 6; + private readonly static uint DamageDefaultValue = 0; + + private uint damage_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint Damage { + get { if ((_hasBits0 & 32) != 0) { return damage_; } else { return DamageDefaultValue; } } + set { + _hasBits0 |= 32; + damage_ = value; + } + } + /// Gets whether the "damage" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasDamage { + get { return (_hasBits0 & 32) != 0; } + } + /// Clears the value of the "damage" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearDamage() { + _hasBits0 &= ~32; + } + + /// Field number for the "kills" field. + public const int KillsFieldNumber = 7; + private readonly static uint KillsDefaultValue = 0; + + private uint kills_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint Kills { + get { if ((_hasBits0 & 64) != 0) { return kills_; } else { return KillsDefaultValue; } } + set { + _hasBits0 |= 64; + kills_ = value; + } + } + /// Gets whether the "kills" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasKills { + get { return (_hasBits0 & 64) != 0; } + } + /// Clears the value of the "kills" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearKills() { + _hasBits0 &= ~64; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RatingLeaderboardEntryV2); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RatingLeaderboardEntryV2 other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Id != other.Id) return false; + if (Score != other.Score) return false; + if (Battles != other.Battles) return false; + if (Wins != other.Wins) return false; + if (Survived != other.Survived) return false; + if (Damage != other.Damage) return false; + if (Kills != other.Kills) 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 (HasScore) hash ^= Score.GetHashCode(); + if (HasBattles) hash ^= Battles.GetHashCode(); + if (HasWins) hash ^= Wins.GetHashCode(); + if (HasSurvived) hash ^= Survived.GetHashCode(); + if (HasDamage) hash ^= Damage.GetHashCode(); + if (HasKills) hash ^= Kills.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 (HasScore) { + output.WriteRawTag(16); + output.WriteUInt32(Score); + } + if (HasBattles) { + output.WriteRawTag(24); + output.WriteUInt32(Battles); + } + if (HasWins) { + output.WriteRawTag(32); + output.WriteUInt32(Wins); + } + if (HasSurvived) { + output.WriteRawTag(40); + output.WriteUInt32(Survived); + } + if (HasDamage) { + output.WriteRawTag(48); + output.WriteUInt32(Damage); + } + if (HasKills) { + output.WriteRawTag(56); + output.WriteUInt32(Kills); + } + 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 (HasScore) { + output.WriteRawTag(16); + output.WriteUInt32(Score); + } + if (HasBattles) { + output.WriteRawTag(24); + output.WriteUInt32(Battles); + } + if (HasWins) { + output.WriteRawTag(32); + output.WriteUInt32(Wins); + } + if (HasSurvived) { + output.WriteRawTag(40); + output.WriteUInt32(Survived); + } + if (HasDamage) { + output.WriteRawTag(48); + output.WriteUInt32(Damage); + } + if (HasKills) { + output.WriteRawTag(56); + output.WriteUInt32(Kills); + } + 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 (HasScore) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Score); + } + if (HasBattles) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Battles); + } + if (HasWins) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Wins); + } + if (HasSurvived) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Survived); + } + if (HasDamage) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Damage); + } + if (HasKills) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Kills); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RatingLeaderboardEntryV2 other) { + if (other == null) { + return; + } + if (other.HasId) { + Id = other.Id; + } + if (other.HasScore) { + Score = other.Score; + } + if (other.HasBattles) { + Battles = other.Battles; + } + if (other.HasWins) { + Wins = other.Wins; + } + if (other.HasSurvived) { + Survived = other.Survived; + } + if (other.HasDamage) { + Damage = other.Damage; + } + if (other.HasKills) { + Kills = other.Kills; + } + _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 16: { + Score = input.ReadUInt32(); + break; + } + case 24: { + Battles = input.ReadUInt32(); + break; + } + case 32: { + Wins = input.ReadUInt32(); + break; + } + case 40: { + Survived = input.ReadUInt32(); + break; + } + case 48: { + Damage = input.ReadUInt32(); + break; + } + case 56: { + Kills = 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: { + Id = input.ReadUInt32(); + break; + } + case 16: { + Score = input.ReadUInt32(); + break; + } + case 24: { + Battles = input.ReadUInt32(); + break; + } + case 32: { + Wins = input.ReadUInt32(); + break; + } + case 40: { + Survived = input.ReadUInt32(); + break; + } + case 48: { + Damage = input.ReadUInt32(); + break; + } + case 56: { + Kills = input.ReadUInt32(); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/BlitzKit.CLI/Protos/LegacySkillDefinitions.cs b/src/BlitzKit.CLI/Protos/LegacySkillDefinitions.cs new file mode 100644 index 000000000..a3d93c475 --- /dev/null +++ b/src/BlitzKit.CLI/Protos/LegacySkillDefinitions.cs @@ -0,0 +1,425 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: packages/core/src/protos/legacy_skill_definitions.proto +// +#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 { + + /// Holder for reflection information generated from packages/core/src/protos/legacy_skill_definitions.proto + public static partial class LegacySkillDefinitionsReflection { + + #region Descriptor + /// File descriptor for packages/core/src/protos/legacy_skill_definitions.proto + 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 + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SkillDefinitions()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser 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); + } + + /// Field number for the "classes" field. + public const int ClassesFieldNumber = 1; + private static readonly pbc::MapField.Codec _map_classes_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForUInt32(8, 0), pb::FieldCodec.ForMessage(18, global::Blitzkit.Skill.Parser), 10); + private readonly pbc::MapField classes_ = new pbc::MapField(); + /// + /// enums are disallowed as keys so using uint32; convert run-time + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField 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 + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Skill()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser 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); + } + + /// Field number for the "skills" field. + public const int SkillsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_skills_codec + = pb::FieldCodec.ForString(10); + private readonly pbc::RepeatedField skills_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField 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 diff --git a/src/BlitzKit.CLI/Protos/LegacyTankDefinitions.cs b/src/BlitzKit.CLI/Protos/LegacyTankDefinitions.cs new file mode 100644 index 000000000..41e202b23 --- /dev/null +++ b/src/BlitzKit.CLI/Protos/LegacyTankDefinitions.cs @@ -0,0 +1,9412 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: packages/core/src/protos/legacy_tank_definitions.proto +// +#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 { + + /// Holder for reflection information generated from packages/core/src/protos/legacy_tank_definitions.proto + public static partial class LegacyTankDefinitionsReflection { + + #region Descriptor + /// File descriptor for packages/core/src/protos/legacy_tank_definitions.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static LegacyTankDefinitionsReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CjZwYWNrYWdlcy9jb3JlL3NyYy9wcm90b3MvbGVnYWN5X3RhbmtfZGVmaW5p", + "dGlvbnMucHJvdG8SCGJsaXR6a2l0GipwYWNrYWdlcy9jb3JlL3NyYy9wcm90", + "b3MvbGVnYWN5X2kxOG4ucHJvdG8ijgEKD1RhbmtEZWZpbml0aW9ucxIzCgV0", + "YW5rcxgBIAMoCzIkLmJsaXR6a2l0LlRhbmtEZWZpbml0aW9ucy5UYW5rc0Vu", + "dHJ5GkYKClRhbmtzRW50cnkSCwoDa2V5GAEgASgNEicKBXZhbHVlGAIgASgL", + "MhguYmxpdHpraXQuVGFua0RlZmluaXRpb246AjgBIowHCg5UYW5rRGVmaW5p", + "dGlvbhIKCgJpZBgBIAIoDRIyCgVyb2xlcxgCIAMoCzIjLmJsaXR6a2l0LlRh", + "bmtEZWZpbml0aW9uLlJvbGVzRW50cnkSGAoQZml4ZWRfY2Ftb3VmbGFnZRgE", + "IAIoCBITCgtjYW1vdWZsYWdlcxgFIAMoBRIRCglhbmNlc3RvcnMYBiADKAUS", + "EgoKc3VjY2Vzc29ycxgHIAMoBRIcCgRjcmV3GAggAygLMg4uYmxpdHpraXQu", + "Q3JldxIOCgZoZWFsdGgYCSACKA0SDgoGbmF0aW9uGAogAigJEiIKBG5hbWUY", + "CyACKAsyFC5ibGl0emtpdC5JMThuU3RyaW5nEicKCW5hbWVfZnVsbBgMIAEo", + "CzIULmJsaXR6a2l0LkkxOG5TdHJpbmcSIAoEdHlwZRgNIAIoDjISLmJsaXR6", + "a2l0LlRhbmtUeXBlEhcKD21heF9jb25zdW1hYmxlcxgOIAIoDRIWCg5tYXhf", + "cHJvdmlzaW9ucxgPIAIoDRIMCgR0aWVyGBAgAigNEiIKBWNsYXNzGBEgAigO", + "MhMuYmxpdHpraXQuVGFua0NsYXNzEg8KB3Rlc3RpbmcYEiACKAgSEgoKZGVw", + "cmVjYXRlZBgTIAIoCBIrCgd0dXJyZXRzGBQgAygLMhouYmxpdHpraXQuVHVy", + "cmV0RGVmaW5pdGlvbhIrCgdlbmdpbmVzGBUgAygLMhouYmxpdHpraXQuRW5n", + "aW5lRGVmaW5pdGlvbhIpCgZ0cmFja3MYFiADKAsyGS5ibGl0emtpdC5UcmFj", + "a0RlZmluaXRpb24SIgoFcHJpY2UYFyACKAsyEy5ibGl0emtpdC5UYW5rUHJp", + "Y2USLQoNcmVzZWFyY2hfY29zdBgYIAEoCzIWLmJsaXR6a2l0LlJlc2VhcmNo", + "Q29zdBIWCg5zcGVlZF9mb3J3YXJkcxgZIAIoAhIXCg9zcGVlZF9iYWNrd2Fy", + "ZHMYGiACKAISGAoQY2Ftb3VmbGFnZV9zdGlsbBgbIAIoAhIZChFjYW1vdWZs", + "YWdlX21vdmluZxgcIAIoAhIZChFjYW1vdWZsYWdlX29uRmlyZRgdIAIoAhIY", + "ChBlcXVpcG1lbnRfcHJlc2V0GB4gAigJEg4KBndlaWdodBgfIAIoDRosCgpS", + "b2xlc0VudHJ5EgsKA2tleRgBIAEoDRINCgV2YWx1ZRgCIAEoDToCOAEicwoM", + "UmVzZWFyY2hDb3N0EgwKAnhwGAEgASgNSAASPwoPc2Vhc29uYWxfdG9rZW5z", + "GAIgASgLMiQuYmxpdHpraXQuUmVzZWFyY2hDb3N0U2Vhc29uYWxUb2tlbnNI", + "AEIUChJyZXNlYXJjaF9jb3N0X3R5cGUiPAoaUmVzZWFyY2hDb3N0U2Vhc29u", + "YWxUb2tlbnMSDgoGc2Vhc29uGAEgAigNEg4KBnRva2VucxgCIAIoDSJBCglU", + "YW5rUHJpY2USJQoEdHlwZRgBIAIoDjIXLmJsaXR6a2l0LlRhbmtQcmljZVR5", + "cGUSDQoFdmFsdWUYAiACKA0izAIKD1RyYWNrRGVmaW5pdGlvbhIKCgJpZBgB", + "IAIoDRIMCgR0aWVyGAIgAigNEiIKBG5hbWUYAyACKAsyFC5ibGl0emtpdC5J", + "MThuU3RyaW5nEg4KBndlaWdodBgEIAIoDRIWCg50cmF2ZXJzZV9zcGVlZBgF", + "IAIoAhItCg1yZXNlYXJjaF9jb3N0GAYgASgLMhYuYmxpdHpraXQuUmVzZWFy", + "Y2hDb3N0EhcKD2Rpc3BlcnNpb25fbW92ZRgHIAIoAhIbChNkaXNwZXJzaW9u", + "X3RyYXZlcnNlGAggAigCEhcKD3Jlc2lzdGFuY2VfaGFyZBgJIAIoAhIZChFy", + "ZXNpc3RhbmNlX21lZGl1bRgKIAIoAhIXCg9yZXNpc3RhbmNlX3NvZnQYCyAC", + "KAISIQoHdW5sb2NrcxgMIAMoCzIQLmJsaXR6a2l0LlVubG9jayLWAQoQRW5n", + "aW5lRGVmaW5pdGlvbhIKCgJpZBgBIAIoDRIiCgRuYW1lGAIgAigLMhQuYmxp", + "dHpraXQuSTE4blN0cmluZxItCg1yZXNlYXJjaF9jb3N0GAMgASgLMhYuYmxp", + "dHpraXQuUmVzZWFyY2hDb3N0EgwKBHRpZXIYBCACKA0SEwoLZmlyZV9jaGFu", + "Y2UYBSACKAISDQoFcG93ZXIYBiACKA0SDgoGd2VpZ2h0GAcgAigNEiEKB3Vu", + "bG9ja3MYCCADKAsyEC5ibGl0emtpdC5VbmxvY2silQIKEFR1cnJldERlZmlu", + "aXRpb24SCgoCaWQYASACKA0SDgoGaGVhbHRoGAIgAigNEhIKCnZpZXdfcmFu", + "Z2UYAyACKA0SFgoOdHJhdmVyc2Vfc3BlZWQYBCACKAISLQoNcmVzZWFyY2hf", + "Y29zdBgFIAEoCzIWLmJsaXR6a2l0LlJlc2VhcmNoQ29zdBIiCgRuYW1lGAYg", + "AigLMhQuYmxpdHpraXQuSTE4blN0cmluZxIMCgR0aWVyGAcgAigNEg4KBndl", + "aWdodBgIIAIoDRIlCgRndW5zGAkgAygLMhcuYmxpdHpraXQuR3VuRGVmaW5p", + "dGlvbhIhCgd1bmxvY2tzGAogAygLMhAuYmxpdHpraXQuVW5sb2NrIsYBCg1H", + "dW5EZWZpbml0aW9uEjEKB3JlZ3VsYXIYASABKAsyHi5ibGl0emtpdC5HdW5E", + "ZWZpbml0aW9uUmVndWxhckgAEjgKC2F1dG9fbG9hZGVyGAIgASgLMiEuYmxp", + "dHpraXQuR3VuRGVmaW5pdGlvbkF1dG9Mb2FkZXJIABI8Cg1hdXRvX3JlbG9h", + "ZGVyGAMgASgLMiMuYmxpdHpraXQuR3VuRGVmaW5pdGlvbkF1dG9SZWxvYWRl", + "ckgAQgoKCGd1bl90eXBlIn4KFEd1bkRlZmluaXRpb25SZWd1bGFyEikKBGJh", + "c2UYASACKAsyGy5ibGl0emtpdC5HdW5EZWZpbml0aW9uQmFzZRI7CglleHRl", + "bnNpb24YAiACKAsyKC5ibGl0emtpdC5HdW5EZWZpbml0aW9uUmVndWxhclBy", + "b3BlcnRpZXMiMAoeR3VuRGVmaW5pdGlvblJlZ3VsYXJQcm9wZXJ0aWVzEg4K", + "BnJlbG9hZBgBIAIoAiKEAQoXR3VuRGVmaW5pdGlvbkF1dG9Mb2FkZXISKQoE", + "YmFzZRgBIAIoCzIbLmJsaXR6a2l0Lkd1bkRlZmluaXRpb25CYXNlEj4KCWV4", + "dGVuc2lvbhgCIAIoCzIrLmJsaXR6a2l0Lkd1bkRlZmluaXRpb25BdXRvTG9h", + "ZGVyUHJvcGVydGllcyJhCiFHdW5EZWZpbml0aW9uQXV0b0xvYWRlclByb3Bl", + "cnRpZXMSEwoLY2xpcF9yZWxvYWQYASACKAISEgoKaW50cmFfY2xpcBgCIAIo", + "AhITCgtzaGVsbF9jb3VudBgDIAIoAiKIAQoZR3VuRGVmaW5pdGlvbkF1dG9S", + "ZWxvYWRlchIpCgRiYXNlGAEgAigLMhsuYmxpdHpraXQuR3VuRGVmaW5pdGlv", + "bkJhc2USQAoJZXh0ZW5zaW9uGAIgAigLMi0uYmxpdHpraXQuR3VuRGVmaW5p", + "dGlvbkF1dG9SZWxvYWRlclByb3BlcnRpZXMiZQojR3VuRGVmaW5pdGlvbkF1", + "dG9SZWxvYWRlclByb3BlcnRpZXMSFQoNc2hlbGxfcmVsb2FkcxgBIAMoAhIS", + "CgppbnRyYV9jbGlwGAIgAigCEhMKC3NoZWxsX2NvdW50GAMgAigCIqQDChFH", + "dW5EZWZpbml0aW9uQmFzZRIKCgJpZBgBIAIoDRIWCg5yb3RhdGlvbl9zcGVl", + "ZBgCIAIoAhItCg1yZXNlYXJjaF9jb3N0GAMgASgLMhYuYmxpdHpraXQuUmVz", + "ZWFyY2hDb3N0Eg4KBndlaWdodBgEIAIoDRIiCgRuYW1lGAUgAigLMhQuYmxp", + "dHpraXQuSTE4blN0cmluZxIMCgR0aWVyGAYgAigNEikKBnNoZWxscxgHIAMo", + "CzIZLmJsaXR6a2l0LlNoZWxsRGVmaW5pdGlvbhIXCg9jYW1vdWZsYWdlX2xv", + "c3MYCCACKAISEAoIYWltX3RpbWUYCSACKAISFwoPZGlzcGVyc2lvbl9iYXNl", + "GAogAigCEhsKE2Rpc3BlcnNpb25fdHJhdmVyc2UYCyACKAISFwoPZGlzcGVy", + "c2lvbl9zaG90GAwgAigCEhoKEmRpc3BlcnNpb25fZGFtYWdlZBgNIAIoAhIh", + "Cgd1bmxvY2tzGA4gAygLMhAuYmxpdHpraXQuVW5sb2NrEhYKDnNoZWxsX2Nh", + "cGFjaXR5GA8gAigNIsUCCg9TaGVsbERlZmluaXRpb24SCgoCaWQYASACKA0S", + "IgoEbmFtZRgCIAIoCzIULmJsaXR6a2l0LkkxOG5TdHJpbmcSEAoIdmVsb2Np", + "dHkYAyACKA0SFAoMYXJtb3JfZGFtYWdlGAQgAigNEhUKDW1vZHVsZV9kYW1h", + "Z2UYBSACKA0SDwoHY2FsaWJlchgGIAIoAhIMCgRpY29uGAcgAigJEi8KC3Bl", + "bmV0cmF0aW9uGAggAigLMhouYmxpdHpraXQuU2hlbGxQZW5ldHJhdGlvbhIh", + "CgR0eXBlGAkgAigOMhMuYmxpdHpraXQuU2hlbGxUeXBlEhUKDW5vcm1hbGl6", + "YXRpb24YCiABKAISEAoIcmljb2NoZXQYCyABKAISGAoQZXhwbG9zaW9uX3Jh", + "ZGl1cxgMIAEoAhINCgVyYW5nZRgNIAIoDSItChBTaGVsbFBlbmV0cmF0aW9u", + "EgwKBG5lYXIYASACKAISCwoDZmFyGAIgAigCIlwKBlVubG9jaxIKCgJpZBgB", + "IAIoBRIiCgR0eXBlGAIgAigOMhQuYmxpdHpraXQuTW9kdWxlVHlwZRIiCgRj", + "b3N0GAMgAigLMhQuYmxpdHpraXQuVW5sb2NrQ29zdCIpCgpVbmxvY2tDb3N0", + "EgwKBHR5cGUYASACKAkSDQoFdmFsdWUYAiACKAUiXwoEQ3JldxIgCgR0eXBl", + "GAEgAigOMhIuYmxpdHpraXQuQ3Jld1R5cGUSDQoFY291bnQYAiACKA0SJgoK", + "c3Vic3RpdHV0ZRgDIAMoDjISLmJsaXR6a2l0LkNyZXdUeXBlKkYKDVRhbmtQ", + "cmljZVR5cGUSGwoXVEFOS19QUklDRV9UWVBFX0NSRURJVFMQABIYChRUQU5L", + "X1BSSUNFX1RZUEVfR09MRBABKlsKCVNoZWxsVHlwZRIRCg1TSEVMTF9UWVBF", + "X0FQEAASEwoPU0hFTExfVFlQRV9BUENSEAESEwoPU0hFTExfVFlQRV9IRUFU", + "EAISEQoNU0hFTExfVFlQRV9IRRADKoIBCgpNb2R1bGVUeXBlEhcKE01PRFVM", + "RV9UWVBFX1ZFSElDTEUQABIWChJNT0RVTEVfVFlQRV9FTkdJTkUQARIWChJN", + "T0RVTEVfVFlQRV9UUkFDS1MQAhIWChJNT0RVTEVfVFlQRV9UVVJSRVQQAxIT", + "Cg9NT0RVTEVfVFlQRV9HVU4QBCptCglUYW5rQ2xhc3MSFAoQVEFOS19DTEFT", + "U19MSUdIVBAAEhUKEVRBTktfQ0xBU1NfTUVESVVNEAESFAoQVEFOS19DTEFT", + "U19IRUFWWRACEh0KGVRBTktfQ0xBU1NfVEFOS19ERVNUUk9ZRVIQAypWCghU", + "YW5rVHlwZRIaChZUQU5LX1RZUEVfUkVTRUFSQ0hBQkxFEAASFQoRVEFOS19U", + "WVBFX1BSRU1JVU0QARIXChNUQU5LX1RZUEVfQ09MTEVDVE9SEAIqfQoIQ3Jl", + "d1R5cGUSFwoTQ1JFV19UWVBFX0NPTU1BTkRFUhAAEhYKEkNSRVdfVFlQRV9S", + "QURJT01BThABEhQKEENSRVdfVFlQRV9HVU5ORVIQAhIUChBDUkVXX1RZUEVf", + "RFJJVkVSEAMSFAoQQ1JFV19UWVBFX0xPQURFUhAE")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Blitzkit.LegacyI18NReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Blitzkit.TankPriceType), typeof(global::Blitzkit.ShellType), typeof(global::Blitzkit.ModuleType), typeof(global::Blitzkit.TankClass), typeof(global::Blitzkit.TankType), typeof(global::Blitzkit.CrewType), }, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.TankDefinitions), global::Blitzkit.TankDefinitions.Parser, new[]{ "Tanks" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.TankDefinition), global::Blitzkit.TankDefinition.Parser, new[]{ "Id", "Roles", "FixedCamouflage", "Camouflages", "Ancestors", "Successors", "Crew", "Health", "Nation", "Name", "NameFull", "Type", "MaxConsumables", "MaxProvisions", "Tier", "Class", "Testing", "Deprecated", "Turrets", "Engines", "Tracks", "Price", "ResearchCost", "SpeedForwards", "SpeedBackwards", "CamouflageStill", "CamouflageMoving", "CamouflageOnFire", "EquipmentPreset", "Weight" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.ResearchCost), global::Blitzkit.ResearchCost.Parser, new[]{ "Xp", "SeasonalTokens" }, new[]{ "ResearchCostType" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.ResearchCostSeasonalTokens), global::Blitzkit.ResearchCostSeasonalTokens.Parser, new[]{ "Season", "Tokens" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.TankPrice), global::Blitzkit.TankPrice.Parser, new[]{ "Type", "Value" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.TrackDefinition), global::Blitzkit.TrackDefinition.Parser, new[]{ "Id", "Tier", "Name", "Weight", "TraverseSpeed", "ResearchCost", "DispersionMove", "DispersionTraverse", "ResistanceHard", "ResistanceMedium", "ResistanceSoft", "Unlocks" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.EngineDefinition), global::Blitzkit.EngineDefinition.Parser, new[]{ "Id", "Name", "ResearchCost", "Tier", "FireChance", "Power", "Weight", "Unlocks" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.TurretDefinition), global::Blitzkit.TurretDefinition.Parser, new[]{ "Id", "Health", "ViewRange", "TraverseSpeed", "ResearchCost", "Name", "Tier", "Weight", "Guns", "Unlocks" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.GunDefinition), global::Blitzkit.GunDefinition.Parser, new[]{ "Regular", "AutoLoader", "AutoReloader" }, new[]{ "GunType" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.GunDefinitionRegular), global::Blitzkit.GunDefinitionRegular.Parser, new[]{ "Base", "Extension" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.GunDefinitionRegularProperties), global::Blitzkit.GunDefinitionRegularProperties.Parser, new[]{ "Reload" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.GunDefinitionAutoLoader), global::Blitzkit.GunDefinitionAutoLoader.Parser, new[]{ "Base", "Extension" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.GunDefinitionAutoLoaderProperties), global::Blitzkit.GunDefinitionAutoLoaderProperties.Parser, new[]{ "ClipReload", "IntraClip", "ShellCount" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.GunDefinitionAutoReloader), global::Blitzkit.GunDefinitionAutoReloader.Parser, new[]{ "Base", "Extension" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.GunDefinitionAutoReloaderProperties), global::Blitzkit.GunDefinitionAutoReloaderProperties.Parser, new[]{ "ShellReloads", "IntraClip", "ShellCount" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.GunDefinitionBase), global::Blitzkit.GunDefinitionBase.Parser, new[]{ "Id", "RotationSpeed", "ResearchCost", "Weight", "Name", "Tier", "Shells", "CamouflageLoss", "AimTime", "DispersionBase", "DispersionTraverse", "DispersionShot", "DispersionDamaged", "Unlocks", "ShellCapacity" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.ShellDefinition), global::Blitzkit.ShellDefinition.Parser, new[]{ "Id", "Name", "Velocity", "ArmorDamage", "ModuleDamage", "Caliber", "Icon", "Penetration", "Type", "Normalization", "Ricochet", "ExplosionRadius", "Range" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.ShellPenetration), global::Blitzkit.ShellPenetration.Parser, new[]{ "Near", "Far" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.Unlock), global::Blitzkit.Unlock.Parser, new[]{ "Id", "Type", "Cost" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.UnlockCost), global::Blitzkit.UnlockCost.Parser, new[]{ "Type", "Value" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.Crew), global::Blitzkit.Crew.Parser, new[]{ "Type", "Count", "Substitute" }, null, null, null, null) + })); + } + #endregion + + } + #region Enums + public enum TankPriceType { + [pbr::OriginalName("TANK_PRICE_TYPE_CREDITS")] Credits = 0, + [pbr::OriginalName("TANK_PRICE_TYPE_GOLD")] Gold = 1, + } + + public enum ShellType { + [pbr::OriginalName("SHELL_TYPE_AP")] Ap = 0, + [pbr::OriginalName("SHELL_TYPE_APCR")] Apcr = 1, + [pbr::OriginalName("SHELL_TYPE_HEAT")] Heat = 2, + [pbr::OriginalName("SHELL_TYPE_HE")] He = 3, + } + + public enum ModuleType { + [pbr::OriginalName("MODULE_TYPE_VEHICLE")] Vehicle = 0, + [pbr::OriginalName("MODULE_TYPE_ENGINE")] Engine = 1, + [pbr::OriginalName("MODULE_TYPE_TRACKS")] Tracks = 2, + [pbr::OriginalName("MODULE_TYPE_TURRET")] Turret = 3, + [pbr::OriginalName("MODULE_TYPE_GUN")] Gun = 4, + } + + public enum TankClass { + [pbr::OriginalName("TANK_CLASS_LIGHT")] Light = 0, + [pbr::OriginalName("TANK_CLASS_MEDIUM")] Medium = 1, + [pbr::OriginalName("TANK_CLASS_HEAVY")] Heavy = 2, + [pbr::OriginalName("TANK_CLASS_TANK_DESTROYER")] TankDestroyer = 3, + } + + public enum TankType { + [pbr::OriginalName("TANK_TYPE_RESEARCHABLE")] Researchable = 0, + [pbr::OriginalName("TANK_TYPE_PREMIUM")] Premium = 1, + [pbr::OriginalName("TANK_TYPE_COLLECTOR")] Collector = 2, + } + + public enum CrewType { + [pbr::OriginalName("CREW_TYPE_COMMANDER")] Commander = 0, + [pbr::OriginalName("CREW_TYPE_RADIOMAN")] Radioman = 1, + [pbr::OriginalName("CREW_TYPE_GUNNER")] Gunner = 2, + [pbr::OriginalName("CREW_TYPE_DRIVER")] Driver = 3, + [pbr::OriginalName("CREW_TYPE_LOADER")] Loader = 4, + } + + #endregion + + #region Messages + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TankDefinitions : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TankDefinitions()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyTankDefinitionsReflection.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 TankDefinitions() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TankDefinitions(TankDefinitions other) : this() { + tanks_ = other.tanks_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TankDefinitions Clone() { + return new TankDefinitions(this); + } + + /// Field number for the "tanks" field. + public const int TanksFieldNumber = 1; + private static readonly pbc::MapField.Codec _map_tanks_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForUInt32(8, 0), pb::FieldCodec.ForMessage(18, global::Blitzkit.TankDefinition.Parser), 10); + private readonly pbc::MapField tanks_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField Tanks { + get { return tanks_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as TankDefinitions); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TankDefinitions other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!Tanks.Equals(other.Tanks)) 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 ^= Tanks.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 + tanks_.WriteTo(output, _map_tanks_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) { + tanks_.WriteTo(ref output, _map_tanks_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 += tanks_.CalculateSize(_map_tanks_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TankDefinitions other) { + if (other == null) { + return; + } + tanks_.MergeFrom(other.tanks_); + _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: { + tanks_.AddEntriesFrom(input, _map_tanks_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: { + tanks_.AddEntriesFrom(ref input, _map_tanks_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TankDefinition : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TankDefinition()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyTankDefinitionsReflection.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 TankDefinition() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TankDefinition(TankDefinition other) : this() { + _hasBits0 = other._hasBits0; + id_ = other.id_; + roles_ = other.roles_.Clone(); + fixedCamouflage_ = other.fixedCamouflage_; + camouflages_ = other.camouflages_.Clone(); + ancestors_ = other.ancestors_.Clone(); + successors_ = other.successors_.Clone(); + crew_ = other.crew_.Clone(); + health_ = other.health_; + nation_ = other.nation_; + name_ = other.name_ != null ? other.name_.Clone() : null; + nameFull_ = other.nameFull_ != null ? other.nameFull_.Clone() : null; + type_ = other.type_; + maxConsumables_ = other.maxConsumables_; + maxProvisions_ = other.maxProvisions_; + tier_ = other.tier_; + class_ = other.class_; + testing_ = other.testing_; + deprecated_ = other.deprecated_; + turrets_ = other.turrets_.Clone(); + engines_ = other.engines_.Clone(); + tracks_ = other.tracks_.Clone(); + price_ = other.price_ != null ? other.price_.Clone() : null; + researchCost_ = other.researchCost_ != null ? other.researchCost_.Clone() : null; + speedForwards_ = other.speedForwards_; + speedBackwards_ = other.speedBackwards_; + camouflageStill_ = other.camouflageStill_; + camouflageMoving_ = other.camouflageMoving_; + camouflageOnFire_ = other.camouflageOnFire_; + equipmentPreset_ = other.equipmentPreset_; + weight_ = other.weight_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TankDefinition Clone() { + return new TankDefinition(this); + } + + /// Field number for the "id" field. + 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; + } + } + /// Gets whether the "id" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasId { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "id" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearId() { + _hasBits0 &= ~1; + } + + /// Field number for the "roles" field. + public const int RolesFieldNumber = 2; + private static readonly pbc::MapField.Codec _map_roles_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForUInt32(8, 0), pb::FieldCodec.ForUInt32(16, 0), 18); + private readonly pbc::MapField roles_ = new pbc::MapField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField Roles { + get { return roles_; } + } + + /// Field number for the "fixed_camouflage" field. + public const int FixedCamouflageFieldNumber = 4; + private readonly static bool FixedCamouflageDefaultValue = false; + + private bool fixedCamouflage_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool FixedCamouflage { + get { if ((_hasBits0 & 2) != 0) { return fixedCamouflage_; } else { return FixedCamouflageDefaultValue; } } + set { + _hasBits0 |= 2; + fixedCamouflage_ = value; + } + } + /// Gets whether the "fixed_camouflage" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasFixedCamouflage { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "fixed_camouflage" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearFixedCamouflage() { + _hasBits0 &= ~2; + } + + /// Field number for the "camouflages" field. + public const int CamouflagesFieldNumber = 5; + private static readonly pb::FieldCodec _repeated_camouflages_codec + = pb::FieldCodec.ForInt32(40); + private readonly pbc::RepeatedField camouflages_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Camouflages { + get { return camouflages_; } + } + + /// Field number for the "ancestors" field. + public const int AncestorsFieldNumber = 6; + private static readonly pb::FieldCodec _repeated_ancestors_codec + = pb::FieldCodec.ForInt32(48); + private readonly pbc::RepeatedField ancestors_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Ancestors { + get { return ancestors_; } + } + + /// Field number for the "successors" field. + public const int SuccessorsFieldNumber = 7; + private static readonly pb::FieldCodec _repeated_successors_codec + = pb::FieldCodec.ForInt32(56); + private readonly pbc::RepeatedField successors_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Successors { + get { return successors_; } + } + + /// Field number for the "crew" field. + public const int CrewFieldNumber = 8; + private static readonly pb::FieldCodec _repeated_crew_codec + = pb::FieldCodec.ForMessage(66, global::Blitzkit.Crew.Parser); + private readonly pbc::RepeatedField crew_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Crew { + get { return crew_; } + } + + /// Field number for the "health" field. + public const int HealthFieldNumber = 9; + private readonly static uint HealthDefaultValue = 0; + + private uint health_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint Health { + get { if ((_hasBits0 & 4) != 0) { return health_; } else { return HealthDefaultValue; } } + set { + _hasBits0 |= 4; + health_ = value; + } + } + /// Gets whether the "health" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasHealth { + get { return (_hasBits0 & 4) != 0; } + } + /// Clears the value of the "health" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearHealth() { + _hasBits0 &= ~4; + } + + /// Field number for the "nation" field. + public const int NationFieldNumber = 10; + private readonly static string NationDefaultValue = ""; + + private string nation_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Nation { + get { return nation_ ?? NationDefaultValue; } + set { + nation_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "nation" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasNation { + get { return nation_ != null; } + } + /// Clears the value of the "nation" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearNation() { + nation_ = null; + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 11; + 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; + } + } + + /// Field number for the "name_full" field. + public const int NameFullFieldNumber = 12; + private global::Blitzkit.I18nString nameFull_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.I18nString NameFull { + get { return nameFull_; } + set { + nameFull_ = value; + } + } + + /// Field number for the "type" field. + public const int TypeFieldNumber = 13; + 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 & 8) != 0) { return type_; } else { return TypeDefaultValue; } } + set { + _hasBits0 |= 8; + type_ = value; + } + } + /// Gets whether the "type" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasType { + get { return (_hasBits0 & 8) != 0; } + } + /// Clears the value of the "type" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearType() { + _hasBits0 &= ~8; + } + + /// Field number for the "max_consumables" field. + public const int MaxConsumablesFieldNumber = 14; + private readonly static uint MaxConsumablesDefaultValue = 0; + + private uint maxConsumables_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint MaxConsumables { + get { if ((_hasBits0 & 16) != 0) { return maxConsumables_; } else { return MaxConsumablesDefaultValue; } } + set { + _hasBits0 |= 16; + maxConsumables_ = value; + } + } + /// Gets whether the "max_consumables" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasMaxConsumables { + get { return (_hasBits0 & 16) != 0; } + } + /// Clears the value of the "max_consumables" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearMaxConsumables() { + _hasBits0 &= ~16; + } + + /// Field number for the "max_provisions" field. + public const int MaxProvisionsFieldNumber = 15; + private readonly static uint MaxProvisionsDefaultValue = 0; + + private uint maxProvisions_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint MaxProvisions { + get { if ((_hasBits0 & 32) != 0) { return maxProvisions_; } else { return MaxProvisionsDefaultValue; } } + set { + _hasBits0 |= 32; + maxProvisions_ = value; + } + } + /// Gets whether the "max_provisions" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasMaxProvisions { + get { return (_hasBits0 & 32) != 0; } + } + /// Clears the value of the "max_provisions" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearMaxProvisions() { + _hasBits0 &= ~32; + } + + /// Field number for the "tier" field. + public const int TierFieldNumber = 16; + private readonly static uint TierDefaultValue = 0; + + private uint tier_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint Tier { + get { if ((_hasBits0 & 64) != 0) { return tier_; } else { return TierDefaultValue; } } + set { + _hasBits0 |= 64; + tier_ = value; + } + } + /// Gets whether the "tier" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasTier { + get { return (_hasBits0 & 64) != 0; } + } + /// Clears the value of the "tier" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearTier() { + _hasBits0 &= ~64; + } + + /// Field number for the "class" field. + public const int ClassFieldNumber = 17; + 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 & 128) != 0) { return class_; } else { return ClassDefaultValue; } } + set { + _hasBits0 |= 128; + class_ = value; + } + } + /// Gets whether the "class" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasClass { + get { return (_hasBits0 & 128) != 0; } + } + /// Clears the value of the "class" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearClass() { + _hasBits0 &= ~128; + } + + /// Field number for the "testing" field. + public const int TestingFieldNumber = 18; + private readonly static bool TestingDefaultValue = false; + + private bool testing_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Testing { + get { if ((_hasBits0 & 256) != 0) { return testing_; } else { return TestingDefaultValue; } } + set { + _hasBits0 |= 256; + testing_ = value; + } + } + /// Gets whether the "testing" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasTesting { + get { return (_hasBits0 & 256) != 0; } + } + /// Clears the value of the "testing" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearTesting() { + _hasBits0 &= ~256; + } + + /// Field number for the "deprecated" field. + public const int DeprecatedFieldNumber = 19; + private readonly static bool DeprecatedDefaultValue = false; + + private bool deprecated_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Deprecated { + get { if ((_hasBits0 & 512) != 0) { return deprecated_; } else { return DeprecatedDefaultValue; } } + set { + _hasBits0 |= 512; + deprecated_ = value; + } + } + /// Gets whether the "deprecated" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasDeprecated { + get { return (_hasBits0 & 512) != 0; } + } + /// Clears the value of the "deprecated" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearDeprecated() { + _hasBits0 &= ~512; + } + + /// Field number for the "turrets" field. + public const int TurretsFieldNumber = 20; + private static readonly pb::FieldCodec _repeated_turrets_codec + = pb::FieldCodec.ForMessage(162, global::Blitzkit.TurretDefinition.Parser); + private readonly pbc::RepeatedField turrets_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Turrets { + get { return turrets_; } + } + + /// Field number for the "engines" field. + public const int EnginesFieldNumber = 21; + private static readonly pb::FieldCodec _repeated_engines_codec + = pb::FieldCodec.ForMessage(170, global::Blitzkit.EngineDefinition.Parser); + private readonly pbc::RepeatedField engines_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Engines { + get { return engines_; } + } + + /// Field number for the "tracks" field. + public const int TracksFieldNumber = 22; + private static readonly pb::FieldCodec _repeated_tracks_codec + = pb::FieldCodec.ForMessage(178, global::Blitzkit.TrackDefinition.Parser); + private readonly pbc::RepeatedField tracks_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Tracks { + get { return tracks_; } + } + + /// Field number for the "price" field. + public const int PriceFieldNumber = 23; + private global::Blitzkit.TankPrice price_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.TankPrice Price { + get { return price_; } + set { + price_ = value; + } + } + + /// Field number for the "research_cost" field. + public const int ResearchCostFieldNumber = 24; + private global::Blitzkit.ResearchCost researchCost_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.ResearchCost ResearchCost { + get { return researchCost_; } + set { + researchCost_ = value; + } + } + + /// Field number for the "speed_forwards" field. + public const int SpeedForwardsFieldNumber = 25; + private readonly static float SpeedForwardsDefaultValue = 0F; + + private float speedForwards_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float SpeedForwards { + get { if ((_hasBits0 & 1024) != 0) { return speedForwards_; } else { return SpeedForwardsDefaultValue; } } + set { + _hasBits0 |= 1024; + speedForwards_ = value; + } + } + /// Gets whether the "speed_forwards" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasSpeedForwards { + get { return (_hasBits0 & 1024) != 0; } + } + /// Clears the value of the "speed_forwards" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearSpeedForwards() { + _hasBits0 &= ~1024; + } + + /// Field number for the "speed_backwards" field. + public const int SpeedBackwardsFieldNumber = 26; + private readonly static float SpeedBackwardsDefaultValue = 0F; + + private float speedBackwards_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float SpeedBackwards { + get { if ((_hasBits0 & 2048) != 0) { return speedBackwards_; } else { return SpeedBackwardsDefaultValue; } } + set { + _hasBits0 |= 2048; + speedBackwards_ = value; + } + } + /// Gets whether the "speed_backwards" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasSpeedBackwards { + get { return (_hasBits0 & 2048) != 0; } + } + /// Clears the value of the "speed_backwards" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearSpeedBackwards() { + _hasBits0 &= ~2048; + } + + /// Field number for the "camouflage_still" field. + public const int CamouflageStillFieldNumber = 27; + private readonly static float CamouflageStillDefaultValue = 0F; + + private float camouflageStill_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float CamouflageStill { + get { if ((_hasBits0 & 4096) != 0) { return camouflageStill_; } else { return CamouflageStillDefaultValue; } } + set { + _hasBits0 |= 4096; + camouflageStill_ = value; + } + } + /// Gets whether the "camouflage_still" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasCamouflageStill { + get { return (_hasBits0 & 4096) != 0; } + } + /// Clears the value of the "camouflage_still" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearCamouflageStill() { + _hasBits0 &= ~4096; + } + + /// Field number for the "camouflage_moving" field. + public const int CamouflageMovingFieldNumber = 28; + private readonly static float CamouflageMovingDefaultValue = 0F; + + private float camouflageMoving_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float CamouflageMoving { + get { if ((_hasBits0 & 8192) != 0) { return camouflageMoving_; } else { return CamouflageMovingDefaultValue; } } + set { + _hasBits0 |= 8192; + camouflageMoving_ = value; + } + } + /// Gets whether the "camouflage_moving" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasCamouflageMoving { + get { return (_hasBits0 & 8192) != 0; } + } + /// Clears the value of the "camouflage_moving" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearCamouflageMoving() { + _hasBits0 &= ~8192; + } + + /// Field number for the "camouflage_onFire" field. + public const int CamouflageOnFireFieldNumber = 29; + private readonly static float CamouflageOnFireDefaultValue = 0F; + + private float camouflageOnFire_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float CamouflageOnFire { + get { if ((_hasBits0 & 16384) != 0) { return camouflageOnFire_; } else { return CamouflageOnFireDefaultValue; } } + set { + _hasBits0 |= 16384; + camouflageOnFire_ = value; + } + } + /// Gets whether the "camouflage_onFire" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasCamouflageOnFire { + get { return (_hasBits0 & 16384) != 0; } + } + /// Clears the value of the "camouflage_onFire" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearCamouflageOnFire() { + _hasBits0 &= ~16384; + } + + /// Field number for the "equipment_preset" field. + public const int EquipmentPresetFieldNumber = 30; + private readonly static string EquipmentPresetDefaultValue = ""; + + private string equipmentPreset_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string EquipmentPreset { + get { return equipmentPreset_ ?? EquipmentPresetDefaultValue; } + set { + equipmentPreset_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "equipment_preset" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasEquipmentPreset { + get { return equipmentPreset_ != null; } + } + /// Clears the value of the "equipment_preset" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearEquipmentPreset() { + equipmentPreset_ = null; + } + + /// Field number for the "weight" field. + public const int WeightFieldNumber = 31; + private readonly static uint WeightDefaultValue = 0; + + private uint weight_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint Weight { + get { if ((_hasBits0 & 32768) != 0) { return weight_; } else { return WeightDefaultValue; } } + set { + _hasBits0 |= 32768; + weight_ = value; + } + } + /// Gets whether the "weight" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasWeight { + get { return (_hasBits0 & 32768) != 0; } + } + /// Clears the value of the "weight" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearWeight() { + _hasBits0 &= ~32768; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as TankDefinition); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TankDefinition other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Id != other.Id) return false; + if (!Roles.Equals(other.Roles)) return false; + if (FixedCamouflage != other.FixedCamouflage) return false; + if(!camouflages_.Equals(other.camouflages_)) return false; + if(!ancestors_.Equals(other.ancestors_)) return false; + if(!successors_.Equals(other.successors_)) return false; + if(!crew_.Equals(other.crew_)) return false; + if (Health != other.Health) return false; + if (Nation != other.Nation) return false; + if (!object.Equals(Name, other.Name)) return false; + if (!object.Equals(NameFull, other.NameFull)) return false; + if (Type != other.Type) return false; + if (MaxConsumables != other.MaxConsumables) return false; + if (MaxProvisions != other.MaxProvisions) return false; + if (Tier != other.Tier) return false; + if (Class != other.Class) return false; + if (Testing != other.Testing) return false; + if (Deprecated != other.Deprecated) return false; + if(!turrets_.Equals(other.turrets_)) return false; + if(!engines_.Equals(other.engines_)) return false; + if(!tracks_.Equals(other.tracks_)) return false; + if (!object.Equals(Price, other.Price)) return false; + if (!object.Equals(ResearchCost, other.ResearchCost)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(SpeedForwards, other.SpeedForwards)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(SpeedBackwards, other.SpeedBackwards)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(CamouflageStill, other.CamouflageStill)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(CamouflageMoving, other.CamouflageMoving)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(CamouflageOnFire, other.CamouflageOnFire)) return false; + if (EquipmentPreset != other.EquipmentPreset) return false; + if (Weight != other.Weight) 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(); + hash ^= Roles.GetHashCode(); + if (HasFixedCamouflage) hash ^= FixedCamouflage.GetHashCode(); + hash ^= camouflages_.GetHashCode(); + hash ^= ancestors_.GetHashCode(); + hash ^= successors_.GetHashCode(); + hash ^= crew_.GetHashCode(); + if (HasHealth) hash ^= Health.GetHashCode(); + if (HasNation) hash ^= Nation.GetHashCode(); + if (name_ != null) hash ^= Name.GetHashCode(); + if (nameFull_ != null) hash ^= NameFull.GetHashCode(); + if (HasType) hash ^= Type.GetHashCode(); + if (HasMaxConsumables) hash ^= MaxConsumables.GetHashCode(); + if (HasMaxProvisions) hash ^= MaxProvisions.GetHashCode(); + if (HasTier) hash ^= Tier.GetHashCode(); + if (HasClass) hash ^= Class.GetHashCode(); + if (HasTesting) hash ^= Testing.GetHashCode(); + if (HasDeprecated) hash ^= Deprecated.GetHashCode(); + hash ^= turrets_.GetHashCode(); + hash ^= engines_.GetHashCode(); + hash ^= tracks_.GetHashCode(); + if (price_ != null) hash ^= Price.GetHashCode(); + if (researchCost_ != null) hash ^= ResearchCost.GetHashCode(); + if (HasSpeedForwards) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(SpeedForwards); + if (HasSpeedBackwards) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(SpeedBackwards); + if (HasCamouflageStill) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(CamouflageStill); + if (HasCamouflageMoving) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(CamouflageMoving); + if (HasCamouflageOnFire) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(CamouflageOnFire); + if (HasEquipmentPreset) hash ^= EquipmentPreset.GetHashCode(); + if (HasWeight) hash ^= Weight.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); + } + roles_.WriteTo(output, _map_roles_codec); + if (HasFixedCamouflage) { + output.WriteRawTag(32); + output.WriteBool(FixedCamouflage); + } + camouflages_.WriteTo(output, _repeated_camouflages_codec); + ancestors_.WriteTo(output, _repeated_ancestors_codec); + successors_.WriteTo(output, _repeated_successors_codec); + crew_.WriteTo(output, _repeated_crew_codec); + if (HasHealth) { + output.WriteRawTag(72); + output.WriteUInt32(Health); + } + if (HasNation) { + output.WriteRawTag(82); + output.WriteString(Nation); + } + if (name_ != null) { + output.WriteRawTag(90); + output.WriteMessage(Name); + } + if (nameFull_ != null) { + output.WriteRawTag(98); + output.WriteMessage(NameFull); + } + if (HasType) { + output.WriteRawTag(104); + output.WriteEnum((int) Type); + } + if (HasMaxConsumables) { + output.WriteRawTag(112); + output.WriteUInt32(MaxConsumables); + } + if (HasMaxProvisions) { + output.WriteRawTag(120); + output.WriteUInt32(MaxProvisions); + } + if (HasTier) { + output.WriteRawTag(128, 1); + output.WriteUInt32(Tier); + } + if (HasClass) { + output.WriteRawTag(136, 1); + output.WriteEnum((int) Class); + } + if (HasTesting) { + output.WriteRawTag(144, 1); + output.WriteBool(Testing); + } + if (HasDeprecated) { + output.WriteRawTag(152, 1); + output.WriteBool(Deprecated); + } + turrets_.WriteTo(output, _repeated_turrets_codec); + engines_.WriteTo(output, _repeated_engines_codec); + tracks_.WriteTo(output, _repeated_tracks_codec); + if (price_ != null) { + output.WriteRawTag(186, 1); + output.WriteMessage(Price); + } + if (researchCost_ != null) { + output.WriteRawTag(194, 1); + output.WriteMessage(ResearchCost); + } + if (HasSpeedForwards) { + output.WriteRawTag(205, 1); + output.WriteFloat(SpeedForwards); + } + if (HasSpeedBackwards) { + output.WriteRawTag(213, 1); + output.WriteFloat(SpeedBackwards); + } + if (HasCamouflageStill) { + output.WriteRawTag(221, 1); + output.WriteFloat(CamouflageStill); + } + if (HasCamouflageMoving) { + output.WriteRawTag(229, 1); + output.WriteFloat(CamouflageMoving); + } + if (HasCamouflageOnFire) { + output.WriteRawTag(237, 1); + output.WriteFloat(CamouflageOnFire); + } + if (HasEquipmentPreset) { + output.WriteRawTag(242, 1); + output.WriteString(EquipmentPreset); + } + if (HasWeight) { + output.WriteRawTag(248, 1); + output.WriteUInt32(Weight); + } + 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); + } + roles_.WriteTo(ref output, _map_roles_codec); + if (HasFixedCamouflage) { + output.WriteRawTag(32); + output.WriteBool(FixedCamouflage); + } + camouflages_.WriteTo(ref output, _repeated_camouflages_codec); + ancestors_.WriteTo(ref output, _repeated_ancestors_codec); + successors_.WriteTo(ref output, _repeated_successors_codec); + crew_.WriteTo(ref output, _repeated_crew_codec); + if (HasHealth) { + output.WriteRawTag(72); + output.WriteUInt32(Health); + } + if (HasNation) { + output.WriteRawTag(82); + output.WriteString(Nation); + } + if (name_ != null) { + output.WriteRawTag(90); + output.WriteMessage(Name); + } + if (nameFull_ != null) { + output.WriteRawTag(98); + output.WriteMessage(NameFull); + } + if (HasType) { + output.WriteRawTag(104); + output.WriteEnum((int) Type); + } + if (HasMaxConsumables) { + output.WriteRawTag(112); + output.WriteUInt32(MaxConsumables); + } + if (HasMaxProvisions) { + output.WriteRawTag(120); + output.WriteUInt32(MaxProvisions); + } + if (HasTier) { + output.WriteRawTag(128, 1); + output.WriteUInt32(Tier); + } + if (HasClass) { + output.WriteRawTag(136, 1); + output.WriteEnum((int) Class); + } + if (HasTesting) { + output.WriteRawTag(144, 1); + output.WriteBool(Testing); + } + if (HasDeprecated) { + output.WriteRawTag(152, 1); + output.WriteBool(Deprecated); + } + turrets_.WriteTo(ref output, _repeated_turrets_codec); + engines_.WriteTo(ref output, _repeated_engines_codec); + tracks_.WriteTo(ref output, _repeated_tracks_codec); + if (price_ != null) { + output.WriteRawTag(186, 1); + output.WriteMessage(Price); + } + if (researchCost_ != null) { + output.WriteRawTag(194, 1); + output.WriteMessage(ResearchCost); + } + if (HasSpeedForwards) { + output.WriteRawTag(205, 1); + output.WriteFloat(SpeedForwards); + } + if (HasSpeedBackwards) { + output.WriteRawTag(213, 1); + output.WriteFloat(SpeedBackwards); + } + if (HasCamouflageStill) { + output.WriteRawTag(221, 1); + output.WriteFloat(CamouflageStill); + } + if (HasCamouflageMoving) { + output.WriteRawTag(229, 1); + output.WriteFloat(CamouflageMoving); + } + if (HasCamouflageOnFire) { + output.WriteRawTag(237, 1); + output.WriteFloat(CamouflageOnFire); + } + if (HasEquipmentPreset) { + output.WriteRawTag(242, 1); + output.WriteString(EquipmentPreset); + } + if (HasWeight) { + output.WriteRawTag(248, 1); + output.WriteUInt32(Weight); + } + 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); + } + size += roles_.CalculateSize(_map_roles_codec); + if (HasFixedCamouflage) { + size += 1 + 1; + } + size += camouflages_.CalculateSize(_repeated_camouflages_codec); + size += ancestors_.CalculateSize(_repeated_ancestors_codec); + size += successors_.CalculateSize(_repeated_successors_codec); + size += crew_.CalculateSize(_repeated_crew_codec); + if (HasHealth) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Health); + } + if (HasNation) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Nation); + } + if (name_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Name); + } + if (nameFull_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(NameFull); + } + if (HasType) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type); + } + if (HasMaxConsumables) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MaxConsumables); + } + if (HasMaxProvisions) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MaxProvisions); + } + if (HasTier) { + size += 2 + pb::CodedOutputStream.ComputeUInt32Size(Tier); + } + if (HasClass) { + size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) Class); + } + if (HasTesting) { + size += 2 + 1; + } + if (HasDeprecated) { + size += 2 + 1; + } + size += turrets_.CalculateSize(_repeated_turrets_codec); + size += engines_.CalculateSize(_repeated_engines_codec); + size += tracks_.CalculateSize(_repeated_tracks_codec); + if (price_ != null) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(Price); + } + if (researchCost_ != null) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(ResearchCost); + } + if (HasSpeedForwards) { + size += 2 + 4; + } + if (HasSpeedBackwards) { + size += 2 + 4; + } + if (HasCamouflageStill) { + size += 2 + 4; + } + if (HasCamouflageMoving) { + size += 2 + 4; + } + if (HasCamouflageOnFire) { + size += 2 + 4; + } + if (HasEquipmentPreset) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(EquipmentPreset); + } + if (HasWeight) { + size += 2 + pb::CodedOutputStream.ComputeUInt32Size(Weight); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TankDefinition other) { + if (other == null) { + return; + } + if (other.HasId) { + Id = other.Id; + } + roles_.MergeFrom(other.roles_); + if (other.HasFixedCamouflage) { + FixedCamouflage = other.FixedCamouflage; + } + camouflages_.Add(other.camouflages_); + ancestors_.Add(other.ancestors_); + successors_.Add(other.successors_); + crew_.Add(other.crew_); + if (other.HasHealth) { + Health = other.Health; + } + if (other.HasNation) { + Nation = other.Nation; + } + if (other.name_ != null) { + if (name_ == null) { + Name = new global::Blitzkit.I18nString(); + } + Name.MergeFrom(other.Name); + } + if (other.nameFull_ != null) { + if (nameFull_ == null) { + NameFull = new global::Blitzkit.I18nString(); + } + NameFull.MergeFrom(other.NameFull); + } + if (other.HasType) { + Type = other.Type; + } + if (other.HasMaxConsumables) { + MaxConsumables = other.MaxConsumables; + } + if (other.HasMaxProvisions) { + MaxProvisions = other.MaxProvisions; + } + if (other.HasTier) { + Tier = other.Tier; + } + if (other.HasClass) { + Class = other.Class; + } + if (other.HasTesting) { + Testing = other.Testing; + } + if (other.HasDeprecated) { + Deprecated = other.Deprecated; + } + turrets_.Add(other.turrets_); + engines_.Add(other.engines_); + tracks_.Add(other.tracks_); + if (other.price_ != null) { + if (price_ == null) { + Price = new global::Blitzkit.TankPrice(); + } + Price.MergeFrom(other.Price); + } + if (other.researchCost_ != null) { + if (researchCost_ == null) { + ResearchCost = new global::Blitzkit.ResearchCost(); + } + ResearchCost.MergeFrom(other.ResearchCost); + } + if (other.HasSpeedForwards) { + SpeedForwards = other.SpeedForwards; + } + if (other.HasSpeedBackwards) { + SpeedBackwards = other.SpeedBackwards; + } + if (other.HasCamouflageStill) { + CamouflageStill = other.CamouflageStill; + } + if (other.HasCamouflageMoving) { + CamouflageMoving = other.CamouflageMoving; + } + if (other.HasCamouflageOnFire) { + CamouflageOnFire = other.CamouflageOnFire; + } + if (other.HasEquipmentPreset) { + EquipmentPreset = other.EquipmentPreset; + } + if (other.HasWeight) { + Weight = other.Weight; + } + _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: { + roles_.AddEntriesFrom(input, _map_roles_codec); + break; + } + case 32: { + FixedCamouflage = input.ReadBool(); + break; + } + case 42: + case 40: { + camouflages_.AddEntriesFrom(input, _repeated_camouflages_codec); + break; + } + case 50: + case 48: { + ancestors_.AddEntriesFrom(input, _repeated_ancestors_codec); + break; + } + case 58: + case 56: { + successors_.AddEntriesFrom(input, _repeated_successors_codec); + break; + } + case 66: { + crew_.AddEntriesFrom(input, _repeated_crew_codec); + break; + } + case 72: { + Health = input.ReadUInt32(); + break; + } + case 82: { + Nation = input.ReadString(); + break; + } + case 90: { + if (name_ == null) { + Name = new global::Blitzkit.I18nString(); + } + input.ReadMessage(Name); + break; + } + case 98: { + if (nameFull_ == null) { + NameFull = new global::Blitzkit.I18nString(); + } + input.ReadMessage(NameFull); + break; + } + case 104: { + Type = (global::Blitzkit.TankType) input.ReadEnum(); + break; + } + case 112: { + MaxConsumables = input.ReadUInt32(); + break; + } + case 120: { + MaxProvisions = input.ReadUInt32(); + break; + } + case 128: { + Tier = input.ReadUInt32(); + break; + } + case 136: { + Class = (global::Blitzkit.TankClass) input.ReadEnum(); + break; + } + case 144: { + Testing = input.ReadBool(); + break; + } + case 152: { + Deprecated = input.ReadBool(); + break; + } + case 162: { + turrets_.AddEntriesFrom(input, _repeated_turrets_codec); + break; + } + case 170: { + engines_.AddEntriesFrom(input, _repeated_engines_codec); + break; + } + case 178: { + tracks_.AddEntriesFrom(input, _repeated_tracks_codec); + break; + } + case 186: { + if (price_ == null) { + Price = new global::Blitzkit.TankPrice(); + } + input.ReadMessage(Price); + break; + } + case 194: { + if (researchCost_ == null) { + ResearchCost = new global::Blitzkit.ResearchCost(); + } + input.ReadMessage(ResearchCost); + break; + } + case 205: { + SpeedForwards = input.ReadFloat(); + break; + } + case 213: { + SpeedBackwards = input.ReadFloat(); + break; + } + case 221: { + CamouflageStill = input.ReadFloat(); + break; + } + case 229: { + CamouflageMoving = input.ReadFloat(); + break; + } + case 237: { + CamouflageOnFire = input.ReadFloat(); + break; + } + case 242: { + EquipmentPreset = input.ReadString(); + break; + } + case 248: { + Weight = 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: { + Id = input.ReadUInt32(); + break; + } + case 18: { + roles_.AddEntriesFrom(ref input, _map_roles_codec); + break; + } + case 32: { + FixedCamouflage = input.ReadBool(); + break; + } + case 42: + case 40: { + camouflages_.AddEntriesFrom(ref input, _repeated_camouflages_codec); + break; + } + case 50: + case 48: { + ancestors_.AddEntriesFrom(ref input, _repeated_ancestors_codec); + break; + } + case 58: + case 56: { + successors_.AddEntriesFrom(ref input, _repeated_successors_codec); + break; + } + case 66: { + crew_.AddEntriesFrom(ref input, _repeated_crew_codec); + break; + } + case 72: { + Health = input.ReadUInt32(); + break; + } + case 82: { + Nation = input.ReadString(); + break; + } + case 90: { + if (name_ == null) { + Name = new global::Blitzkit.I18nString(); + } + input.ReadMessage(Name); + break; + } + case 98: { + if (nameFull_ == null) { + NameFull = new global::Blitzkit.I18nString(); + } + input.ReadMessage(NameFull); + break; + } + case 104: { + Type = (global::Blitzkit.TankType) input.ReadEnum(); + break; + } + case 112: { + MaxConsumables = input.ReadUInt32(); + break; + } + case 120: { + MaxProvisions = input.ReadUInt32(); + break; + } + case 128: { + Tier = input.ReadUInt32(); + break; + } + case 136: { + Class = (global::Blitzkit.TankClass) input.ReadEnum(); + break; + } + case 144: { + Testing = input.ReadBool(); + break; + } + case 152: { + Deprecated = input.ReadBool(); + break; + } + case 162: { + turrets_.AddEntriesFrom(ref input, _repeated_turrets_codec); + break; + } + case 170: { + engines_.AddEntriesFrom(ref input, _repeated_engines_codec); + break; + } + case 178: { + tracks_.AddEntriesFrom(ref input, _repeated_tracks_codec); + break; + } + case 186: { + if (price_ == null) { + Price = new global::Blitzkit.TankPrice(); + } + input.ReadMessage(Price); + break; + } + case 194: { + if (researchCost_ == null) { + ResearchCost = new global::Blitzkit.ResearchCost(); + } + input.ReadMessage(ResearchCost); + break; + } + case 205: { + SpeedForwards = input.ReadFloat(); + break; + } + case 213: { + SpeedBackwards = input.ReadFloat(); + break; + } + case 221: { + CamouflageStill = input.ReadFloat(); + break; + } + case 229: { + CamouflageMoving = input.ReadFloat(); + break; + } + case 237: { + CamouflageOnFire = input.ReadFloat(); + break; + } + case 242: { + EquipmentPreset = input.ReadString(); + break; + } + case 248: { + Weight = input.ReadUInt32(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ResearchCost : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ResearchCost()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyTankDefinitionsReflection.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 ResearchCost() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ResearchCost(ResearchCost other) : this() { + switch (other.ResearchCostTypeCase) { + case ResearchCostTypeOneofCase.Xp: + Xp = other.Xp; + break; + case ResearchCostTypeOneofCase.SeasonalTokens: + SeasonalTokens = other.SeasonalTokens.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ResearchCost Clone() { + return new ResearchCost(this); + } + + /// Field number for the "xp" field. + public const int XpFieldNumber = 1; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint Xp { + get { return HasXp ? (uint) researchCostType_ : 0; } + set { + researchCostType_ = value; + researchCostTypeCase_ = ResearchCostTypeOneofCase.Xp; + } + } + /// Gets whether the "xp" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasXp { + get { return researchCostTypeCase_ == ResearchCostTypeOneofCase.Xp; } + } + /// Clears the value of the oneof if it's currently set to "xp" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearXp() { + if (HasXp) { + ClearResearchCostType(); + } + } + + /// Field number for the "seasonal_tokens" field. + public const int SeasonalTokensFieldNumber = 2; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.ResearchCostSeasonalTokens SeasonalTokens { + get { return researchCostTypeCase_ == ResearchCostTypeOneofCase.SeasonalTokens ? (global::Blitzkit.ResearchCostSeasonalTokens) researchCostType_ : null; } + set { + researchCostType_ = value; + researchCostTypeCase_ = value == null ? ResearchCostTypeOneofCase.None : ResearchCostTypeOneofCase.SeasonalTokens; + } + } + + private object researchCostType_; + /// Enum of possible cases for the "research_cost_type" oneof. + public enum ResearchCostTypeOneofCase { + None = 0, + Xp = 1, + SeasonalTokens = 2, + } + private ResearchCostTypeOneofCase researchCostTypeCase_ = ResearchCostTypeOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ResearchCostTypeOneofCase ResearchCostTypeCase { + get { return researchCostTypeCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearResearchCostType() { + researchCostTypeCase_ = ResearchCostTypeOneofCase.None; + researchCostType_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ResearchCost); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ResearchCost other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Xp != other.Xp) return false; + if (!object.Equals(SeasonalTokens, other.SeasonalTokens)) return false; + if (ResearchCostTypeCase != other.ResearchCostTypeCase) 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 (HasXp) hash ^= Xp.GetHashCode(); + if (researchCostTypeCase_ == ResearchCostTypeOneofCase.SeasonalTokens) hash ^= SeasonalTokens.GetHashCode(); + hash ^= (int) researchCostTypeCase_; + 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 (HasXp) { + output.WriteRawTag(8); + output.WriteUInt32(Xp); + } + if (researchCostTypeCase_ == ResearchCostTypeOneofCase.SeasonalTokens) { + output.WriteRawTag(18); + output.WriteMessage(SeasonalTokens); + } + 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 (HasXp) { + output.WriteRawTag(8); + output.WriteUInt32(Xp); + } + if (researchCostTypeCase_ == ResearchCostTypeOneofCase.SeasonalTokens) { + output.WriteRawTag(18); + output.WriteMessage(SeasonalTokens); + } + 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 (HasXp) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Xp); + } + if (researchCostTypeCase_ == ResearchCostTypeOneofCase.SeasonalTokens) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(SeasonalTokens); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ResearchCost other) { + if (other == null) { + return; + } + switch (other.ResearchCostTypeCase) { + case ResearchCostTypeOneofCase.Xp: + Xp = other.Xp; + break; + case ResearchCostTypeOneofCase.SeasonalTokens: + if (SeasonalTokens == null) { + SeasonalTokens = new global::Blitzkit.ResearchCostSeasonalTokens(); + } + SeasonalTokens.MergeFrom(other.SeasonalTokens); + break; + } + + _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: { + Xp = input.ReadUInt32(); + break; + } + case 18: { + global::Blitzkit.ResearchCostSeasonalTokens subBuilder = new global::Blitzkit.ResearchCostSeasonalTokens(); + if (researchCostTypeCase_ == ResearchCostTypeOneofCase.SeasonalTokens) { + subBuilder.MergeFrom(SeasonalTokens); + } + input.ReadMessage(subBuilder); + SeasonalTokens = subBuilder; + 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: { + Xp = input.ReadUInt32(); + break; + } + case 18: { + global::Blitzkit.ResearchCostSeasonalTokens subBuilder = new global::Blitzkit.ResearchCostSeasonalTokens(); + if (researchCostTypeCase_ == ResearchCostTypeOneofCase.SeasonalTokens) { + subBuilder.MergeFrom(SeasonalTokens); + } + input.ReadMessage(subBuilder); + SeasonalTokens = subBuilder; + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ResearchCostSeasonalTokens : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ResearchCostSeasonalTokens()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyTankDefinitionsReflection.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 ResearchCostSeasonalTokens() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ResearchCostSeasonalTokens(ResearchCostSeasonalTokens other) : this() { + _hasBits0 = other._hasBits0; + season_ = other.season_; + tokens_ = other.tokens_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ResearchCostSeasonalTokens Clone() { + return new ResearchCostSeasonalTokens(this); + } + + /// Field number for the "season" field. + public const int SeasonFieldNumber = 1; + private readonly static uint SeasonDefaultValue = 0; + + private uint season_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint Season { + get { if ((_hasBits0 & 1) != 0) { return season_; } else { return SeasonDefaultValue; } } + set { + _hasBits0 |= 1; + season_ = value; + } + } + /// Gets whether the "season" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasSeason { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "season" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearSeason() { + _hasBits0 &= ~1; + } + + /// Field number for the "tokens" field. + public const int TokensFieldNumber = 2; + private readonly static uint TokensDefaultValue = 0; + + private uint tokens_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint Tokens { + get { if ((_hasBits0 & 2) != 0) { return tokens_; } else { return TokensDefaultValue; } } + set { + _hasBits0 |= 2; + tokens_ = value; + } + } + /// Gets whether the "tokens" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasTokens { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "tokens" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearTokens() { + _hasBits0 &= ~2; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ResearchCostSeasonalTokens); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ResearchCostSeasonalTokens other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Season != other.Season) return false; + if (Tokens != other.Tokens) 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 (HasSeason) hash ^= Season.GetHashCode(); + if (HasTokens) hash ^= Tokens.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 (HasSeason) { + output.WriteRawTag(8); + output.WriteUInt32(Season); + } + if (HasTokens) { + output.WriteRawTag(16); + output.WriteUInt32(Tokens); + } + 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 (HasSeason) { + output.WriteRawTag(8); + output.WriteUInt32(Season); + } + if (HasTokens) { + output.WriteRawTag(16); + output.WriteUInt32(Tokens); + } + 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 (HasSeason) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Season); + } + if (HasTokens) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Tokens); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ResearchCostSeasonalTokens other) { + if (other == null) { + return; + } + if (other.HasSeason) { + Season = other.Season; + } + if (other.HasTokens) { + Tokens = other.Tokens; + } + _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: { + Season = input.ReadUInt32(); + break; + } + case 16: { + Tokens = 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: { + Season = input.ReadUInt32(); + break; + } + case 16: { + Tokens = input.ReadUInt32(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TankPrice : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TankPrice()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyTankDefinitionsReflection.Descriptor.MessageTypes[4]; } + } + + [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 TankPrice() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TankPrice(TankPrice other) : this() { + _hasBits0 = other._hasBits0; + type_ = other.type_; + value_ = other.value_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TankPrice Clone() { + return new TankPrice(this); + } + + /// Field number for the "type" field. + public const int TypeFieldNumber = 1; + private readonly static global::Blitzkit.TankPriceType TypeDefaultValue = global::Blitzkit.TankPriceType.Credits; + + private global::Blitzkit.TankPriceType type_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.TankPriceType Type { + get { if ((_hasBits0 & 1) != 0) { return type_; } else { return TypeDefaultValue; } } + set { + _hasBits0 |= 1; + type_ = value; + } + } + /// Gets whether the "type" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasType { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "type" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearType() { + _hasBits0 &= ~1; + } + + /// Field number for the "value" field. + public const int ValueFieldNumber = 2; + private readonly static uint ValueDefaultValue = 0; + + private uint value_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint Value { + get { if ((_hasBits0 & 2) != 0) { return value_; } else { return ValueDefaultValue; } } + set { + _hasBits0 |= 2; + value_ = value; + } + } + /// Gets whether the "value" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasValue { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "value" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearValue() { + _hasBits0 &= ~2; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as TankPrice); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TankPrice other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Type != other.Type) return false; + if (Value != other.Value) 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 (HasType) hash ^= Type.GetHashCode(); + if (HasValue) hash ^= Value.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 (HasType) { + output.WriteRawTag(8); + output.WriteEnum((int) Type); + } + if (HasValue) { + output.WriteRawTag(16); + output.WriteUInt32(Value); + } + 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 (HasType) { + output.WriteRawTag(8); + output.WriteEnum((int) Type); + } + if (HasValue) { + output.WriteRawTag(16); + output.WriteUInt32(Value); + } + 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 (HasType) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type); + } + if (HasValue) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Value); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TankPrice other) { + if (other == null) { + return; + } + if (other.HasType) { + Type = other.Type; + } + if (other.HasValue) { + Value = other.Value; + } + _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: { + Type = (global::Blitzkit.TankPriceType) input.ReadEnum(); + break; + } + case 16: { + Value = 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: { + Type = (global::Blitzkit.TankPriceType) input.ReadEnum(); + break; + } + case 16: { + Value = input.ReadUInt32(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TrackDefinition : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TrackDefinition()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyTankDefinitionsReflection.Descriptor.MessageTypes[5]; } + } + + [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 TrackDefinition() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TrackDefinition(TrackDefinition other) : this() { + _hasBits0 = other._hasBits0; + id_ = other.id_; + tier_ = other.tier_; + name_ = other.name_ != null ? other.name_.Clone() : null; + weight_ = other.weight_; + traverseSpeed_ = other.traverseSpeed_; + researchCost_ = other.researchCost_ != null ? other.researchCost_.Clone() : null; + dispersionMove_ = other.dispersionMove_; + dispersionTraverse_ = other.dispersionTraverse_; + resistanceHard_ = other.resistanceHard_; + resistanceMedium_ = other.resistanceMedium_; + resistanceSoft_ = other.resistanceSoft_; + unlocks_ = other.unlocks_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TrackDefinition Clone() { + return new TrackDefinition(this); + } + + /// Field number for the "id" field. + 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; + } + } + /// Gets whether the "id" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasId { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "id" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearId() { + _hasBits0 &= ~1; + } + + /// Field number for the "tier" field. + public const int TierFieldNumber = 2; + private readonly static uint TierDefaultValue = 0; + + private uint tier_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint Tier { + get { if ((_hasBits0 & 2) != 0) { return tier_; } else { return TierDefaultValue; } } + set { + _hasBits0 |= 2; + tier_ = value; + } + } + /// Gets whether the "tier" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasTier { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "tier" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearTier() { + _hasBits0 &= ~2; + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 3; + 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; + } + } + + /// Field number for the "weight" field. + public const int WeightFieldNumber = 4; + private readonly static uint WeightDefaultValue = 0; + + private uint weight_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint Weight { + get { if ((_hasBits0 & 4) != 0) { return weight_; } else { return WeightDefaultValue; } } + set { + _hasBits0 |= 4; + weight_ = value; + } + } + /// Gets whether the "weight" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasWeight { + get { return (_hasBits0 & 4) != 0; } + } + /// Clears the value of the "weight" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearWeight() { + _hasBits0 &= ~4; + } + + /// Field number for the "traverse_speed" field. + public const int TraverseSpeedFieldNumber = 5; + private readonly static float TraverseSpeedDefaultValue = 0F; + + private float traverseSpeed_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float TraverseSpeed { + get { if ((_hasBits0 & 8) != 0) { return traverseSpeed_; } else { return TraverseSpeedDefaultValue; } } + set { + _hasBits0 |= 8; + traverseSpeed_ = value; + } + } + /// Gets whether the "traverse_speed" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasTraverseSpeed { + get { return (_hasBits0 & 8) != 0; } + } + /// Clears the value of the "traverse_speed" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearTraverseSpeed() { + _hasBits0 &= ~8; + } + + /// Field number for the "research_cost" field. + public const int ResearchCostFieldNumber = 6; + private global::Blitzkit.ResearchCost researchCost_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.ResearchCost ResearchCost { + get { return researchCost_; } + set { + researchCost_ = value; + } + } + + /// Field number for the "dispersion_move" field. + public const int DispersionMoveFieldNumber = 7; + private readonly static float DispersionMoveDefaultValue = 0F; + + private float dispersionMove_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float DispersionMove { + get { if ((_hasBits0 & 16) != 0) { return dispersionMove_; } else { return DispersionMoveDefaultValue; } } + set { + _hasBits0 |= 16; + dispersionMove_ = value; + } + } + /// Gets whether the "dispersion_move" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasDispersionMove { + get { return (_hasBits0 & 16) != 0; } + } + /// Clears the value of the "dispersion_move" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearDispersionMove() { + _hasBits0 &= ~16; + } + + /// Field number for the "dispersion_traverse" field. + public const int DispersionTraverseFieldNumber = 8; + private readonly static float DispersionTraverseDefaultValue = 0F; + + private float dispersionTraverse_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float DispersionTraverse { + get { if ((_hasBits0 & 32) != 0) { return dispersionTraverse_; } else { return DispersionTraverseDefaultValue; } } + set { + _hasBits0 |= 32; + dispersionTraverse_ = value; + } + } + /// Gets whether the "dispersion_traverse" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasDispersionTraverse { + get { return (_hasBits0 & 32) != 0; } + } + /// Clears the value of the "dispersion_traverse" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearDispersionTraverse() { + _hasBits0 &= ~32; + } + + /// Field number for the "resistance_hard" field. + public const int ResistanceHardFieldNumber = 9; + private readonly static float ResistanceHardDefaultValue = 0F; + + private float resistanceHard_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float ResistanceHard { + get { if ((_hasBits0 & 64) != 0) { return resistanceHard_; } else { return ResistanceHardDefaultValue; } } + set { + _hasBits0 |= 64; + resistanceHard_ = value; + } + } + /// Gets whether the "resistance_hard" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasResistanceHard { + get { return (_hasBits0 & 64) != 0; } + } + /// Clears the value of the "resistance_hard" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearResistanceHard() { + _hasBits0 &= ~64; + } + + /// Field number for the "resistance_medium" field. + public const int ResistanceMediumFieldNumber = 10; + private readonly static float ResistanceMediumDefaultValue = 0F; + + private float resistanceMedium_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float ResistanceMedium { + get { if ((_hasBits0 & 128) != 0) { return resistanceMedium_; } else { return ResistanceMediumDefaultValue; } } + set { + _hasBits0 |= 128; + resistanceMedium_ = value; + } + } + /// Gets whether the "resistance_medium" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasResistanceMedium { + get { return (_hasBits0 & 128) != 0; } + } + /// Clears the value of the "resistance_medium" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearResistanceMedium() { + _hasBits0 &= ~128; + } + + /// Field number for the "resistance_soft" field. + public const int ResistanceSoftFieldNumber = 11; + private readonly static float ResistanceSoftDefaultValue = 0F; + + private float resistanceSoft_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float ResistanceSoft { + get { if ((_hasBits0 & 256) != 0) { return resistanceSoft_; } else { return ResistanceSoftDefaultValue; } } + set { + _hasBits0 |= 256; + resistanceSoft_ = value; + } + } + /// Gets whether the "resistance_soft" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasResistanceSoft { + get { return (_hasBits0 & 256) != 0; } + } + /// Clears the value of the "resistance_soft" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearResistanceSoft() { + _hasBits0 &= ~256; + } + + /// Field number for the "unlocks" field. + public const int UnlocksFieldNumber = 12; + private static readonly pb::FieldCodec _repeated_unlocks_codec + = pb::FieldCodec.ForMessage(98, global::Blitzkit.Unlock.Parser); + private readonly pbc::RepeatedField unlocks_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Unlocks { + get { return unlocks_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as TrackDefinition); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TrackDefinition other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Id != other.Id) return false; + if (Tier != other.Tier) return false; + if (!object.Equals(Name, other.Name)) return false; + if (Weight != other.Weight) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(TraverseSpeed, other.TraverseSpeed)) return false; + if (!object.Equals(ResearchCost, other.ResearchCost)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(DispersionMove, other.DispersionMove)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(DispersionTraverse, other.DispersionTraverse)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(ResistanceHard, other.ResistanceHard)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(ResistanceMedium, other.ResistanceMedium)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(ResistanceSoft, other.ResistanceSoft)) return false; + if(!unlocks_.Equals(other.unlocks_)) 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 (HasTier) hash ^= Tier.GetHashCode(); + if (name_ != null) hash ^= Name.GetHashCode(); + if (HasWeight) hash ^= Weight.GetHashCode(); + if (HasTraverseSpeed) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(TraverseSpeed); + if (researchCost_ != null) hash ^= ResearchCost.GetHashCode(); + if (HasDispersionMove) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(DispersionMove); + if (HasDispersionTraverse) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(DispersionTraverse); + if (HasResistanceHard) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(ResistanceHard); + if (HasResistanceMedium) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(ResistanceMedium); + if (HasResistanceSoft) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(ResistanceSoft); + hash ^= unlocks_.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 (HasTier) { + output.WriteRawTag(16); + output.WriteUInt32(Tier); + } + if (name_ != null) { + output.WriteRawTag(26); + output.WriteMessage(Name); + } + if (HasWeight) { + output.WriteRawTag(32); + output.WriteUInt32(Weight); + } + if (HasTraverseSpeed) { + output.WriteRawTag(45); + output.WriteFloat(TraverseSpeed); + } + if (researchCost_ != null) { + output.WriteRawTag(50); + output.WriteMessage(ResearchCost); + } + if (HasDispersionMove) { + output.WriteRawTag(61); + output.WriteFloat(DispersionMove); + } + if (HasDispersionTraverse) { + output.WriteRawTag(69); + output.WriteFloat(DispersionTraverse); + } + if (HasResistanceHard) { + output.WriteRawTag(77); + output.WriteFloat(ResistanceHard); + } + if (HasResistanceMedium) { + output.WriteRawTag(85); + output.WriteFloat(ResistanceMedium); + } + if (HasResistanceSoft) { + output.WriteRawTag(93); + output.WriteFloat(ResistanceSoft); + } + unlocks_.WriteTo(output, _repeated_unlocks_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 (HasTier) { + output.WriteRawTag(16); + output.WriteUInt32(Tier); + } + if (name_ != null) { + output.WriteRawTag(26); + output.WriteMessage(Name); + } + if (HasWeight) { + output.WriteRawTag(32); + output.WriteUInt32(Weight); + } + if (HasTraverseSpeed) { + output.WriteRawTag(45); + output.WriteFloat(TraverseSpeed); + } + if (researchCost_ != null) { + output.WriteRawTag(50); + output.WriteMessage(ResearchCost); + } + if (HasDispersionMove) { + output.WriteRawTag(61); + output.WriteFloat(DispersionMove); + } + if (HasDispersionTraverse) { + output.WriteRawTag(69); + output.WriteFloat(DispersionTraverse); + } + if (HasResistanceHard) { + output.WriteRawTag(77); + output.WriteFloat(ResistanceHard); + } + if (HasResistanceMedium) { + output.WriteRawTag(85); + output.WriteFloat(ResistanceMedium); + } + if (HasResistanceSoft) { + output.WriteRawTag(93); + output.WriteFloat(ResistanceSoft); + } + unlocks_.WriteTo(ref output, _repeated_unlocks_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 (HasTier) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Tier); + } + if (name_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Name); + } + if (HasWeight) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Weight); + } + if (HasTraverseSpeed) { + size += 1 + 4; + } + if (researchCost_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ResearchCost); + } + if (HasDispersionMove) { + size += 1 + 4; + } + if (HasDispersionTraverse) { + size += 1 + 4; + } + if (HasResistanceHard) { + size += 1 + 4; + } + if (HasResistanceMedium) { + size += 1 + 4; + } + if (HasResistanceSoft) { + size += 1 + 4; + } + size += unlocks_.CalculateSize(_repeated_unlocks_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TrackDefinition other) { + if (other == null) { + return; + } + if (other.HasId) { + Id = other.Id; + } + if (other.HasTier) { + Tier = other.Tier; + } + if (other.name_ != null) { + if (name_ == null) { + Name = new global::Blitzkit.I18nString(); + } + Name.MergeFrom(other.Name); + } + if (other.HasWeight) { + Weight = other.Weight; + } + if (other.HasTraverseSpeed) { + TraverseSpeed = other.TraverseSpeed; + } + if (other.researchCost_ != null) { + if (researchCost_ == null) { + ResearchCost = new global::Blitzkit.ResearchCost(); + } + ResearchCost.MergeFrom(other.ResearchCost); + } + if (other.HasDispersionMove) { + DispersionMove = other.DispersionMove; + } + if (other.HasDispersionTraverse) { + DispersionTraverse = other.DispersionTraverse; + } + if (other.HasResistanceHard) { + ResistanceHard = other.ResistanceHard; + } + if (other.HasResistanceMedium) { + ResistanceMedium = other.ResistanceMedium; + } + if (other.HasResistanceSoft) { + ResistanceSoft = other.ResistanceSoft; + } + unlocks_.Add(other.unlocks_); + _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 16: { + Tier = input.ReadUInt32(); + break; + } + case 26: { + if (name_ == null) { + Name = new global::Blitzkit.I18nString(); + } + input.ReadMessage(Name); + break; + } + case 32: { + Weight = input.ReadUInt32(); + break; + } + case 45: { + TraverseSpeed = input.ReadFloat(); + break; + } + case 50: { + if (researchCost_ == null) { + ResearchCost = new global::Blitzkit.ResearchCost(); + } + input.ReadMessage(ResearchCost); + break; + } + case 61: { + DispersionMove = input.ReadFloat(); + break; + } + case 69: { + DispersionTraverse = input.ReadFloat(); + break; + } + case 77: { + ResistanceHard = input.ReadFloat(); + break; + } + case 85: { + ResistanceMedium = input.ReadFloat(); + break; + } + case 93: { + ResistanceSoft = input.ReadFloat(); + break; + } + case 98: { + unlocks_.AddEntriesFrom(input, _repeated_unlocks_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 16: { + Tier = input.ReadUInt32(); + break; + } + case 26: { + if (name_ == null) { + Name = new global::Blitzkit.I18nString(); + } + input.ReadMessage(Name); + break; + } + case 32: { + Weight = input.ReadUInt32(); + break; + } + case 45: { + TraverseSpeed = input.ReadFloat(); + break; + } + case 50: { + if (researchCost_ == null) { + ResearchCost = new global::Blitzkit.ResearchCost(); + } + input.ReadMessage(ResearchCost); + break; + } + case 61: { + DispersionMove = input.ReadFloat(); + break; + } + case 69: { + DispersionTraverse = input.ReadFloat(); + break; + } + case 77: { + ResistanceHard = input.ReadFloat(); + break; + } + case 85: { + ResistanceMedium = input.ReadFloat(); + break; + } + case 93: { + ResistanceSoft = input.ReadFloat(); + break; + } + case 98: { + unlocks_.AddEntriesFrom(ref input, _repeated_unlocks_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EngineDefinition : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EngineDefinition()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyTankDefinitionsReflection.Descriptor.MessageTypes[6]; } + } + + [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 EngineDefinition() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EngineDefinition(EngineDefinition other) : this() { + _hasBits0 = other._hasBits0; + id_ = other.id_; + name_ = other.name_ != null ? other.name_.Clone() : null; + researchCost_ = other.researchCost_ != null ? other.researchCost_.Clone() : null; + tier_ = other.tier_; + fireChance_ = other.fireChance_; + power_ = other.power_; + weight_ = other.weight_; + unlocks_ = other.unlocks_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EngineDefinition Clone() { + return new EngineDefinition(this); + } + + /// Field number for the "id" field. + 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; + } + } + /// Gets whether the "id" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasId { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "id" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearId() { + _hasBits0 &= ~1; + } + + /// Field number for the "name" field. + 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; + } + } + + /// Field number for the "research_cost" field. + public const int ResearchCostFieldNumber = 3; + private global::Blitzkit.ResearchCost researchCost_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.ResearchCost ResearchCost { + get { return researchCost_; } + set { + researchCost_ = value; + } + } + + /// Field number for the "tier" field. + public const int TierFieldNumber = 4; + private readonly static uint TierDefaultValue = 0; + + private uint tier_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint Tier { + get { if ((_hasBits0 & 2) != 0) { return tier_; } else { return TierDefaultValue; } } + set { + _hasBits0 |= 2; + tier_ = value; + } + } + /// Gets whether the "tier" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasTier { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "tier" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearTier() { + _hasBits0 &= ~2; + } + + /// Field number for the "fire_chance" field. + public const int FireChanceFieldNumber = 5; + private readonly static float FireChanceDefaultValue = 0F; + + private float fireChance_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float FireChance { + get { if ((_hasBits0 & 4) != 0) { return fireChance_; } else { return FireChanceDefaultValue; } } + set { + _hasBits0 |= 4; + fireChance_ = value; + } + } + /// Gets whether the "fire_chance" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasFireChance { + get { return (_hasBits0 & 4) != 0; } + } + /// Clears the value of the "fire_chance" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearFireChance() { + _hasBits0 &= ~4; + } + + /// Field number for the "power" field. + public const int PowerFieldNumber = 6; + private readonly static uint PowerDefaultValue = 0; + + private uint power_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint Power { + get { if ((_hasBits0 & 8) != 0) { return power_; } else { return PowerDefaultValue; } } + set { + _hasBits0 |= 8; + power_ = value; + } + } + /// Gets whether the "power" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasPower { + get { return (_hasBits0 & 8) != 0; } + } + /// Clears the value of the "power" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearPower() { + _hasBits0 &= ~8; + } + + /// Field number for the "weight" field. + public const int WeightFieldNumber = 7; + private readonly static uint WeightDefaultValue = 0; + + private uint weight_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint Weight { + get { if ((_hasBits0 & 16) != 0) { return weight_; } else { return WeightDefaultValue; } } + set { + _hasBits0 |= 16; + weight_ = value; + } + } + /// Gets whether the "weight" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasWeight { + get { return (_hasBits0 & 16) != 0; } + } + /// Clears the value of the "weight" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearWeight() { + _hasBits0 &= ~16; + } + + /// Field number for the "unlocks" field. + public const int UnlocksFieldNumber = 8; + private static readonly pb::FieldCodec _repeated_unlocks_codec + = pb::FieldCodec.ForMessage(66, global::Blitzkit.Unlock.Parser); + private readonly pbc::RepeatedField unlocks_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Unlocks { + get { return unlocks_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as EngineDefinition); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(EngineDefinition 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(ResearchCost, other.ResearchCost)) return false; + if (Tier != other.Tier) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(FireChance, other.FireChance)) return false; + if (Power != other.Power) return false; + if (Weight != other.Weight) return false; + if(!unlocks_.Equals(other.unlocks_)) 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 (researchCost_ != null) hash ^= ResearchCost.GetHashCode(); + if (HasTier) hash ^= Tier.GetHashCode(); + if (HasFireChance) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(FireChance); + if (HasPower) hash ^= Power.GetHashCode(); + if (HasWeight) hash ^= Weight.GetHashCode(); + hash ^= unlocks_.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 (researchCost_ != null) { + output.WriteRawTag(26); + output.WriteMessage(ResearchCost); + } + if (HasTier) { + output.WriteRawTag(32); + output.WriteUInt32(Tier); + } + if (HasFireChance) { + output.WriteRawTag(45); + output.WriteFloat(FireChance); + } + if (HasPower) { + output.WriteRawTag(48); + output.WriteUInt32(Power); + } + if (HasWeight) { + output.WriteRawTag(56); + output.WriteUInt32(Weight); + } + unlocks_.WriteTo(output, _repeated_unlocks_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 (researchCost_ != null) { + output.WriteRawTag(26); + output.WriteMessage(ResearchCost); + } + if (HasTier) { + output.WriteRawTag(32); + output.WriteUInt32(Tier); + } + if (HasFireChance) { + output.WriteRawTag(45); + output.WriteFloat(FireChance); + } + if (HasPower) { + output.WriteRawTag(48); + output.WriteUInt32(Power); + } + if (HasWeight) { + output.WriteRawTag(56); + output.WriteUInt32(Weight); + } + unlocks_.WriteTo(ref output, _repeated_unlocks_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 (researchCost_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ResearchCost); + } + if (HasTier) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Tier); + } + if (HasFireChance) { + size += 1 + 4; + } + if (HasPower) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Power); + } + if (HasWeight) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Weight); + } + size += unlocks_.CalculateSize(_repeated_unlocks_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(EngineDefinition 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.researchCost_ != null) { + if (researchCost_ == null) { + ResearchCost = new global::Blitzkit.ResearchCost(); + } + ResearchCost.MergeFrom(other.ResearchCost); + } + if (other.HasTier) { + Tier = other.Tier; + } + if (other.HasFireChance) { + FireChance = other.FireChance; + } + if (other.HasPower) { + Power = other.Power; + } + if (other.HasWeight) { + Weight = other.Weight; + } + unlocks_.Add(other.unlocks_); + _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 (researchCost_ == null) { + ResearchCost = new global::Blitzkit.ResearchCost(); + } + input.ReadMessage(ResearchCost); + break; + } + case 32: { + Tier = input.ReadUInt32(); + break; + } + case 45: { + FireChance = input.ReadFloat(); + break; + } + case 48: { + Power = input.ReadUInt32(); + break; + } + case 56: { + Weight = input.ReadUInt32(); + break; + } + case 66: { + unlocks_.AddEntriesFrom(input, _repeated_unlocks_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 26: { + if (researchCost_ == null) { + ResearchCost = new global::Blitzkit.ResearchCost(); + } + input.ReadMessage(ResearchCost); + break; + } + case 32: { + Tier = input.ReadUInt32(); + break; + } + case 45: { + FireChance = input.ReadFloat(); + break; + } + case 48: { + Power = input.ReadUInt32(); + break; + } + case 56: { + Weight = input.ReadUInt32(); + break; + } + case 66: { + unlocks_.AddEntriesFrom(ref input, _repeated_unlocks_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TurretDefinition : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TurretDefinition()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyTankDefinitionsReflection.Descriptor.MessageTypes[7]; } + } + + [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 TurretDefinition() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TurretDefinition(TurretDefinition other) : this() { + _hasBits0 = other._hasBits0; + id_ = other.id_; + health_ = other.health_; + viewRange_ = other.viewRange_; + traverseSpeed_ = other.traverseSpeed_; + researchCost_ = other.researchCost_ != null ? other.researchCost_.Clone() : null; + name_ = other.name_ != null ? other.name_.Clone() : null; + tier_ = other.tier_; + weight_ = other.weight_; + guns_ = other.guns_.Clone(); + unlocks_ = other.unlocks_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TurretDefinition Clone() { + return new TurretDefinition(this); + } + + /// Field number for the "id" field. + 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; + } + } + /// Gets whether the "id" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasId { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "id" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearId() { + _hasBits0 &= ~1; + } + + /// Field number for the "health" field. + public const int HealthFieldNumber = 2; + private readonly static uint HealthDefaultValue = 0; + + private uint health_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint Health { + get { if ((_hasBits0 & 2) != 0) { return health_; } else { return HealthDefaultValue; } } + set { + _hasBits0 |= 2; + health_ = value; + } + } + /// Gets whether the "health" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasHealth { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "health" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearHealth() { + _hasBits0 &= ~2; + } + + /// Field number for the "view_range" field. + public const int ViewRangeFieldNumber = 3; + private readonly static uint ViewRangeDefaultValue = 0; + + private uint viewRange_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint ViewRange { + get { if ((_hasBits0 & 4) != 0) { return viewRange_; } else { return ViewRangeDefaultValue; } } + set { + _hasBits0 |= 4; + viewRange_ = value; + } + } + /// Gets whether the "view_range" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasViewRange { + get { return (_hasBits0 & 4) != 0; } + } + /// Clears the value of the "view_range" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearViewRange() { + _hasBits0 &= ~4; + } + + /// Field number for the "traverse_speed" field. + public const int TraverseSpeedFieldNumber = 4; + private readonly static float TraverseSpeedDefaultValue = 0F; + + private float traverseSpeed_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float TraverseSpeed { + get { if ((_hasBits0 & 8) != 0) { return traverseSpeed_; } else { return TraverseSpeedDefaultValue; } } + set { + _hasBits0 |= 8; + traverseSpeed_ = value; + } + } + /// Gets whether the "traverse_speed" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasTraverseSpeed { + get { return (_hasBits0 & 8) != 0; } + } + /// Clears the value of the "traverse_speed" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearTraverseSpeed() { + _hasBits0 &= ~8; + } + + /// Field number for the "research_cost" field. + public const int ResearchCostFieldNumber = 5; + private global::Blitzkit.ResearchCost researchCost_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.ResearchCost ResearchCost { + get { return researchCost_; } + set { + researchCost_ = value; + } + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 6; + 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; + } + } + + /// Field number for the "tier" field. + public const int TierFieldNumber = 7; + private readonly static uint TierDefaultValue = 0; + + private uint tier_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint Tier { + get { if ((_hasBits0 & 16) != 0) { return tier_; } else { return TierDefaultValue; } } + set { + _hasBits0 |= 16; + tier_ = value; + } + } + /// Gets whether the "tier" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasTier { + get { return (_hasBits0 & 16) != 0; } + } + /// Clears the value of the "tier" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearTier() { + _hasBits0 &= ~16; + } + + /// Field number for the "weight" field. + public const int WeightFieldNumber = 8; + private readonly static uint WeightDefaultValue = 0; + + private uint weight_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint Weight { + get { if ((_hasBits0 & 32) != 0) { return weight_; } else { return WeightDefaultValue; } } + set { + _hasBits0 |= 32; + weight_ = value; + } + } + /// Gets whether the "weight" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasWeight { + get { return (_hasBits0 & 32) != 0; } + } + /// Clears the value of the "weight" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearWeight() { + _hasBits0 &= ~32; + } + + /// Field number for the "guns" field. + public const int GunsFieldNumber = 9; + private static readonly pb::FieldCodec _repeated_guns_codec + = pb::FieldCodec.ForMessage(74, global::Blitzkit.GunDefinition.Parser); + private readonly pbc::RepeatedField guns_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Guns { + get { return guns_; } + } + + /// Field number for the "unlocks" field. + public const int UnlocksFieldNumber = 10; + private static readonly pb::FieldCodec _repeated_unlocks_codec + = pb::FieldCodec.ForMessage(82, global::Blitzkit.Unlock.Parser); + private readonly pbc::RepeatedField unlocks_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Unlocks { + get { return unlocks_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as TurretDefinition); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TurretDefinition other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Id != other.Id) return false; + if (Health != other.Health) return false; + if (ViewRange != other.ViewRange) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(TraverseSpeed, other.TraverseSpeed)) return false; + if (!object.Equals(ResearchCost, other.ResearchCost)) return false; + if (!object.Equals(Name, other.Name)) return false; + if (Tier != other.Tier) return false; + if (Weight != other.Weight) return false; + if(!guns_.Equals(other.guns_)) return false; + if(!unlocks_.Equals(other.unlocks_)) 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 (HasHealth) hash ^= Health.GetHashCode(); + if (HasViewRange) hash ^= ViewRange.GetHashCode(); + if (HasTraverseSpeed) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(TraverseSpeed); + if (researchCost_ != null) hash ^= ResearchCost.GetHashCode(); + if (name_ != null) hash ^= Name.GetHashCode(); + if (HasTier) hash ^= Tier.GetHashCode(); + if (HasWeight) hash ^= Weight.GetHashCode(); + hash ^= guns_.GetHashCode(); + hash ^= unlocks_.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 (HasHealth) { + output.WriteRawTag(16); + output.WriteUInt32(Health); + } + if (HasViewRange) { + output.WriteRawTag(24); + output.WriteUInt32(ViewRange); + } + if (HasTraverseSpeed) { + output.WriteRawTag(37); + output.WriteFloat(TraverseSpeed); + } + if (researchCost_ != null) { + output.WriteRawTag(42); + output.WriteMessage(ResearchCost); + } + if (name_ != null) { + output.WriteRawTag(50); + output.WriteMessage(Name); + } + if (HasTier) { + output.WriteRawTag(56); + output.WriteUInt32(Tier); + } + if (HasWeight) { + output.WriteRawTag(64); + output.WriteUInt32(Weight); + } + guns_.WriteTo(output, _repeated_guns_codec); + unlocks_.WriteTo(output, _repeated_unlocks_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 (HasHealth) { + output.WriteRawTag(16); + output.WriteUInt32(Health); + } + if (HasViewRange) { + output.WriteRawTag(24); + output.WriteUInt32(ViewRange); + } + if (HasTraverseSpeed) { + output.WriteRawTag(37); + output.WriteFloat(TraverseSpeed); + } + if (researchCost_ != null) { + output.WriteRawTag(42); + output.WriteMessage(ResearchCost); + } + if (name_ != null) { + output.WriteRawTag(50); + output.WriteMessage(Name); + } + if (HasTier) { + output.WriteRawTag(56); + output.WriteUInt32(Tier); + } + if (HasWeight) { + output.WriteRawTag(64); + output.WriteUInt32(Weight); + } + guns_.WriteTo(ref output, _repeated_guns_codec); + unlocks_.WriteTo(ref output, _repeated_unlocks_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 (HasHealth) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Health); + } + if (HasViewRange) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(ViewRange); + } + if (HasTraverseSpeed) { + size += 1 + 4; + } + if (researchCost_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ResearchCost); + } + if (name_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Name); + } + if (HasTier) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Tier); + } + if (HasWeight) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Weight); + } + size += guns_.CalculateSize(_repeated_guns_codec); + size += unlocks_.CalculateSize(_repeated_unlocks_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TurretDefinition other) { + if (other == null) { + return; + } + if (other.HasId) { + Id = other.Id; + } + if (other.HasHealth) { + Health = other.Health; + } + if (other.HasViewRange) { + ViewRange = other.ViewRange; + } + if (other.HasTraverseSpeed) { + TraverseSpeed = other.TraverseSpeed; + } + if (other.researchCost_ != null) { + if (researchCost_ == null) { + ResearchCost = new global::Blitzkit.ResearchCost(); + } + ResearchCost.MergeFrom(other.ResearchCost); + } + if (other.name_ != null) { + if (name_ == null) { + Name = new global::Blitzkit.I18nString(); + } + Name.MergeFrom(other.Name); + } + if (other.HasTier) { + Tier = other.Tier; + } + if (other.HasWeight) { + Weight = other.Weight; + } + guns_.Add(other.guns_); + unlocks_.Add(other.unlocks_); + _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 16: { + Health = input.ReadUInt32(); + break; + } + case 24: { + ViewRange = input.ReadUInt32(); + break; + } + case 37: { + TraverseSpeed = input.ReadFloat(); + break; + } + case 42: { + if (researchCost_ == null) { + ResearchCost = new global::Blitzkit.ResearchCost(); + } + input.ReadMessage(ResearchCost); + break; + } + case 50: { + if (name_ == null) { + Name = new global::Blitzkit.I18nString(); + } + input.ReadMessage(Name); + break; + } + case 56: { + Tier = input.ReadUInt32(); + break; + } + case 64: { + Weight = input.ReadUInt32(); + break; + } + case 74: { + guns_.AddEntriesFrom(input, _repeated_guns_codec); + break; + } + case 82: { + unlocks_.AddEntriesFrom(input, _repeated_unlocks_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 16: { + Health = input.ReadUInt32(); + break; + } + case 24: { + ViewRange = input.ReadUInt32(); + break; + } + case 37: { + TraverseSpeed = input.ReadFloat(); + break; + } + case 42: { + if (researchCost_ == null) { + ResearchCost = new global::Blitzkit.ResearchCost(); + } + input.ReadMessage(ResearchCost); + break; + } + case 50: { + if (name_ == null) { + Name = new global::Blitzkit.I18nString(); + } + input.ReadMessage(Name); + break; + } + case 56: { + Tier = input.ReadUInt32(); + break; + } + case 64: { + Weight = input.ReadUInt32(); + break; + } + case 74: { + guns_.AddEntriesFrom(ref input, _repeated_guns_codec); + break; + } + case 82: { + unlocks_.AddEntriesFrom(ref input, _repeated_unlocks_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GunDefinition : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GunDefinition()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyTankDefinitionsReflection.Descriptor.MessageTypes[8]; } + } + + [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 GunDefinition() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GunDefinition(GunDefinition other) : this() { + switch (other.GunTypeCase) { + case GunTypeOneofCase.Regular: + Regular = other.Regular.Clone(); + break; + case GunTypeOneofCase.AutoLoader: + AutoLoader = other.AutoLoader.Clone(); + break; + case GunTypeOneofCase.AutoReloader: + AutoReloader = other.AutoReloader.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GunDefinition Clone() { + return new GunDefinition(this); + } + + /// Field number for the "regular" field. + public const int RegularFieldNumber = 1; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.GunDefinitionRegular Regular { + get { return gunTypeCase_ == GunTypeOneofCase.Regular ? (global::Blitzkit.GunDefinitionRegular) gunType_ : null; } + set { + gunType_ = value; + gunTypeCase_ = value == null ? GunTypeOneofCase.None : GunTypeOneofCase.Regular; + } + } + + /// Field number for the "auto_loader" field. + public const int AutoLoaderFieldNumber = 2; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.GunDefinitionAutoLoader AutoLoader { + get { return gunTypeCase_ == GunTypeOneofCase.AutoLoader ? (global::Blitzkit.GunDefinitionAutoLoader) gunType_ : null; } + set { + gunType_ = value; + gunTypeCase_ = value == null ? GunTypeOneofCase.None : GunTypeOneofCase.AutoLoader; + } + } + + /// Field number for the "auto_reloader" field. + public const int AutoReloaderFieldNumber = 3; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.GunDefinitionAutoReloader AutoReloader { + get { return gunTypeCase_ == GunTypeOneofCase.AutoReloader ? (global::Blitzkit.GunDefinitionAutoReloader) gunType_ : null; } + set { + gunType_ = value; + gunTypeCase_ = value == null ? GunTypeOneofCase.None : GunTypeOneofCase.AutoReloader; + } + } + + private object gunType_; + /// Enum of possible cases for the "gun_type" oneof. + public enum GunTypeOneofCase { + None = 0, + Regular = 1, + AutoLoader = 2, + AutoReloader = 3, + } + private GunTypeOneofCase gunTypeCase_ = GunTypeOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GunTypeOneofCase GunTypeCase { + get { return gunTypeCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearGunType() { + gunTypeCase_ = GunTypeOneofCase.None; + gunType_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GunDefinition); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GunDefinition other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(Regular, other.Regular)) return false; + if (!object.Equals(AutoLoader, other.AutoLoader)) return false; + if (!object.Equals(AutoReloader, other.AutoReloader)) return false; + if (GunTypeCase != other.GunTypeCase) 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 (gunTypeCase_ == GunTypeOneofCase.Regular) hash ^= Regular.GetHashCode(); + if (gunTypeCase_ == GunTypeOneofCase.AutoLoader) hash ^= AutoLoader.GetHashCode(); + if (gunTypeCase_ == GunTypeOneofCase.AutoReloader) hash ^= AutoReloader.GetHashCode(); + hash ^= (int) gunTypeCase_; + 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 (gunTypeCase_ == GunTypeOneofCase.Regular) { + output.WriteRawTag(10); + output.WriteMessage(Regular); + } + if (gunTypeCase_ == GunTypeOneofCase.AutoLoader) { + output.WriteRawTag(18); + output.WriteMessage(AutoLoader); + } + if (gunTypeCase_ == GunTypeOneofCase.AutoReloader) { + output.WriteRawTag(26); + output.WriteMessage(AutoReloader); + } + 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 (gunTypeCase_ == GunTypeOneofCase.Regular) { + output.WriteRawTag(10); + output.WriteMessage(Regular); + } + if (gunTypeCase_ == GunTypeOneofCase.AutoLoader) { + output.WriteRawTag(18); + output.WriteMessage(AutoLoader); + } + if (gunTypeCase_ == GunTypeOneofCase.AutoReloader) { + output.WriteRawTag(26); + output.WriteMessage(AutoReloader); + } + 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 (gunTypeCase_ == GunTypeOneofCase.Regular) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Regular); + } + if (gunTypeCase_ == GunTypeOneofCase.AutoLoader) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(AutoLoader); + } + if (gunTypeCase_ == GunTypeOneofCase.AutoReloader) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(AutoReloader); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GunDefinition other) { + if (other == null) { + return; + } + switch (other.GunTypeCase) { + case GunTypeOneofCase.Regular: + if (Regular == null) { + Regular = new global::Blitzkit.GunDefinitionRegular(); + } + Regular.MergeFrom(other.Regular); + break; + case GunTypeOneofCase.AutoLoader: + if (AutoLoader == null) { + AutoLoader = new global::Blitzkit.GunDefinitionAutoLoader(); + } + AutoLoader.MergeFrom(other.AutoLoader); + break; + case GunTypeOneofCase.AutoReloader: + if (AutoReloader == null) { + AutoReloader = new global::Blitzkit.GunDefinitionAutoReloader(); + } + AutoReloader.MergeFrom(other.AutoReloader); + break; + } + + _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: { + global::Blitzkit.GunDefinitionRegular subBuilder = new global::Blitzkit.GunDefinitionRegular(); + if (gunTypeCase_ == GunTypeOneofCase.Regular) { + subBuilder.MergeFrom(Regular); + } + input.ReadMessage(subBuilder); + Regular = subBuilder; + break; + } + case 18: { + global::Blitzkit.GunDefinitionAutoLoader subBuilder = new global::Blitzkit.GunDefinitionAutoLoader(); + if (gunTypeCase_ == GunTypeOneofCase.AutoLoader) { + subBuilder.MergeFrom(AutoLoader); + } + input.ReadMessage(subBuilder); + AutoLoader = subBuilder; + break; + } + case 26: { + global::Blitzkit.GunDefinitionAutoReloader subBuilder = new global::Blitzkit.GunDefinitionAutoReloader(); + if (gunTypeCase_ == GunTypeOneofCase.AutoReloader) { + subBuilder.MergeFrom(AutoReloader); + } + input.ReadMessage(subBuilder); + AutoReloader = subBuilder; + 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: { + global::Blitzkit.GunDefinitionRegular subBuilder = new global::Blitzkit.GunDefinitionRegular(); + if (gunTypeCase_ == GunTypeOneofCase.Regular) { + subBuilder.MergeFrom(Regular); + } + input.ReadMessage(subBuilder); + Regular = subBuilder; + break; + } + case 18: { + global::Blitzkit.GunDefinitionAutoLoader subBuilder = new global::Blitzkit.GunDefinitionAutoLoader(); + if (gunTypeCase_ == GunTypeOneofCase.AutoLoader) { + subBuilder.MergeFrom(AutoLoader); + } + input.ReadMessage(subBuilder); + AutoLoader = subBuilder; + break; + } + case 26: { + global::Blitzkit.GunDefinitionAutoReloader subBuilder = new global::Blitzkit.GunDefinitionAutoReloader(); + if (gunTypeCase_ == GunTypeOneofCase.AutoReloader) { + subBuilder.MergeFrom(AutoReloader); + } + input.ReadMessage(subBuilder); + AutoReloader = subBuilder; + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GunDefinitionRegular : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GunDefinitionRegular()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyTankDefinitionsReflection.Descriptor.MessageTypes[9]; } + } + + [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 GunDefinitionRegular() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GunDefinitionRegular(GunDefinitionRegular other) : this() { + base_ = other.base_ != null ? other.base_.Clone() : null; + extension_ = other.extension_ != null ? other.extension_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GunDefinitionRegular Clone() { + return new GunDefinitionRegular(this); + } + + /// Field number for the "base" field. + public const int BaseFieldNumber = 1; + private global::Blitzkit.GunDefinitionBase base_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.GunDefinitionBase Base { + get { return base_; } + set { + base_ = value; + } + } + + /// Field number for the "extension" field. + public const int ExtensionFieldNumber = 2; + private global::Blitzkit.GunDefinitionRegularProperties extension_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.GunDefinitionRegularProperties Extension { + get { return extension_; } + set { + extension_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GunDefinitionRegular); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GunDefinitionRegular other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(Base, other.Base)) return false; + if (!object.Equals(Extension, other.Extension)) 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 (base_ != null) hash ^= Base.GetHashCode(); + if (extension_ != null) hash ^= Extension.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 (base_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Base); + } + if (extension_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Extension); + } + 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 (base_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Base); + } + if (extension_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Extension); + } + 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 (base_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Base); + } + if (extension_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Extension); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GunDefinitionRegular other) { + if (other == null) { + return; + } + if (other.base_ != null) { + if (base_ == null) { + Base = new global::Blitzkit.GunDefinitionBase(); + } + Base.MergeFrom(other.Base); + } + if (other.extension_ != null) { + if (extension_ == null) { + Extension = new global::Blitzkit.GunDefinitionRegularProperties(); + } + Extension.MergeFrom(other.Extension); + } + _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 (base_ == null) { + Base = new global::Blitzkit.GunDefinitionBase(); + } + input.ReadMessage(Base); + break; + } + case 18: { + if (extension_ == null) { + Extension = new global::Blitzkit.GunDefinitionRegularProperties(); + } + input.ReadMessage(Extension); + 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 (base_ == null) { + Base = new global::Blitzkit.GunDefinitionBase(); + } + input.ReadMessage(Base); + break; + } + case 18: { + if (extension_ == null) { + Extension = new global::Blitzkit.GunDefinitionRegularProperties(); + } + input.ReadMessage(Extension); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GunDefinitionRegularProperties : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GunDefinitionRegularProperties()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyTankDefinitionsReflection.Descriptor.MessageTypes[10]; } + } + + [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 GunDefinitionRegularProperties() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GunDefinitionRegularProperties(GunDefinitionRegularProperties other) : this() { + _hasBits0 = other._hasBits0; + reload_ = other.reload_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GunDefinitionRegularProperties Clone() { + return new GunDefinitionRegularProperties(this); + } + + /// Field number for the "reload" field. + public const int ReloadFieldNumber = 1; + private readonly static float ReloadDefaultValue = 0F; + + private float reload_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Reload { + get { if ((_hasBits0 & 1) != 0) { return reload_; } else { return ReloadDefaultValue; } } + set { + _hasBits0 |= 1; + reload_ = value; + } + } + /// Gets whether the "reload" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasReload { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "reload" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearReload() { + _hasBits0 &= ~1; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GunDefinitionRegularProperties); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GunDefinitionRegularProperties other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Reload, other.Reload)) 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 (HasReload) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Reload); + 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 (HasReload) { + output.WriteRawTag(13); + output.WriteFloat(Reload); + } + 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 (HasReload) { + output.WriteRawTag(13); + output.WriteFloat(Reload); + } + 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 (HasReload) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GunDefinitionRegularProperties other) { + if (other == null) { + return; + } + if (other.HasReload) { + Reload = other.Reload; + } + _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 13: { + Reload = input.ReadFloat(); + 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 13: { + Reload = input.ReadFloat(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GunDefinitionAutoLoader : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GunDefinitionAutoLoader()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyTankDefinitionsReflection.Descriptor.MessageTypes[11]; } + } + + [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 GunDefinitionAutoLoader() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GunDefinitionAutoLoader(GunDefinitionAutoLoader other) : this() { + base_ = other.base_ != null ? other.base_.Clone() : null; + extension_ = other.extension_ != null ? other.extension_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GunDefinitionAutoLoader Clone() { + return new GunDefinitionAutoLoader(this); + } + + /// Field number for the "base" field. + public const int BaseFieldNumber = 1; + private global::Blitzkit.GunDefinitionBase base_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.GunDefinitionBase Base { + get { return base_; } + set { + base_ = value; + } + } + + /// Field number for the "extension" field. + public const int ExtensionFieldNumber = 2; + private global::Blitzkit.GunDefinitionAutoLoaderProperties extension_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.GunDefinitionAutoLoaderProperties Extension { + get { return extension_; } + set { + extension_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GunDefinitionAutoLoader); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GunDefinitionAutoLoader other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(Base, other.Base)) return false; + if (!object.Equals(Extension, other.Extension)) 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 (base_ != null) hash ^= Base.GetHashCode(); + if (extension_ != null) hash ^= Extension.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 (base_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Base); + } + if (extension_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Extension); + } + 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 (base_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Base); + } + if (extension_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Extension); + } + 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 (base_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Base); + } + if (extension_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Extension); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GunDefinitionAutoLoader other) { + if (other == null) { + return; + } + if (other.base_ != null) { + if (base_ == null) { + Base = new global::Blitzkit.GunDefinitionBase(); + } + Base.MergeFrom(other.Base); + } + if (other.extension_ != null) { + if (extension_ == null) { + Extension = new global::Blitzkit.GunDefinitionAutoLoaderProperties(); + } + Extension.MergeFrom(other.Extension); + } + _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 (base_ == null) { + Base = new global::Blitzkit.GunDefinitionBase(); + } + input.ReadMessage(Base); + break; + } + case 18: { + if (extension_ == null) { + Extension = new global::Blitzkit.GunDefinitionAutoLoaderProperties(); + } + input.ReadMessage(Extension); + 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 (base_ == null) { + Base = new global::Blitzkit.GunDefinitionBase(); + } + input.ReadMessage(Base); + break; + } + case 18: { + if (extension_ == null) { + Extension = new global::Blitzkit.GunDefinitionAutoLoaderProperties(); + } + input.ReadMessage(Extension); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GunDefinitionAutoLoaderProperties : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GunDefinitionAutoLoaderProperties()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyTankDefinitionsReflection.Descriptor.MessageTypes[12]; } + } + + [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 GunDefinitionAutoLoaderProperties() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GunDefinitionAutoLoaderProperties(GunDefinitionAutoLoaderProperties other) : this() { + _hasBits0 = other._hasBits0; + clipReload_ = other.clipReload_; + intraClip_ = other.intraClip_; + shellCount_ = other.shellCount_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GunDefinitionAutoLoaderProperties Clone() { + return new GunDefinitionAutoLoaderProperties(this); + } + + /// Field number for the "clip_reload" field. + public const int ClipReloadFieldNumber = 1; + private readonly static float ClipReloadDefaultValue = 0F; + + private float clipReload_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float ClipReload { + get { if ((_hasBits0 & 1) != 0) { return clipReload_; } else { return ClipReloadDefaultValue; } } + set { + _hasBits0 |= 1; + clipReload_ = value; + } + } + /// Gets whether the "clip_reload" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasClipReload { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "clip_reload" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearClipReload() { + _hasBits0 &= ~1; + } + + /// Field number for the "intra_clip" field. + public const int IntraClipFieldNumber = 2; + private readonly static float IntraClipDefaultValue = 0F; + + private float intraClip_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float IntraClip { + get { if ((_hasBits0 & 2) != 0) { return intraClip_; } else { return IntraClipDefaultValue; } } + set { + _hasBits0 |= 2; + intraClip_ = value; + } + } + /// Gets whether the "intra_clip" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasIntraClip { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "intra_clip" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearIntraClip() { + _hasBits0 &= ~2; + } + + /// Field number for the "shell_count" field. + public const int ShellCountFieldNumber = 3; + private readonly static float ShellCountDefaultValue = 0F; + + private float shellCount_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float ShellCount { + get { if ((_hasBits0 & 4) != 0) { return shellCount_; } else { return ShellCountDefaultValue; } } + set { + _hasBits0 |= 4; + shellCount_ = value; + } + } + /// Gets whether the "shell_count" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasShellCount { + get { return (_hasBits0 & 4) != 0; } + } + /// Clears the value of the "shell_count" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearShellCount() { + _hasBits0 &= ~4; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GunDefinitionAutoLoaderProperties); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GunDefinitionAutoLoaderProperties other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(ClipReload, other.ClipReload)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(IntraClip, other.IntraClip)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(ShellCount, other.ShellCount)) 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 (HasClipReload) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(ClipReload); + if (HasIntraClip) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(IntraClip); + if (HasShellCount) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(ShellCount); + 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 (HasClipReload) { + output.WriteRawTag(13); + output.WriteFloat(ClipReload); + } + if (HasIntraClip) { + output.WriteRawTag(21); + output.WriteFloat(IntraClip); + } + if (HasShellCount) { + output.WriteRawTag(29); + output.WriteFloat(ShellCount); + } + 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 (HasClipReload) { + output.WriteRawTag(13); + output.WriteFloat(ClipReload); + } + if (HasIntraClip) { + output.WriteRawTag(21); + output.WriteFloat(IntraClip); + } + if (HasShellCount) { + output.WriteRawTag(29); + output.WriteFloat(ShellCount); + } + 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 (HasClipReload) { + size += 1 + 4; + } + if (HasIntraClip) { + size += 1 + 4; + } + if (HasShellCount) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GunDefinitionAutoLoaderProperties other) { + if (other == null) { + return; + } + if (other.HasClipReload) { + ClipReload = other.ClipReload; + } + if (other.HasIntraClip) { + IntraClip = other.IntraClip; + } + if (other.HasShellCount) { + ShellCount = other.ShellCount; + } + _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 13: { + ClipReload = input.ReadFloat(); + break; + } + case 21: { + IntraClip = input.ReadFloat(); + break; + } + case 29: { + ShellCount = input.ReadFloat(); + 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 13: { + ClipReload = input.ReadFloat(); + break; + } + case 21: { + IntraClip = input.ReadFloat(); + break; + } + case 29: { + ShellCount = input.ReadFloat(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GunDefinitionAutoReloader : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GunDefinitionAutoReloader()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyTankDefinitionsReflection.Descriptor.MessageTypes[13]; } + } + + [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 GunDefinitionAutoReloader() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GunDefinitionAutoReloader(GunDefinitionAutoReloader other) : this() { + base_ = other.base_ != null ? other.base_.Clone() : null; + extension_ = other.extension_ != null ? other.extension_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GunDefinitionAutoReloader Clone() { + return new GunDefinitionAutoReloader(this); + } + + /// Field number for the "base" field. + public const int BaseFieldNumber = 1; + private global::Blitzkit.GunDefinitionBase base_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.GunDefinitionBase Base { + get { return base_; } + set { + base_ = value; + } + } + + /// Field number for the "extension" field. + public const int ExtensionFieldNumber = 2; + private global::Blitzkit.GunDefinitionAutoReloaderProperties extension_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.GunDefinitionAutoReloaderProperties Extension { + get { return extension_; } + set { + extension_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GunDefinitionAutoReloader); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GunDefinitionAutoReloader other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(Base, other.Base)) return false; + if (!object.Equals(Extension, other.Extension)) 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 (base_ != null) hash ^= Base.GetHashCode(); + if (extension_ != null) hash ^= Extension.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 (base_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Base); + } + if (extension_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Extension); + } + 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 (base_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Base); + } + if (extension_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Extension); + } + 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 (base_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Base); + } + if (extension_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Extension); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GunDefinitionAutoReloader other) { + if (other == null) { + return; + } + if (other.base_ != null) { + if (base_ == null) { + Base = new global::Blitzkit.GunDefinitionBase(); + } + Base.MergeFrom(other.Base); + } + if (other.extension_ != null) { + if (extension_ == null) { + Extension = new global::Blitzkit.GunDefinitionAutoReloaderProperties(); + } + Extension.MergeFrom(other.Extension); + } + _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 (base_ == null) { + Base = new global::Blitzkit.GunDefinitionBase(); + } + input.ReadMessage(Base); + break; + } + case 18: { + if (extension_ == null) { + Extension = new global::Blitzkit.GunDefinitionAutoReloaderProperties(); + } + input.ReadMessage(Extension); + 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 (base_ == null) { + Base = new global::Blitzkit.GunDefinitionBase(); + } + input.ReadMessage(Base); + break; + } + case 18: { + if (extension_ == null) { + Extension = new global::Blitzkit.GunDefinitionAutoReloaderProperties(); + } + input.ReadMessage(Extension); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GunDefinitionAutoReloaderProperties : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GunDefinitionAutoReloaderProperties()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyTankDefinitionsReflection.Descriptor.MessageTypes[14]; } + } + + [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 GunDefinitionAutoReloaderProperties() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GunDefinitionAutoReloaderProperties(GunDefinitionAutoReloaderProperties other) : this() { + _hasBits0 = other._hasBits0; + shellReloads_ = other.shellReloads_.Clone(); + intraClip_ = other.intraClip_; + shellCount_ = other.shellCount_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GunDefinitionAutoReloaderProperties Clone() { + return new GunDefinitionAutoReloaderProperties(this); + } + + /// Field number for the "shell_reloads" field. + public const int ShellReloadsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_shellReloads_codec + = pb::FieldCodec.ForFloat(13); + private readonly pbc::RepeatedField shellReloads_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField ShellReloads { + get { return shellReloads_; } + } + + /// Field number for the "intra_clip" field. + public const int IntraClipFieldNumber = 2; + private readonly static float IntraClipDefaultValue = 0F; + + private float intraClip_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float IntraClip { + get { if ((_hasBits0 & 1) != 0) { return intraClip_; } else { return IntraClipDefaultValue; } } + set { + _hasBits0 |= 1; + intraClip_ = value; + } + } + /// Gets whether the "intra_clip" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasIntraClip { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "intra_clip" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearIntraClip() { + _hasBits0 &= ~1; + } + + /// Field number for the "shell_count" field. + public const int ShellCountFieldNumber = 3; + private readonly static float ShellCountDefaultValue = 0F; + + private float shellCount_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float ShellCount { + get { if ((_hasBits0 & 2) != 0) { return shellCount_; } else { return ShellCountDefaultValue; } } + set { + _hasBits0 |= 2; + shellCount_ = value; + } + } + /// Gets whether the "shell_count" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasShellCount { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "shell_count" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearShellCount() { + _hasBits0 &= ~2; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GunDefinitionAutoReloaderProperties); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GunDefinitionAutoReloaderProperties other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!shellReloads_.Equals(other.shellReloads_)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(IntraClip, other.IntraClip)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(ShellCount, other.ShellCount)) 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 ^= shellReloads_.GetHashCode(); + if (HasIntraClip) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(IntraClip); + if (HasShellCount) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(ShellCount); + 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 + shellReloads_.WriteTo(output, _repeated_shellReloads_codec); + if (HasIntraClip) { + output.WriteRawTag(21); + output.WriteFloat(IntraClip); + } + if (HasShellCount) { + output.WriteRawTag(29); + output.WriteFloat(ShellCount); + } + 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) { + shellReloads_.WriteTo(ref output, _repeated_shellReloads_codec); + if (HasIntraClip) { + output.WriteRawTag(21); + output.WriteFloat(IntraClip); + } + if (HasShellCount) { + output.WriteRawTag(29); + output.WriteFloat(ShellCount); + } + 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 += shellReloads_.CalculateSize(_repeated_shellReloads_codec); + if (HasIntraClip) { + size += 1 + 4; + } + if (HasShellCount) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GunDefinitionAutoReloaderProperties other) { + if (other == null) { + return; + } + shellReloads_.Add(other.shellReloads_); + if (other.HasIntraClip) { + IntraClip = other.IntraClip; + } + if (other.HasShellCount) { + ShellCount = other.ShellCount; + } + _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 13: { + shellReloads_.AddEntriesFrom(input, _repeated_shellReloads_codec); + break; + } + case 21: { + IntraClip = input.ReadFloat(); + break; + } + case 29: { + ShellCount = input.ReadFloat(); + 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 13: { + shellReloads_.AddEntriesFrom(ref input, _repeated_shellReloads_codec); + break; + } + case 21: { + IntraClip = input.ReadFloat(); + break; + } + case 29: { + ShellCount = input.ReadFloat(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GunDefinitionBase : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GunDefinitionBase()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyTankDefinitionsReflection.Descriptor.MessageTypes[15]; } + } + + [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 GunDefinitionBase() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GunDefinitionBase(GunDefinitionBase other) : this() { + _hasBits0 = other._hasBits0; + id_ = other.id_; + rotationSpeed_ = other.rotationSpeed_; + researchCost_ = other.researchCost_ != null ? other.researchCost_.Clone() : null; + weight_ = other.weight_; + name_ = other.name_ != null ? other.name_.Clone() : null; + tier_ = other.tier_; + shells_ = other.shells_.Clone(); + camouflageLoss_ = other.camouflageLoss_; + aimTime_ = other.aimTime_; + dispersionBase_ = other.dispersionBase_; + dispersionTraverse_ = other.dispersionTraverse_; + dispersionShot_ = other.dispersionShot_; + dispersionDamaged_ = other.dispersionDamaged_; + unlocks_ = other.unlocks_.Clone(); + shellCapacity_ = other.shellCapacity_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GunDefinitionBase Clone() { + return new GunDefinitionBase(this); + } + + /// Field number for the "id" field. + 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; + } + } + /// Gets whether the "id" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasId { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "id" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearId() { + _hasBits0 &= ~1; + } + + /// Field number for the "rotation_speed" field. + public const int RotationSpeedFieldNumber = 2; + private readonly static float RotationSpeedDefaultValue = 0F; + + private float rotationSpeed_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float RotationSpeed { + get { if ((_hasBits0 & 2) != 0) { return rotationSpeed_; } else { return RotationSpeedDefaultValue; } } + set { + _hasBits0 |= 2; + rotationSpeed_ = value; + } + } + /// Gets whether the "rotation_speed" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasRotationSpeed { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "rotation_speed" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearRotationSpeed() { + _hasBits0 &= ~2; + } + + /// Field number for the "research_cost" field. + public const int ResearchCostFieldNumber = 3; + private global::Blitzkit.ResearchCost researchCost_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.ResearchCost ResearchCost { + get { return researchCost_; } + set { + researchCost_ = value; + } + } + + /// Field number for the "weight" field. + public const int WeightFieldNumber = 4; + private readonly static uint WeightDefaultValue = 0; + + private uint weight_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint Weight { + get { if ((_hasBits0 & 4) != 0) { return weight_; } else { return WeightDefaultValue; } } + set { + _hasBits0 |= 4; + weight_ = value; + } + } + /// Gets whether the "weight" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasWeight { + get { return (_hasBits0 & 4) != 0; } + } + /// Clears the value of the "weight" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearWeight() { + _hasBits0 &= ~4; + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 5; + 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; + } + } + + /// Field number for the "tier" field. + public const int TierFieldNumber = 6; + private readonly static uint TierDefaultValue = 0; + + private uint tier_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint Tier { + get { if ((_hasBits0 & 8) != 0) { return tier_; } else { return TierDefaultValue; } } + set { + _hasBits0 |= 8; + tier_ = value; + } + } + /// Gets whether the "tier" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasTier { + get { return (_hasBits0 & 8) != 0; } + } + /// Clears the value of the "tier" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearTier() { + _hasBits0 &= ~8; + } + + /// Field number for the "shells" field. + public const int ShellsFieldNumber = 7; + private static readonly pb::FieldCodec _repeated_shells_codec + = pb::FieldCodec.ForMessage(58, global::Blitzkit.ShellDefinition.Parser); + private readonly pbc::RepeatedField shells_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Shells { + get { return shells_; } + } + + /// Field number for the "camouflage_loss" field. + public const int CamouflageLossFieldNumber = 8; + private readonly static float CamouflageLossDefaultValue = 0F; + + private float camouflageLoss_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float CamouflageLoss { + get { if ((_hasBits0 & 16) != 0) { return camouflageLoss_; } else { return CamouflageLossDefaultValue; } } + set { + _hasBits0 |= 16; + camouflageLoss_ = value; + } + } + /// Gets whether the "camouflage_loss" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasCamouflageLoss { + get { return (_hasBits0 & 16) != 0; } + } + /// Clears the value of the "camouflage_loss" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearCamouflageLoss() { + _hasBits0 &= ~16; + } + + /// Field number for the "aim_time" field. + public const int AimTimeFieldNumber = 9; + private readonly static float AimTimeDefaultValue = 0F; + + private float aimTime_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float AimTime { + get { if ((_hasBits0 & 32) != 0) { return aimTime_; } else { return AimTimeDefaultValue; } } + set { + _hasBits0 |= 32; + aimTime_ = value; + } + } + /// Gets whether the "aim_time" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasAimTime { + get { return (_hasBits0 & 32) != 0; } + } + /// Clears the value of the "aim_time" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearAimTime() { + _hasBits0 &= ~32; + } + + /// Field number for the "dispersion_base" field. + public const int DispersionBaseFieldNumber = 10; + private readonly static float DispersionBaseDefaultValue = 0F; + + private float dispersionBase_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float DispersionBase { + get { if ((_hasBits0 & 64) != 0) { return dispersionBase_; } else { return DispersionBaseDefaultValue; } } + set { + _hasBits0 |= 64; + dispersionBase_ = value; + } + } + /// Gets whether the "dispersion_base" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasDispersionBase { + get { return (_hasBits0 & 64) != 0; } + } + /// Clears the value of the "dispersion_base" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearDispersionBase() { + _hasBits0 &= ~64; + } + + /// Field number for the "dispersion_traverse" field. + public const int DispersionTraverseFieldNumber = 11; + private readonly static float DispersionTraverseDefaultValue = 0F; + + private float dispersionTraverse_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float DispersionTraverse { + get { if ((_hasBits0 & 128) != 0) { return dispersionTraverse_; } else { return DispersionTraverseDefaultValue; } } + set { + _hasBits0 |= 128; + dispersionTraverse_ = value; + } + } + /// Gets whether the "dispersion_traverse" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasDispersionTraverse { + get { return (_hasBits0 & 128) != 0; } + } + /// Clears the value of the "dispersion_traverse" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearDispersionTraverse() { + _hasBits0 &= ~128; + } + + /// Field number for the "dispersion_shot" field. + public const int DispersionShotFieldNumber = 12; + private readonly static float DispersionShotDefaultValue = 0F; + + private float dispersionShot_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float DispersionShot { + get { if ((_hasBits0 & 256) != 0) { return dispersionShot_; } else { return DispersionShotDefaultValue; } } + set { + _hasBits0 |= 256; + dispersionShot_ = value; + } + } + /// Gets whether the "dispersion_shot" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasDispersionShot { + get { return (_hasBits0 & 256) != 0; } + } + /// Clears the value of the "dispersion_shot" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearDispersionShot() { + _hasBits0 &= ~256; + } + + /// Field number for the "dispersion_damaged" field. + public const int DispersionDamagedFieldNumber = 13; + private readonly static float DispersionDamagedDefaultValue = 0F; + + private float dispersionDamaged_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float DispersionDamaged { + get { if ((_hasBits0 & 512) != 0) { return dispersionDamaged_; } else { return DispersionDamagedDefaultValue; } } + set { + _hasBits0 |= 512; + dispersionDamaged_ = value; + } + } + /// Gets whether the "dispersion_damaged" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasDispersionDamaged { + get { return (_hasBits0 & 512) != 0; } + } + /// Clears the value of the "dispersion_damaged" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearDispersionDamaged() { + _hasBits0 &= ~512; + } + + /// Field number for the "unlocks" field. + public const int UnlocksFieldNumber = 14; + private static readonly pb::FieldCodec _repeated_unlocks_codec + = pb::FieldCodec.ForMessage(114, global::Blitzkit.Unlock.Parser); + private readonly pbc::RepeatedField unlocks_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Unlocks { + get { return unlocks_; } + } + + /// Field number for the "shell_capacity" field. + public const int ShellCapacityFieldNumber = 15; + private readonly static uint ShellCapacityDefaultValue = 0; + + private uint shellCapacity_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint ShellCapacity { + get { if ((_hasBits0 & 1024) != 0) { return shellCapacity_; } else { return ShellCapacityDefaultValue; } } + set { + _hasBits0 |= 1024; + shellCapacity_ = value; + } + } + /// Gets whether the "shell_capacity" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasShellCapacity { + get { return (_hasBits0 & 1024) != 0; } + } + /// Clears the value of the "shell_capacity" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearShellCapacity() { + _hasBits0 &= ~1024; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GunDefinitionBase); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GunDefinitionBase other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Id != other.Id) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(RotationSpeed, other.RotationSpeed)) return false; + if (!object.Equals(ResearchCost, other.ResearchCost)) return false; + if (Weight != other.Weight) return false; + if (!object.Equals(Name, other.Name)) return false; + if (Tier != other.Tier) return false; + if(!shells_.Equals(other.shells_)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(CamouflageLoss, other.CamouflageLoss)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(AimTime, other.AimTime)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(DispersionBase, other.DispersionBase)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(DispersionTraverse, other.DispersionTraverse)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(DispersionShot, other.DispersionShot)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(DispersionDamaged, other.DispersionDamaged)) return false; + if(!unlocks_.Equals(other.unlocks_)) return false; + if (ShellCapacity != other.ShellCapacity) 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 (HasRotationSpeed) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(RotationSpeed); + if (researchCost_ != null) hash ^= ResearchCost.GetHashCode(); + if (HasWeight) hash ^= Weight.GetHashCode(); + if (name_ != null) hash ^= Name.GetHashCode(); + if (HasTier) hash ^= Tier.GetHashCode(); + hash ^= shells_.GetHashCode(); + if (HasCamouflageLoss) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(CamouflageLoss); + if (HasAimTime) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(AimTime); + if (HasDispersionBase) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(DispersionBase); + if (HasDispersionTraverse) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(DispersionTraverse); + if (HasDispersionShot) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(DispersionShot); + if (HasDispersionDamaged) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(DispersionDamaged); + hash ^= unlocks_.GetHashCode(); + if (HasShellCapacity) hash ^= ShellCapacity.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 (HasRotationSpeed) { + output.WriteRawTag(21); + output.WriteFloat(RotationSpeed); + } + if (researchCost_ != null) { + output.WriteRawTag(26); + output.WriteMessage(ResearchCost); + } + if (HasWeight) { + output.WriteRawTag(32); + output.WriteUInt32(Weight); + } + if (name_ != null) { + output.WriteRawTag(42); + output.WriteMessage(Name); + } + if (HasTier) { + output.WriteRawTag(48); + output.WriteUInt32(Tier); + } + shells_.WriteTo(output, _repeated_shells_codec); + if (HasCamouflageLoss) { + output.WriteRawTag(69); + output.WriteFloat(CamouflageLoss); + } + if (HasAimTime) { + output.WriteRawTag(77); + output.WriteFloat(AimTime); + } + if (HasDispersionBase) { + output.WriteRawTag(85); + output.WriteFloat(DispersionBase); + } + if (HasDispersionTraverse) { + output.WriteRawTag(93); + output.WriteFloat(DispersionTraverse); + } + if (HasDispersionShot) { + output.WriteRawTag(101); + output.WriteFloat(DispersionShot); + } + if (HasDispersionDamaged) { + output.WriteRawTag(109); + output.WriteFloat(DispersionDamaged); + } + unlocks_.WriteTo(output, _repeated_unlocks_codec); + if (HasShellCapacity) { + output.WriteRawTag(120); + output.WriteUInt32(ShellCapacity); + } + 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 (HasRotationSpeed) { + output.WriteRawTag(21); + output.WriteFloat(RotationSpeed); + } + if (researchCost_ != null) { + output.WriteRawTag(26); + output.WriteMessage(ResearchCost); + } + if (HasWeight) { + output.WriteRawTag(32); + output.WriteUInt32(Weight); + } + if (name_ != null) { + output.WriteRawTag(42); + output.WriteMessage(Name); + } + if (HasTier) { + output.WriteRawTag(48); + output.WriteUInt32(Tier); + } + shells_.WriteTo(ref output, _repeated_shells_codec); + if (HasCamouflageLoss) { + output.WriteRawTag(69); + output.WriteFloat(CamouflageLoss); + } + if (HasAimTime) { + output.WriteRawTag(77); + output.WriteFloat(AimTime); + } + if (HasDispersionBase) { + output.WriteRawTag(85); + output.WriteFloat(DispersionBase); + } + if (HasDispersionTraverse) { + output.WriteRawTag(93); + output.WriteFloat(DispersionTraverse); + } + if (HasDispersionShot) { + output.WriteRawTag(101); + output.WriteFloat(DispersionShot); + } + if (HasDispersionDamaged) { + output.WriteRawTag(109); + output.WriteFloat(DispersionDamaged); + } + unlocks_.WriteTo(ref output, _repeated_unlocks_codec); + if (HasShellCapacity) { + output.WriteRawTag(120); + output.WriteUInt32(ShellCapacity); + } + 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 (HasRotationSpeed) { + size += 1 + 4; + } + if (researchCost_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ResearchCost); + } + if (HasWeight) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Weight); + } + if (name_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Name); + } + if (HasTier) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Tier); + } + size += shells_.CalculateSize(_repeated_shells_codec); + if (HasCamouflageLoss) { + size += 1 + 4; + } + if (HasAimTime) { + size += 1 + 4; + } + if (HasDispersionBase) { + size += 1 + 4; + } + if (HasDispersionTraverse) { + size += 1 + 4; + } + if (HasDispersionShot) { + size += 1 + 4; + } + if (HasDispersionDamaged) { + size += 1 + 4; + } + size += unlocks_.CalculateSize(_repeated_unlocks_codec); + if (HasShellCapacity) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(ShellCapacity); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GunDefinitionBase other) { + if (other == null) { + return; + } + if (other.HasId) { + Id = other.Id; + } + if (other.HasRotationSpeed) { + RotationSpeed = other.RotationSpeed; + } + if (other.researchCost_ != null) { + if (researchCost_ == null) { + ResearchCost = new global::Blitzkit.ResearchCost(); + } + ResearchCost.MergeFrom(other.ResearchCost); + } + if (other.HasWeight) { + Weight = other.Weight; + } + if (other.name_ != null) { + if (name_ == null) { + Name = new global::Blitzkit.I18nString(); + } + Name.MergeFrom(other.Name); + } + if (other.HasTier) { + Tier = other.Tier; + } + shells_.Add(other.shells_); + if (other.HasCamouflageLoss) { + CamouflageLoss = other.CamouflageLoss; + } + if (other.HasAimTime) { + AimTime = other.AimTime; + } + if (other.HasDispersionBase) { + DispersionBase = other.DispersionBase; + } + if (other.HasDispersionTraverse) { + DispersionTraverse = other.DispersionTraverse; + } + if (other.HasDispersionShot) { + DispersionShot = other.DispersionShot; + } + if (other.HasDispersionDamaged) { + DispersionDamaged = other.DispersionDamaged; + } + unlocks_.Add(other.unlocks_); + if (other.HasShellCapacity) { + ShellCapacity = other.ShellCapacity; + } + _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 21: { + RotationSpeed = input.ReadFloat(); + break; + } + case 26: { + if (researchCost_ == null) { + ResearchCost = new global::Blitzkit.ResearchCost(); + } + input.ReadMessage(ResearchCost); + break; + } + case 32: { + Weight = input.ReadUInt32(); + break; + } + case 42: { + if (name_ == null) { + Name = new global::Blitzkit.I18nString(); + } + input.ReadMessage(Name); + break; + } + case 48: { + Tier = input.ReadUInt32(); + break; + } + case 58: { + shells_.AddEntriesFrom(input, _repeated_shells_codec); + break; + } + case 69: { + CamouflageLoss = input.ReadFloat(); + break; + } + case 77: { + AimTime = input.ReadFloat(); + break; + } + case 85: { + DispersionBase = input.ReadFloat(); + break; + } + case 93: { + DispersionTraverse = input.ReadFloat(); + break; + } + case 101: { + DispersionShot = input.ReadFloat(); + break; + } + case 109: { + DispersionDamaged = input.ReadFloat(); + break; + } + case 114: { + unlocks_.AddEntriesFrom(input, _repeated_unlocks_codec); + break; + } + case 120: { + ShellCapacity = 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: { + Id = input.ReadUInt32(); + break; + } + case 21: { + RotationSpeed = input.ReadFloat(); + break; + } + case 26: { + if (researchCost_ == null) { + ResearchCost = new global::Blitzkit.ResearchCost(); + } + input.ReadMessage(ResearchCost); + break; + } + case 32: { + Weight = input.ReadUInt32(); + break; + } + case 42: { + if (name_ == null) { + Name = new global::Blitzkit.I18nString(); + } + input.ReadMessage(Name); + break; + } + case 48: { + Tier = input.ReadUInt32(); + break; + } + case 58: { + shells_.AddEntriesFrom(ref input, _repeated_shells_codec); + break; + } + case 69: { + CamouflageLoss = input.ReadFloat(); + break; + } + case 77: { + AimTime = input.ReadFloat(); + break; + } + case 85: { + DispersionBase = input.ReadFloat(); + break; + } + case 93: { + DispersionTraverse = input.ReadFloat(); + break; + } + case 101: { + DispersionShot = input.ReadFloat(); + break; + } + case 109: { + DispersionDamaged = input.ReadFloat(); + break; + } + case 114: { + unlocks_.AddEntriesFrom(ref input, _repeated_unlocks_codec); + break; + } + case 120: { + ShellCapacity = input.ReadUInt32(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ShellDefinition : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ShellDefinition()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyTankDefinitionsReflection.Descriptor.MessageTypes[16]; } + } + + [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 ShellDefinition() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ShellDefinition(ShellDefinition other) : this() { + _hasBits0 = other._hasBits0; + id_ = other.id_; + name_ = other.name_ != null ? other.name_.Clone() : null; + velocity_ = other.velocity_; + armorDamage_ = other.armorDamage_; + moduleDamage_ = other.moduleDamage_; + caliber_ = other.caliber_; + icon_ = other.icon_; + penetration_ = other.penetration_ != null ? other.penetration_.Clone() : null; + type_ = other.type_; + normalization_ = other.normalization_; + ricochet_ = other.ricochet_; + explosionRadius_ = other.explosionRadius_; + range_ = other.range_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ShellDefinition Clone() { + return new ShellDefinition(this); + } + + /// Field number for the "id" field. + 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; + } + } + /// Gets whether the "id" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasId { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "id" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearId() { + _hasBits0 &= ~1; + } + + /// Field number for the "name" field. + 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; + } + } + + /// Field number for the "velocity" field. + public const int VelocityFieldNumber = 3; + private readonly static uint VelocityDefaultValue = 0; + + private uint velocity_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint Velocity { + get { if ((_hasBits0 & 2) != 0) { return velocity_; } else { return VelocityDefaultValue; } } + set { + _hasBits0 |= 2; + velocity_ = value; + } + } + /// Gets whether the "velocity" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasVelocity { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "velocity" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearVelocity() { + _hasBits0 &= ~2; + } + + /// Field number for the "armor_damage" field. + public const int ArmorDamageFieldNumber = 4; + private readonly static uint ArmorDamageDefaultValue = 0; + + private uint armorDamage_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint ArmorDamage { + get { if ((_hasBits0 & 4) != 0) { return armorDamage_; } else { return ArmorDamageDefaultValue; } } + set { + _hasBits0 |= 4; + armorDamage_ = value; + } + } + /// Gets whether the "armor_damage" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasArmorDamage { + get { return (_hasBits0 & 4) != 0; } + } + /// Clears the value of the "armor_damage" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearArmorDamage() { + _hasBits0 &= ~4; + } + + /// Field number for the "module_damage" field. + public const int ModuleDamageFieldNumber = 5; + private readonly static uint ModuleDamageDefaultValue = 0; + + private uint moduleDamage_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint ModuleDamage { + get { if ((_hasBits0 & 8) != 0) { return moduleDamage_; } else { return ModuleDamageDefaultValue; } } + set { + _hasBits0 |= 8; + moduleDamage_ = value; + } + } + /// Gets whether the "module_damage" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasModuleDamage { + get { return (_hasBits0 & 8) != 0; } + } + /// Clears the value of the "module_damage" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearModuleDamage() { + _hasBits0 &= ~8; + } + + /// Field number for the "caliber" field. + public const int CaliberFieldNumber = 6; + private readonly static float CaliberDefaultValue = 0F; + + private float caliber_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Caliber { + get { if ((_hasBits0 & 16) != 0) { return caliber_; } else { return CaliberDefaultValue; } } + set { + _hasBits0 |= 16; + caliber_ = value; + } + } + /// Gets whether the "caliber" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasCaliber { + get { return (_hasBits0 & 16) != 0; } + } + /// Clears the value of the "caliber" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearCaliber() { + _hasBits0 &= ~16; + } + + /// Field number for the "icon" field. + public const int IconFieldNumber = 7; + private readonly static string IconDefaultValue = ""; + + private string icon_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Icon { + get { return icon_ ?? IconDefaultValue; } + set { + icon_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "icon" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasIcon { + get { return icon_ != null; } + } + /// Clears the value of the "icon" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearIcon() { + icon_ = null; + } + + /// Field number for the "penetration" field. + public const int PenetrationFieldNumber = 8; + private global::Blitzkit.ShellPenetration penetration_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.ShellPenetration Penetration { + get { return penetration_; } + set { + penetration_ = value; + } + } + + /// Field number for the "type" field. + public const int TypeFieldNumber = 9; + private readonly static global::Blitzkit.ShellType TypeDefaultValue = global::Blitzkit.ShellType.Ap; + + private global::Blitzkit.ShellType type_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.ShellType Type { + get { if ((_hasBits0 & 32) != 0) { return type_; } else { return TypeDefaultValue; } } + set { + _hasBits0 |= 32; + type_ = value; + } + } + /// Gets whether the "type" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasType { + get { return (_hasBits0 & 32) != 0; } + } + /// Clears the value of the "type" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearType() { + _hasBits0 &= ~32; + } + + /// Field number for the "normalization" field. + public const int NormalizationFieldNumber = 10; + private readonly static float NormalizationDefaultValue = 0F; + + private float normalization_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Normalization { + get { if ((_hasBits0 & 64) != 0) { return normalization_; } else { return NormalizationDefaultValue; } } + set { + _hasBits0 |= 64; + normalization_ = value; + } + } + /// Gets whether the "normalization" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasNormalization { + get { return (_hasBits0 & 64) != 0; } + } + /// Clears the value of the "normalization" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearNormalization() { + _hasBits0 &= ~64; + } + + /// Field number for the "ricochet" field. + public const int RicochetFieldNumber = 11; + private readonly static float RicochetDefaultValue = 0F; + + private float ricochet_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Ricochet { + get { if ((_hasBits0 & 128) != 0) { return ricochet_; } else { return RicochetDefaultValue; } } + set { + _hasBits0 |= 128; + ricochet_ = value; + } + } + /// Gets whether the "ricochet" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasRicochet { + get { return (_hasBits0 & 128) != 0; } + } + /// Clears the value of the "ricochet" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearRicochet() { + _hasBits0 &= ~128; + } + + /// Field number for the "explosion_radius" field. + public const int ExplosionRadiusFieldNumber = 12; + private readonly static float ExplosionRadiusDefaultValue = 0F; + + private float explosionRadius_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float ExplosionRadius { + get { if ((_hasBits0 & 256) != 0) { return explosionRadius_; } else { return ExplosionRadiusDefaultValue; } } + set { + _hasBits0 |= 256; + explosionRadius_ = value; + } + } + /// Gets whether the "explosion_radius" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasExplosionRadius { + get { return (_hasBits0 & 256) != 0; } + } + /// Clears the value of the "explosion_radius" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearExplosionRadius() { + _hasBits0 &= ~256; + } + + /// Field number for the "range" field. + public const int RangeFieldNumber = 13; + private readonly static uint RangeDefaultValue = 0; + + private uint range_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint Range { + get { if ((_hasBits0 & 512) != 0) { return range_; } else { return RangeDefaultValue; } } + set { + _hasBits0 |= 512; + range_ = value; + } + } + /// Gets whether the "range" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasRange { + get { return (_hasBits0 & 512) != 0; } + } + /// Clears the value of the "range" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearRange() { + _hasBits0 &= ~512; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ShellDefinition); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ShellDefinition 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 (Velocity != other.Velocity) return false; + if (ArmorDamage != other.ArmorDamage) return false; + if (ModuleDamage != other.ModuleDamage) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Caliber, other.Caliber)) return false; + if (Icon != other.Icon) return false; + if (!object.Equals(Penetration, other.Penetration)) return false; + if (Type != other.Type) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Normalization, other.Normalization)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Ricochet, other.Ricochet)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(ExplosionRadius, other.ExplosionRadius)) return false; + if (Range != other.Range) 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 (HasVelocity) hash ^= Velocity.GetHashCode(); + if (HasArmorDamage) hash ^= ArmorDamage.GetHashCode(); + if (HasModuleDamage) hash ^= ModuleDamage.GetHashCode(); + if (HasCaliber) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Caliber); + if (HasIcon) hash ^= Icon.GetHashCode(); + if (penetration_ != null) hash ^= Penetration.GetHashCode(); + if (HasType) hash ^= Type.GetHashCode(); + if (HasNormalization) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Normalization); + if (HasRicochet) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Ricochet); + if (HasExplosionRadius) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(ExplosionRadius); + if (HasRange) hash ^= Range.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 (HasVelocity) { + output.WriteRawTag(24); + output.WriteUInt32(Velocity); + } + if (HasArmorDamage) { + output.WriteRawTag(32); + output.WriteUInt32(ArmorDamage); + } + if (HasModuleDamage) { + output.WriteRawTag(40); + output.WriteUInt32(ModuleDamage); + } + if (HasCaliber) { + output.WriteRawTag(53); + output.WriteFloat(Caliber); + } + if (HasIcon) { + output.WriteRawTag(58); + output.WriteString(Icon); + } + if (penetration_ != null) { + output.WriteRawTag(66); + output.WriteMessage(Penetration); + } + if (HasType) { + output.WriteRawTag(72); + output.WriteEnum((int) Type); + } + if (HasNormalization) { + output.WriteRawTag(85); + output.WriteFloat(Normalization); + } + if (HasRicochet) { + output.WriteRawTag(93); + output.WriteFloat(Ricochet); + } + if (HasExplosionRadius) { + output.WriteRawTag(101); + output.WriteFloat(ExplosionRadius); + } + if (HasRange) { + output.WriteRawTag(104); + output.WriteUInt32(Range); + } + 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 (HasVelocity) { + output.WriteRawTag(24); + output.WriteUInt32(Velocity); + } + if (HasArmorDamage) { + output.WriteRawTag(32); + output.WriteUInt32(ArmorDamage); + } + if (HasModuleDamage) { + output.WriteRawTag(40); + output.WriteUInt32(ModuleDamage); + } + if (HasCaliber) { + output.WriteRawTag(53); + output.WriteFloat(Caliber); + } + if (HasIcon) { + output.WriteRawTag(58); + output.WriteString(Icon); + } + if (penetration_ != null) { + output.WriteRawTag(66); + output.WriteMessage(Penetration); + } + if (HasType) { + output.WriteRawTag(72); + output.WriteEnum((int) Type); + } + if (HasNormalization) { + output.WriteRawTag(85); + output.WriteFloat(Normalization); + } + if (HasRicochet) { + output.WriteRawTag(93); + output.WriteFloat(Ricochet); + } + if (HasExplosionRadius) { + output.WriteRawTag(101); + output.WriteFloat(ExplosionRadius); + } + if (HasRange) { + output.WriteRawTag(104); + output.WriteUInt32(Range); + } + 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 (HasVelocity) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Velocity); + } + if (HasArmorDamage) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(ArmorDamage); + } + if (HasModuleDamage) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(ModuleDamage); + } + if (HasCaliber) { + size += 1 + 4; + } + if (HasIcon) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Icon); + } + if (penetration_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Penetration); + } + if (HasType) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type); + } + if (HasNormalization) { + size += 1 + 4; + } + if (HasRicochet) { + size += 1 + 4; + } + if (HasExplosionRadius) { + size += 1 + 4; + } + if (HasRange) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Range); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ShellDefinition 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.HasVelocity) { + Velocity = other.Velocity; + } + if (other.HasArmorDamage) { + ArmorDamage = other.ArmorDamage; + } + if (other.HasModuleDamage) { + ModuleDamage = other.ModuleDamage; + } + if (other.HasCaliber) { + Caliber = other.Caliber; + } + if (other.HasIcon) { + Icon = other.Icon; + } + if (other.penetration_ != null) { + if (penetration_ == null) { + Penetration = new global::Blitzkit.ShellPenetration(); + } + Penetration.MergeFrom(other.Penetration); + } + if (other.HasType) { + Type = other.Type; + } + if (other.HasNormalization) { + Normalization = other.Normalization; + } + if (other.HasRicochet) { + Ricochet = other.Ricochet; + } + if (other.HasExplosionRadius) { + ExplosionRadius = other.ExplosionRadius; + } + if (other.HasRange) { + Range = other.Range; + } + _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 24: { + Velocity = input.ReadUInt32(); + break; + } + case 32: { + ArmorDamage = input.ReadUInt32(); + break; + } + case 40: { + ModuleDamage = input.ReadUInt32(); + break; + } + case 53: { + Caliber = input.ReadFloat(); + break; + } + case 58: { + Icon = input.ReadString(); + break; + } + case 66: { + if (penetration_ == null) { + Penetration = new global::Blitzkit.ShellPenetration(); + } + input.ReadMessage(Penetration); + break; + } + case 72: { + Type = (global::Blitzkit.ShellType) input.ReadEnum(); + break; + } + case 85: { + Normalization = input.ReadFloat(); + break; + } + case 93: { + Ricochet = input.ReadFloat(); + break; + } + case 101: { + ExplosionRadius = input.ReadFloat(); + break; + } + case 104: { + Range = 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: { + Id = input.ReadUInt32(); + break; + } + case 18: { + if (name_ == null) { + Name = new global::Blitzkit.I18nString(); + } + input.ReadMessage(Name); + break; + } + case 24: { + Velocity = input.ReadUInt32(); + break; + } + case 32: { + ArmorDamage = input.ReadUInt32(); + break; + } + case 40: { + ModuleDamage = input.ReadUInt32(); + break; + } + case 53: { + Caliber = input.ReadFloat(); + break; + } + case 58: { + Icon = input.ReadString(); + break; + } + case 66: { + if (penetration_ == null) { + Penetration = new global::Blitzkit.ShellPenetration(); + } + input.ReadMessage(Penetration); + break; + } + case 72: { + Type = (global::Blitzkit.ShellType) input.ReadEnum(); + break; + } + case 85: { + Normalization = input.ReadFloat(); + break; + } + case 93: { + Ricochet = input.ReadFloat(); + break; + } + case 101: { + ExplosionRadius = input.ReadFloat(); + break; + } + case 104: { + Range = input.ReadUInt32(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ShellPenetration : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ShellPenetration()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyTankDefinitionsReflection.Descriptor.MessageTypes[17]; } + } + + [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 ShellPenetration() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ShellPenetration(ShellPenetration other) : this() { + _hasBits0 = other._hasBits0; + near_ = other.near_; + far_ = other.far_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ShellPenetration Clone() { + return new ShellPenetration(this); + } + + /// Field number for the "near" field. + public const int NearFieldNumber = 1; + private readonly static float NearDefaultValue = 0F; + + private float near_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Near { + get { if ((_hasBits0 & 1) != 0) { return near_; } else { return NearDefaultValue; } } + set { + _hasBits0 |= 1; + near_ = value; + } + } + /// Gets whether the "near" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasNear { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "near" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearNear() { + _hasBits0 &= ~1; + } + + /// Field number for the "far" field. + public const int FarFieldNumber = 2; + private readonly static float FarDefaultValue = 0F; + + private float far_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Far { + get { if ((_hasBits0 & 2) != 0) { return far_; } else { return FarDefaultValue; } } + set { + _hasBits0 |= 2; + far_ = value; + } + } + /// Gets whether the "far" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasFar { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "far" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearFar() { + _hasBits0 &= ~2; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ShellPenetration); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ShellPenetration other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Near, other.Near)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Far, other.Far)) 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 (HasNear) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Near); + if (HasFar) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Far); + 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 (HasNear) { + output.WriteRawTag(13); + output.WriteFloat(Near); + } + if (HasFar) { + output.WriteRawTag(21); + output.WriteFloat(Far); + } + 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 (HasNear) { + output.WriteRawTag(13); + output.WriteFloat(Near); + } + if (HasFar) { + output.WriteRawTag(21); + output.WriteFloat(Far); + } + 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 (HasNear) { + size += 1 + 4; + } + if (HasFar) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ShellPenetration other) { + if (other == null) { + return; + } + if (other.HasNear) { + Near = other.Near; + } + if (other.HasFar) { + Far = other.Far; + } + _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 13: { + Near = input.ReadFloat(); + break; + } + case 21: { + Far = input.ReadFloat(); + 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 13: { + Near = input.ReadFloat(); + break; + } + case 21: { + Far = input.ReadFloat(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Unlock : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Unlock()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyTankDefinitionsReflection.Descriptor.MessageTypes[18]; } + } + + [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 Unlock() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Unlock(Unlock other) : this() { + _hasBits0 = other._hasBits0; + id_ = other.id_; + type_ = other.type_; + cost_ = other.cost_ != null ? other.cost_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Unlock Clone() { + return new Unlock(this); + } + + /// Field number for the "id" field. + public const int IdFieldNumber = 1; + private readonly static int IdDefaultValue = 0; + + private int id_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Id { + get { if ((_hasBits0 & 1) != 0) { return id_; } else { return IdDefaultValue; } } + set { + _hasBits0 |= 1; + id_ = value; + } + } + /// Gets whether the "id" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasId { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "id" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearId() { + _hasBits0 &= ~1; + } + + /// Field number for the "type" field. + public const int TypeFieldNumber = 2; + private readonly static global::Blitzkit.ModuleType TypeDefaultValue = global::Blitzkit.ModuleType.Vehicle; + + private global::Blitzkit.ModuleType type_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.ModuleType Type { + get { if ((_hasBits0 & 2) != 0) { return type_; } else { return TypeDefaultValue; } } + set { + _hasBits0 |= 2; + type_ = value; + } + } + /// Gets whether the "type" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasType { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "type" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearType() { + _hasBits0 &= ~2; + } + + /// Field number for the "cost" field. + public const int CostFieldNumber = 3; + private global::Blitzkit.UnlockCost cost_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.UnlockCost Cost { + get { return cost_; } + set { + cost_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Unlock); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Unlock other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Id != other.Id) return false; + if (Type != other.Type) return false; + if (!object.Equals(Cost, other.Cost)) 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 (HasType) hash ^= Type.GetHashCode(); + if (cost_ != null) hash ^= Cost.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.WriteInt32(Id); + } + if (HasType) { + output.WriteRawTag(16); + output.WriteEnum((int) Type); + } + if (cost_ != null) { + output.WriteRawTag(26); + output.WriteMessage(Cost); + } + 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.WriteInt32(Id); + } + if (HasType) { + output.WriteRawTag(16); + output.WriteEnum((int) Type); + } + if (cost_ != null) { + output.WriteRawTag(26); + output.WriteMessage(Cost); + } + 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.ComputeInt32Size(Id); + } + if (HasType) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type); + } + if (cost_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Cost); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Unlock other) { + if (other == null) { + return; + } + if (other.HasId) { + Id = other.Id; + } + if (other.HasType) { + Type = other.Type; + } + if (other.cost_ != null) { + if (cost_ == null) { + Cost = new global::Blitzkit.UnlockCost(); + } + Cost.MergeFrom(other.Cost); + } + _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.ReadInt32(); + break; + } + case 16: { + Type = (global::Blitzkit.ModuleType) input.ReadEnum(); + break; + } + case 26: { + if (cost_ == null) { + Cost = new global::Blitzkit.UnlockCost(); + } + input.ReadMessage(Cost); + 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.ReadInt32(); + break; + } + case 16: { + Type = (global::Blitzkit.ModuleType) input.ReadEnum(); + break; + } + case 26: { + if (cost_ == null) { + Cost = new global::Blitzkit.UnlockCost(); + } + input.ReadMessage(Cost); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UnlockCost : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UnlockCost()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyTankDefinitionsReflection.Descriptor.MessageTypes[19]; } + } + + [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 UnlockCost() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UnlockCost(UnlockCost other) : this() { + _hasBits0 = other._hasBits0; + type_ = other.type_; + value_ = other.value_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UnlockCost Clone() { + return new UnlockCost(this); + } + + /// Field number for the "type" field. + public const int TypeFieldNumber = 1; + private readonly static string TypeDefaultValue = ""; + + private string type_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Type { + get { return type_ ?? TypeDefaultValue; } + set { + type_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "type" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasType { + get { return type_ != null; } + } + /// Clears the value of the "type" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearType() { + type_ = null; + } + + /// Field number for the "value" field. + public const int ValueFieldNumber = 2; + private readonly static int ValueDefaultValue = 0; + + private int value_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Value { + get { if ((_hasBits0 & 1) != 0) { return value_; } else { return ValueDefaultValue; } } + set { + _hasBits0 |= 1; + value_ = value; + } + } + /// Gets whether the "value" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasValue { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "value" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearValue() { + _hasBits0 &= ~1; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as UnlockCost); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UnlockCost other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Type != other.Type) return false; + if (Value != other.Value) 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 (HasType) hash ^= Type.GetHashCode(); + if (HasValue) hash ^= Value.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 (HasType) { + output.WriteRawTag(10); + output.WriteString(Type); + } + if (HasValue) { + output.WriteRawTag(16); + output.WriteInt32(Value); + } + 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 (HasType) { + output.WriteRawTag(10); + output.WriteString(Type); + } + if (HasValue) { + output.WriteRawTag(16); + output.WriteInt32(Value); + } + 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 (HasType) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Type); + } + if (HasValue) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Value); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UnlockCost other) { + if (other == null) { + return; + } + if (other.HasType) { + Type = other.Type; + } + if (other.HasValue) { + Value = other.Value; + } + _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: { + Type = input.ReadString(); + break; + } + case 16: { + Value = input.ReadInt32(); + 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: { + Type = input.ReadString(); + break; + } + case 16: { + Value = input.ReadInt32(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Crew : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Crew()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Blitzkit.LegacyTankDefinitionsReflection.Descriptor.MessageTypes[20]; } + } + + [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 Crew() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Crew(Crew other) : this() { + _hasBits0 = other._hasBits0; + type_ = other.type_; + count_ = other.count_; + substitute_ = other.substitute_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Crew Clone() { + return new Crew(this); + } + + /// Field number for the "type" field. + public const int TypeFieldNumber = 1; + private readonly static global::Blitzkit.CrewType TypeDefaultValue = global::Blitzkit.CrewType.Commander; + + private global::Blitzkit.CrewType type_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Blitzkit.CrewType Type { + get { if ((_hasBits0 & 1) != 0) { return type_; } else { return TypeDefaultValue; } } + set { + _hasBits0 |= 1; + type_ = value; + } + } + /// Gets whether the "type" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasType { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "type" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearType() { + _hasBits0 &= ~1; + } + + /// Field number for the "count" field. + public const int CountFieldNumber = 2; + private readonly static uint CountDefaultValue = 0; + + private uint count_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint Count { + get { if ((_hasBits0 & 2) != 0) { return count_; } else { return CountDefaultValue; } } + set { + _hasBits0 |= 2; + count_ = value; + } + } + /// Gets whether the "count" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasCount { + get { return (_hasBits0 & 2) != 0; } + } + /// Clears the value of the "count" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearCount() { + _hasBits0 &= ~2; + } + + /// Field number for the "substitute" field. + public const int SubstituteFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_substitute_codec + = pb::FieldCodec.ForEnum(24, x => (int) x, x => (global::Blitzkit.CrewType) x); + private readonly pbc::RepeatedField substitute_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Substitute { + get { return substitute_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Crew); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Crew other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Type != other.Type) return false; + if (Count != other.Count) return false; + if(!substitute_.Equals(other.substitute_)) 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 (HasType) hash ^= Type.GetHashCode(); + if (HasCount) hash ^= Count.GetHashCode(); + hash ^= substitute_.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 (HasType) { + output.WriteRawTag(8); + output.WriteEnum((int) Type); + } + if (HasCount) { + output.WriteRawTag(16); + output.WriteUInt32(Count); + } + substitute_.WriteTo(output, _repeated_substitute_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 (HasType) { + output.WriteRawTag(8); + output.WriteEnum((int) Type); + } + if (HasCount) { + output.WriteRawTag(16); + output.WriteUInt32(Count); + } + substitute_.WriteTo(ref output, _repeated_substitute_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 (HasType) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type); + } + if (HasCount) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Count); + } + size += substitute_.CalculateSize(_repeated_substitute_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Crew other) { + if (other == null) { + return; + } + if (other.HasType) { + Type = other.Type; + } + if (other.HasCount) { + Count = other.Count; + } + substitute_.Add(other.substitute_); + _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: { + Type = (global::Blitzkit.CrewType) input.ReadEnum(); + break; + } + case 16: { + Count = input.ReadUInt32(); + break; + } + case 26: + case 24: { + substitute_.AddEntriesFrom(input, _repeated_substitute_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: { + Type = (global::Blitzkit.CrewType) input.ReadEnum(); + break; + } + case 16: { + Count = input.ReadUInt32(); + break; + } + case 26: + case 24: { + substitute_.AddEntriesFrom(ref input, _repeated_substitute_codec); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/BlitzKit.CLI/Protos/Tank.cs b/src/BlitzKit.CLI/Protos/Tank.cs index f1abb9bad..68ca72ce8 100644 --- a/src/BlitzKit.CLI/Protos/Tank.cs +++ b/src/BlitzKit.CLI/Protos/Tank.cs @@ -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 @@ -84,7 +45,6 @@ namespace Blitzkit { { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Tank()); private pb::UnknownFieldSet _unknownFields; - private int _hasBits0; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser 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 { } } - /// Field number for the "class" field. - 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; - } - } - /// Gets whether the "class" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasClass { - get { return (_hasBits0 & 1) != 0; } - } - /// Clears the value of the "class" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearClass() { - _hasBits0 &= ~1; - } - - /// Field number for the "type" field. - 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; - } - } - /// Gets whether the "type" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasType { - get { return (_hasBits0 & 2) != 0; } - } - /// Clears the value of the "type" field - [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; - } } } }