feat: modules list and translations

This commit is contained in:
tresabhi committed 2025-03-29 19:29:29 -05:00
1 parent 8afc334aa7
commit e6f9b07b20
23 files changed
+2301 -788

No files matched your search

+1
View File
@@ -145,6 +145,7 @@
"POSITIVEY",
"POSITIVEZ",
"precompute",
"preforged",
"Promisable",
"proto",
"protobuf",
+1 -1
View File
@@ -33,7 +33,7 @@
"update": "yarn upgrade --latest",
"tunnel": "cloudflared tunnel --url http://localhost:3000",
"discoverids": "scripts/discoverIds.ts",
"protos": "protoc packages/core/src/protos/*.proto --csharp_out=src/BlitzKit.CLI/Protos && bun packages/scripts/src/protos.ts",
"protos": "rm -rf src/BlitzKit.CLI/Protos && mkdir -p src/BlitzKit.CLI/Protos && protoc packages/core/src/protos/*.proto --csharp_out=src/BlitzKit.CLI/Protos && bun packages/scripts/src/protos.ts",
"preview:website": "cd packages/website && bun run preview",
"build:reviews": "cd packages/scripts && bun build:reviews",
"build:ids": "cd packages/scripts && bun build:ids",
-7
View File
@@ -1,7 +0,0 @@
syntax = "proto2";
package blitzkit;
message I18n {
map<string, string> locales = 1;
}
+3 -2
View File
@@ -1,5 +1,4 @@
// @ts-nocheck
export * from './i18n.ts';
export * from './legacy_average_definitions.ts';
export * from './legacy_camouflage_definitions.ts';
export * from './legacy_consumable_definitions.ts';
@@ -15,4 +14,6 @@ export * from './legacy_tank_definitions.ts';
export * from './reviews.ts';
export * from './tank.ts';
export * from './tanks.ts';
export * from './tank_armor.ts';
export * from './tank_armor.ts';
export * from './tank_model.ts';
export * from './utils.ts';
@@ -2,6 +2,8 @@ syntax = "proto2";
package blitzkit;
import "packages/core/src/protos/utils.proto";
message ModelDefinitions {
map<uint32, ModelDefinition> models = 1;
}
@@ -20,12 +22,6 @@ message Armor {
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;
@@ -6,6 +6,7 @@
/* eslint-disable */
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
import { Vector3, createBaseVector3 } from "./utils";
export const protobufPackage = "blitzkit";
@@ -47,12 +48,6 @@ export interface Armor_ThicknessEntry {
value: number;
}
export interface Vector3 {
x: number;
y: number;
z: number;
}
export interface InitialTurretRotation {
yaw: number;
pitch: number;
@@ -814,98 +809,6 @@ export const Armor_ThicknessEntry: MessageFns<Armor_ThicknessEntry> = {
},
};
function createBaseVector3(): Vector3 {
return { x: 0, y: 0, z: 0 };
}
export const Vector3: MessageFns<Vector3> = {
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 extends Exact<DeepPartial<Vector3>, I>>(base?: I): Vector3 {
return Vector3.fromPartial(base ?? ({} as any));
},
fromPartial<I extends Exact<DeepPartial<Vector3>, 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 };
}
+9 -1
View File
@@ -1,6 +1,6 @@
syntax = "proto2";
import "packages/core/src/protos/i18n.proto";
import "packages/core/src/protos/utils.proto";
package blitzkit;
@@ -8,4 +8,12 @@ message Tank {
required string id = 1;
required string slug = 2;
required I18n name = 3;
map<string, Turret> turrets = 4;
map<string, Gun> guns = 5;
}
message Turret {
}
message Gun {
}
+334 -2
View File
@@ -6,7 +6,7 @@
/* eslint-disable */
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
import { I18n, createBaseI18n } from "./i18n";
import { I18n, createBaseI18n } from "./utils";
export const protobufPackage = "blitzkit";
@@ -14,10 +14,28 @@ export interface Tank {
id: string;
slug: string;
name: I18n;
turrets: { [key: string]: Turret };
guns: { [key: string]: Gun };
}
export interface Tank_TurretsEntry {
key: string;
value: Turret | undefined;
}
export interface Tank_GunsEntry {
key: string;
value: Gun | undefined;
}
export interface Turret {
}
export interface Gun {
}
function createBaseTank(): Tank {
return { id: "", slug: "", name: createBaseI18n() };
return { id: "", slug: "", name: createBaseI18n(), turrets: {}, guns: {} };
}
export const Tank: MessageFns<Tank> = {
@@ -31,6 +49,12 @@ export const Tank: MessageFns<Tank> = {
if (message.name !== undefined) {
I18n.encode(message.name, writer.uint32(26).fork()).join();
}
Object.entries(message.turrets).forEach(([key, value]) => {
Tank_TurretsEntry.encode({ key: key as any, value }, writer.uint32(34).fork()).join();
});
Object.entries(message.guns).forEach(([key, value]) => {
Tank_GunsEntry.encode({ key: key as any, value }, writer.uint32(42).fork()).join();
});
return writer;
},
@@ -65,6 +89,28 @@ export const Tank: MessageFns<Tank> = {
message.name = I18n.decode(reader, reader.uint32());
continue;
}
case 4: {
if (tag !== 34) {
break;
}
const entry4 = Tank_TurretsEntry.decode(reader, reader.uint32());
if (entry4.value !== undefined) {
message.turrets[entry4.key] = entry4.value;
}
continue;
}
case 5: {
if (tag !== 42) {
break;
}
const entry5 = Tank_GunsEntry.decode(reader, reader.uint32());
if (entry5.value !== undefined) {
message.guns[entry5.key] = entry5.value;
}
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
@@ -79,6 +125,18 @@ export const Tank: MessageFns<Tank> = {
id: globalThis.String(assertSet("Tank.id", object.id)),
slug: globalThis.String(assertSet("Tank.slug", object.slug)),
name: I18n.fromJSON(assertSet("Tank.name", object.name)),
turrets: isObject(object.turrets)
? Object.entries(object.turrets).reduce<{ [key: string]: Turret }>((acc, [key, value]) => {
acc[key] = Turret.fromJSON(value);
return acc;
}, {})
: {},
guns: isObject(object.guns)
? Object.entries(object.guns).reduce<{ [key: string]: Gun }>((acc, [key, value]) => {
acc[key] = Gun.fromJSON(value);
return acc;
}, {})
: {},
};
},
@@ -93,6 +151,24 @@ export const Tank: MessageFns<Tank> = {
if (message.name !== undefined) {
obj.name = I18n.toJSON(message.name);
}
if (message.turrets) {
const entries = Object.entries(message.turrets);
if (entries.length > 0) {
obj.turrets = {};
entries.forEach(([k, v]) => {
obj.turrets[k] = Turret.toJSON(v);
});
}
}
if (message.guns) {
const entries = Object.entries(message.guns);
if (entries.length > 0) {
obj.guns = {};
entries.forEach(([k, v]) => {
obj.guns[k] = Gun.toJSON(v);
});
}
}
return obj;
},
@@ -106,6 +182,258 @@ export const Tank: MessageFns<Tank> = {
message.name = (object.name !== undefined && object.name !== null)
? I18n.fromPartial(object.name)
: createBaseI18n();
message.turrets = Object.entries(object.turrets ?? {}).reduce<{ [key: string]: Turret }>((acc, [key, value]) => {
if (value !== undefined) {
acc[key] = Turret.fromPartial(value);
}
return acc;
}, {});
message.guns = Object.entries(object.guns ?? {}).reduce<{ [key: string]: Gun }>((acc, [key, value]) => {
if (value !== undefined) {
acc[key] = Gun.fromPartial(value);
}
return acc;
}, {});
return message;
},
};
function createBaseTank_TurretsEntry(): Tank_TurretsEntry {
return { key: "", value: createBaseTurret() };
}
export const Tank_TurretsEntry: MessageFns<Tank_TurretsEntry> = {
encode(message: Tank_TurretsEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
if (message.key !== undefined) {
writer.uint32(10).string(message.key);
}
if (message.value !== undefined) {
Turret.encode(message.value, writer.uint32(18).fork()).join();
}
return writer;
},
decode(input: BinaryReader | Uint8Array, length?: number): Tank_TurretsEntry {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseTank_TurretsEntry();
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 = Turret.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object: any): Tank_TurretsEntry {
return {
key: globalThis.String(assertSet("Tank_TurretsEntry.key", object.key)),
value: Turret.fromJSON(assertSet("Tank_TurretsEntry.value", object.value)),
};
},
toJSON(message: Tank_TurretsEntry): unknown {
const obj: any = {};
if (message.key !== undefined) {
obj.key = message.key;
}
if (message.value !== undefined) {
obj.value = Turret.toJSON(message.value);
}
return obj;
},
create<I extends Exact<DeepPartial<Tank_TurretsEntry>, I>>(base?: I): Tank_TurretsEntry {
return Tank_TurretsEntry.fromPartial(base ?? ({} as any));
},
fromPartial<I extends Exact<DeepPartial<Tank_TurretsEntry>, I>>(object: I): Tank_TurretsEntry {
const message = createBaseTank_TurretsEntry();
message.key = object.key ?? "";
message.value = (object.value !== undefined && object.value !== null)
? Turret.fromPartial(object.value)
: undefined;
return message;
},
};
function createBaseTank_GunsEntry(): Tank_GunsEntry {
return { key: "", value: createBaseGun() };
}
export const Tank_GunsEntry: MessageFns<Tank_GunsEntry> = {
encode(message: Tank_GunsEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
if (message.key !== undefined) {
writer.uint32(10).string(message.key);
}
if (message.value !== undefined) {
Gun.encode(message.value, writer.uint32(18).fork()).join();
}
return writer;
},
decode(input: BinaryReader | Uint8Array, length?: number): Tank_GunsEntry {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseTank_GunsEntry();
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 = Gun.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object: any): Tank_GunsEntry {
return {
key: globalThis.String(assertSet("Tank_GunsEntry.key", object.key)),
value: Gun.fromJSON(assertSet("Tank_GunsEntry.value", object.value)),
};
},
toJSON(message: Tank_GunsEntry): unknown {
const obj: any = {};
if (message.key !== undefined) {
obj.key = message.key;
}
if (message.value !== undefined) {
obj.value = Gun.toJSON(message.value);
}
return obj;
},
create<I extends Exact<DeepPartial<Tank_GunsEntry>, I>>(base?: I): Tank_GunsEntry {
return Tank_GunsEntry.fromPartial(base ?? ({} as any));
},
fromPartial<I extends Exact<DeepPartial<Tank_GunsEntry>, I>>(object: I): Tank_GunsEntry {
const message = createBaseTank_GunsEntry();
message.key = object.key ?? "";
message.value = (object.value !== undefined && object.value !== null) ? Gun.fromPartial(object.value) : undefined;
return message;
},
};
function createBaseTurret(): Turret {
return {};
}
export const Turret: MessageFns<Turret> = {
encode(_: Turret, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
return writer;
},
decode(input: BinaryReader | Uint8Array, length?: number): Turret {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseTurret();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(_: any): Turret {
return {};
},
toJSON(_: Turret): unknown {
const obj: any = {};
return obj;
},
create<I extends Exact<DeepPartial<Turret>, I>>(base?: I): Turret {
return Turret.fromPartial(base ?? ({} as any));
},
fromPartial<I extends Exact<DeepPartial<Turret>, I>>(_: I): Turret {
const message = createBaseTurret();
return message;
},
};
function createBaseGun(): Gun {
return {};
}
export const Gun: MessageFns<Gun> = {
encode(_: Gun, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
return writer;
},
decode(input: BinaryReader | Uint8Array, length?: number): Gun {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseGun();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(_: any): Gun {
return {};
},
toJSON(_: Gun): unknown {
const obj: any = {};
return obj;
},
create<I extends Exact<DeepPartial<Gun>, I>>(base?: I): Gun {
return Gun.fromPartial(base ?? ({} as any));
},
fromPartial<I extends Exact<DeepPartial<Gun>, I>>(_: I): Gun {
const message = createBaseGun();
return message;
},
};
@@ -123,6 +451,10 @@ type KeysOfUnion<T> = T extends T ? keyof T : never;
export type Exact<P, I extends P> = P extends Builtin ? P
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
function isObject(value: any): boolean {
return typeof value === "object" && value !== null;
}
function isSet(value: any): boolean {
return value !== null && value !== undefined;
}
+13
View File
@@ -0,0 +1,13 @@
syntax = "proto2";
import "packages/core/src/protos/utils.proto";
package blitzkit;
message TankModel {
map<string, ModuleModel> modules = 1;
}
message ModuleModel {
required Vector3 translation = 2;
}
+282
View File
@@ -0,0 +1,282 @@
// 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/tank_model.proto
/* eslint-disable */
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
import { Vector3 } from "./utils";
export const protobufPackage = "blitzkit";
export interface TankModel {
modules: { [key: string]: ModuleModel };
}
export interface TankModel_ModulesEntry {
key: string;
value: ModuleModel | undefined;
}
export interface ModuleModel {
translation: Vector3;
}
function createBaseTankModel(): TankModel {
return { modules: {} };
}
export const TankModel: MessageFns<TankModel> = {
encode(message: TankModel, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
Object.entries(message.modules).forEach(([key, value]) => {
TankModel_ModulesEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join();
});
return writer;
},
decode(input: BinaryReader | Uint8Array, length?: number): TankModel {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseTankModel();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
const entry1 = TankModel_ModulesEntry.decode(reader, reader.uint32());
if (entry1.value !== undefined) {
message.modules[entry1.key] = entry1.value;
}
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object: any): TankModel {
return {
modules: isObject(object.modules)
? Object.entries(object.modules).reduce<{ [key: string]: ModuleModel }>((acc, [key, value]) => {
acc[key] = ModuleModel.fromJSON(value);
return acc;
}, {})
: {},
};
},
toJSON(message: TankModel): unknown {
const obj: any = {};
if (message.modules) {
const entries = Object.entries(message.modules);
if (entries.length > 0) {
obj.modules = {};
entries.forEach(([k, v]) => {
obj.modules[k] = ModuleModel.toJSON(v);
});
}
}
return obj;
},
create<I extends Exact<DeepPartial<TankModel>, I>>(base?: I): TankModel {
return TankModel.fromPartial(base ?? ({} as any));
},
fromPartial<I extends Exact<DeepPartial<TankModel>, I>>(object: I): TankModel {
const message = createBaseTankModel();
message.modules = Object.entries(object.modules ?? {}).reduce<{ [key: string]: ModuleModel }>(
(acc, [key, value]) => {
if (value !== undefined) {
acc[key] = ModuleModel.fromPartial(value);
}
return acc;
},
{},
);
return message;
},
};
function createBaseTankModel_ModulesEntry(): TankModel_ModulesEntry {
return { key: "", value: createBaseModuleModel() };
}
export const TankModel_ModulesEntry: MessageFns<TankModel_ModulesEntry> = {
encode(message: TankModel_ModulesEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
if (message.key !== undefined) {
writer.uint32(10).string(message.key);
}
if (message.value !== undefined) {
ModuleModel.encode(message.value, writer.uint32(18).fork()).join();
}
return writer;
},
decode(input: BinaryReader | Uint8Array, length?: number): TankModel_ModulesEntry {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseTankModel_ModulesEntry();
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 = ModuleModel.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object: any): TankModel_ModulesEntry {
return {
key: globalThis.String(assertSet("TankModel_ModulesEntry.key", object.key)),
value: ModuleModel.fromJSON(assertSet("TankModel_ModulesEntry.value", object.value)),
};
},
toJSON(message: TankModel_ModulesEntry): unknown {
const obj: any = {};
if (message.key !== undefined) {
obj.key = message.key;
}
if (message.value !== undefined) {
obj.value = ModuleModel.toJSON(message.value);
}
return obj;
},
create<I extends Exact<DeepPartial<TankModel_ModulesEntry>, I>>(base?: I): TankModel_ModulesEntry {
return TankModel_ModulesEntry.fromPartial(base ?? ({} as any));
},
fromPartial<I extends Exact<DeepPartial<TankModel_ModulesEntry>, I>>(object: I): TankModel_ModulesEntry {
const message = createBaseTankModel_ModulesEntry();
message.key = object.key ?? "";
message.value = (object.value !== undefined && object.value !== null)
? ModuleModel.fromPartial(object.value)
: undefined;
return message;
},
};
function createBaseModuleModel(): ModuleModel {
return { translation: createBaseVector3() };
}
export const ModuleModel: MessageFns<ModuleModel> = {
encode(message: ModuleModel, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
if (message.translation !== undefined) {
Vector3.encode(message.translation, writer.uint32(18).fork()).join();
}
return writer;
},
decode(input: BinaryReader | Uint8Array, length?: number): ModuleModel {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseModuleModel();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 2: {
if (tag !== 18) {
break;
}
message.translation = Vector3.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object: any): ModuleModel {
return { translation: Vector3.fromJSON(assertSet("ModuleModel.translation", object.translation)) };
},
toJSON(message: ModuleModel): unknown {
const obj: any = {};
if (message.translation !== undefined) {
obj.translation = Vector3.toJSON(message.translation);
}
return obj;
},
create<I extends Exact<DeepPartial<ModuleModel>, I>>(base?: I): ModuleModel {
return ModuleModel.fromPartial(base ?? ({} as any));
},
fromPartial<I extends Exact<DeepPartial<ModuleModel>, I>>(object: I): ModuleModel {
const message = createBaseModuleModel();
message.translation = (object.translation !== undefined && object.translation !== null)
? Vector3.fromPartial(object.translation)
: createBaseVector3();
return message;
},
};
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends { $case: string; value: unknown } ? { $case: T["$case"]; value?: DeepPartial<T["value"]> }
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
type KeysOfUnion<T> = T extends T ? keyof T : never;
export type Exact<P, I extends P> = P extends Builtin ? P
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
function isObject(value: any): boolean {
return typeof value === "object" && value !== null;
}
function isSet(value: any): boolean {
return value !== null && value !== undefined;
}
function assertSet<T>(field: string, value: T | undefined): T {
if (!isSet(value)) {
throw new TypeError(`Required field ${field} is not set`);
}
return value as T;
}
export interface MessageFns<T> {
encode(message: T, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): T;
fromJSON(object: any): T;
toJSON(message: T): unknown;
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
}
+13
View File
@@ -0,0 +1,13 @@
syntax = "proto2";
package blitzkit;
message Vector3 {
required float x = 1;
required float y = 2;
required float z = 3;
}
message I18n {
map<string, string> locales = 1;
}
@@ -2,13 +2,19 @@
// versions:
// protoc-gen-ts_proto v2.2.2
// protoc v5.28.2
// source: packages/core/src/protos/i18n.proto
// source: packages/core/src/protos/utils.proto
/* eslint-disable */
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
export const protobufPackage = "blitzkit";
export interface Vector3 {
x: number;
y: number;
z: number;
}
export interface I18n {
locales: { [key: string]: string };
}
@@ -18,6 +24,98 @@ export interface I18n_LocalesEntry {
value: string;
}
export function createBaseVector3(): Vector3 {
return { x: 0, y: 0, z: 0 };
}
export const Vector3: MessageFns<Vector3> = {
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 extends Exact<DeepPartial<Vector3>, I>>(base?: I): Vector3 {
return Vector3.fromPartial(base ?? ({} as any));
},
fromPartial<I extends Exact<DeepPartial<Vector3>, I>>(object: I): Vector3 {
const message = createBaseVector3();
message.x = object.x ?? 0;
message.y = object.y ?? 0;
message.z = object.z ?? 0;
return message;
},
};
export function createBaseI18n(): I18n {
return { locales: {} };
}
@@ -10,11 +10,13 @@ export const StaticArmor = memo(() => {
<group>
<StaticArmorSceneComponent group="hull" />
<StaticArmorSceneComponent group="chassis" />
<group position={[0.7, 1.6, 0]}>
<group position={[65.92709 / 100, 155.5313 / 100, 0.022151405 / 100]}>
<StaticArmorSceneComponent group="turret_01" />
<group position={[1, 0.36, 0]}>
<StaticArmorSceneComponent group="gun_01" />
</group>
</group>
<group position={[194.92838 / 100, 190.19179 / 100, 0.06545235 / 100]}>
<StaticArmorSceneComponent group="gun_01" />
</group>
</group>
);
@@ -137,7 +137,7 @@ export const TankopediaEphemeral = createContextualStore(
armor,
controlsEnabled: true,
xpMultiplier: 1,
display: TankopediaDisplay.Dissector,
display: TankopediaDisplay.StaticArmor,
})),
);
},
+84 -58
View File
@@ -9,6 +9,7 @@ using CUE4Parse.UE4.Assets.Exports.Engine;
using CUE4Parse.UE4.Assets.Exports.StaticMesh;
using CUE4Parse.UE4.Assets.Exports.Texture;
using CUE4Parse.UE4.Assets.Objects;
using CUE4Parse.UE4.Objects.Core.Math;
using CUE4Parse.UE4.Objects.UObject;
using CUE4Parse.Utils;
using Google.Protobuf;
@@ -48,7 +49,7 @@ namespace BlitzKit.CLI.Functions
readonly BlitzProvider provider = new(args.Contains("--depot"));
Locales? locales;
readonly Dictionary<string, Dictionary<string, string>> strings = [];
readonly AssetUploader assetUploader = new("mangled ue assets");
readonly AssetUploader assetUploader = new("mangled ue assets") { enabled = true };
public async Task Mangle()
{
@@ -137,11 +138,11 @@ namespace BlitzKit.CLI.Functions
foreach (var tank in tanksFull.Tanks)
{
tanks.Tanks_.Add(tank.Id);
await assetUploader.Add(new($"tanks/{tank.Id}/meta.pb", tank.ToByteArray()));
await assetUploader.Add($"tanks/{tank.Id}/meta.pb", tank.ToByteArray());
}
await assetUploader.Add(new("definitions/tanks.pb", tanks.ToByteArray()));
await assetUploader.Add(new("definitions/tanks-full.pb", tanksFull.ToByteArray()));
await assetUploader.Add("definitions/tanks.pb", tanks.ToByteArray());
await assetUploader.Add("definitions/tanks-full.pb", tanksFull.ToByteArray());
}
void DeduplicateSlugs(TanksFull tanksFull)
@@ -219,14 +220,13 @@ namespace BlitzKit.CLI.Functions
var pdaName = $"PDA_{tankDir.Name}";
var pda = provider.LoadObject($"{tankDir.Path}/{pdaName}.{pdaName}");
var id = PropertyUtil.Get<FName>(pda, "TankId").Text;
var id = pda.Get<FName>("TankId").Text;
var name = GetString($"TankEntity__{id.ToLowerInvariant()}__Short_Name");
var slug = Diacritics.Remove(name.Locales["en"]).ToLower();
slug = NonAlphanumericRegex().Replace(slug, "-");
slug = MultipleDashesRegex().Replace(slug, "-");
slug = TrailingDashRegex().Replace(slug, "");
await MangleCollision(id, pda);
await MangleIcon(pda);
await MangleArmor(pda);
@@ -237,39 +237,35 @@ namespace BlitzKit.CLI.Functions
Slug = slug,
};
await MangleModules(tank, pda);
return tank;
}
async Task MangleArmor(UObject pda)
{
var id = PropertyUtil.Get<FName>(pda, "TankId").Text;
var id = pda.Get<FName>("TankId").Text;
TankArmor tankArmor = new();
var attributes = PropertyUtil.Get<UObject>(pda, "DA_Attributes");
PropertyUtil.TryGet<UScriptMap>(attributes, "PenetrationGroups", out var penetrationGroups);
var attributes = pda.Get<UObject>("DA_Attributes");
if (penetrationGroups == null)
{
PrettyLog.Warn($"Penetration groups missing for {id}; creating empty list");
}
else
if (attributes.TryGet<UScriptMap>("PenetrationGroups", out var penetrationGroups))
{
foreach (var group in penetrationGroups.Properties)
{
var rawName = ((FName)group.Key.GenericValue!).Text;
var name = PenetrationGroupNameMap[rawName];
var armors = PropertyUtil.Get<UScriptMap>(
group.Value!.GetValue<FStructFallback>()!,
"PenetrationGroups"
);
var armors = group
.Value!.GetValue<FStructFallback>()!
.Get<UScriptMap>("PenetrationGroups");
PenetrationGroup penetrationGroup = new();
foreach (var armorProperty in armors.Properties)
{
var armorName = ((FName)armorProperty.Key.GenericValue!).Text;
var armorProperties = armorProperty.Value!.GetValue<FStructFallback>()!;
var thickness = PropertyUtil.Get<float>(armorProperties, "Armor");
var commonData = PropertyUtil.Get<FStructFallback>(armorProperties, "CommonData");
var rowName = PropertyUtil.Get<FName>(commonData, "RowName");
var thickness = armorProperties.Get<float>("Armor");
var commonData = armorProperties.Get<FStructFallback>("CommonData");
var rowName = commonData.Get<FName>("RowName");
penetrationGroup.Armors[armorName] = new()
{
@@ -281,65 +277,95 @@ namespace BlitzKit.CLI.Functions
tankArmor.Groups[name] = penetrationGroup;
}
}
else
{
PrettyLog.Warn($"Penetration groups missing for {id}; creating empty list");
}
await assetUploader.Add(new($"tanks/{id}/armor.pb", tankArmor.ToByteArray()));
await assetUploader.Add($"tanks/{id}/armor.pb", tankArmor.ToByteArray());
}
async Task MangleIcon(UObject pda)
{
var id = PropertyUtil.Get<FName>(pda, "TankId").Text;
PropertyUtil.TryGet<UTexture2D>(pda, "SmallIcon", out var smallIconTexture);
PropertyUtil.TryGet<UTexture2D>(pda, "BigIcon", out var bigIconTexture);
var id = pda.Get<FName>("TankId").Text;
if (smallIconTexture is null)
if (pda.TryGet<UTexture2D>("SmallIcon", out var smallIconTexture))
{
var smallIcon = BlitzKitExporter.Texture2D(smallIconTexture);
await assetUploader.Add($"tanks/{id}/icons/small.png", smallIcon);
}
else
{
PrettyLog.Warn($"Small icon missing for {id}");
}
else
{
var smallIcon = BlitzKitExporter.Texture2D(smallIconTexture);
await assetUploader.Add(new($"tanks/{id}/icons/small.png", smallIcon));
}
if (bigIconTexture is null)
if (pda.TryGet<UTexture2D>("BigIcon", out var bigIconTexture))
{
var bigIcon = BlitzKitExporter.Texture2D(bigIconTexture);
await assetUploader.Add($"tanks/{id}/icons/big.png", bigIcon);
}
else
{
PrettyLog.Warn($"Big icon missing for {id}");
}
else
{
var bigIcon = BlitzKitExporter.Texture2D(bigIconTexture);
await assetUploader.Add(new($"tanks/{id}/icons/big.png", bigIcon));
}
}
async Task MangleModuleCollision(string id, UDataTable dt)
async Task MangleModules(Tank tank, UObject pda)
{
foreach (var row in dt.RowMap)
TankModel tankModel = new();
foreach (var moduleType in CollisionDTs)
{
var moduleName = row.Key.Text;
var visualData = PropertyUtil.Get<UObject>(row.Value, "VisualData");
var meshSettings = PropertyUtil.Get<FStructFallback>(visualData, "MeshSettings");
var dt = pda.Get<UDataTable>(moduleType);
if (PropertyUtil.TryGet<UStaticMesh>(meshSettings, "CollisionMesh", out var collision))
foreach (var row in dt.RowMap)
{
MonoGltf gltf = new(collision);
var moduleName = row.Key.Text;
ModuleModel moduleModel = new();
var visualData = row.Value.Get<UObject>("VisualData");
var meshSettings = visualData.Get<FStructFallback>("MeshSettings");
var boneTransform = meshSettings.Get<FStructFallback>("BoneTransform");
await assetUploader.Add(new($"tanks/{id}/collision/{moduleName}.glb", gltf.Write()));
}
else
{
PrettyLog.Warn($"No collision mesh found for {id} {moduleName}; skipping...");
}
;
}
}
switch (moduleType)
{
case "DT_Turrets":
{
Turret turret = new();
tank.Turrets[moduleName] = turret;
break;
}
async Task MangleCollision(string id, UObject pda)
{
foreach (var name in CollisionDTs)
{
await MangleModuleCollision(id, PropertyUtil.Get<UDataTable>(pda, name));
case "DT_Guns":
{
Gun gun = new();
tank.Guns[moduleName] = gun;
break;
}
}
if (boneTransform.TryGet<FVector>("Translation", out var translation))
{
moduleModel.Translation = BlitzKitExporter.Vector3(translation);
}
tankModel.Modules[moduleName] = moduleModel;
if (meshSettings.TryGet<UStaticMesh>("CollisionMesh", out var collision))
{
MonoGltf gltf = new(collision);
await assetUploader.Add(
new($"tanks/{tank.Id}/collision/{moduleName}.glb", gltf.Write())
);
}
else
{
PrettyLog.Warn($"No collision mesh found for {tank.Id} {moduleName}; skipping...");
}
}
}
await assetUploader.Add($"tanks/{tank.Id}/model.pb", tankModel.ToByteArray());
}
}
}
+5
View File
@@ -28,6 +28,11 @@ namespace BlitzKit.CLI.Models
private static readonly List<FileChange> changes = [];
private int changesSize = 0;
public async Task Add(string blobPath, byte[] blob)
{
await Add(new(blobPath, blob));
}
public async Task Add(FileChange change)
{
if (!enabled)
-232
View File
@@ -1,232 +0,0 @@
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: packages/core/src/protos/i18n.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021, 8981
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Blitzkit {
/// <summary>Holder for reflection information generated from packages/core/src/protos/i18n.proto</summary>
public static partial class I18NReflection {
#region Descriptor
/// <summary>File descriptor for packages/core/src/protos/i18n.proto</summary>
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;
static I18NReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"CiNwYWNrYWdlcy9jb3JlL3NyYy9wcm90b3MvaTE4bi5wcm90bxIIYmxpdHpr",
"aXQiZAoESTE4bhIsCgdsb2NhbGVzGAEgAygLMhsuYmxpdHpraXQuSTE4bi5M",
"b2NhbGVzRW50cnkaLgoMTG9jYWxlc0VudHJ5EgsKA2tleRgBIAEoCRINCgV2",
"YWx1ZRgCIAEoCToCOAE="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.I18n), global::Blitzkit.I18n.Parser, new[]{ "Locales" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, })
}));
}
#endregion
}
#region Messages
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
public sealed partial class I18n : pb::IMessage<I18n>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<I18n> _parser = new pb::MessageParser<I18n>(() => new I18n());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pb::MessageParser<I18n> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor {
get { return global::Blitzkit.I18NReflection.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 I18n() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public I18n(I18n other) : this() {
locales_ = other.locales_.Clone();
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public I18n Clone() {
return new I18n(this);
}
/// <summary>Field number for the "locales" field.</summary>
public const int LocalesFieldNumber = 1;
private static readonly pbc::MapField<string, string>.Codec _map_locales_codec
= new pbc::MapField<string, string>.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForString(18, ""), 10);
private readonly pbc::MapField<string, string> locales_ = new pbc::MapField<string, string>();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public pbc::MapField<string, string> Locales {
get { return locales_; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override bool Equals(object other) {
return Equals(other as I18n);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool Equals(I18n 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(I18n 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
+49 -369
View File
@@ -25,53 +25,52 @@ namespace Blitzkit {
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"));
"aXRpb25zLnByb3RvEghibGl0emtpdBokcGFja2FnZXMvY29yZS9zcmMvcHJv",
"dG9zL3V0aWxzLnByb3RvIpQBChBNb2RlbERlZmluaXRpb25zEjYKBm1vZGVs",
"cxgBIAMoCzImLmJsaXR6a2l0Lk1vZGVsRGVmaW5pdGlvbnMuTW9kZWxzRW50",
"cnkaSAoLTW9kZWxzRW50cnkSCwoDa2V5GAEgASgNEigKBXZhbHVlGAIgASgL",
"MhkuYmxpdHpraXQuTW9kZWxEZWZpbml0aW9uOgI4ASLaAwoPTW9kZWxEZWZp",
"bml0aW9uEh4KBWFybW9yGAEgAigLMg8uYmxpdHpraXQuQXJtb3ISKAoNdHVy",
"cmV0X29yaWdpbhgCIAIoCzIRLmJsaXR6a2l0LlZlY3RvcjMSQAoXaW5pdGlh",
"bF90dXJyZXRfcm90YXRpb24YAyABKAsyHy5ibGl0emtpdC5Jbml0aWFsVHVy",
"cmV0Um90YXRpb24SNwoHdHVycmV0cxgEIAMoCzImLmJsaXR6a2l0Lk1vZGVs",
"RGVmaW5pdGlvbi5UdXJyZXRzRW50cnkSNQoGdHJhY2tzGAUgAygLMiUuYmxp",
"dHpraXQuTW9kZWxEZWZpbml0aW9uLlRyYWNrc0VudHJ5EisKDGJvdW5kaW5n",
"X2JveBgGIAIoCzIVLmJsaXR6a2l0LkJvdW5kaW5nQm94Gk8KDFR1cnJldHNF",
"bnRyeRILCgNrZXkYASABKA0SLgoFdmFsdWUYAiABKAsyHy5ibGl0emtpdC5U",
"dXJyZXRNb2RlbERlZmluaXRpb246AjgBGk0KC1RyYWNrc0VudHJ5EgsKA2tl",
"eRgBIAEoDRItCgV2YWx1ZRgCIAEoCzIeLmJsaXR6a2l0LlRyYWNrTW9kZWxE",
"ZWZpbml0aW9uOgI4ASJ8CgVBcm1vchIxCgl0aGlja25lc3MYASADKAsyHi5i",
"bGl0emtpdC5Bcm1vci5UaGlja25lc3NFbnRyeRIOCgZzcGFjZWQYAiADKA0a",
"MAoOVGhpY2tuZXNzRW50cnkSCwoDa2V5GAEgASgNEg0KBXZhbHVlGAIgASgC",
"OgI4ASJBChVJbml0aWFsVHVycmV0Um90YXRpb24SCwoDeWF3GAEgAigCEg0K",
"BXBpdGNoGAIgAigCEgwKBHJvbGwYAyACKAIiwwIKFVR1cnJldE1vZGVsRGVm",
"aW5pdGlvbhIrCgxib3VuZGluZ19ib3gYASACKAsyFS5ibGl0emtpdC5Cb3Vu",
"ZGluZ0JveBIeCgVhcm1vchgCIAIoCzIPLmJsaXR6a2l0LkFybW9yEhAKCG1v",
"ZGVsX2lkGAMgAigNEiUKCmd1bl9vcmlnaW4YBCACKAsyES5ibGl0emtpdC5W",
"ZWN0b3IzEjcKBGd1bnMYBSADKAsyKS5ibGl0emtpdC5UdXJyZXRNb2RlbERl",
"ZmluaXRpb24uR3Vuc0VudHJ5EiAKA3lhdxgGIAEoCzITLmJsaXR6a2l0Lllh",
"d0xpbWl0cxpJCglHdW5zRW50cnkSCwoDa2V5GAEgASgNEisKBXZhbHVlGAIg",
"ASgLMhwuYmxpdHpraXQuR3VuTW9kZWxEZWZpbml0aW9uOgI4ASIlCglZYXdM",
"aW1pdHMSCwoDbWluGAEgAigCEgsKA21heBgCIAIoAiJNCgtCb3VuZGluZ0Jv",
"eBIeCgNtaW4YASACKAsyES5ibGl0emtpdC5WZWN0b3IzEh4KA21heBgCIAIo",
"CzIRLmJsaXR6a2l0LlZlY3RvcjMiTAoUVHJhY2tNb2RlbERlZmluaXRpb24S",
"EQoJdGhpY2tuZXNzGAEgAigCEiEKBm9yaWdpbhgCIAIoCzIRLmJsaXR6a2l0",
"LlZlY3RvcjMijQEKEkd1bk1vZGVsRGVmaW5pdGlvbhIeCgVhcm1vchgBIAIo",
"CzIPLmJsaXR6a2l0LkFybW9yEhEKCXRoaWNrbmVzcxgCIAIoAhIQCghtb2Rl",
"bF9pZBgDIAIoDRIkCgVwaXRjaBgEIAIoCzIVLmJsaXR6a2l0LlBpdGNoTGlt",
"aXRzEgwKBG1hc2sYBSABKAIilAEKC1BpdGNoTGltaXRzEgsKA21pbhgBIAIo",
"AhILCgNtYXgYAiACKAISKwoFZnJvbnQYAyABKAsyHC5ibGl0emtpdC5QaXRj",
"aExpbWl0c0V4dHJlbWESKgoEYmFjaxgEIAEoCzIcLmJsaXR6a2l0LlBpdGNo",
"TGltaXRzRXh0cmVtYRISCgp0cmFuc2l0aW9uGAUgASgCIj0KElBpdGNoTGlt",
"aXRzRXh0cmVtYRILCgNtaW4YASACKAISCwoDbWF4GAIgAigCEg0KBXJhbmdl",
"GAMgAigC"));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::FileDescriptor[] { global::Blitzkit.UtilsReflection.Descriptor, },
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),
@@ -885,325 +884,6 @@ namespace Blitzkit {
}
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
public sealed partial class Vector3 : pb::IMessage<Vector3>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<Vector3> _parser = new pb::MessageParser<Vector3>(() => new Vector3());
private pb::UnknownFieldSet _unknownFields;
private int _hasBits0;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pb::MessageParser<Vector3> 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);
}
/// <summary>Field number for the "x" field.</summary>
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;
}
}
/// <summary>Gets whether the "x" field is set</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool HasX {
get { return (_hasBits0 & 1) != 0; }
}
/// <summary>Clears the value of the "x" field</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void ClearX() {
_hasBits0 &= ~1;
}
/// <summary>Field number for the "y" field.</summary>
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;
}
}
/// <summary>Gets whether the "y" field is set</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool HasY {
get { return (_hasBits0 & 2) != 0; }
}
/// <summary>Clears the value of the "y" field</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void ClearY() {
_hasBits0 &= ~2;
}
/// <summary>Field number for the "z" field.</summary>
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;
}
}
/// <summary>Gets whether the "z" field is set</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool HasZ {
get { return (_hasBits0 & 4) != 0; }
}
/// <summary>Clears the value of the "z" field</summary>
[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<InitialTurretRotation>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
@@ -1220,7 +900,7 @@ namespace Blitzkit {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor {
get { return global::Blitzkit.LegacyModelDefinitionsReflection.Descriptor.MessageTypes[4]; }
get { return global::Blitzkit.LegacyModelDefinitionsReflection.Descriptor.MessageTypes[3]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -1539,7 +1219,7 @@ namespace Blitzkit {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor {
get { return global::Blitzkit.LegacyModelDefinitionsReflection.Descriptor.MessageTypes[5]; }
get { return global::Blitzkit.LegacyModelDefinitionsReflection.Descriptor.MessageTypes[4]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -1964,7 +1644,7 @@ namespace Blitzkit {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor {
get { return global::Blitzkit.LegacyModelDefinitionsReflection.Descriptor.MessageTypes[6]; }
get { return global::Blitzkit.LegacyModelDefinitionsReflection.Descriptor.MessageTypes[5]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -2230,7 +1910,7 @@ namespace Blitzkit {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor {
get { return global::Blitzkit.LegacyModelDefinitionsReflection.Descriptor.MessageTypes[7]; }
get { return global::Blitzkit.LegacyModelDefinitionsReflection.Descriptor.MessageTypes[6]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -2484,7 +2164,7 @@ namespace Blitzkit {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor {
get { return global::Blitzkit.LegacyModelDefinitionsReflection.Descriptor.MessageTypes[8]; }
get { return global::Blitzkit.LegacyModelDefinitionsReflection.Descriptor.MessageTypes[7]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -2745,7 +2425,7 @@ namespace Blitzkit {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor {
get { return global::Blitzkit.LegacyModelDefinitionsReflection.Descriptor.MessageTypes[9]; }
get { return global::Blitzkit.LegacyModelDefinitionsReflection.Descriptor.MessageTypes[8]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -3156,7 +2836,7 @@ namespace Blitzkit {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor {
get { return global::Blitzkit.LegacyModelDefinitionsReflection.Descriptor.MessageTypes[10]; }
get { return global::Blitzkit.LegacyModelDefinitionsReflection.Descriptor.MessageTypes[9]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -3567,7 +3247,7 @@ namespace Blitzkit {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor {
get { return global::Blitzkit.LegacyModelDefinitionsReflection.Descriptor.MessageTypes[11]; }
get { return global::Blitzkit.LegacyModelDefinitionsReflection.Descriptor.MessageTypes[10]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+386 -5
View File
@@ -25,13 +25,20 @@ namespace Blitzkit {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"CiNwYWNrYWdlcy9jb3JlL3NyYy9wcm90b3MvdGFuay5wcm90bxIIYmxpdHpr",
"aXQaI3BhY2thZ2VzL2NvcmUvc3JjL3Byb3Rvcy9pMThuLnByb3RvIj4KBFRh",
"bmsSCgoCaWQYASACKAkSDAoEc2x1ZxgCIAIoCRIcCgRuYW1lGAMgAigLMg4u",
"YmxpdHpraXQuSTE4bg=="));
"aXQaJHBhY2thZ2VzL2NvcmUvc3JjL3Byb3Rvcy91dGlscy5wcm90byKSAgoE",
"VGFuaxIKCgJpZBgBIAIoCRIMCgRzbHVnGAIgAigJEhwKBG5hbWUYAyACKAsy",
"Di5ibGl0emtpdC5JMThuEiwKB3R1cnJldHMYBCADKAsyGy5ibGl0emtpdC5U",
"YW5rLlR1cnJldHNFbnRyeRImCgRndW5zGAUgAygLMhguYmxpdHpraXQuVGFu",
"ay5HdW5zRW50cnkaQAoMVHVycmV0c0VudHJ5EgsKA2tleRgBIAEoCRIfCgV2",
"YWx1ZRgCIAEoCzIQLmJsaXR6a2l0LlR1cnJldDoCOAEaOgoJR3Vuc0VudHJ5",
"EgsKA2tleRgBIAEoCRIcCgV2YWx1ZRgCIAEoCzINLmJsaXR6a2l0Lkd1bjoC",
"OAEiCAoGVHVycmV0IgUKA0d1bg=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Blitzkit.I18NReflection.Descriptor, },
new pbr::FileDescriptor[] { global::Blitzkit.UtilsReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.Tank), global::Blitzkit.Tank.Parser, new[]{ "Id", "Slug", "Name" }, null, null, null, null)
new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.Tank), global::Blitzkit.Tank.Parser, new[]{ "Id", "Slug", "Name", "Turrets", "Guns" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, null, }),
new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.Turret), global::Blitzkit.Turret.Parser, null, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.Gun), global::Blitzkit.Gun.Parser, null, null, null, null, null)
}));
}
#endregion
@@ -76,6 +83,8 @@ namespace Blitzkit {
id_ = other.id_;
slug_ = other.slug_;
name_ = other.name_ != null ? other.name_.Clone() : null;
turrets_ = other.turrets_.Clone();
guns_ = other.guns_.Clone();
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
@@ -149,6 +158,28 @@ namespace Blitzkit {
}
}
/// <summary>Field number for the "turrets" field.</summary>
public const int TurretsFieldNumber = 4;
private static readonly pbc::MapField<string, global::Blitzkit.Turret>.Codec _map_turrets_codec
= new pbc::MapField<string, global::Blitzkit.Turret>.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForMessage(18, global::Blitzkit.Turret.Parser), 34);
private readonly pbc::MapField<string, global::Blitzkit.Turret> turrets_ = new pbc::MapField<string, global::Blitzkit.Turret>();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public pbc::MapField<string, global::Blitzkit.Turret> Turrets {
get { return turrets_; }
}
/// <summary>Field number for the "guns" field.</summary>
public const int GunsFieldNumber = 5;
private static readonly pbc::MapField<string, global::Blitzkit.Gun>.Codec _map_guns_codec
= new pbc::MapField<string, global::Blitzkit.Gun>.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForMessage(18, global::Blitzkit.Gun.Parser), 42);
private readonly pbc::MapField<string, global::Blitzkit.Gun> guns_ = new pbc::MapField<string, global::Blitzkit.Gun>();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public pbc::MapField<string, global::Blitzkit.Gun> Guns {
get { return guns_; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override bool Equals(object other) {
@@ -167,6 +198,8 @@ namespace Blitzkit {
if (Id != other.Id) return false;
if (Slug != other.Slug) return false;
if (!object.Equals(Name, other.Name)) return false;
if (!Turrets.Equals(other.Turrets)) return false;
if (!Guns.Equals(other.Guns)) return false;
return Equals(_unknownFields, other._unknownFields);
}
@@ -177,6 +210,8 @@ namespace Blitzkit {
if (HasId) hash ^= Id.GetHashCode();
if (HasSlug) hash ^= Slug.GetHashCode();
if (name_ != null) hash ^= Name.GetHashCode();
hash ^= Turrets.GetHashCode();
hash ^= Guns.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
@@ -207,6 +242,8 @@ namespace Blitzkit {
output.WriteRawTag(26);
output.WriteMessage(Name);
}
turrets_.WriteTo(output, _map_turrets_codec);
guns_.WriteTo(output, _map_guns_codec);
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
@@ -229,6 +266,8 @@ namespace Blitzkit {
output.WriteRawTag(26);
output.WriteMessage(Name);
}
turrets_.WriteTo(ref output, _map_turrets_codec);
guns_.WriteTo(ref output, _map_guns_codec);
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
@@ -248,6 +287,8 @@ namespace Blitzkit {
if (name_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(Name);
}
size += turrets_.CalculateSize(_map_turrets_codec);
size += guns_.CalculateSize(_map_guns_codec);
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
@@ -272,6 +313,8 @@ namespace Blitzkit {
}
Name.MergeFrom(other.Name);
}
turrets_.MergeFrom(other.turrets_);
guns_.MergeFrom(other.guns_);
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
@@ -306,6 +349,14 @@ namespace Blitzkit {
input.ReadMessage(Name);
break;
}
case 34: {
turrets_.AddEntriesFrom(input, _map_turrets_codec);
break;
}
case 42: {
guns_.AddEntriesFrom(input, _map_guns_codec);
break;
}
}
}
#endif
@@ -340,6 +391,336 @@ namespace Blitzkit {
input.ReadMessage(Name);
break;
}
case 34: {
turrets_.AddEntriesFrom(ref input, _map_turrets_codec);
break;
}
case 42: {
guns_.AddEntriesFrom(ref input, _map_guns_codec);
break;
}
}
}
}
#endif
}
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
public sealed partial class Turret : pb::IMessage<Turret>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<Turret> _parser = new pb::MessageParser<Turret>(() => new Turret());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pb::MessageParser<Turret> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor {
get { return global::Blitzkit.TankReflection.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 Turret() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public Turret(Turret other) : this() {
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public Turret Clone() {
return new Turret(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override bool Equals(object other) {
return Equals(other as Turret);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool Equals(Turret other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override int GetHashCode() {
int hash = 1;
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 (_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 (_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 (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(Turret other) {
if (other == null) {
return;
}
_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;
}
}
#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;
}
}
}
#endif
}
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
public sealed partial class Gun : pb::IMessage<Gun>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<Gun> _parser = new pb::MessageParser<Gun>(() => new Gun());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pb::MessageParser<Gun> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor {
get { return global::Blitzkit.TankReflection.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 Gun() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public Gun(Gun other) : this() {
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public Gun Clone() {
return new Gun(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override bool Equals(object other) {
return Equals(other as Gun);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool Equals(Gun other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override int GetHashCode() {
int hash = 1;
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 (_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 (_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 (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(Gun other) {
if (other == null) {
return;
}
_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;
}
}
#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;
}
}
}
+443
View File
@@ -0,0 +1,443 @@
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: packages/core/src/protos/tank_model.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021, 8981
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Blitzkit {
/// <summary>Holder for reflection information generated from packages/core/src/protos/tank_model.proto</summary>
public static partial class TankModelReflection {
#region Descriptor
/// <summary>File descriptor for packages/core/src/protos/tank_model.proto</summary>
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;
static TankModelReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"CilwYWNrYWdlcy9jb3JlL3NyYy9wcm90b3MvdGFua19tb2RlbC5wcm90bxII",
"YmxpdHpraXQaJHBhY2thZ2VzL2NvcmUvc3JjL3Byb3Rvcy91dGlscy5wcm90",
"byKFAQoJVGFua01vZGVsEjEKB21vZHVsZXMYASADKAsyIC5ibGl0emtpdC5U",
"YW5rTW9kZWwuTW9kdWxlc0VudHJ5GkUKDE1vZHVsZXNFbnRyeRILCgNrZXkY",
"ASABKAkSJAoFdmFsdWUYAiABKAsyFS5ibGl0emtpdC5Nb2R1bGVNb2RlbDoC",
"OAEiNQoLTW9kdWxlTW9kZWwSJgoLdHJhbnNsYXRpb24YAiACKAsyES5ibGl0",
"emtpdC5WZWN0b3Iz"));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Blitzkit.UtilsReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.TankModel), global::Blitzkit.TankModel.Parser, new[]{ "Modules" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }),
new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.ModuleModel), global::Blitzkit.ModuleModel.Parser, new[]{ "Translation" }, null, null, null, null)
}));
}
#endregion
}
#region Messages
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
public sealed partial class TankModel : pb::IMessage<TankModel>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<TankModel> _parser = new pb::MessageParser<TankModel>(() => new TankModel());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pb::MessageParser<TankModel> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor {
get { return global::Blitzkit.TankModelReflection.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 TankModel() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public TankModel(TankModel other) : this() {
modules_ = other.modules_.Clone();
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public TankModel Clone() {
return new TankModel(this);
}
/// <summary>Field number for the "modules" field.</summary>
public const int ModulesFieldNumber = 1;
private static readonly pbc::MapField<string, global::Blitzkit.ModuleModel>.Codec _map_modules_codec
= new pbc::MapField<string, global::Blitzkit.ModuleModel>.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForMessage(18, global::Blitzkit.ModuleModel.Parser), 10);
private readonly pbc::MapField<string, global::Blitzkit.ModuleModel> modules_ = new pbc::MapField<string, global::Blitzkit.ModuleModel>();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public pbc::MapField<string, global::Blitzkit.ModuleModel> Modules {
get { return modules_; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override bool Equals(object other) {
return Equals(other as TankModel);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool Equals(TankModel other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (!Modules.Equals(other.Modules)) 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 ^= Modules.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
modules_.WriteTo(output, _map_modules_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) {
modules_.WriteTo(ref output, _map_modules_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 += modules_.CalculateSize(_map_modules_codec);
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(TankModel other) {
if (other == null) {
return;
}
modules_.MergeFrom(other.modules_);
_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: {
modules_.AddEntriesFrom(input, _map_modules_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: {
modules_.AddEntriesFrom(ref input, _map_modules_codec);
break;
}
}
}
}
#endif
}
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
public sealed partial class ModuleModel : pb::IMessage<ModuleModel>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<ModuleModel> _parser = new pb::MessageParser<ModuleModel>(() => new ModuleModel());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pb::MessageParser<ModuleModel> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor {
get { return global::Blitzkit.TankModelReflection.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 ModuleModel() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public ModuleModel(ModuleModel other) : this() {
translation_ = other.translation_ != null ? other.translation_.Clone() : null;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public ModuleModel Clone() {
return new ModuleModel(this);
}
/// <summary>Field number for the "translation" field.</summary>
public const int TranslationFieldNumber = 2;
private global::Blitzkit.Vector3 translation_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public global::Blitzkit.Vector3 Translation {
get { return translation_; }
set {
translation_ = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override bool Equals(object other) {
return Equals(other as ModuleModel);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool Equals(ModuleModel other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (!object.Equals(Translation, other.Translation)) 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 (translation_ != null) hash ^= Translation.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 (translation_ != null) {
output.WriteRawTag(18);
output.WriteMessage(Translation);
}
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 (translation_ != null) {
output.WriteRawTag(18);
output.WriteMessage(Translation);
}
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 (translation_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(Translation);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(ModuleModel other) {
if (other == null) {
return;
}
if (other.translation_ != null) {
if (translation_ == null) {
Translation = new global::Blitzkit.Vector3();
}
Translation.MergeFrom(other.Translation);
}
_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 18: {
if (translation_ == null) {
Translation = new global::Blitzkit.Vector3();
}
input.ReadMessage(Translation);
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 18: {
if (translation_ == null) {
Translation = new global::Blitzkit.Vector3();
}
input.ReadMessage(Translation);
break;
}
}
}
}
#endif
}
#endregion
}
#endregion Designer generated code
+553
View File
@@ -0,0 +1,553 @@
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: packages/core/src/protos/utils.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021, 8981
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Blitzkit {
/// <summary>Holder for reflection information generated from packages/core/src/protos/utils.proto</summary>
public static partial class UtilsReflection {
#region Descriptor
/// <summary>File descriptor for packages/core/src/protos/utils.proto</summary>
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;
static UtilsReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"CiRwYWNrYWdlcy9jb3JlL3NyYy9wcm90b3MvdXRpbHMucHJvdG8SCGJsaXR6",
"a2l0IioKB1ZlY3RvcjMSCQoBeBgBIAIoAhIJCgF5GAIgAigCEgkKAXoYAyAC",
"KAIiZAoESTE4bhIsCgdsb2NhbGVzGAEgAygLMhsuYmxpdHpraXQuSTE4bi5M",
"b2NhbGVzRW50cnkaLgoMTG9jYWxlc0VudHJ5EgsKA2tleRgBIAEoCRINCgV2",
"YWx1ZRgCIAEoCToCOAE="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
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.I18n), global::Blitzkit.I18n.Parser, new[]{ "Locales" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, })
}));
}
#endregion
}
#region Messages
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
public sealed partial class Vector3 : pb::IMessage<Vector3>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<Vector3> _parser = new pb::MessageParser<Vector3>(() => new Vector3());
private pb::UnknownFieldSet _unknownFields;
private int _hasBits0;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pb::MessageParser<Vector3> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor {
get { return global::Blitzkit.UtilsReflection.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 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);
}
/// <summary>Field number for the "x" field.</summary>
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;
}
}
/// <summary>Gets whether the "x" field is set</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool HasX {
get { return (_hasBits0 & 1) != 0; }
}
/// <summary>Clears the value of the "x" field</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void ClearX() {
_hasBits0 &= ~1;
}
/// <summary>Field number for the "y" field.</summary>
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;
}
}
/// <summary>Gets whether the "y" field is set</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool HasY {
get { return (_hasBits0 & 2) != 0; }
}
/// <summary>Clears the value of the "y" field</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void ClearY() {
_hasBits0 &= ~2;
}
/// <summary>Field number for the "z" field.</summary>
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;
}
}
/// <summary>Gets whether the "z" field is set</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool HasZ {
get { return (_hasBits0 & 4) != 0; }
}
/// <summary>Clears the value of the "z" field</summary>
[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 I18n : pb::IMessage<I18n>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<I18n> _parser = new pb::MessageParser<I18n>(() => new I18n());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pb::MessageParser<I18n> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor {
get { return global::Blitzkit.UtilsReflection.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 I18n() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public I18n(I18n other) : this() {
locales_ = other.locales_.Clone();
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public I18n Clone() {
return new I18n(this);
}
/// <summary>Field number for the "locales" field.</summary>
public const int LocalesFieldNumber = 1;
private static readonly pbc::MapField<string, string>.Codec _map_locales_codec
= new pbc::MapField<string, string>.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForString(18, ""), 10);
private readonly pbc::MapField<string, string> locales_ = new pbc::MapField<string, string>();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public pbc::MapField<string, string> Locales {
get { return locales_; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override bool Equals(object other) {
return Equals(other as I18n);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool Equals(I18n 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(I18n 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
+15
View File
@@ -1,10 +1,15 @@
using Blitzkit;
using CUE4Parse_Conversion.Textures;
using CUE4Parse.UE4.Assets.Exports.Texture;
using CUE4Parse.UE4.Assets.Objects;
using CUE4Parse.UE4.Objects.Core.Math;
namespace BlitzKit.CLI.Utils
{
public static class BlitzKitExporter
{
private static readonly float SCALE = 0.01f;
public static byte[] Texture2D(UTexture2D texture)
{
return texture
@@ -12,5 +17,15 @@ namespace BlitzKit.CLI.Utils
.Encode(ETextureFormat.Png, 100)
.ToArray();
}
public static Vector3 Vector3(FVector fVector)
{
return new()
{
X = SCALE * fVector.X,
Y = SCALE * fVector.Z,
Z = SCALE * fVector.Y,
};
}
}
}
+1 -1
View File
@@ -20,5 +20,5 @@
}
]
},
"exclude": ["node_modules/**/*", "dist", ".next"]
"exclude": ["node_modules/**/*", "dist", ".next", "packages/preforged"]
}