feat: slugs back in tanks

This commit is contained in:
tresabhi committed 2025-03-05 09:51:02 -06:00
1 parent ba36c600c4
commit 16b3a59f88
7 files changed
+91 -98

No files matched your search

+6 -58
View File
@@ -25,13 +25,12 @@ namespace Blitzkit {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"CiNwYWNrYWdlcy9jb3JlL3NyYy9wcm90b3MvdGFuay5wcm90bxIIYmxpdHpr",
"aXQaI3BhY2thZ2VzL2NvcmUvc3JjL3Byb3Rvcy9pMThuLnByb3RvIj4KBFRh",
"bmsSCgoCaWQYASACKAkSDAoEc2x1ZxgCIAIoCRIcCgRuYW1lGAMgAigLMg4u",
"YmxpdHpraXQuSTE4bg=="));
"aXQaI3BhY2thZ2VzL2NvcmUvc3JjL3Byb3Rvcy9pMThuLnByb3RvIjAKBFRh",
"bmsSCgoCaWQYASACKAkSHAoEbmFtZRgCIAIoCzIOLmJsaXR6a2l0LkkxOG4="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Blitzkit.I18NReflection.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", "Name" }, null, null, null, null)
}));
}
#endregion
@@ -74,7 +73,6 @@ namespace Blitzkit {
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public Tank(Tank other) : this() {
id_ = other.id_;
slug_ = other.slug_;
name_ = other.name_ != null ? other.name_.Clone() : null;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
@@ -111,34 +109,8 @@ namespace Blitzkit {
id_ = null;
}
/// <summary>Field number for the "slug" field.</summary>
public const int SlugFieldNumber = 2;
private readonly static string SlugDefaultValue = "";
private string slug_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public string Slug {
get { return slug_ ?? SlugDefaultValue; }
set {
slug_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Gets whether the "slug" field is set</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool HasSlug {
get { return slug_ != null; }
}
/// <summary>Clears the value of the "slug" field</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void ClearSlug() {
slug_ = null;
}
/// <summary>Field number for the "name" field.</summary>
public const int NameFieldNumber = 3;
public const int NameFieldNumber = 2;
private global::Blitzkit.I18n name_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
@@ -165,7 +137,6 @@ namespace Blitzkit {
return true;
}
if (Id != other.Id) return false;
if (Slug != other.Slug) return false;
if (!object.Equals(Name, other.Name)) return false;
return Equals(_unknownFields, other._unknownFields);
}
@@ -175,7 +146,6 @@ namespace Blitzkit {
public override int GetHashCode() {
int hash = 1;
if (HasId) hash ^= Id.GetHashCode();
if (HasSlug) hash ^= Slug.GetHashCode();
if (name_ != null) hash ^= Name.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
@@ -199,12 +169,8 @@ namespace Blitzkit {
output.WriteRawTag(10);
output.WriteString(Id);
}
if (HasSlug) {
output.WriteRawTag(18);
output.WriteString(Slug);
}
if (name_ != null) {
output.WriteRawTag(26);
output.WriteRawTag(18);
output.WriteMessage(Name);
}
if (_unknownFields != null) {
@@ -221,12 +187,8 @@ namespace Blitzkit {
output.WriteRawTag(10);
output.WriteString(Id);
}
if (HasSlug) {
output.WriteRawTag(18);
output.WriteString(Slug);
}
if (name_ != null) {
output.WriteRawTag(26);
output.WriteRawTag(18);
output.WriteMessage(Name);
}
if (_unknownFields != null) {
@@ -242,9 +204,6 @@ namespace Blitzkit {
if (HasId) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Id);
}
if (HasSlug) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Slug);
}
if (name_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(Name);
}
@@ -263,9 +222,6 @@ namespace Blitzkit {
if (other.HasId) {
Id = other.Id;
}
if (other.HasSlug) {
Slug = other.Slug;
}
if (other.name_ != null) {
if (name_ == null) {
Name = new global::Blitzkit.I18n();
@@ -296,10 +252,6 @@ namespace Blitzkit {
break;
}
case 18: {
Slug = input.ReadString();
break;
}
case 26: {
if (name_ == null) {
Name = new global::Blitzkit.I18n();
}
@@ -330,10 +282,6 @@ namespace Blitzkit {
break;
}
case 18: {
Slug = input.ReadString();
break;
}
case 26: {
if (name_ == null) {
Name = new global::Blitzkit.I18n();
}