mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
feat: the thing
This commit is contained in:
1 parent
e60bbc03d2
commit
b856268ee0
9 files changed
+63
-107
No files matched your search
@@ -47,6 +47,7 @@ export * from './createDefaultProvisions';
|
|||||||
export * from './metaSortTank';
|
export * from './metaSortTank';
|
||||||
export * from './romanize';
|
export * from './romanize';
|
||||||
export * from './tank';
|
export * from './tank';
|
||||||
|
export * from './tankArmor';
|
||||||
export * from './tanks';
|
export * from './tanks';
|
||||||
export * from './tanksFull';
|
export * from './tanksFull';
|
||||||
export * from './youtubers';
|
export * from './youtubers';
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
import { fetchPB } from '../protobuf';
|
||||||
|
import { TankArmor } from '../protos';
|
||||||
|
import { asset } from './asset';
|
||||||
|
|
||||||
|
export function fetchTankArmor(id: string) {
|
||||||
|
return fetchPB(asset(`tanks/${id}/armor.pb`), TankArmor);
|
||||||
|
}
|
||||||
@@ -3,10 +3,8 @@ syntax = "proto2";
|
|||||||
package blitzkit;
|
package blitzkit;
|
||||||
|
|
||||||
message TankArmor {
|
message TankArmor {
|
||||||
// tank id
|
|
||||||
required string id = 1;
|
|
||||||
// key can only ever be "chassis", "hull", "turret", or "gun"
|
// key can only ever be "chassis", "hull", "turret", or "gun"
|
||||||
map<string, PenetrationGroup> groups = 4;
|
map<string, PenetrationGroup> groups = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
message PenetrationGroup {
|
message PenetrationGroup {
|
||||||
|
|||||||
@@ -10,8 +10,6 @@ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|||||||
export const protobufPackage = "blitzkit";
|
export const protobufPackage = "blitzkit";
|
||||||
|
|
||||||
export interface TankArmor {
|
export interface TankArmor {
|
||||||
/** tank id */
|
|
||||||
id: string;
|
|
||||||
/** key can only ever be "chassis", "hull", "turret", or "gun" */
|
/** key can only ever be "chassis", "hull", "turret", or "gun" */
|
||||||
groups: { [key: string]: PenetrationGroup };
|
groups: { [key: string]: PenetrationGroup };
|
||||||
}
|
}
|
||||||
@@ -42,16 +40,13 @@ export interface ArmorPlate {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function createBaseTankArmor(): TankArmor {
|
function createBaseTankArmor(): TankArmor {
|
||||||
return { id: "", groups: {} };
|
return { groups: {} };
|
||||||
}
|
}
|
||||||
|
|
||||||
export const TankArmor: MessageFns<TankArmor> = {
|
export const TankArmor: MessageFns<TankArmor> = {
|
||||||
encode(message: TankArmor, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
encode(message: TankArmor, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||||
if (message.id !== "") {
|
|
||||||
writer.uint32(10).string(message.id);
|
|
||||||
}
|
|
||||||
Object.entries(message.groups).forEach(([key, value]) => {
|
Object.entries(message.groups).forEach(([key, value]) => {
|
||||||
TankArmor_GroupsEntry.encode({ key: key as any, value }, writer.uint32(34).fork()).join();
|
TankArmor_GroupsEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join();
|
||||||
});
|
});
|
||||||
return writer;
|
return writer;
|
||||||
},
|
},
|
||||||
@@ -68,17 +63,9 @@ export const TankArmor: MessageFns<TankArmor> = {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
message.id = reader.string();
|
const entry1 = TankArmor_GroupsEntry.decode(reader, reader.uint32());
|
||||||
continue;
|
if (entry1.value !== undefined) {
|
||||||
}
|
message.groups[entry1.key] = entry1.value;
|
||||||
case 4: {
|
|
||||||
if (tag !== 34) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
const entry4 = TankArmor_GroupsEntry.decode(reader, reader.uint32());
|
|
||||||
if (entry4.value !== undefined) {
|
|
||||||
message.groups[entry4.key] = entry4.value;
|
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -93,7 +80,6 @@ export const TankArmor: MessageFns<TankArmor> = {
|
|||||||
|
|
||||||
fromJSON(object: any): TankArmor {
|
fromJSON(object: any): TankArmor {
|
||||||
return {
|
return {
|
||||||
id: globalThis.String(assertSet("TankArmor.id", object.id)),
|
|
||||||
groups: isObject(object.groups)
|
groups: isObject(object.groups)
|
||||||
? Object.entries(object.groups).reduce<{ [key: string]: PenetrationGroup }>((acc, [key, value]) => {
|
? Object.entries(object.groups).reduce<{ [key: string]: PenetrationGroup }>((acc, [key, value]) => {
|
||||||
acc[key] = PenetrationGroup.fromJSON(value);
|
acc[key] = PenetrationGroup.fromJSON(value);
|
||||||
@@ -105,9 +91,6 @@ export const TankArmor: MessageFns<TankArmor> = {
|
|||||||
|
|
||||||
toJSON(message: TankArmor): unknown {
|
toJSON(message: TankArmor): unknown {
|
||||||
const obj: any = {};
|
const obj: any = {};
|
||||||
if (message.id !== "") {
|
|
||||||
obj.id = message.id;
|
|
||||||
}
|
|
||||||
if (message.groups) {
|
if (message.groups) {
|
||||||
const entries = Object.entries(message.groups);
|
const entries = Object.entries(message.groups);
|
||||||
if (entries.length > 0) {
|
if (entries.length > 0) {
|
||||||
@@ -125,7 +108,6 @@ export const TankArmor: MessageFns<TankArmor> = {
|
|||||||
},
|
},
|
||||||
fromPartial<I extends Exact<DeepPartial<TankArmor>, I>>(object: I): TankArmor {
|
fromPartial<I extends Exact<DeepPartial<TankArmor>, I>>(object: I): TankArmor {
|
||||||
const message = createBaseTankArmor();
|
const message = createBaseTankArmor();
|
||||||
message.id = object.id ?? "";
|
|
||||||
message.groups = Object.entries(object.groups ?? {}).reduce<{ [key: string]: PenetrationGroup }>(
|
message.groups = Object.entries(object.groups ?? {}).reduce<{ [key: string]: PenetrationGroup }>(
|
||||||
(acc, [key, value]) => {
|
(acc, [key, value]) => {
|
||||||
if (value !== undefined) {
|
if (value !== undefined) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { asset, type Tank } from '@blitzkit/core';
|
import { asset, TankArmor, type Tank } from '@blitzkit/core';
|
||||||
import { useLoader } from '@react-three/fiber';
|
import { useLoader } from '@react-three/fiber';
|
||||||
import { Material, MeshBasicMaterial } from 'three';
|
import { Material, MeshBasicMaterial } from 'three';
|
||||||
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';
|
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';
|
||||||
@@ -7,10 +7,11 @@ import { jsxTree } from '../core/blitzkit/jsxTree';
|
|||||||
|
|
||||||
interface ArmorGroupProps {
|
interface ArmorGroupProps {
|
||||||
tank: Tank;
|
tank: Tank;
|
||||||
|
armor: TankArmor;
|
||||||
group: string;
|
group: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function ArmorGroup({ tank, group }: ArmorGroupProps) {
|
export function ArmorGroup({ tank, armor, group }: ArmorGroupProps) {
|
||||||
const gltf = useLoader(
|
const gltf = useLoader(
|
||||||
GLTFLoader,
|
GLTFLoader,
|
||||||
asset(`/tanks/${tank.id}/collision/hull.glb`),
|
asset(`/tanks/${tank.id}/collision/hull.glb`),
|
||||||
@@ -31,7 +32,7 @@ export function ArmorGroup({ tank, group }: ArmorGroupProps) {
|
|||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
|
||||||
const armorName = mesh.material.name;
|
const armorName = mesh.material.name;
|
||||||
const penetrationGroup = tank.penetration_groups[group];
|
const penetrationGroup = armor.groups[group];
|
||||||
const thickness = penetrationGroup.armors[armorName];
|
const thickness = penetrationGroup.armors[armorName];
|
||||||
|
|
||||||
console.log(tank.id, armorName, penetrationGroup, thickness);
|
console.log(tank.id, armorName, penetrationGroup, thickness);
|
||||||
|
|||||||
@@ -1,22 +1,26 @@
|
|||||||
import { Tank } from '@blitzkit/core';
|
import { Tank, TankArmor } from '@blitzkit/core';
|
||||||
|
import { Box } from '@radix-ui/themes';
|
||||||
import { OrbitControls } from '@react-three/drei';
|
import { OrbitControls } from '@react-three/drei';
|
||||||
import { Canvas } from '@react-three/fiber';
|
import { Canvas } from '@react-three/fiber';
|
||||||
import { ArmorGroup } from '../../../../components/ArmorGroup';
|
import { ArmorGroup } from '../../../../components/ArmorGroup';
|
||||||
|
import { PageWrapper } from '../../../../components/PageWrapper';
|
||||||
|
|
||||||
interface PageProps {
|
interface PageProps {
|
||||||
tank: Tank;
|
tank: Tank;
|
||||||
|
armor: TankArmor;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function Page({ tank }: PageProps) {
|
export function Page({ tank, armor }: PageProps) {
|
||||||
return (
|
return (
|
||||||
<Canvas
|
<PageWrapper p="0" maxWidth="unset">
|
||||||
style={{
|
<Box height="100%" width="100%" flexGrow="1" position="relative">
|
||||||
width: 640,
|
<Box position="absolute" top="0" left="0" width="100%" height="100%">
|
||||||
height: 640,
|
<Canvas>
|
||||||
}}
|
<OrbitControls />
|
||||||
>
|
<ArmorGroup group="hull" tank={tank} armor={armor} />
|
||||||
<OrbitControls />
|
</Canvas>
|
||||||
<ArmorGroup group="hull" tank={tank} />
|
</Box>
|
||||||
</Canvas>
|
</Box>
|
||||||
|
</PageWrapper>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
import { fetchTank } from '@blitzkit/core';
|
import { fetchTank, fetchTankArmor } from '@blitzkit/core';
|
||||||
import type { GetStaticPaths } from 'astro';
|
import type { GetStaticPaths } from 'astro';
|
||||||
import { awaitableTanksFull } from '../../../../core/awaitables/tanksFull';
|
import { awaitableTanksFull } from '../../../../core/awaitables/tanksFull';
|
||||||
import BaseLayout from '../../../../layouts/BaseLayout.astro';
|
import BaseLayout from '../../../../layouts/BaseLayout.astro';
|
||||||
@@ -22,8 +22,9 @@ export const getStaticPaths = (async () => {
|
|||||||
|
|
||||||
const { id } = Astro.props;
|
const { id } = Astro.props;
|
||||||
const tank = await fetchTank(id);
|
const tank = await fetchTank(id);
|
||||||
|
const armor = await fetchTankArmor(id);
|
||||||
---
|
---
|
||||||
|
|
||||||
<BaseLayout>
|
<BaseLayout>
|
||||||
<Page {tank} client:load />
|
<Page {tank} {armor} client:load />
|
||||||
</BaseLayout>
|
</BaseLayout>
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
import { fetchTankArmor } from '@blitzkit/core';
|
||||||
|
import type { APIRoute } from 'astro';
|
||||||
|
|
||||||
|
export { getStaticPaths } from './meta.json';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the thicknesses and types of all armor plates on a tank chunked into
|
||||||
|
* groups.
|
||||||
|
*
|
||||||
|
* @param id The tank id.
|
||||||
|
* @returns JSON.
|
||||||
|
*/
|
||||||
|
export const GET: APIRoute<{}, { id: string }> = async ({ params }) => {
|
||||||
|
const tank = await fetchTankArmor(params.id);
|
||||||
|
return Response.json(tank);
|
||||||
|
};
|
||||||
@@ -25,18 +25,18 @@ namespace Blitzkit {
|
|||||||
byte[] descriptorData = global::System.Convert.FromBase64String(
|
byte[] descriptorData = global::System.Convert.FromBase64String(
|
||||||
string.Concat(
|
string.Concat(
|
||||||
"CilwYWNrYWdlcy9jb3JlL3NyYy9wcm90b3MvdGFua19hcm1vci5wcm90bxII",
|
"CilwYWNrYWdlcy9jb3JlL3NyYy9wcm90b3MvdGFua19hcm1vci5wcm90bxII",
|
||||||
"YmxpdHpraXQikwEKCVRhbmtBcm1vchIKCgJpZBgBIAIoCRIvCgZncm91cHMY",
|
"YmxpdHpraXQihwEKCVRhbmtBcm1vchIvCgZncm91cHMYASADKAsyHy5ibGl0",
|
||||||
"BCADKAsyHy5ibGl0emtpdC5UYW5rQXJtb3IuR3JvdXBzRW50cnkaSQoLR3Jv",
|
"emtpdC5UYW5rQXJtb3IuR3JvdXBzRW50cnkaSQoLR3JvdXBzRW50cnkSCwoD",
|
||||||
"dXBzRW50cnkSCwoDa2V5GAEgASgJEikKBXZhbHVlGAIgASgLMhouYmxpdHpr",
|
"a2V5GAEgASgJEikKBXZhbHVlGAIgASgLMhouYmxpdHpraXQuUGVuZXRyYXRp",
|
||||||
"aXQuUGVuZXRyYXRpb25Hcm91cDoCOAEijwEKEFBlbmV0cmF0aW9uR3JvdXAS",
|
"b25Hcm91cDoCOAEijwEKEFBlbmV0cmF0aW9uR3JvdXASNgoGYXJtb3JzGAEg",
|
||||||
"NgoGYXJtb3JzGAEgAygLMiYuYmxpdHpraXQuUGVuZXRyYXRpb25Hcm91cC5B",
|
"AygLMiYuYmxpdHpraXQuUGVuZXRyYXRpb25Hcm91cC5Bcm1vcnNFbnRyeRpD",
|
||||||
"cm1vcnNFbnRyeRpDCgtBcm1vcnNFbnRyeRILCgNrZXkYASABKAkSIwoFdmFs",
|
"CgtBcm1vcnNFbnRyeRILCgNrZXkYASABKAkSIwoFdmFsdWUYAiABKAsyFC5i",
|
||||||
"dWUYAiABKAsyFC5ibGl0emtpdC5Bcm1vclBsYXRlOgI4ASItCgpBcm1vclBs",
|
"bGl0emtpdC5Bcm1vclBsYXRlOgI4ASItCgpBcm1vclBsYXRlEhEKCXRoaWNr",
|
||||||
"YXRlEhEKCXRoaWNrbmVzcxgBIAIoAhIMCgR0eXBlGAIgAigJ"));
|
"bmVzcxgBIAIoAhIMCgR0eXBlGAIgAigJ"));
|
||||||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
|
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
|
||||||
new pbr::FileDescriptor[] { },
|
new pbr::FileDescriptor[] { },
|
||||||
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
|
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
|
||||||
new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.TankArmor), global::Blitzkit.TankArmor.Parser, new[]{ "Id", "Groups" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }),
|
new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.TankArmor), global::Blitzkit.TankArmor.Parser, new[]{ "Groups" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }),
|
||||||
new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.PenetrationGroup), global::Blitzkit.PenetrationGroup.Parser, new[]{ "Armors" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }),
|
new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.PenetrationGroup), global::Blitzkit.PenetrationGroup.Parser, new[]{ "Armors" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }),
|
||||||
new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.ArmorPlate), global::Blitzkit.ArmorPlate.Parser, new[]{ "Thickness", "Type" }, null, null, null, null)
|
new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.ArmorPlate), global::Blitzkit.ArmorPlate.Parser, new[]{ "Thickness", "Type" }, null, null, null, null)
|
||||||
}));
|
}));
|
||||||
@@ -80,7 +80,6 @@ namespace Blitzkit {
|
|||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
public TankArmor(TankArmor other) : this() {
|
public TankArmor(TankArmor other) : this() {
|
||||||
id_ = other.id_;
|
|
||||||
groups_ = other.groups_.Clone();
|
groups_ = other.groups_.Clone();
|
||||||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
||||||
}
|
}
|
||||||
@@ -91,39 +90,10 @@ namespace Blitzkit {
|
|||||||
return new TankArmor(this);
|
return new TankArmor(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Field number for the "id" field.</summary>
|
|
||||||
public const int IdFieldNumber = 1;
|
|
||||||
private readonly static string IdDefaultValue = "";
|
|
||||||
|
|
||||||
private string id_;
|
|
||||||
/// <summary>
|
|
||||||
/// tank id
|
|
||||||
/// </summary>
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
|
||||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
|
||||||
public string Id {
|
|
||||||
get { return id_ ?? IdDefaultValue; }
|
|
||||||
set {
|
|
||||||
id_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/// <summary>Gets whether the "id" field is set</summary>
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
|
||||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
|
||||||
public bool HasId {
|
|
||||||
get { return id_ != null; }
|
|
||||||
}
|
|
||||||
/// <summary>Clears the value of the "id" field</summary>
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
|
||||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
|
||||||
public void ClearId() {
|
|
||||||
id_ = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>Field number for the "groups" field.</summary>
|
/// <summary>Field number for the "groups" field.</summary>
|
||||||
public const int GroupsFieldNumber = 4;
|
public const int GroupsFieldNumber = 1;
|
||||||
private static readonly pbc::MapField<string, global::Blitzkit.PenetrationGroup>.Codec _map_groups_codec
|
private static readonly pbc::MapField<string, global::Blitzkit.PenetrationGroup>.Codec _map_groups_codec
|
||||||
= new pbc::MapField<string, global::Blitzkit.PenetrationGroup>.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForMessage(18, global::Blitzkit.PenetrationGroup.Parser), 34);
|
= new pbc::MapField<string, global::Blitzkit.PenetrationGroup>.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForMessage(18, global::Blitzkit.PenetrationGroup.Parser), 10);
|
||||||
private readonly pbc::MapField<string, global::Blitzkit.PenetrationGroup> groups_ = new pbc::MapField<string, global::Blitzkit.PenetrationGroup>();
|
private readonly pbc::MapField<string, global::Blitzkit.PenetrationGroup> groups_ = new pbc::MapField<string, global::Blitzkit.PenetrationGroup>();
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// key can only ever be "chassis", "hull", "turret", or "gun"
|
/// key can only ever be "chassis", "hull", "turret", or "gun"
|
||||||
@@ -149,7 +119,6 @@ namespace Blitzkit {
|
|||||||
if (ReferenceEquals(other, this)) {
|
if (ReferenceEquals(other, this)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (Id != other.Id) return false;
|
|
||||||
if (!Groups.Equals(other.Groups)) return false;
|
if (!Groups.Equals(other.Groups)) return false;
|
||||||
return Equals(_unknownFields, other._unknownFields);
|
return Equals(_unknownFields, other._unknownFields);
|
||||||
}
|
}
|
||||||
@@ -158,7 +127,6 @@ namespace Blitzkit {
|
|||||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
public override int GetHashCode() {
|
public override int GetHashCode() {
|
||||||
int hash = 1;
|
int hash = 1;
|
||||||
if (HasId) hash ^= Id.GetHashCode();
|
|
||||||
hash ^= Groups.GetHashCode();
|
hash ^= Groups.GetHashCode();
|
||||||
if (_unknownFields != null) {
|
if (_unknownFields != null) {
|
||||||
hash ^= _unknownFields.GetHashCode();
|
hash ^= _unknownFields.GetHashCode();
|
||||||
@@ -178,10 +146,6 @@ namespace Blitzkit {
|
|||||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||||
output.WriteRawMessage(this);
|
output.WriteRawMessage(this);
|
||||||
#else
|
#else
|
||||||
if (HasId) {
|
|
||||||
output.WriteRawTag(10);
|
|
||||||
output.WriteString(Id);
|
|
||||||
}
|
|
||||||
groups_.WriteTo(output, _map_groups_codec);
|
groups_.WriteTo(output, _map_groups_codec);
|
||||||
if (_unknownFields != null) {
|
if (_unknownFields != null) {
|
||||||
_unknownFields.WriteTo(output);
|
_unknownFields.WriteTo(output);
|
||||||
@@ -193,10 +157,6 @@ namespace Blitzkit {
|
|||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
|
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
|
||||||
if (HasId) {
|
|
||||||
output.WriteRawTag(10);
|
|
||||||
output.WriteString(Id);
|
|
||||||
}
|
|
||||||
groups_.WriteTo(ref output, _map_groups_codec);
|
groups_.WriteTo(ref output, _map_groups_codec);
|
||||||
if (_unknownFields != null) {
|
if (_unknownFields != null) {
|
||||||
_unknownFields.WriteTo(ref output);
|
_unknownFields.WriteTo(ref output);
|
||||||
@@ -208,9 +168,6 @@ namespace Blitzkit {
|
|||||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
public int CalculateSize() {
|
public int CalculateSize() {
|
||||||
int size = 0;
|
int size = 0;
|
||||||
if (HasId) {
|
|
||||||
size += 1 + pb::CodedOutputStream.ComputeStringSize(Id);
|
|
||||||
}
|
|
||||||
size += groups_.CalculateSize(_map_groups_codec);
|
size += groups_.CalculateSize(_map_groups_codec);
|
||||||
if (_unknownFields != null) {
|
if (_unknownFields != null) {
|
||||||
size += _unknownFields.CalculateSize();
|
size += _unknownFields.CalculateSize();
|
||||||
@@ -224,9 +181,6 @@ namespace Blitzkit {
|
|||||||
if (other == null) {
|
if (other == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (other.HasId) {
|
|
||||||
Id = other.Id;
|
|
||||||
}
|
|
||||||
groups_.MergeFrom(other.groups_);
|
groups_.MergeFrom(other.groups_);
|
||||||
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
|
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
|
||||||
}
|
}
|
||||||
@@ -248,10 +202,6 @@ namespace Blitzkit {
|
|||||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
|
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
|
||||||
break;
|
break;
|
||||||
case 10: {
|
case 10: {
|
||||||
Id = input.ReadString();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 34: {
|
|
||||||
groups_.AddEntriesFrom(input, _map_groups_codec);
|
groups_.AddEntriesFrom(input, _map_groups_codec);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -275,10 +225,6 @@ namespace Blitzkit {
|
|||||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
|
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
|
||||||
break;
|
break;
|
||||||
case 10: {
|
case 10: {
|
||||||
Id = input.ReadString();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 34: {
|
|
||||||
groups_.AddEntriesFrom(ref input, _map_groups_codec);
|
groups_.AddEntriesFrom(ref input, _map_groups_codec);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user