diff --git a/packages/core/src/blitzkit/index.ts b/packages/core/src/blitzkit/index.ts index 983def4d7..defe13e5a 100644 --- a/packages/core/src/blitzkit/index.ts +++ b/packages/core/src/blitzkit/index.ts @@ -46,4 +46,5 @@ export * from './votes'; export * from './createDefaultProvisions'; export * from './metaSortTank'; export * from './romanize'; +export * from './tanks'; export * from './youtubers'; diff --git a/packages/core/src/blitzkit/tanks.ts b/packages/core/src/blitzkit/tanks.ts new file mode 100644 index 000000000..48eac0f32 --- /dev/null +++ b/packages/core/src/blitzkit/tanks.ts @@ -0,0 +1,7 @@ +import { fetchPB } from '../protobuf'; +import { Tanks } from '../protos'; +import { asset } from './asset'; + +export function fetchTanks() { + return fetchPB(asset('definitions/tanks.pb'), Tanks); +} diff --git a/packages/core/src/protos/tank.proto b/packages/core/src/protos/tank.proto index c45c02345..2b73ead16 100644 --- a/packages/core/src/protos/tank.proto +++ b/packages/core/src/protos/tank.proto @@ -7,90 +7,34 @@ package blitzkit; message Tank { required string id = 1; required I18n name = 2; - required string set = 3; - required string class = 4; - // nations have been renamed to factions - required string faction = 5; + required TankClass class = 3; + required TankType type = 4; +} - required ModuleHealth turret_rotator_health = 6; - required ModuleHealth surveying_device_health = 7; - required ModuleHealth gun_health = 8; - required ModuleHealth chassis_health = 9; - required ModuleHealth ammo_bay_health = 10; - required ModuleHealth engine_health = 11; - required ModuleHealth fuel_tank_health = 12; - repeated CrewHealth crew_health = 13; - required float max_health = 14; - required float health_burn_per_sec = 15; - required float fire_starting_chance = 16; - - required float concealment_stationary = 17; - required float concealment_moving = 18; - required float concealment_factor_at_shot = 19; - - required float turret_turn_rate = 20; - required float circular_vision_radius = 21; +enum TankClass { + LIGHT = 1; + MEDIUM = 2; + HEAVY = 3; + TANK_DESTROYER = 4; +} - repeated Shell shells = 22; - required float reload_time = 23; - required float dispersion_angle = 24; - required float shot_dispersion_factor = 25; - required float turret_rotation_dispersion_factor = 26; - required float aiming_time = 27; - required float gun_turn_rate = 28; - - required float mass = 29; - required float engine_power = 30; - required float forward_max_speed = 31; - required float backward_max_speed = 32; - required float rotation_speed = 33; - required float terrain_resistance_hard = 34; - required float brake_force = 35; +enum TankType { + RESEARCHABLE = 1; + PREMIUM = 2; + COLLECTOR = 3; +} + +enum ShellType { + AP = 1; + APCR = 2; + HEAT = 3; + HE = 4; } enum CrewType { - COMMANDER = 0; - DRIVER = 1; - GUNNER_1 = 2; - GUNNER_2 = 3; - LOADER_1 = 4; - LOADER_2 = 5; -} - -message CrewHealth { - required CrewType type = 1; - required float max_health = 2; -} - -message Shell { - required float speed = 1; - required float gravity = 2; - required float armor_damage = 3; - required float module_damage = 4; - required float caliber = 5; - required float piercing_power = 6; - required float piercing_power_500m = 7; - required float normalization = 8; - required float max_distance = 9; - required float ricochet_angle = 10; - required float piercing_power_loss_factor_by_distance = 11; - required float explosion_radius = 12; - required int32 max_count = 13; -} - -message ModuleHealth { - // max health, assigned by default at the start of the battle - required float max_health = 1; - // max health reached as the module regenerates after breaking - required float max_regen_health = 2; - // the range from 0 to this where the module is "red" and doesn't function - // all the while healing; after surpassing this, the "yellow" phase is reached - // undefined for modules like ammo bays - optional float hysteresis_health = 3; - // the heal rate (per second); this won't apply if the health is at or above - // max_regen hence always leaving it in the "yellow" phase until repaired - required float health_regen_per_sec = 4; - // damage received (per second) to the modules when caught on fire; this can - // be undefined for some modules like the gun or chassis - optional float health_burn_per_sec = 5; + COMMANDER = 1; + DRIVER = 2; + GUNNER = 3; + LOADER = 4; + RADIOMAN = 5; } \ No newline at end of file diff --git a/packages/core/src/protos/tank.ts b/packages/core/src/protos/tank.ts index 4df74dfbd..ac11e13c9 100644 --- a/packages/core/src/protos/tank.ts +++ b/packages/core/src/protos/tank.ts @@ -10,35 +10,148 @@ import { I18n } from "./i18n"; export const protobufPackage = "blitzkit"; +export enum TankClass { + LIGHT = 1, + MEDIUM = 2, + HEAVY = 3, + TANK_DESTROYER = 4, +} + +export function tankClassFromJSON(object: any): TankClass { + switch (object) { + case 1: + case "LIGHT": + return TankClass.LIGHT; + case 2: + case "MEDIUM": + return TankClass.MEDIUM; + case 3: + case "HEAVY": + return TankClass.HEAVY; + case 4: + case "TANK_DESTROYER": + return TankClass.TANK_DESTROYER; + default: + throw new globalThis.Error("Unrecognized enum value " + object + " for enum TankClass"); + } +} + +export function tankClassToJSON(object: TankClass): string { + switch (object) { + case TankClass.LIGHT: + return "LIGHT"; + case TankClass.MEDIUM: + return "MEDIUM"; + case TankClass.HEAVY: + return "HEAVY"; + case TankClass.TANK_DESTROYER: + return "TANK_DESTROYER"; + default: + throw new globalThis.Error("Unrecognized enum value " + object + " for enum TankClass"); + } +} + +export enum TankType { + RESEARCHABLE = 1, + PREMIUM = 2, + COLLECTOR = 3, +} + +export function tankTypeFromJSON(object: any): TankType { + switch (object) { + case 1: + case "RESEARCHABLE": + return TankType.RESEARCHABLE; + case 2: + case "PREMIUM": + return TankType.PREMIUM; + case 3: + case "COLLECTOR": + return TankType.COLLECTOR; + default: + throw new globalThis.Error("Unrecognized enum value " + object + " for enum TankType"); + } +} + +export function tankTypeToJSON(object: TankType): string { + switch (object) { + case TankType.RESEARCHABLE: + return "RESEARCHABLE"; + case TankType.PREMIUM: + return "PREMIUM"; + case TankType.COLLECTOR: + return "COLLECTOR"; + default: + throw new globalThis.Error("Unrecognized enum value " + object + " for enum TankType"); + } +} + +export enum ShellType { + AP = 1, + APCR = 2, + HEAT = 3, + HE = 4, +} + +export function shellTypeFromJSON(object: any): ShellType { + switch (object) { + case 1: + case "AP": + return ShellType.AP; + case 2: + case "APCR": + return ShellType.APCR; + case 3: + case "HEAT": + return ShellType.HEAT; + case 4: + case "HE": + return ShellType.HE; + default: + throw new globalThis.Error("Unrecognized enum value " + object + " for enum ShellType"); + } +} + +export function shellTypeToJSON(object: ShellType): string { + switch (object) { + case ShellType.AP: + return "AP"; + case ShellType.APCR: + return "APCR"; + case ShellType.HEAT: + return "HEAT"; + case ShellType.HE: + return "HE"; + default: + throw new globalThis.Error("Unrecognized enum value " + object + " for enum ShellType"); + } +} + export enum CrewType { - COMMANDER = 0, - DRIVER = 1, - GUNNER_1 = 2, - GUNNER_2 = 3, - LOADER_1 = 4, - LOADER_2 = 5, + COMMANDER = 1, + DRIVER = 2, + GUNNER = 3, + LOADER = 4, + RADIOMAN = 5, } export function crewTypeFromJSON(object: any): CrewType { switch (object) { - case 0: + case 1: case "COMMANDER": return CrewType.COMMANDER; - case 1: + case 2: case "DRIVER": return CrewType.DRIVER; - case 2: - case "GUNNER_1": - return CrewType.GUNNER_1; case 3: - case "GUNNER_2": - return CrewType.GUNNER_2; + case "GUNNER": + return CrewType.GUNNER; case 4: - case "LOADER_1": - return CrewType.LOADER_1; + case "LOADER": + return CrewType.LOADER; case 5: - case "LOADER_2": - return CrewType.LOADER_2; + case "RADIOMAN": + return CrewType.RADIOMAN; default: throw new globalThis.Error("Unrecognized enum value " + object + " for enum CrewType"); } @@ -50,14 +163,12 @@ export function crewTypeToJSON(object: CrewType): string { return "COMMANDER"; case CrewType.DRIVER: return "DRIVER"; - case CrewType.GUNNER_1: - return "GUNNER_1"; - case CrewType.GUNNER_2: - return "GUNNER_2"; - case CrewType.LOADER_1: - return "LOADER_1"; - case CrewType.LOADER_2: - return "LOADER_2"; + case CrewType.GUNNER: + return "GUNNER"; + case CrewType.LOADER: + return "LOADER"; + case CrewType.RADIOMAN: + return "RADIOMAN"; default: throw new globalThis.Error("Unrecognized enum value " + object + " for enum CrewType"); } @@ -66,126 +177,12 @@ export function crewTypeToJSON(object: CrewType): string { export interface Tank { id: string; name: I18n; - set: string; - class: string; - /** nations have been renamed to factions */ - faction: string; - turret_rotator_health: ModuleHealth; - surveying_device_health: ModuleHealth; - gun_health: ModuleHealth; - chassis_health: ModuleHealth; - ammo_bay_health: ModuleHealth; - engine_health: ModuleHealth; - fuel_tank_health: ModuleHealth; - crew_health: CrewHealth[]; - max_health: number; - health_burn_per_sec: number; - fire_starting_chance: number; - concealment_stationary: number; - concealment_moving: number; - concealment_factor_at_shot: number; - turret_turn_rate: number; - circular_vision_radius: number; - shells: Shell[]; - reload_time: number; - dispersion_angle: number; - shot_dispersion_factor: number; - turret_rotation_dispersion_factor: number; - aiming_time: number; - gun_turn_rate: number; - mass: number; - engine_power: number; - forward_max_speed: number; - backward_max_speed: number; - rotation_speed: number; - terrain_resistance_hard: number; - brake_force: number; -} - -export interface CrewHealth { - type: CrewType; - max_health: number; -} - -export interface Shell { - speed: number; - gravity: number; - armor_damage: number; - module_damage: number; - caliber: number; - piercing_power: number; - piercing_power_500m: number; - normalization: number; - max_distance: number; - ricochet_angle: number; - piercing_power_loss_factor_by_distance: number; - explosion_radius: number; - max_count: number; -} - -export interface ModuleHealth { - /** max health, assigned by default at the start of the battle */ - max_health: number; - /** max health reached as the module regenerates after breaking */ - max_regen_health: number; - /** - * the range from 0 to this where the module is "red" and doesn't function - * all the while healing; after surpassing this, the "yellow" phase is reached - * undefined for modules like ammo bays - */ - hysteresis_health?: - | number - | undefined; - /** - * the heal rate (per second); this won't apply if the health is at or above - * max_regen hence always leaving it in the "yellow" phase until repaired - */ - health_regen_per_sec: number; - /** - * damage received (per second) to the modules when caught on fire; this can - * be undefined for some modules like the gun or chassis - */ - health_burn_per_sec?: number | undefined; + class: TankClass; + type: TankType; } function createBaseTank(): Tank { - return { - id: "", - name: createBaseI18n(), - set: "", - class: "", - faction: "", - turret_rotator_health: createBaseModuleHealth(), - surveying_device_health: createBaseModuleHealth(), - gun_health: createBaseModuleHealth(), - chassis_health: createBaseModuleHealth(), - ammo_bay_health: createBaseModuleHealth(), - engine_health: createBaseModuleHealth(), - fuel_tank_health: createBaseModuleHealth(), - crew_health: [], - max_health: 0, - health_burn_per_sec: 0, - fire_starting_chance: 0, - concealment_stationary: 0, - concealment_moving: 0, - concealment_factor_at_shot: 0, - turret_turn_rate: 0, - circular_vision_radius: 0, - shells: [], - reload_time: 0, - dispersion_angle: 0, - shot_dispersion_factor: 0, - turret_rotation_dispersion_factor: 0, - aiming_time: 0, - gun_turn_rate: 0, - mass: 0, - engine_power: 0, - forward_max_speed: 0, - backward_max_speed: 0, - rotation_speed: 0, - terrain_resistance_hard: 0, - brake_force: 0, - }; + return { id: "", name: createBaseI18n(), class: 1, type: 1 }; } export const Tank: MessageFns = { @@ -196,104 +193,11 @@ export const Tank: MessageFns = { if (message.name !== undefined) { I18n.encode(message.name, writer.uint32(18).fork()).join(); } - if (message.set !== "") { - writer.uint32(26).string(message.set); + if (message.class !== 1) { + writer.uint32(24).int32(message.class); } - if (message.class !== "") { - writer.uint32(34).string(message.class); - } - if (message.faction !== "") { - writer.uint32(42).string(message.faction); - } - if (message.turret_rotator_health !== undefined) { - ModuleHealth.encode(message.turret_rotator_health, writer.uint32(50).fork()).join(); - } - if (message.surveying_device_health !== undefined) { - ModuleHealth.encode(message.surveying_device_health, writer.uint32(58).fork()).join(); - } - if (message.gun_health !== undefined) { - ModuleHealth.encode(message.gun_health, writer.uint32(66).fork()).join(); - } - if (message.chassis_health !== undefined) { - ModuleHealth.encode(message.chassis_health, writer.uint32(74).fork()).join(); - } - if (message.ammo_bay_health !== undefined) { - ModuleHealth.encode(message.ammo_bay_health, writer.uint32(82).fork()).join(); - } - if (message.engine_health !== undefined) { - ModuleHealth.encode(message.engine_health, writer.uint32(90).fork()).join(); - } - if (message.fuel_tank_health !== undefined) { - ModuleHealth.encode(message.fuel_tank_health, writer.uint32(98).fork()).join(); - } - for (const v of message.crew_health) { - CrewHealth.encode(v!, writer.uint32(106).fork()).join(); - } - if (message.max_health !== 0) { - writer.uint32(117).float(message.max_health); - } - if (message.health_burn_per_sec !== 0) { - writer.uint32(125).float(message.health_burn_per_sec); - } - if (message.fire_starting_chance !== 0) { - writer.uint32(133).float(message.fire_starting_chance); - } - if (message.concealment_stationary !== 0) { - writer.uint32(141).float(message.concealment_stationary); - } - if (message.concealment_moving !== 0) { - writer.uint32(149).float(message.concealment_moving); - } - if (message.concealment_factor_at_shot !== 0) { - writer.uint32(157).float(message.concealment_factor_at_shot); - } - if (message.turret_turn_rate !== 0) { - writer.uint32(165).float(message.turret_turn_rate); - } - if (message.circular_vision_radius !== 0) { - writer.uint32(173).float(message.circular_vision_radius); - } - for (const v of message.shells) { - Shell.encode(v!, writer.uint32(178).fork()).join(); - } - if (message.reload_time !== 0) { - writer.uint32(189).float(message.reload_time); - } - if (message.dispersion_angle !== 0) { - writer.uint32(197).float(message.dispersion_angle); - } - if (message.shot_dispersion_factor !== 0) { - writer.uint32(205).float(message.shot_dispersion_factor); - } - if (message.turret_rotation_dispersion_factor !== 0) { - writer.uint32(213).float(message.turret_rotation_dispersion_factor); - } - if (message.aiming_time !== 0) { - writer.uint32(221).float(message.aiming_time); - } - if (message.gun_turn_rate !== 0) { - writer.uint32(229).float(message.gun_turn_rate); - } - if (message.mass !== 0) { - writer.uint32(237).float(message.mass); - } - if (message.engine_power !== 0) { - writer.uint32(245).float(message.engine_power); - } - if (message.forward_max_speed !== 0) { - writer.uint32(253).float(message.forward_max_speed); - } - if (message.backward_max_speed !== 0) { - writer.uint32(261).float(message.backward_max_speed); - } - if (message.rotation_speed !== 0) { - writer.uint32(269).float(message.rotation_speed); - } - if (message.terrain_resistance_hard !== 0) { - writer.uint32(277).float(message.terrain_resistance_hard); - } - if (message.brake_force !== 0) { - writer.uint32(285).float(message.brake_force); + if (message.type !== 1) { + writer.uint32(32).int32(message.type); } return writer; }, @@ -322,267 +226,19 @@ export const Tank: MessageFns = { continue; } case 3: { - if (tag !== 26) { + if (tag !== 24) { break; } - message.set = reader.string(); + message.class = reader.int32() as any; continue; } case 4: { - if (tag !== 34) { + if (tag !== 32) { break; } - message.class = reader.string(); - continue; - } - case 5: { - if (tag !== 42) { - break; - } - - message.faction = reader.string(); - continue; - } - case 6: { - if (tag !== 50) { - break; - } - - message.turret_rotator_health = ModuleHealth.decode(reader, reader.uint32()); - continue; - } - case 7: { - if (tag !== 58) { - break; - } - - message.surveying_device_health = ModuleHealth.decode(reader, reader.uint32()); - continue; - } - case 8: { - if (tag !== 66) { - break; - } - - message.gun_health = ModuleHealth.decode(reader, reader.uint32()); - continue; - } - case 9: { - if (tag !== 74) { - break; - } - - message.chassis_health = ModuleHealth.decode(reader, reader.uint32()); - continue; - } - case 10: { - if (tag !== 82) { - break; - } - - message.ammo_bay_health = ModuleHealth.decode(reader, reader.uint32()); - continue; - } - case 11: { - if (tag !== 90) { - break; - } - - message.engine_health = ModuleHealth.decode(reader, reader.uint32()); - continue; - } - case 12: { - if (tag !== 98) { - break; - } - - message.fuel_tank_health = ModuleHealth.decode(reader, reader.uint32()); - continue; - } - case 13: { - if (tag !== 106) { - break; - } - - message.crew_health.push(CrewHealth.decode(reader, reader.uint32())); - continue; - } - case 14: { - if (tag !== 117) { - break; - } - - message.max_health = reader.float(); - continue; - } - case 15: { - if (tag !== 125) { - break; - } - - message.health_burn_per_sec = reader.float(); - continue; - } - case 16: { - if (tag !== 133) { - break; - } - - message.fire_starting_chance = reader.float(); - continue; - } - case 17: { - if (tag !== 141) { - break; - } - - message.concealment_stationary = reader.float(); - continue; - } - case 18: { - if (tag !== 149) { - break; - } - - message.concealment_moving = reader.float(); - continue; - } - case 19: { - if (tag !== 157) { - break; - } - - message.concealment_factor_at_shot = reader.float(); - continue; - } - case 20: { - if (tag !== 165) { - break; - } - - message.turret_turn_rate = reader.float(); - continue; - } - case 21: { - if (tag !== 173) { - break; - } - - message.circular_vision_radius = reader.float(); - continue; - } - case 22: { - if (tag !== 178) { - break; - } - - message.shells.push(Shell.decode(reader, reader.uint32())); - continue; - } - case 23: { - if (tag !== 189) { - break; - } - - message.reload_time = reader.float(); - continue; - } - case 24: { - if (tag !== 197) { - break; - } - - message.dispersion_angle = reader.float(); - continue; - } - case 25: { - if (tag !== 205) { - break; - } - - message.shot_dispersion_factor = reader.float(); - continue; - } - case 26: { - if (tag !== 213) { - break; - } - - message.turret_rotation_dispersion_factor = reader.float(); - continue; - } - case 27: { - if (tag !== 221) { - break; - } - - message.aiming_time = reader.float(); - continue; - } - case 28: { - if (tag !== 229) { - break; - } - - message.gun_turn_rate = reader.float(); - continue; - } - case 29: { - if (tag !== 237) { - break; - } - - message.mass = reader.float(); - continue; - } - case 30: { - if (tag !== 245) { - break; - } - - message.engine_power = reader.float(); - continue; - } - case 31: { - if (tag !== 253) { - break; - } - - message.forward_max_speed = reader.float(); - continue; - } - case 32: { - if (tag !== 261) { - break; - } - - message.backward_max_speed = reader.float(); - continue; - } - case 33: { - if (tag !== 269) { - break; - } - - message.rotation_speed = reader.float(); - continue; - } - case 34: { - if (tag !== 277) { - break; - } - - message.terrain_resistance_hard = reader.float(); - continue; - } - case 35: { - if (tag !== 285) { - break; - } - - message.brake_force = reader.float(); + message.type = reader.int32() as any; continue; } } @@ -598,57 +254,8 @@ export const Tank: MessageFns = { return { id: globalThis.String(assertSet("Tank.id", object.id)), name: I18n.fromJSON(assertSet("Tank.name", object.name)), - set: globalThis.String(assertSet("Tank.set", object.set)), - class: globalThis.String(assertSet("Tank.class", object.class)), - faction: globalThis.String(assertSet("Tank.faction", object.faction)), - turret_rotator_health: ModuleHealth.fromJSON( - assertSet("Tank.turret_rotator_health", object.turret_rotator_health), - ), - surveying_device_health: ModuleHealth.fromJSON( - assertSet("Tank.surveying_device_health", object.surveying_device_health), - ), - gun_health: ModuleHealth.fromJSON(assertSet("Tank.gun_health", object.gun_health)), - chassis_health: ModuleHealth.fromJSON(assertSet("Tank.chassis_health", object.chassis_health)), - ammo_bay_health: ModuleHealth.fromJSON(assertSet("Tank.ammo_bay_health", object.ammo_bay_health)), - engine_health: ModuleHealth.fromJSON(assertSet("Tank.engine_health", object.engine_health)), - fuel_tank_health: ModuleHealth.fromJSON(assertSet("Tank.fuel_tank_health", object.fuel_tank_health)), - crew_health: globalThis.Array.isArray(object?.crew_health) - ? object.crew_health.map((e: any) => CrewHealth.fromJSON(e)) - : [], - max_health: globalThis.Number(assertSet("Tank.max_health", object.max_health)), - health_burn_per_sec: globalThis.Number(assertSet("Tank.health_burn_per_sec", object.health_burn_per_sec)), - fire_starting_chance: globalThis.Number(assertSet("Tank.fire_starting_chance", object.fire_starting_chance)), - concealment_stationary: globalThis.Number( - assertSet("Tank.concealment_stationary", object.concealment_stationary), - ), - concealment_moving: globalThis.Number(assertSet("Tank.concealment_moving", object.concealment_moving)), - concealment_factor_at_shot: globalThis.Number( - assertSet("Tank.concealment_factor_at_shot", object.concealment_factor_at_shot), - ), - turret_turn_rate: globalThis.Number(assertSet("Tank.turret_turn_rate", object.turret_turn_rate)), - circular_vision_radius: globalThis.Number( - assertSet("Tank.circular_vision_radius", object.circular_vision_radius), - ), - shells: globalThis.Array.isArray(object?.shells) ? object.shells.map((e: any) => Shell.fromJSON(e)) : [], - reload_time: globalThis.Number(assertSet("Tank.reload_time", object.reload_time)), - dispersion_angle: globalThis.Number(assertSet("Tank.dispersion_angle", object.dispersion_angle)), - shot_dispersion_factor: globalThis.Number( - assertSet("Tank.shot_dispersion_factor", object.shot_dispersion_factor), - ), - turret_rotation_dispersion_factor: globalThis.Number( - assertSet("Tank.turret_rotation_dispersion_factor", object.turret_rotation_dispersion_factor), - ), - aiming_time: globalThis.Number(assertSet("Tank.aiming_time", object.aiming_time)), - gun_turn_rate: globalThis.Number(assertSet("Tank.gun_turn_rate", object.gun_turn_rate)), - mass: globalThis.Number(assertSet("Tank.mass", object.mass)), - engine_power: globalThis.Number(assertSet("Tank.engine_power", object.engine_power)), - forward_max_speed: globalThis.Number(assertSet("Tank.forward_max_speed", object.forward_max_speed)), - backward_max_speed: globalThis.Number(assertSet("Tank.backward_max_speed", object.backward_max_speed)), - rotation_speed: globalThis.Number(assertSet("Tank.rotation_speed", object.rotation_speed)), - terrain_resistance_hard: globalThis.Number( - assertSet("Tank.terrain_resistance_hard", object.terrain_resistance_hard), - ), - brake_force: globalThis.Number(assertSet("Tank.brake_force", object.brake_force)), + class: tankClassFromJSON(assertSet("Tank.class", object.class)), + type: tankTypeFromJSON(assertSet("Tank.type", object.type)), }; }, @@ -660,104 +267,11 @@ export const Tank: MessageFns = { if (message.name !== undefined) { obj.name = I18n.toJSON(message.name); } - if (message.set !== "") { - obj.set = message.set; + if (message.class !== 1) { + obj.class = tankClassToJSON(message.class); } - if (message.class !== "") { - obj.class = message.class; - } - if (message.faction !== "") { - obj.faction = message.faction; - } - if (message.turret_rotator_health !== undefined) { - obj.turret_rotator_health = ModuleHealth.toJSON(message.turret_rotator_health); - } - if (message.surveying_device_health !== undefined) { - obj.surveying_device_health = ModuleHealth.toJSON(message.surveying_device_health); - } - if (message.gun_health !== undefined) { - obj.gun_health = ModuleHealth.toJSON(message.gun_health); - } - if (message.chassis_health !== undefined) { - obj.chassis_health = ModuleHealth.toJSON(message.chassis_health); - } - if (message.ammo_bay_health !== undefined) { - obj.ammo_bay_health = ModuleHealth.toJSON(message.ammo_bay_health); - } - if (message.engine_health !== undefined) { - obj.engine_health = ModuleHealth.toJSON(message.engine_health); - } - if (message.fuel_tank_health !== undefined) { - obj.fuel_tank_health = ModuleHealth.toJSON(message.fuel_tank_health); - } - if (message.crew_health?.length) { - obj.crew_health = message.crew_health.map((e) => CrewHealth.toJSON(e)); - } - if (message.max_health !== 0) { - obj.max_health = message.max_health; - } - if (message.health_burn_per_sec !== 0) { - obj.health_burn_per_sec = message.health_burn_per_sec; - } - if (message.fire_starting_chance !== 0) { - obj.fire_starting_chance = message.fire_starting_chance; - } - if (message.concealment_stationary !== 0) { - obj.concealment_stationary = message.concealment_stationary; - } - if (message.concealment_moving !== 0) { - obj.concealment_moving = message.concealment_moving; - } - if (message.concealment_factor_at_shot !== 0) { - obj.concealment_factor_at_shot = message.concealment_factor_at_shot; - } - if (message.turret_turn_rate !== 0) { - obj.turret_turn_rate = message.turret_turn_rate; - } - if (message.circular_vision_radius !== 0) { - obj.circular_vision_radius = message.circular_vision_radius; - } - if (message.shells?.length) { - obj.shells = message.shells.map((e) => Shell.toJSON(e)); - } - if (message.reload_time !== 0) { - obj.reload_time = message.reload_time; - } - if (message.dispersion_angle !== 0) { - obj.dispersion_angle = message.dispersion_angle; - } - if (message.shot_dispersion_factor !== 0) { - obj.shot_dispersion_factor = message.shot_dispersion_factor; - } - if (message.turret_rotation_dispersion_factor !== 0) { - obj.turret_rotation_dispersion_factor = message.turret_rotation_dispersion_factor; - } - if (message.aiming_time !== 0) { - obj.aiming_time = message.aiming_time; - } - if (message.gun_turn_rate !== 0) { - obj.gun_turn_rate = message.gun_turn_rate; - } - if (message.mass !== 0) { - obj.mass = message.mass; - } - if (message.engine_power !== 0) { - obj.engine_power = message.engine_power; - } - if (message.forward_max_speed !== 0) { - obj.forward_max_speed = message.forward_max_speed; - } - if (message.backward_max_speed !== 0) { - obj.backward_max_speed = message.backward_max_speed; - } - if (message.rotation_speed !== 0) { - obj.rotation_speed = message.rotation_speed; - } - if (message.terrain_resistance_hard !== 0) { - obj.terrain_resistance_hard = message.terrain_resistance_hard; - } - if (message.brake_force !== 0) { - obj.brake_force = message.brake_force; + if (message.type !== 1) { + obj.type = tankTypeToJSON(message.type); } return obj; }, @@ -771,533 +285,8 @@ export const Tank: MessageFns = { message.name = (object.name !== undefined && object.name !== null) ? I18n.fromPartial(object.name) : createBaseI18n(); - message.set = object.set ?? ""; - message.class = object.class ?? ""; - message.faction = object.faction ?? ""; - message.turret_rotator_health = - (object.turret_rotator_health !== undefined && object.turret_rotator_health !== null) - ? ModuleHealth.fromPartial(object.turret_rotator_health) - : createBaseModuleHealth(); - message.surveying_device_health = - (object.surveying_device_health !== undefined && object.surveying_device_health !== null) - ? ModuleHealth.fromPartial(object.surveying_device_health) - : createBaseModuleHealth(); - message.gun_health = (object.gun_health !== undefined && object.gun_health !== null) - ? ModuleHealth.fromPartial(object.gun_health) - : createBaseModuleHealth(); - message.chassis_health = (object.chassis_health !== undefined && object.chassis_health !== null) - ? ModuleHealth.fromPartial(object.chassis_health) - : createBaseModuleHealth(); - message.ammo_bay_health = (object.ammo_bay_health !== undefined && object.ammo_bay_health !== null) - ? ModuleHealth.fromPartial(object.ammo_bay_health) - : createBaseModuleHealth(); - message.engine_health = (object.engine_health !== undefined && object.engine_health !== null) - ? ModuleHealth.fromPartial(object.engine_health) - : createBaseModuleHealth(); - message.fuel_tank_health = (object.fuel_tank_health !== undefined && object.fuel_tank_health !== null) - ? ModuleHealth.fromPartial(object.fuel_tank_health) - : createBaseModuleHealth(); - message.crew_health = object.crew_health?.map((e) => CrewHealth.fromPartial(e)) || []; - message.max_health = object.max_health ?? 0; - message.health_burn_per_sec = object.health_burn_per_sec ?? 0; - message.fire_starting_chance = object.fire_starting_chance ?? 0; - message.concealment_stationary = object.concealment_stationary ?? 0; - message.concealment_moving = object.concealment_moving ?? 0; - message.concealment_factor_at_shot = object.concealment_factor_at_shot ?? 0; - message.turret_turn_rate = object.turret_turn_rate ?? 0; - message.circular_vision_radius = object.circular_vision_radius ?? 0; - message.shells = object.shells?.map((e) => Shell.fromPartial(e)) || []; - message.reload_time = object.reload_time ?? 0; - message.dispersion_angle = object.dispersion_angle ?? 0; - message.shot_dispersion_factor = object.shot_dispersion_factor ?? 0; - message.turret_rotation_dispersion_factor = object.turret_rotation_dispersion_factor ?? 0; - message.aiming_time = object.aiming_time ?? 0; - message.gun_turn_rate = object.gun_turn_rate ?? 0; - message.mass = object.mass ?? 0; - message.engine_power = object.engine_power ?? 0; - message.forward_max_speed = object.forward_max_speed ?? 0; - message.backward_max_speed = object.backward_max_speed ?? 0; - message.rotation_speed = object.rotation_speed ?? 0; - message.terrain_resistance_hard = object.terrain_resistance_hard ?? 0; - message.brake_force = object.brake_force ?? 0; - return message; - }, -}; - -function createBaseCrewHealth(): CrewHealth { - return { type: 0, max_health: 0 }; -} - -export const CrewHealth: MessageFns = { - encode(message: CrewHealth, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.type !== 0) { - writer.uint32(8).int32(message.type); - } - if (message.max_health !== 0) { - writer.uint32(21).float(message.max_health); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): CrewHealth { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCrewHealth(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 8) { - break; - } - - message.type = reader.int32() as any; - continue; - } - case 2: { - if (tag !== 21) { - break; - } - - message.max_health = reader.float(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): CrewHealth { - return { - type: crewTypeFromJSON(assertSet("CrewHealth.type", object.type)), - max_health: globalThis.Number(assertSet("CrewHealth.max_health", object.max_health)), - }; - }, - - toJSON(message: CrewHealth): unknown { - const obj: any = {}; - if (message.type !== 0) { - obj.type = crewTypeToJSON(message.type); - } - if (message.max_health !== 0) { - obj.max_health = message.max_health; - } - return obj; - }, - - create, I>>(base?: I): CrewHealth { - return CrewHealth.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): CrewHealth { - const message = createBaseCrewHealth(); - message.type = object.type ?? 0; - message.max_health = object.max_health ?? 0; - return message; - }, -}; - -function createBaseShell(): Shell { - return { - speed: 0, - gravity: 0, - armor_damage: 0, - module_damage: 0, - caliber: 0, - piercing_power: 0, - piercing_power_500m: 0, - normalization: 0, - max_distance: 0, - ricochet_angle: 0, - piercing_power_loss_factor_by_distance: 0, - explosion_radius: 0, - max_count: 0, - }; -} - -export const Shell: MessageFns = { - encode(message: Shell, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.speed !== 0) { - writer.uint32(13).float(message.speed); - } - if (message.gravity !== 0) { - writer.uint32(21).float(message.gravity); - } - if (message.armor_damage !== 0) { - writer.uint32(29).float(message.armor_damage); - } - if (message.module_damage !== 0) { - writer.uint32(37).float(message.module_damage); - } - if (message.caliber !== 0) { - writer.uint32(45).float(message.caliber); - } - if (message.piercing_power !== 0) { - writer.uint32(53).float(message.piercing_power); - } - if (message.piercing_power_500m !== 0) { - writer.uint32(61).float(message.piercing_power_500m); - } - if (message.normalization !== 0) { - writer.uint32(69).float(message.normalization); - } - if (message.max_distance !== 0) { - writer.uint32(77).float(message.max_distance); - } - if (message.ricochet_angle !== 0) { - writer.uint32(85).float(message.ricochet_angle); - } - if (message.piercing_power_loss_factor_by_distance !== 0) { - writer.uint32(93).float(message.piercing_power_loss_factor_by_distance); - } - if (message.explosion_radius !== 0) { - writer.uint32(101).float(message.explosion_radius); - } - if (message.max_count !== 0) { - writer.uint32(104).int32(message.max_count); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): Shell { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseShell(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 13) { - break; - } - - message.speed = reader.float(); - continue; - } - case 2: { - if (tag !== 21) { - break; - } - - message.gravity = reader.float(); - continue; - } - case 3: { - if (tag !== 29) { - break; - } - - message.armor_damage = reader.float(); - continue; - } - case 4: { - if (tag !== 37) { - break; - } - - message.module_damage = reader.float(); - continue; - } - case 5: { - if (tag !== 45) { - break; - } - - message.caliber = reader.float(); - continue; - } - case 6: { - if (tag !== 53) { - break; - } - - message.piercing_power = reader.float(); - continue; - } - case 7: { - if (tag !== 61) { - break; - } - - message.piercing_power_500m = reader.float(); - continue; - } - case 8: { - if (tag !== 69) { - break; - } - - message.normalization = reader.float(); - continue; - } - case 9: { - if (tag !== 77) { - break; - } - - message.max_distance = reader.float(); - continue; - } - case 10: { - if (tag !== 85) { - break; - } - - message.ricochet_angle = reader.float(); - continue; - } - case 11: { - if (tag !== 93) { - break; - } - - message.piercing_power_loss_factor_by_distance = reader.float(); - continue; - } - case 12: { - if (tag !== 101) { - break; - } - - message.explosion_radius = reader.float(); - continue; - } - case 13: { - if (tag !== 104) { - break; - } - - message.max_count = reader.int32(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): Shell { - return { - speed: globalThis.Number(assertSet("Shell.speed", object.speed)), - gravity: globalThis.Number(assertSet("Shell.gravity", object.gravity)), - armor_damage: globalThis.Number(assertSet("Shell.armor_damage", object.armor_damage)), - module_damage: globalThis.Number(assertSet("Shell.module_damage", object.module_damage)), - caliber: globalThis.Number(assertSet("Shell.caliber", object.caliber)), - piercing_power: globalThis.Number(assertSet("Shell.piercing_power", object.piercing_power)), - piercing_power_500m: globalThis.Number(assertSet("Shell.piercing_power_500m", object.piercing_power_500m)), - normalization: globalThis.Number(assertSet("Shell.normalization", object.normalization)), - max_distance: globalThis.Number(assertSet("Shell.max_distance", object.max_distance)), - ricochet_angle: globalThis.Number(assertSet("Shell.ricochet_angle", object.ricochet_angle)), - piercing_power_loss_factor_by_distance: globalThis.Number( - assertSet("Shell.piercing_power_loss_factor_by_distance", object.piercing_power_loss_factor_by_distance), - ), - explosion_radius: globalThis.Number(assertSet("Shell.explosion_radius", object.explosion_radius)), - max_count: globalThis.Number(assertSet("Shell.max_count", object.max_count)), - }; - }, - - toJSON(message: Shell): unknown { - const obj: any = {}; - if (message.speed !== 0) { - obj.speed = message.speed; - } - if (message.gravity !== 0) { - obj.gravity = message.gravity; - } - if (message.armor_damage !== 0) { - obj.armor_damage = message.armor_damage; - } - if (message.module_damage !== 0) { - obj.module_damage = message.module_damage; - } - if (message.caliber !== 0) { - obj.caliber = message.caliber; - } - if (message.piercing_power !== 0) { - obj.piercing_power = message.piercing_power; - } - if (message.piercing_power_500m !== 0) { - obj.piercing_power_500m = message.piercing_power_500m; - } - if (message.normalization !== 0) { - obj.normalization = message.normalization; - } - if (message.max_distance !== 0) { - obj.max_distance = message.max_distance; - } - if (message.ricochet_angle !== 0) { - obj.ricochet_angle = message.ricochet_angle; - } - if (message.piercing_power_loss_factor_by_distance !== 0) { - obj.piercing_power_loss_factor_by_distance = message.piercing_power_loss_factor_by_distance; - } - if (message.explosion_radius !== 0) { - obj.explosion_radius = message.explosion_radius; - } - if (message.max_count !== 0) { - obj.max_count = Math.round(message.max_count); - } - return obj; - }, - - create, I>>(base?: I): Shell { - return Shell.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): Shell { - const message = createBaseShell(); - message.speed = object.speed ?? 0; - message.gravity = object.gravity ?? 0; - message.armor_damage = object.armor_damage ?? 0; - message.module_damage = object.module_damage ?? 0; - message.caliber = object.caliber ?? 0; - message.piercing_power = object.piercing_power ?? 0; - message.piercing_power_500m = object.piercing_power_500m ?? 0; - message.normalization = object.normalization ?? 0; - message.max_distance = object.max_distance ?? 0; - message.ricochet_angle = object.ricochet_angle ?? 0; - message.piercing_power_loss_factor_by_distance = object.piercing_power_loss_factor_by_distance ?? 0; - message.explosion_radius = object.explosion_radius ?? 0; - message.max_count = object.max_count ?? 0; - return message; - }, -}; - -function createBaseModuleHealth(): ModuleHealth { - return { - max_health: 0, - max_regen_health: 0, - hysteresis_health: undefined, - health_regen_per_sec: 0, - health_burn_per_sec: undefined, - }; -} - -export const ModuleHealth: MessageFns = { - encode(message: ModuleHealth, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.max_health !== 0) { - writer.uint32(13).float(message.max_health); - } - if (message.max_regen_health !== 0) { - writer.uint32(21).float(message.max_regen_health); - } - if (message.hysteresis_health !== undefined && message.hysteresis_health !== undefined) { - writer.uint32(29).float(message.hysteresis_health); - } - if (message.health_regen_per_sec !== 0) { - writer.uint32(37).float(message.health_regen_per_sec); - } - if (message.health_burn_per_sec !== undefined && message.health_burn_per_sec !== undefined) { - writer.uint32(45).float(message.health_burn_per_sec); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): ModuleHealth { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseModuleHealth(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 13) { - break; - } - - message.max_health = reader.float(); - continue; - } - case 2: { - if (tag !== 21) { - break; - } - - message.max_regen_health = reader.float(); - continue; - } - case 3: { - if (tag !== 29) { - break; - } - - message.hysteresis_health = reader.float(); - continue; - } - case 4: { - if (tag !== 37) { - break; - } - - message.health_regen_per_sec = reader.float(); - continue; - } - case 5: { - if (tag !== 45) { - break; - } - - message.health_burn_per_sec = reader.float(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): ModuleHealth { - return { - max_health: globalThis.Number(assertSet("ModuleHealth.max_health", object.max_health)), - max_regen_health: globalThis.Number(assertSet("ModuleHealth.max_regen_health", object.max_regen_health)), - hysteresis_health: isSet(object.hysteresis_health) ? globalThis.Number(object.hysteresis_health) : undefined, - health_regen_per_sec: globalThis.Number( - assertSet("ModuleHealth.health_regen_per_sec", object.health_regen_per_sec), - ), - health_burn_per_sec: isSet(object.health_burn_per_sec) - ? globalThis.Number(object.health_burn_per_sec) - : undefined, - }; - }, - - toJSON(message: ModuleHealth): unknown { - const obj: any = {}; - if (message.max_health !== 0) { - obj.max_health = message.max_health; - } - if (message.max_regen_health !== 0) { - obj.max_regen_health = message.max_regen_health; - } - if (message.hysteresis_health !== undefined && message.hysteresis_health !== undefined) { - obj.hysteresis_health = message.hysteresis_health; - } - if (message.health_regen_per_sec !== 0) { - obj.health_regen_per_sec = message.health_regen_per_sec; - } - if (message.health_burn_per_sec !== undefined && message.health_burn_per_sec !== undefined) { - obj.health_burn_per_sec = message.health_burn_per_sec; - } - return obj; - }, - - create, I>>(base?: I): ModuleHealth { - return ModuleHealth.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): ModuleHealth { - const message = createBaseModuleHealth(); - message.max_health = object.max_health ?? 0; - message.max_regen_health = object.max_regen_health ?? 0; - message.hysteresis_health = object.hysteresis_health ?? undefined; - message.health_regen_per_sec = object.health_regen_per_sec ?? 0; - message.health_burn_per_sec = object.health_burn_per_sec ?? undefined; + message.class = object.class ?? 1; + message.type = object.type ?? 1; return message; }, }; diff --git a/packages/website/src/core/awaitables/tanks.ts b/packages/website/src/core/awaitables/tanks.ts new file mode 100644 index 000000000..048d22ab5 --- /dev/null +++ b/packages/website/src/core/awaitables/tanks.ts @@ -0,0 +1,3 @@ +import { fetchTanks } from '@blitzkit/core'; + +export const awaitableTanks = fetchTanks(); diff --git a/packages/website/src/pages/[...locale]/index.astro b/packages/website/src/pages/[...locale]/index.astro index 025a9ef1c..026aa69e9 100644 --- a/packages/website/src/pages/[...locale]/index.astro +++ b/packages/website/src/pages/[...locale]/index.astro @@ -1,6 +1,7 @@ --- import { assertSecret } from '@blitzkit/core'; import { DEFAULT_LOCALE, SUPPORTED_LOCALES } from '@blitzkit/i18n'; +import { literals } from '@blitzkit/i18n/src/literals'; import { Box, Flex, Heading, Link } from '@radix-ui/themes'; import type { GetStaticPaths } from 'astro'; import { AesonPlug } from '../../components/AesonPlug'; @@ -21,7 +22,6 @@ import { tierListTool, } from '../../constants/tools'; import { getStrings } from '../../core/i18n/getStrings'; -import { literals } from '@blitzkit/i18n/src/literals'; import BaseLayout from '../../layouts/BaseLayout.astro'; const PUBLIC_ASSET_BRANCH = assertSecret(import.meta.env.PUBLIC_ASSET_BRANCH); diff --git a/src/BlitzKit.CLI/Protos/Tank.cs b/src/BlitzKit.CLI/Protos/Tank.cs index bb31f87f2..f1abb9bad 100644 --- a/src/BlitzKit.CLI/Protos/Tank.cs +++ b/src/BlitzKit.CLI/Protos/Tank.cs @@ -25,66 +25,52 @@ namespace Blitzkit { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( "CiNwYWNrYWdlcy9jb3JlL3NyYy9wcm90b3MvdGFuay5wcm90bxIIYmxpdHpr", - "aXQaI3BhY2thZ2VzL2NvcmUvc3JjL3Byb3Rvcy9pMThuLnByb3RvIr8ICgRU", - "YW5rEgoKAmlkGAEgAigJEhwKBG5hbWUYAiACKAsyDi5ibGl0emtpdC5JMThu", - "EgsKA3NldBgDIAIoCRINCgVjbGFzcxgEIAIoCRIPCgdmYWN0aW9uGAUgAigJ", - "EjUKFXR1cnJldF9yb3RhdG9yX2hlYWx0aBgGIAIoCzIWLmJsaXR6a2l0Lk1v", - "ZHVsZUhlYWx0aBI3ChdzdXJ2ZXlpbmdfZGV2aWNlX2hlYWx0aBgHIAIoCzIW", - "LmJsaXR6a2l0Lk1vZHVsZUhlYWx0aBIqCgpndW5faGVhbHRoGAggAigLMhYu", - "YmxpdHpraXQuTW9kdWxlSGVhbHRoEi4KDmNoYXNzaXNfaGVhbHRoGAkgAigL", - "MhYuYmxpdHpraXQuTW9kdWxlSGVhbHRoEi8KD2FtbW9fYmF5X2hlYWx0aBgK", - "IAIoCzIWLmJsaXR6a2l0Lk1vZHVsZUhlYWx0aBItCg1lbmdpbmVfaGVhbHRo", - "GAsgAigLMhYuYmxpdHpraXQuTW9kdWxlSGVhbHRoEjAKEGZ1ZWxfdGFua19o", - "ZWFsdGgYDCACKAsyFi5ibGl0emtpdC5Nb2R1bGVIZWFsdGgSKQoLY3Jld19o", - "ZWFsdGgYDSADKAsyFC5ibGl0emtpdC5DcmV3SGVhbHRoEhIKCm1heF9oZWFs", - "dGgYDiACKAISGwoTaGVhbHRoX2J1cm5fcGVyX3NlYxgPIAIoAhIcChRmaXJl", - "X3N0YXJ0aW5nX2NoYW5jZRgQIAIoAhIeChZjb25jZWFsbWVudF9zdGF0aW9u", - "YXJ5GBEgAigCEhoKEmNvbmNlYWxtZW50X21vdmluZxgSIAIoAhIiChpjb25j", - "ZWFsbWVudF9mYWN0b3JfYXRfc2hvdBgTIAIoAhIYChB0dXJyZXRfdHVybl9y", - "YXRlGBQgAigCEh4KFmNpcmN1bGFyX3Zpc2lvbl9yYWRpdXMYFSACKAISHwoG", - "c2hlbGxzGBYgAygLMg8uYmxpdHpraXQuU2hlbGwSEwoLcmVsb2FkX3RpbWUY", - "FyACKAISGAoQZGlzcGVyc2lvbl9hbmdsZRgYIAIoAhIeChZzaG90X2Rpc3Bl", - "cnNpb25fZmFjdG9yGBkgAigCEikKIXR1cnJldF9yb3RhdGlvbl9kaXNwZXJz", - "aW9uX2ZhY3RvchgaIAIoAhITCgthaW1pbmdfdGltZRgbIAIoAhIVCg1ndW5f", - "dHVybl9yYXRlGBwgAigCEgwKBG1hc3MYHSACKAISFAoMZW5naW5lX3Bvd2Vy", - "GB4gAigCEhkKEWZvcndhcmRfbWF4X3NwZWVkGB8gAigCEhoKEmJhY2t3YXJk", - "X21heF9zcGVlZBggIAIoAhIWCg5yb3RhdGlvbl9zcGVlZBghIAIoAhIfChd0", - "ZXJyYWluX3Jlc2lzdGFuY2VfaGFyZBgiIAIoAhITCgticmFrZV9mb3JjZRgj", - "IAIoAiJCCgpDcmV3SGVhbHRoEiAKBHR5cGUYASACKA4yEi5ibGl0emtpdC5D", - "cmV3VHlwZRISCgptYXhfaGVhbHRoGAIgAigCIrwCCgVTaGVsbBINCgVzcGVl", - "ZBgBIAIoAhIPCgdncmF2aXR5GAIgAigCEhQKDGFybW9yX2RhbWFnZRgDIAIo", - "AhIVCg1tb2R1bGVfZGFtYWdlGAQgAigCEg8KB2NhbGliZXIYBSACKAISFgoO", - "cGllcmNpbmdfcG93ZXIYBiACKAISGwoTcGllcmNpbmdfcG93ZXJfNTAwbRgH", - "IAIoAhIVCg1ub3JtYWxpemF0aW9uGAggAigCEhQKDG1heF9kaXN0YW5jZRgJ", - "IAIoAhIWCg5yaWNvY2hldF9hbmdsZRgKIAIoAhIuCiZwaWVyY2luZ19wb3dl", - "cl9sb3NzX2ZhY3Rvcl9ieV9kaXN0YW5jZRgLIAIoAhIYChBleHBsb3Npb25f", - "cmFkaXVzGAwgAigCEhEKCW1heF9jb3VudBgNIAIoBSKSAQoMTW9kdWxlSGVh", - "bHRoEhIKCm1heF9oZWFsdGgYASACKAISGAoQbWF4X3JlZ2VuX2hlYWx0aBgC", - "IAIoAhIZChFoeXN0ZXJlc2lzX2hlYWx0aBgDIAEoAhIcChRoZWFsdGhfcmVn", - "ZW5fcGVyX3NlYxgEIAIoAhIbChNoZWFsdGhfYnVybl9wZXJfc2VjGAUgASgC", - "Kl0KCENyZXdUeXBlEg0KCUNPTU1BTkRFUhAAEgoKBkRSSVZFUhABEgwKCEdV", - "Tk5FUl8xEAISDAoIR1VOTkVSXzIQAxIMCghMT0FERVJfMRAEEgwKCExPQURF", - "Ul8yEAU=")); + "aXQaI3BhY2thZ2VzL2NvcmUvc3JjL3Byb3Rvcy9pMThuLnByb3RvInYKBFRh", + "bmsSCgoCaWQYASACKAkSHAoEbmFtZRgCIAIoCzIOLmJsaXR6a2l0LkkxOG4S", + "IgoFY2xhc3MYAyACKA4yEy5ibGl0emtpdC5UYW5rQ2xhc3MSIAoEdHlwZRgE", + "IAIoDjISLmJsaXR6a2l0LlRhbmtUeXBlKkEKCVRhbmtDbGFzcxIJCgVMSUdI", + "VBABEgoKBk1FRElVTRACEgkKBUhFQVZZEAMSEgoOVEFOS19ERVNUUk9ZRVIQ", + "BCo4CghUYW5rVHlwZRIQCgxSRVNFQVJDSEFCTEUQARILCgdQUkVNSVVNEAIS", + "DQoJQ09MTEVDVE9SEAMqLwoJU2hlbGxUeXBlEgYKAkFQEAESCAoEQVBDUhAC", + "EggKBEhFQVQQAxIGCgJIRRAEKksKCENyZXdUeXBlEg0KCUNPTU1BTkRFUhAB", + "EgoKBkRSSVZFUhACEgoKBkdVTk5FUhADEgoKBkxPQURFUhAEEgwKCFJBRElP", + "TUFOEAU=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Blitzkit.I18NReflection.Descriptor, }, - new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Blitzkit.CrewType), }, null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.Tank), global::Blitzkit.Tank.Parser, new[]{ "Id", "Name", "Set", "Class", "Faction", "TurretRotatorHealth", "SurveyingDeviceHealth", "GunHealth", "ChassisHealth", "AmmoBayHealth", "EngineHealth", "FuelTankHealth", "CrewHealth", "MaxHealth", "HealthBurnPerSec", "FireStartingChance", "ConcealmentStationary", "ConcealmentMoving", "ConcealmentFactorAtShot", "TurretTurnRate", "CircularVisionRadius", "Shells", "ReloadTime", "DispersionAngle", "ShotDispersionFactor", "TurretRotationDispersionFactor", "AimingTime", "GunTurnRate", "Mass", "EnginePower", "ForwardMaxSpeed", "BackwardMaxSpeed", "RotationSpeed", "TerrainResistanceHard", "BrakeForce" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.CrewHealth), global::Blitzkit.CrewHealth.Parser, new[]{ "Type", "MaxHealth" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.Shell), global::Blitzkit.Shell.Parser, new[]{ "Speed", "Gravity", "ArmorDamage", "ModuleDamage", "Caliber", "PiercingPower", "PiercingPower500M", "Normalization", "MaxDistance", "RicochetAngle", "PiercingPowerLossFactorByDistance", "ExplosionRadius", "MaxCount" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.ModuleHealth), global::Blitzkit.ModuleHealth.Parser, new[]{ "MaxHealth", "MaxRegenHealth", "HysteresisHealth", "HealthRegenPerSec", "HealthBurnPerSec" }, null, null, null, null) + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Blitzkit.TankClass), typeof(global::Blitzkit.TankType), typeof(global::Blitzkit.ShellType), typeof(global::Blitzkit.CrewType), }, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Blitzkit.Tank), global::Blitzkit.Tank.Parser, new[]{ "Id", "Name", "Class", "Type" }, null, null, null, null) })); } #endregion } #region Enums + public enum TankClass { + [pbr::OriginalName("LIGHT")] Light = 1, + [pbr::OriginalName("MEDIUM")] Medium = 2, + [pbr::OriginalName("HEAVY")] Heavy = 3, + [pbr::OriginalName("TANK_DESTROYER")] TankDestroyer = 4, + } + + public enum TankType { + [pbr::OriginalName("RESEARCHABLE")] Researchable = 1, + [pbr::OriginalName("PREMIUM")] Premium = 2, + [pbr::OriginalName("COLLECTOR")] Collector = 3, + } + + public enum ShellType { + [pbr::OriginalName("AP")] Ap = 1, + [pbr::OriginalName("APCR")] Apcr = 2, + [pbr::OriginalName("HEAT")] Heat = 3, + [pbr::OriginalName("HE")] He = 4, + } + public enum CrewType { - [pbr::OriginalName("COMMANDER")] Commander = 0, - [pbr::OriginalName("DRIVER")] Driver = 1, - [pbr::OriginalName("GUNNER_1")] Gunner1 = 2, - [pbr::OriginalName("GUNNER_2")] Gunner2 = 3, - [pbr::OriginalName("LOADER_1")] Loader1 = 4, - [pbr::OriginalName("LOADER_2")] Loader2 = 5, + [pbr::OriginalName("COMMANDER")] Commander = 1, + [pbr::OriginalName("DRIVER")] Driver = 2, + [pbr::OriginalName("GUNNER")] Gunner = 3, + [pbr::OriginalName("LOADER")] Loader = 4, + [pbr::OriginalName("RADIOMAN")] Radioman = 5, } #endregion @@ -129,39 +115,8 @@ namespace Blitzkit { _hasBits0 = other._hasBits0; id_ = other.id_; name_ = other.name_ != null ? other.name_.Clone() : null; - set_ = other.set_; class_ = other.class_; - faction_ = other.faction_; - turretRotatorHealth_ = other.turretRotatorHealth_ != null ? other.turretRotatorHealth_.Clone() : null; - surveyingDeviceHealth_ = other.surveyingDeviceHealth_ != null ? other.surveyingDeviceHealth_.Clone() : null; - gunHealth_ = other.gunHealth_ != null ? other.gunHealth_.Clone() : null; - chassisHealth_ = other.chassisHealth_ != null ? other.chassisHealth_.Clone() : null; - ammoBayHealth_ = other.ammoBayHealth_ != null ? other.ammoBayHealth_.Clone() : null; - engineHealth_ = other.engineHealth_ != null ? other.engineHealth_.Clone() : null; - fuelTankHealth_ = other.fuelTankHealth_ != null ? other.fuelTankHealth_.Clone() : null; - crewHealth_ = other.crewHealth_.Clone(); - maxHealth_ = other.maxHealth_; - healthBurnPerSec_ = other.healthBurnPerSec_; - fireStartingChance_ = other.fireStartingChance_; - concealmentStationary_ = other.concealmentStationary_; - concealmentMoving_ = other.concealmentMoving_; - concealmentFactorAtShot_ = other.concealmentFactorAtShot_; - turretTurnRate_ = other.turretTurnRate_; - circularVisionRadius_ = other.circularVisionRadius_; - shells_ = other.shells_.Clone(); - reloadTime_ = other.reloadTime_; - dispersionAngle_ = other.dispersionAngle_; - shotDispersionFactor_ = other.shotDispersionFactor_; - turretRotationDispersionFactor_ = other.turretRotationDispersionFactor_; - aimingTime_ = other.aimingTime_; - gunTurnRate_ = other.gunTurnRate_; - mass_ = other.mass_; - enginePower_ = other.enginePower_; - forwardMaxSpeed_ = other.forwardMaxSpeed_; - backwardMaxSpeed_ = other.backwardMaxSpeed_; - rotationSpeed_ = other.rotationSpeed_; - terrainResistanceHard_ = other.terrainResistanceHard_; - brakeForce_ = other.brakeForce_; + type_ = other.type_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -209,760 +164,60 @@ namespace Blitzkit { } } - /// Field number for the "set" field. - public const int SetFieldNumber = 3; - private readonly static string SetDefaultValue = ""; - - private string set_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string Set { - get { return set_ ?? SetDefaultValue; } - set { - set_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - /// Gets whether the "set" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasSet { - get { return set_ != null; } - } - /// Clears the value of the "set" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearSet() { - set_ = null; - } - /// Field number for the "class" field. - public const int ClassFieldNumber = 4; - private readonly static string ClassDefaultValue = ""; + public const int ClassFieldNumber = 3; + private readonly static global::Blitzkit.TankClass ClassDefaultValue = global::Blitzkit.TankClass.Light; - private string class_; + private global::Blitzkit.TankClass class_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string Class { - get { return class_ ?? ClassDefaultValue; } + public global::Blitzkit.TankClass Class { + get { if ((_hasBits0 & 1) != 0) { return class_; } else { return ClassDefaultValue; } } set { - class_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + _hasBits0 |= 1; + class_ = value; } } /// Gets whether the "class" field is set [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool HasClass { - get { return class_ != null; } + get { return (_hasBits0 & 1) != 0; } } /// Clears the value of the "class" field [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void ClearClass() { - class_ = null; - } - - /// Field number for the "faction" field. - public const int FactionFieldNumber = 5; - private readonly static string FactionDefaultValue = ""; - - private string faction_; - /// - /// nations have been renamed to factions - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string Faction { - get { return faction_ ?? FactionDefaultValue; } - set { - faction_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - /// Gets whether the "faction" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasFaction { - get { return faction_ != null; } - } - /// Clears the value of the "faction" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearFaction() { - faction_ = null; - } - - /// Field number for the "turret_rotator_health" field. - public const int TurretRotatorHealthFieldNumber = 6; - private global::Blitzkit.ModuleHealth turretRotatorHealth_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public global::Blitzkit.ModuleHealth TurretRotatorHealth { - get { return turretRotatorHealth_; } - set { - turretRotatorHealth_ = value; - } - } - - /// Field number for the "surveying_device_health" field. - public const int SurveyingDeviceHealthFieldNumber = 7; - private global::Blitzkit.ModuleHealth surveyingDeviceHealth_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public global::Blitzkit.ModuleHealth SurveyingDeviceHealth { - get { return surveyingDeviceHealth_; } - set { - surveyingDeviceHealth_ = value; - } - } - - /// Field number for the "gun_health" field. - public const int GunHealthFieldNumber = 8; - private global::Blitzkit.ModuleHealth gunHealth_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public global::Blitzkit.ModuleHealth GunHealth { - get { return gunHealth_; } - set { - gunHealth_ = value; - } - } - - /// Field number for the "chassis_health" field. - public const int ChassisHealthFieldNumber = 9; - private global::Blitzkit.ModuleHealth chassisHealth_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public global::Blitzkit.ModuleHealth ChassisHealth { - get { return chassisHealth_; } - set { - chassisHealth_ = value; - } - } - - /// Field number for the "ammo_bay_health" field. - public const int AmmoBayHealthFieldNumber = 10; - private global::Blitzkit.ModuleHealth ammoBayHealth_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public global::Blitzkit.ModuleHealth AmmoBayHealth { - get { return ammoBayHealth_; } - set { - ammoBayHealth_ = value; - } - } - - /// Field number for the "engine_health" field. - public const int EngineHealthFieldNumber = 11; - private global::Blitzkit.ModuleHealth engineHealth_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public global::Blitzkit.ModuleHealth EngineHealth { - get { return engineHealth_; } - set { - engineHealth_ = value; - } - } - - /// Field number for the "fuel_tank_health" field. - public const int FuelTankHealthFieldNumber = 12; - private global::Blitzkit.ModuleHealth fuelTankHealth_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public global::Blitzkit.ModuleHealth FuelTankHealth { - get { return fuelTankHealth_; } - set { - fuelTankHealth_ = value; - } - } - - /// Field number for the "crew_health" field. - public const int CrewHealthFieldNumber = 13; - private static readonly pb::FieldCodec _repeated_crewHealth_codec - = pb::FieldCodec.ForMessage(106, global::Blitzkit.CrewHealth.Parser); - private readonly pbc::RepeatedField crewHealth_ = new pbc::RepeatedField(); - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public pbc::RepeatedField CrewHealth { - get { return crewHealth_; } - } - - /// Field number for the "max_health" field. - public const int MaxHealthFieldNumber = 14; - private readonly static float MaxHealthDefaultValue = 0F; - - private float maxHealth_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public float MaxHealth { - get { if ((_hasBits0 & 1) != 0) { return maxHealth_; } else { return MaxHealthDefaultValue; } } - set { - _hasBits0 |= 1; - maxHealth_ = value; - } - } - /// Gets whether the "max_health" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasMaxHealth { - get { return (_hasBits0 & 1) != 0; } - } - /// Clears the value of the "max_health" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearMaxHealth() { _hasBits0 &= ~1; } - /// Field number for the "health_burn_per_sec" field. - public const int HealthBurnPerSecFieldNumber = 15; - private readonly static float HealthBurnPerSecDefaultValue = 0F; + /// Field number for the "type" field. + public const int TypeFieldNumber = 4; + private readonly static global::Blitzkit.TankType TypeDefaultValue = global::Blitzkit.TankType.Researchable; - private float healthBurnPerSec_; + private global::Blitzkit.TankType type_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public float HealthBurnPerSec { - get { if ((_hasBits0 & 2) != 0) { return healthBurnPerSec_; } else { return HealthBurnPerSecDefaultValue; } } + public global::Blitzkit.TankType Type { + get { if ((_hasBits0 & 2) != 0) { return type_; } else { return TypeDefaultValue; } } set { _hasBits0 |= 2; - healthBurnPerSec_ = value; + type_ = value; } } - /// Gets whether the "health_burn_per_sec" field is set + /// Gets whether the "type" field is set [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasHealthBurnPerSec { + public bool HasType { get { return (_hasBits0 & 2) != 0; } } - /// Clears the value of the "health_burn_per_sec" field + /// Clears the value of the "type" field [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearHealthBurnPerSec() { + public void ClearType() { _hasBits0 &= ~2; } - /// Field number for the "fire_starting_chance" field. - public const int FireStartingChanceFieldNumber = 16; - private readonly static float FireStartingChanceDefaultValue = 0F; - - private float fireStartingChance_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public float FireStartingChance { - get { if ((_hasBits0 & 4) != 0) { return fireStartingChance_; } else { return FireStartingChanceDefaultValue; } } - set { - _hasBits0 |= 4; - fireStartingChance_ = value; - } - } - /// Gets whether the "fire_starting_chance" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasFireStartingChance { - get { return (_hasBits0 & 4) != 0; } - } - /// Clears the value of the "fire_starting_chance" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearFireStartingChance() { - _hasBits0 &= ~4; - } - - /// Field number for the "concealment_stationary" field. - public const int ConcealmentStationaryFieldNumber = 17; - private readonly static float ConcealmentStationaryDefaultValue = 0F; - - private float concealmentStationary_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public float ConcealmentStationary { - get { if ((_hasBits0 & 8) != 0) { return concealmentStationary_; } else { return ConcealmentStationaryDefaultValue; } } - set { - _hasBits0 |= 8; - concealmentStationary_ = value; - } - } - /// Gets whether the "concealment_stationary" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasConcealmentStationary { - get { return (_hasBits0 & 8) != 0; } - } - /// Clears the value of the "concealment_stationary" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearConcealmentStationary() { - _hasBits0 &= ~8; - } - - /// Field number for the "concealment_moving" field. - public const int ConcealmentMovingFieldNumber = 18; - private readonly static float ConcealmentMovingDefaultValue = 0F; - - private float concealmentMoving_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public float ConcealmentMoving { - get { if ((_hasBits0 & 16) != 0) { return concealmentMoving_; } else { return ConcealmentMovingDefaultValue; } } - set { - _hasBits0 |= 16; - concealmentMoving_ = value; - } - } - /// Gets whether the "concealment_moving" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasConcealmentMoving { - get { return (_hasBits0 & 16) != 0; } - } - /// Clears the value of the "concealment_moving" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearConcealmentMoving() { - _hasBits0 &= ~16; - } - - /// Field number for the "concealment_factor_at_shot" field. - public const int ConcealmentFactorAtShotFieldNumber = 19; - private readonly static float ConcealmentFactorAtShotDefaultValue = 0F; - - private float concealmentFactorAtShot_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public float ConcealmentFactorAtShot { - get { if ((_hasBits0 & 32) != 0) { return concealmentFactorAtShot_; } else { return ConcealmentFactorAtShotDefaultValue; } } - set { - _hasBits0 |= 32; - concealmentFactorAtShot_ = value; - } - } - /// Gets whether the "concealment_factor_at_shot" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasConcealmentFactorAtShot { - get { return (_hasBits0 & 32) != 0; } - } - /// Clears the value of the "concealment_factor_at_shot" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearConcealmentFactorAtShot() { - _hasBits0 &= ~32; - } - - /// Field number for the "turret_turn_rate" field. - public const int TurretTurnRateFieldNumber = 20; - private readonly static float TurretTurnRateDefaultValue = 0F; - - private float turretTurnRate_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public float TurretTurnRate { - get { if ((_hasBits0 & 64) != 0) { return turretTurnRate_; } else { return TurretTurnRateDefaultValue; } } - set { - _hasBits0 |= 64; - turretTurnRate_ = value; - } - } - /// Gets whether the "turret_turn_rate" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasTurretTurnRate { - get { return (_hasBits0 & 64) != 0; } - } - /// Clears the value of the "turret_turn_rate" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearTurretTurnRate() { - _hasBits0 &= ~64; - } - - /// Field number for the "circular_vision_radius" field. - public const int CircularVisionRadiusFieldNumber = 21; - private readonly static float CircularVisionRadiusDefaultValue = 0F; - - private float circularVisionRadius_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public float CircularVisionRadius { - get { if ((_hasBits0 & 128) != 0) { return circularVisionRadius_; } else { return CircularVisionRadiusDefaultValue; } } - set { - _hasBits0 |= 128; - circularVisionRadius_ = value; - } - } - /// Gets whether the "circular_vision_radius" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasCircularVisionRadius { - get { return (_hasBits0 & 128) != 0; } - } - /// Clears the value of the "circular_vision_radius" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearCircularVisionRadius() { - _hasBits0 &= ~128; - } - - /// Field number for the "shells" field. - public const int ShellsFieldNumber = 22; - private static readonly pb::FieldCodec _repeated_shells_codec - = pb::FieldCodec.ForMessage(178, global::Blitzkit.Shell.Parser); - private readonly pbc::RepeatedField shells_ = new pbc::RepeatedField(); - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public pbc::RepeatedField Shells { - get { return shells_; } - } - - /// Field number for the "reload_time" field. - public const int ReloadTimeFieldNumber = 23; - private readonly static float ReloadTimeDefaultValue = 0F; - - private float reloadTime_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public float ReloadTime { - get { if ((_hasBits0 & 256) != 0) { return reloadTime_; } else { return ReloadTimeDefaultValue; } } - set { - _hasBits0 |= 256; - reloadTime_ = value; - } - } - /// Gets whether the "reload_time" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasReloadTime { - get { return (_hasBits0 & 256) != 0; } - } - /// Clears the value of the "reload_time" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearReloadTime() { - _hasBits0 &= ~256; - } - - /// Field number for the "dispersion_angle" field. - public const int DispersionAngleFieldNumber = 24; - private readonly static float DispersionAngleDefaultValue = 0F; - - private float dispersionAngle_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public float DispersionAngle { - get { if ((_hasBits0 & 512) != 0) { return dispersionAngle_; } else { return DispersionAngleDefaultValue; } } - set { - _hasBits0 |= 512; - dispersionAngle_ = value; - } - } - /// Gets whether the "dispersion_angle" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasDispersionAngle { - get { return (_hasBits0 & 512) != 0; } - } - /// Clears the value of the "dispersion_angle" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearDispersionAngle() { - _hasBits0 &= ~512; - } - - /// Field number for the "shot_dispersion_factor" field. - public const int ShotDispersionFactorFieldNumber = 25; - private readonly static float ShotDispersionFactorDefaultValue = 0F; - - private float shotDispersionFactor_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public float ShotDispersionFactor { - get { if ((_hasBits0 & 1024) != 0) { return shotDispersionFactor_; } else { return ShotDispersionFactorDefaultValue; } } - set { - _hasBits0 |= 1024; - shotDispersionFactor_ = value; - } - } - /// Gets whether the "shot_dispersion_factor" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasShotDispersionFactor { - get { return (_hasBits0 & 1024) != 0; } - } - /// Clears the value of the "shot_dispersion_factor" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearShotDispersionFactor() { - _hasBits0 &= ~1024; - } - - /// Field number for the "turret_rotation_dispersion_factor" field. - public const int TurretRotationDispersionFactorFieldNumber = 26; - private readonly static float TurretRotationDispersionFactorDefaultValue = 0F; - - private float turretRotationDispersionFactor_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public float TurretRotationDispersionFactor { - get { if ((_hasBits0 & 2048) != 0) { return turretRotationDispersionFactor_; } else { return TurretRotationDispersionFactorDefaultValue; } } - set { - _hasBits0 |= 2048; - turretRotationDispersionFactor_ = value; - } - } - /// Gets whether the "turret_rotation_dispersion_factor" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasTurretRotationDispersionFactor { - get { return (_hasBits0 & 2048) != 0; } - } - /// Clears the value of the "turret_rotation_dispersion_factor" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearTurretRotationDispersionFactor() { - _hasBits0 &= ~2048; - } - - /// Field number for the "aiming_time" field. - public const int AimingTimeFieldNumber = 27; - private readonly static float AimingTimeDefaultValue = 0F; - - private float aimingTime_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public float AimingTime { - get { if ((_hasBits0 & 4096) != 0) { return aimingTime_; } else { return AimingTimeDefaultValue; } } - set { - _hasBits0 |= 4096; - aimingTime_ = value; - } - } - /// Gets whether the "aiming_time" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasAimingTime { - get { return (_hasBits0 & 4096) != 0; } - } - /// Clears the value of the "aiming_time" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearAimingTime() { - _hasBits0 &= ~4096; - } - - /// Field number for the "gun_turn_rate" field. - public const int GunTurnRateFieldNumber = 28; - private readonly static float GunTurnRateDefaultValue = 0F; - - private float gunTurnRate_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public float GunTurnRate { - get { if ((_hasBits0 & 8192) != 0) { return gunTurnRate_; } else { return GunTurnRateDefaultValue; } } - set { - _hasBits0 |= 8192; - gunTurnRate_ = value; - } - } - /// Gets whether the "gun_turn_rate" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasGunTurnRate { - get { return (_hasBits0 & 8192) != 0; } - } - /// Clears the value of the "gun_turn_rate" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearGunTurnRate() { - _hasBits0 &= ~8192; - } - - /// Field number for the "mass" field. - public const int MassFieldNumber = 29; - private readonly static float MassDefaultValue = 0F; - - private float mass_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public float Mass { - get { if ((_hasBits0 & 16384) != 0) { return mass_; } else { return MassDefaultValue; } } - set { - _hasBits0 |= 16384; - mass_ = value; - } - } - /// Gets whether the "mass" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasMass { - get { return (_hasBits0 & 16384) != 0; } - } - /// Clears the value of the "mass" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearMass() { - _hasBits0 &= ~16384; - } - - /// Field number for the "engine_power" field. - public const int EnginePowerFieldNumber = 30; - private readonly static float EnginePowerDefaultValue = 0F; - - private float enginePower_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public float EnginePower { - get { if ((_hasBits0 & 32768) != 0) { return enginePower_; } else { return EnginePowerDefaultValue; } } - set { - _hasBits0 |= 32768; - enginePower_ = value; - } - } - /// Gets whether the "engine_power" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasEnginePower { - get { return (_hasBits0 & 32768) != 0; } - } - /// Clears the value of the "engine_power" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearEnginePower() { - _hasBits0 &= ~32768; - } - - /// Field number for the "forward_max_speed" field. - public const int ForwardMaxSpeedFieldNumber = 31; - private readonly static float ForwardMaxSpeedDefaultValue = 0F; - - private float forwardMaxSpeed_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public float ForwardMaxSpeed { - get { if ((_hasBits0 & 65536) != 0) { return forwardMaxSpeed_; } else { return ForwardMaxSpeedDefaultValue; } } - set { - _hasBits0 |= 65536; - forwardMaxSpeed_ = value; - } - } - /// Gets whether the "forward_max_speed" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasForwardMaxSpeed { - get { return (_hasBits0 & 65536) != 0; } - } - /// Clears the value of the "forward_max_speed" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearForwardMaxSpeed() { - _hasBits0 &= ~65536; - } - - /// Field number for the "backward_max_speed" field. - public const int BackwardMaxSpeedFieldNumber = 32; - private readonly static float BackwardMaxSpeedDefaultValue = 0F; - - private float backwardMaxSpeed_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public float BackwardMaxSpeed { - get { if ((_hasBits0 & 131072) != 0) { return backwardMaxSpeed_; } else { return BackwardMaxSpeedDefaultValue; } } - set { - _hasBits0 |= 131072; - backwardMaxSpeed_ = value; - } - } - /// Gets whether the "backward_max_speed" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasBackwardMaxSpeed { - get { return (_hasBits0 & 131072) != 0; } - } - /// Clears the value of the "backward_max_speed" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearBackwardMaxSpeed() { - _hasBits0 &= ~131072; - } - - /// Field number for the "rotation_speed" field. - public const int RotationSpeedFieldNumber = 33; - private readonly static float RotationSpeedDefaultValue = 0F; - - private float rotationSpeed_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public float RotationSpeed { - get { if ((_hasBits0 & 262144) != 0) { return rotationSpeed_; } else { return RotationSpeedDefaultValue; } } - set { - _hasBits0 |= 262144; - rotationSpeed_ = value; - } - } - /// Gets whether the "rotation_speed" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasRotationSpeed { - get { return (_hasBits0 & 262144) != 0; } - } - /// Clears the value of the "rotation_speed" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearRotationSpeed() { - _hasBits0 &= ~262144; - } - - /// Field number for the "terrain_resistance_hard" field. - public const int TerrainResistanceHardFieldNumber = 34; - private readonly static float TerrainResistanceHardDefaultValue = 0F; - - private float terrainResistanceHard_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public float TerrainResistanceHard { - get { if ((_hasBits0 & 524288) != 0) { return terrainResistanceHard_; } else { return TerrainResistanceHardDefaultValue; } } - set { - _hasBits0 |= 524288; - terrainResistanceHard_ = value; - } - } - /// Gets whether the "terrain_resistance_hard" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasTerrainResistanceHard { - get { return (_hasBits0 & 524288) != 0; } - } - /// Clears the value of the "terrain_resistance_hard" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearTerrainResistanceHard() { - _hasBits0 &= ~524288; - } - - /// Field number for the "brake_force" field. - public const int BrakeForceFieldNumber = 35; - private readonly static float BrakeForceDefaultValue = 0F; - - private float brakeForce_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public float BrakeForce { - get { if ((_hasBits0 & 1048576) != 0) { return brakeForce_; } else { return BrakeForceDefaultValue; } } - set { - _hasBits0 |= 1048576; - brakeForce_ = value; - } - } - /// Gets whether the "brake_force" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasBrakeForce { - get { return (_hasBits0 & 1048576) != 0; } - } - /// Clears the value of the "brake_force" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearBrakeForce() { - _hasBits0 &= ~1048576; - } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { @@ -980,39 +235,8 @@ namespace Blitzkit { } if (Id != other.Id) return false; if (!object.Equals(Name, other.Name)) return false; - if (Set != other.Set) return false; if (Class != other.Class) return false; - if (Faction != other.Faction) return false; - if (!object.Equals(TurretRotatorHealth, other.TurretRotatorHealth)) return false; - if (!object.Equals(SurveyingDeviceHealth, other.SurveyingDeviceHealth)) return false; - if (!object.Equals(GunHealth, other.GunHealth)) return false; - if (!object.Equals(ChassisHealth, other.ChassisHealth)) return false; - if (!object.Equals(AmmoBayHealth, other.AmmoBayHealth)) return false; - if (!object.Equals(EngineHealth, other.EngineHealth)) return false; - if (!object.Equals(FuelTankHealth, other.FuelTankHealth)) return false; - if(!crewHealth_.Equals(other.crewHealth_)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MaxHealth, other.MaxHealth)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(HealthBurnPerSec, other.HealthBurnPerSec)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(FireStartingChance, other.FireStartingChance)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(ConcealmentStationary, other.ConcealmentStationary)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(ConcealmentMoving, other.ConcealmentMoving)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(ConcealmentFactorAtShot, other.ConcealmentFactorAtShot)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(TurretTurnRate, other.TurretTurnRate)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(CircularVisionRadius, other.CircularVisionRadius)) return false; - if(!shells_.Equals(other.shells_)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(ReloadTime, other.ReloadTime)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(DispersionAngle, other.DispersionAngle)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(ShotDispersionFactor, other.ShotDispersionFactor)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(TurretRotationDispersionFactor, other.TurretRotationDispersionFactor)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(AimingTime, other.AimingTime)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(GunTurnRate, other.GunTurnRate)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Mass, other.Mass)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(EnginePower, other.EnginePower)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(ForwardMaxSpeed, other.ForwardMaxSpeed)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(BackwardMaxSpeed, other.BackwardMaxSpeed)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(RotationSpeed, other.RotationSpeed)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(TerrainResistanceHard, other.TerrainResistanceHard)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(BrakeForce, other.BrakeForce)) return false; + if (Type != other.Type) return false; return Equals(_unknownFields, other._unknownFields); } @@ -1022,39 +246,8 @@ namespace Blitzkit { int hash = 1; if (HasId) hash ^= Id.GetHashCode(); if (name_ != null) hash ^= Name.GetHashCode(); - if (HasSet) hash ^= Set.GetHashCode(); if (HasClass) hash ^= Class.GetHashCode(); - if (HasFaction) hash ^= Faction.GetHashCode(); - if (turretRotatorHealth_ != null) hash ^= TurretRotatorHealth.GetHashCode(); - if (surveyingDeviceHealth_ != null) hash ^= SurveyingDeviceHealth.GetHashCode(); - if (gunHealth_ != null) hash ^= GunHealth.GetHashCode(); - if (chassisHealth_ != null) hash ^= ChassisHealth.GetHashCode(); - if (ammoBayHealth_ != null) hash ^= AmmoBayHealth.GetHashCode(); - if (engineHealth_ != null) hash ^= EngineHealth.GetHashCode(); - if (fuelTankHealth_ != null) hash ^= FuelTankHealth.GetHashCode(); - hash ^= crewHealth_.GetHashCode(); - if (HasMaxHealth) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MaxHealth); - if (HasHealthBurnPerSec) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(HealthBurnPerSec); - if (HasFireStartingChance) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(FireStartingChance); - if (HasConcealmentStationary) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(ConcealmentStationary); - if (HasConcealmentMoving) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(ConcealmentMoving); - if (HasConcealmentFactorAtShot) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(ConcealmentFactorAtShot); - if (HasTurretTurnRate) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(TurretTurnRate); - if (HasCircularVisionRadius) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(CircularVisionRadius); - hash ^= shells_.GetHashCode(); - if (HasReloadTime) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(ReloadTime); - if (HasDispersionAngle) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(DispersionAngle); - if (HasShotDispersionFactor) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(ShotDispersionFactor); - if (HasTurretRotationDispersionFactor) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(TurretRotationDispersionFactor); - if (HasAimingTime) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(AimingTime); - if (HasGunTurnRate) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(GunTurnRate); - if (HasMass) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Mass); - if (HasEnginePower) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(EnginePower); - if (HasForwardMaxSpeed) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(ForwardMaxSpeed); - if (HasBackwardMaxSpeed) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(BackwardMaxSpeed); - if (HasRotationSpeed) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(RotationSpeed); - if (HasTerrainResistanceHard) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(TerrainResistanceHard); - if (HasBrakeForce) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(BrakeForce); + if (HasType) hash ^= Type.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -1081,131 +274,13 @@ namespace Blitzkit { output.WriteRawTag(18); output.WriteMessage(Name); } - if (HasSet) { - output.WriteRawTag(26); - output.WriteString(Set); - } if (HasClass) { - output.WriteRawTag(34); - output.WriteString(Class); + output.WriteRawTag(24); + output.WriteEnum((int) Class); } - if (HasFaction) { - output.WriteRawTag(42); - output.WriteString(Faction); - } - if (turretRotatorHealth_ != null) { - output.WriteRawTag(50); - output.WriteMessage(TurretRotatorHealth); - } - if (surveyingDeviceHealth_ != null) { - output.WriteRawTag(58); - output.WriteMessage(SurveyingDeviceHealth); - } - if (gunHealth_ != null) { - output.WriteRawTag(66); - output.WriteMessage(GunHealth); - } - if (chassisHealth_ != null) { - output.WriteRawTag(74); - output.WriteMessage(ChassisHealth); - } - if (ammoBayHealth_ != null) { - output.WriteRawTag(82); - output.WriteMessage(AmmoBayHealth); - } - if (engineHealth_ != null) { - output.WriteRawTag(90); - output.WriteMessage(EngineHealth); - } - if (fuelTankHealth_ != null) { - output.WriteRawTag(98); - output.WriteMessage(FuelTankHealth); - } - crewHealth_.WriteTo(output, _repeated_crewHealth_codec); - if (HasMaxHealth) { - output.WriteRawTag(117); - output.WriteFloat(MaxHealth); - } - if (HasHealthBurnPerSec) { - output.WriteRawTag(125); - output.WriteFloat(HealthBurnPerSec); - } - if (HasFireStartingChance) { - output.WriteRawTag(133, 1); - output.WriteFloat(FireStartingChance); - } - if (HasConcealmentStationary) { - output.WriteRawTag(141, 1); - output.WriteFloat(ConcealmentStationary); - } - if (HasConcealmentMoving) { - output.WriteRawTag(149, 1); - output.WriteFloat(ConcealmentMoving); - } - if (HasConcealmentFactorAtShot) { - output.WriteRawTag(157, 1); - output.WriteFloat(ConcealmentFactorAtShot); - } - if (HasTurretTurnRate) { - output.WriteRawTag(165, 1); - output.WriteFloat(TurretTurnRate); - } - if (HasCircularVisionRadius) { - output.WriteRawTag(173, 1); - output.WriteFloat(CircularVisionRadius); - } - shells_.WriteTo(output, _repeated_shells_codec); - if (HasReloadTime) { - output.WriteRawTag(189, 1); - output.WriteFloat(ReloadTime); - } - if (HasDispersionAngle) { - output.WriteRawTag(197, 1); - output.WriteFloat(DispersionAngle); - } - if (HasShotDispersionFactor) { - output.WriteRawTag(205, 1); - output.WriteFloat(ShotDispersionFactor); - } - if (HasTurretRotationDispersionFactor) { - output.WriteRawTag(213, 1); - output.WriteFloat(TurretRotationDispersionFactor); - } - if (HasAimingTime) { - output.WriteRawTag(221, 1); - output.WriteFloat(AimingTime); - } - if (HasGunTurnRate) { - output.WriteRawTag(229, 1); - output.WriteFloat(GunTurnRate); - } - if (HasMass) { - output.WriteRawTag(237, 1); - output.WriteFloat(Mass); - } - if (HasEnginePower) { - output.WriteRawTag(245, 1); - output.WriteFloat(EnginePower); - } - if (HasForwardMaxSpeed) { - output.WriteRawTag(253, 1); - output.WriteFloat(ForwardMaxSpeed); - } - if (HasBackwardMaxSpeed) { - output.WriteRawTag(133, 2); - output.WriteFloat(BackwardMaxSpeed); - } - if (HasRotationSpeed) { - output.WriteRawTag(141, 2); - output.WriteFloat(RotationSpeed); - } - if (HasTerrainResistanceHard) { - output.WriteRawTag(149, 2); - output.WriteFloat(TerrainResistanceHard); - } - if (HasBrakeForce) { - output.WriteRawTag(157, 2); - output.WriteFloat(BrakeForce); + if (HasType) { + output.WriteRawTag(32); + output.WriteEnum((int) Type); } if (_unknownFields != null) { _unknownFields.WriteTo(output); @@ -1225,131 +300,13 @@ namespace Blitzkit { output.WriteRawTag(18); output.WriteMessage(Name); } - if (HasSet) { - output.WriteRawTag(26); - output.WriteString(Set); - } if (HasClass) { - output.WriteRawTag(34); - output.WriteString(Class); + output.WriteRawTag(24); + output.WriteEnum((int) Class); } - if (HasFaction) { - output.WriteRawTag(42); - output.WriteString(Faction); - } - if (turretRotatorHealth_ != null) { - output.WriteRawTag(50); - output.WriteMessage(TurretRotatorHealth); - } - if (surveyingDeviceHealth_ != null) { - output.WriteRawTag(58); - output.WriteMessage(SurveyingDeviceHealth); - } - if (gunHealth_ != null) { - output.WriteRawTag(66); - output.WriteMessage(GunHealth); - } - if (chassisHealth_ != null) { - output.WriteRawTag(74); - output.WriteMessage(ChassisHealth); - } - if (ammoBayHealth_ != null) { - output.WriteRawTag(82); - output.WriteMessage(AmmoBayHealth); - } - if (engineHealth_ != null) { - output.WriteRawTag(90); - output.WriteMessage(EngineHealth); - } - if (fuelTankHealth_ != null) { - output.WriteRawTag(98); - output.WriteMessage(FuelTankHealth); - } - crewHealth_.WriteTo(ref output, _repeated_crewHealth_codec); - if (HasMaxHealth) { - output.WriteRawTag(117); - output.WriteFloat(MaxHealth); - } - if (HasHealthBurnPerSec) { - output.WriteRawTag(125); - output.WriteFloat(HealthBurnPerSec); - } - if (HasFireStartingChance) { - output.WriteRawTag(133, 1); - output.WriteFloat(FireStartingChance); - } - if (HasConcealmentStationary) { - output.WriteRawTag(141, 1); - output.WriteFloat(ConcealmentStationary); - } - if (HasConcealmentMoving) { - output.WriteRawTag(149, 1); - output.WriteFloat(ConcealmentMoving); - } - if (HasConcealmentFactorAtShot) { - output.WriteRawTag(157, 1); - output.WriteFloat(ConcealmentFactorAtShot); - } - if (HasTurretTurnRate) { - output.WriteRawTag(165, 1); - output.WriteFloat(TurretTurnRate); - } - if (HasCircularVisionRadius) { - output.WriteRawTag(173, 1); - output.WriteFloat(CircularVisionRadius); - } - shells_.WriteTo(ref output, _repeated_shells_codec); - if (HasReloadTime) { - output.WriteRawTag(189, 1); - output.WriteFloat(ReloadTime); - } - if (HasDispersionAngle) { - output.WriteRawTag(197, 1); - output.WriteFloat(DispersionAngle); - } - if (HasShotDispersionFactor) { - output.WriteRawTag(205, 1); - output.WriteFloat(ShotDispersionFactor); - } - if (HasTurretRotationDispersionFactor) { - output.WriteRawTag(213, 1); - output.WriteFloat(TurretRotationDispersionFactor); - } - if (HasAimingTime) { - output.WriteRawTag(221, 1); - output.WriteFloat(AimingTime); - } - if (HasGunTurnRate) { - output.WriteRawTag(229, 1); - output.WriteFloat(GunTurnRate); - } - if (HasMass) { - output.WriteRawTag(237, 1); - output.WriteFloat(Mass); - } - if (HasEnginePower) { - output.WriteRawTag(245, 1); - output.WriteFloat(EnginePower); - } - if (HasForwardMaxSpeed) { - output.WriteRawTag(253, 1); - output.WriteFloat(ForwardMaxSpeed); - } - if (HasBackwardMaxSpeed) { - output.WriteRawTag(133, 2); - output.WriteFloat(BackwardMaxSpeed); - } - if (HasRotationSpeed) { - output.WriteRawTag(141, 2); - output.WriteFloat(RotationSpeed); - } - if (HasTerrainResistanceHard) { - output.WriteRawTag(149, 2); - output.WriteFloat(TerrainResistanceHard); - } - if (HasBrakeForce) { - output.WriteRawTag(157, 2); - output.WriteFloat(BrakeForce); + if (HasType) { + output.WriteRawTag(32); + output.WriteEnum((int) Type); } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); @@ -1367,100 +324,11 @@ namespace Blitzkit { if (name_ != null) { size += 1 + pb::CodedOutputStream.ComputeMessageSize(Name); } - if (HasSet) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Set); - } if (HasClass) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Class); + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Class); } - if (HasFaction) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Faction); - } - if (turretRotatorHealth_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(TurretRotatorHealth); - } - if (surveyingDeviceHealth_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(SurveyingDeviceHealth); - } - if (gunHealth_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(GunHealth); - } - if (chassisHealth_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(ChassisHealth); - } - if (ammoBayHealth_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(AmmoBayHealth); - } - if (engineHealth_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(EngineHealth); - } - if (fuelTankHealth_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(FuelTankHealth); - } - size += crewHealth_.CalculateSize(_repeated_crewHealth_codec); - if (HasMaxHealth) { - size += 1 + 4; - } - if (HasHealthBurnPerSec) { - size += 1 + 4; - } - if (HasFireStartingChance) { - size += 2 + 4; - } - if (HasConcealmentStationary) { - size += 2 + 4; - } - if (HasConcealmentMoving) { - size += 2 + 4; - } - if (HasConcealmentFactorAtShot) { - size += 2 + 4; - } - if (HasTurretTurnRate) { - size += 2 + 4; - } - if (HasCircularVisionRadius) { - size += 2 + 4; - } - size += shells_.CalculateSize(_repeated_shells_codec); - if (HasReloadTime) { - size += 2 + 4; - } - if (HasDispersionAngle) { - size += 2 + 4; - } - if (HasShotDispersionFactor) { - size += 2 + 4; - } - if (HasTurretRotationDispersionFactor) { - size += 2 + 4; - } - if (HasAimingTime) { - size += 2 + 4; - } - if (HasGunTurnRate) { - size += 2 + 4; - } - if (HasMass) { - size += 2 + 4; - } - if (HasEnginePower) { - size += 2 + 4; - } - if (HasForwardMaxSpeed) { - size += 2 + 4; - } - if (HasBackwardMaxSpeed) { - size += 2 + 4; - } - if (HasRotationSpeed) { - size += 2 + 4; - } - if (HasTerrainResistanceHard) { - size += 2 + 4; - } - if (HasBrakeForce) { - size += 2 + 4; + if (HasType) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -1483,701 +351,12 @@ namespace Blitzkit { } Name.MergeFrom(other.Name); } - if (other.HasSet) { - Set = other.Set; - } if (other.HasClass) { Class = other.Class; } - if (other.HasFaction) { - Faction = other.Faction; - } - if (other.turretRotatorHealth_ != null) { - if (turretRotatorHealth_ == null) { - TurretRotatorHealth = new global::Blitzkit.ModuleHealth(); - } - TurretRotatorHealth.MergeFrom(other.TurretRotatorHealth); - } - if (other.surveyingDeviceHealth_ != null) { - if (surveyingDeviceHealth_ == null) { - SurveyingDeviceHealth = new global::Blitzkit.ModuleHealth(); - } - SurveyingDeviceHealth.MergeFrom(other.SurveyingDeviceHealth); - } - if (other.gunHealth_ != null) { - if (gunHealth_ == null) { - GunHealth = new global::Blitzkit.ModuleHealth(); - } - GunHealth.MergeFrom(other.GunHealth); - } - if (other.chassisHealth_ != null) { - if (chassisHealth_ == null) { - ChassisHealth = new global::Blitzkit.ModuleHealth(); - } - ChassisHealth.MergeFrom(other.ChassisHealth); - } - if (other.ammoBayHealth_ != null) { - if (ammoBayHealth_ == null) { - AmmoBayHealth = new global::Blitzkit.ModuleHealth(); - } - AmmoBayHealth.MergeFrom(other.AmmoBayHealth); - } - if (other.engineHealth_ != null) { - if (engineHealth_ == null) { - EngineHealth = new global::Blitzkit.ModuleHealth(); - } - EngineHealth.MergeFrom(other.EngineHealth); - } - if (other.fuelTankHealth_ != null) { - if (fuelTankHealth_ == null) { - FuelTankHealth = new global::Blitzkit.ModuleHealth(); - } - FuelTankHealth.MergeFrom(other.FuelTankHealth); - } - crewHealth_.Add(other.crewHealth_); - if (other.HasMaxHealth) { - MaxHealth = other.MaxHealth; - } - if (other.HasHealthBurnPerSec) { - HealthBurnPerSec = other.HealthBurnPerSec; - } - if (other.HasFireStartingChance) { - FireStartingChance = other.FireStartingChance; - } - if (other.HasConcealmentStationary) { - ConcealmentStationary = other.ConcealmentStationary; - } - if (other.HasConcealmentMoving) { - ConcealmentMoving = other.ConcealmentMoving; - } - if (other.HasConcealmentFactorAtShot) { - ConcealmentFactorAtShot = other.ConcealmentFactorAtShot; - } - if (other.HasTurretTurnRate) { - TurretTurnRate = other.TurretTurnRate; - } - if (other.HasCircularVisionRadius) { - CircularVisionRadius = other.CircularVisionRadius; - } - shells_.Add(other.shells_); - if (other.HasReloadTime) { - ReloadTime = other.ReloadTime; - } - if (other.HasDispersionAngle) { - DispersionAngle = other.DispersionAngle; - } - if (other.HasShotDispersionFactor) { - ShotDispersionFactor = other.ShotDispersionFactor; - } - if (other.HasTurretRotationDispersionFactor) { - TurretRotationDispersionFactor = other.TurretRotationDispersionFactor; - } - if (other.HasAimingTime) { - AimingTime = other.AimingTime; - } - if (other.HasGunTurnRate) { - GunTurnRate = other.GunTurnRate; - } - if (other.HasMass) { - Mass = other.Mass; - } - if (other.HasEnginePower) { - EnginePower = other.EnginePower; - } - if (other.HasForwardMaxSpeed) { - ForwardMaxSpeed = other.ForwardMaxSpeed; - } - if (other.HasBackwardMaxSpeed) { - BackwardMaxSpeed = other.BackwardMaxSpeed; - } - if (other.HasRotationSpeed) { - RotationSpeed = other.RotationSpeed; - } - if (other.HasTerrainResistanceHard) { - TerrainResistanceHard = other.TerrainResistanceHard; - } - if (other.HasBrakeForce) { - BrakeForce = other.BrakeForce; - } - _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: { - Id = input.ReadString(); - break; - } - case 18: { - if (name_ == null) { - Name = new global::Blitzkit.I18n(); - } - input.ReadMessage(Name); - break; - } - case 26: { - Set = input.ReadString(); - break; - } - case 34: { - Class = input.ReadString(); - break; - } - case 42: { - Faction = input.ReadString(); - break; - } - case 50: { - if (turretRotatorHealth_ == null) { - TurretRotatorHealth = new global::Blitzkit.ModuleHealth(); - } - input.ReadMessage(TurretRotatorHealth); - break; - } - case 58: { - if (surveyingDeviceHealth_ == null) { - SurveyingDeviceHealth = new global::Blitzkit.ModuleHealth(); - } - input.ReadMessage(SurveyingDeviceHealth); - break; - } - case 66: { - if (gunHealth_ == null) { - GunHealth = new global::Blitzkit.ModuleHealth(); - } - input.ReadMessage(GunHealth); - break; - } - case 74: { - if (chassisHealth_ == null) { - ChassisHealth = new global::Blitzkit.ModuleHealth(); - } - input.ReadMessage(ChassisHealth); - break; - } - case 82: { - if (ammoBayHealth_ == null) { - AmmoBayHealth = new global::Blitzkit.ModuleHealth(); - } - input.ReadMessage(AmmoBayHealth); - break; - } - case 90: { - if (engineHealth_ == null) { - EngineHealth = new global::Blitzkit.ModuleHealth(); - } - input.ReadMessage(EngineHealth); - break; - } - case 98: { - if (fuelTankHealth_ == null) { - FuelTankHealth = new global::Blitzkit.ModuleHealth(); - } - input.ReadMessage(FuelTankHealth); - break; - } - case 106: { - crewHealth_.AddEntriesFrom(input, _repeated_crewHealth_codec); - break; - } - case 117: { - MaxHealth = input.ReadFloat(); - break; - } - case 125: { - HealthBurnPerSec = input.ReadFloat(); - break; - } - case 133: { - FireStartingChance = input.ReadFloat(); - break; - } - case 141: { - ConcealmentStationary = input.ReadFloat(); - break; - } - case 149: { - ConcealmentMoving = input.ReadFloat(); - break; - } - case 157: { - ConcealmentFactorAtShot = input.ReadFloat(); - break; - } - case 165: { - TurretTurnRate = input.ReadFloat(); - break; - } - case 173: { - CircularVisionRadius = input.ReadFloat(); - break; - } - case 178: { - shells_.AddEntriesFrom(input, _repeated_shells_codec); - break; - } - case 189: { - ReloadTime = input.ReadFloat(); - break; - } - case 197: { - DispersionAngle = input.ReadFloat(); - break; - } - case 205: { - ShotDispersionFactor = input.ReadFloat(); - break; - } - case 213: { - TurretRotationDispersionFactor = input.ReadFloat(); - break; - } - case 221: { - AimingTime = input.ReadFloat(); - break; - } - case 229: { - GunTurnRate = input.ReadFloat(); - break; - } - case 237: { - Mass = input.ReadFloat(); - break; - } - case 245: { - EnginePower = input.ReadFloat(); - break; - } - case 253: { - ForwardMaxSpeed = input.ReadFloat(); - break; - } - case 261: { - BackwardMaxSpeed = input.ReadFloat(); - break; - } - case 269: { - RotationSpeed = input.ReadFloat(); - break; - } - case 277: { - TerrainResistanceHard = input.ReadFloat(); - break; - } - case 285: { - BrakeForce = input.ReadFloat(); - break; - } - } - } - #endif - } - - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { - uint tag; - while ((tag = input.ReadTag()) != 0) { - if ((tag & 7) == 4) { - // Abort on any end group tag. - return; - } - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); - break; - case 10: { - Id = input.ReadString(); - break; - } - case 18: { - if (name_ == null) { - Name = new global::Blitzkit.I18n(); - } - input.ReadMessage(Name); - break; - } - case 26: { - Set = input.ReadString(); - break; - } - case 34: { - Class = input.ReadString(); - break; - } - case 42: { - Faction = input.ReadString(); - break; - } - case 50: { - if (turretRotatorHealth_ == null) { - TurretRotatorHealth = new global::Blitzkit.ModuleHealth(); - } - input.ReadMessage(TurretRotatorHealth); - break; - } - case 58: { - if (surveyingDeviceHealth_ == null) { - SurveyingDeviceHealth = new global::Blitzkit.ModuleHealth(); - } - input.ReadMessage(SurveyingDeviceHealth); - break; - } - case 66: { - if (gunHealth_ == null) { - GunHealth = new global::Blitzkit.ModuleHealth(); - } - input.ReadMessage(GunHealth); - break; - } - case 74: { - if (chassisHealth_ == null) { - ChassisHealth = new global::Blitzkit.ModuleHealth(); - } - input.ReadMessage(ChassisHealth); - break; - } - case 82: { - if (ammoBayHealth_ == null) { - AmmoBayHealth = new global::Blitzkit.ModuleHealth(); - } - input.ReadMessage(AmmoBayHealth); - break; - } - case 90: { - if (engineHealth_ == null) { - EngineHealth = new global::Blitzkit.ModuleHealth(); - } - input.ReadMessage(EngineHealth); - break; - } - case 98: { - if (fuelTankHealth_ == null) { - FuelTankHealth = new global::Blitzkit.ModuleHealth(); - } - input.ReadMessage(FuelTankHealth); - break; - } - case 106: { - crewHealth_.AddEntriesFrom(ref input, _repeated_crewHealth_codec); - break; - } - case 117: { - MaxHealth = input.ReadFloat(); - break; - } - case 125: { - HealthBurnPerSec = input.ReadFloat(); - break; - } - case 133: { - FireStartingChance = input.ReadFloat(); - break; - } - case 141: { - ConcealmentStationary = input.ReadFloat(); - break; - } - case 149: { - ConcealmentMoving = input.ReadFloat(); - break; - } - case 157: { - ConcealmentFactorAtShot = input.ReadFloat(); - break; - } - case 165: { - TurretTurnRate = input.ReadFloat(); - break; - } - case 173: { - CircularVisionRadius = input.ReadFloat(); - break; - } - case 178: { - shells_.AddEntriesFrom(ref input, _repeated_shells_codec); - break; - } - case 189: { - ReloadTime = input.ReadFloat(); - break; - } - case 197: { - DispersionAngle = input.ReadFloat(); - break; - } - case 205: { - ShotDispersionFactor = input.ReadFloat(); - break; - } - case 213: { - TurretRotationDispersionFactor = input.ReadFloat(); - break; - } - case 221: { - AimingTime = input.ReadFloat(); - break; - } - case 229: { - GunTurnRate = input.ReadFloat(); - break; - } - case 237: { - Mass = input.ReadFloat(); - break; - } - case 245: { - EnginePower = input.ReadFloat(); - break; - } - case 253: { - ForwardMaxSpeed = input.ReadFloat(); - break; - } - case 261: { - BackwardMaxSpeed = input.ReadFloat(); - break; - } - case 269: { - RotationSpeed = input.ReadFloat(); - break; - } - case 277: { - TerrainResistanceHard = input.ReadFloat(); - break; - } - case 285: { - BrakeForce = input.ReadFloat(); - break; - } - } - } - } - #endif - - } - - [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] - public sealed partial class CrewHealth : pb::IMessage - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - , pb::IBufferMessage - #endif - { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CrewHealth()); - private pb::UnknownFieldSet _unknownFields; - private int _hasBits0; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pbr::MessageDescriptor Descriptor { - get { return global::Blitzkit.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 CrewHealth() { - OnConstruction(); - } - - partial void OnConstruction(); - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public CrewHealth(CrewHealth other) : this() { - _hasBits0 = other._hasBits0; - type_ = other.type_; - maxHealth_ = other.maxHealth_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public CrewHealth Clone() { - return new CrewHealth(this); - } - - /// Field number for the "type" field. - public const int TypeFieldNumber = 1; - private readonly static global::Blitzkit.CrewType TypeDefaultValue = global::Blitzkit.CrewType.Commander; - - private global::Blitzkit.CrewType type_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public global::Blitzkit.CrewType Type { - get { if ((_hasBits0 & 1) != 0) { return type_; } else { return TypeDefaultValue; } } - set { - _hasBits0 |= 1; - type_ = value; - } - } - /// Gets whether the "type" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasType { - get { return (_hasBits0 & 1) != 0; } - } - /// Clears the value of the "type" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearType() { - _hasBits0 &= ~1; - } - - /// Field number for the "max_health" field. - public const int MaxHealthFieldNumber = 2; - private readonly static float MaxHealthDefaultValue = 0F; - - private float maxHealth_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public float MaxHealth { - get { if ((_hasBits0 & 2) != 0) { return maxHealth_; } else { return MaxHealthDefaultValue; } } - set { - _hasBits0 |= 2; - maxHealth_ = value; - } - } - /// Gets whether the "max_health" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasMaxHealth { - get { return (_hasBits0 & 2) != 0; } - } - /// Clears the value of the "max_health" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearMaxHealth() { - _hasBits0 &= ~2; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override bool Equals(object other) { - return Equals(other as CrewHealth); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(CrewHealth other) { - if (ReferenceEquals(other, null)) { - return false; - } - if (ReferenceEquals(other, this)) { - return true; - } - if (Type != other.Type) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MaxHealth, other.MaxHealth)) return false; - return Equals(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override int GetHashCode() { - int hash = 1; - if (HasType) hash ^= Type.GetHashCode(); - if (HasMaxHealth) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MaxHealth); - if (_unknownFields != null) { - hash ^= _unknownFields.GetHashCode(); - } - return hash; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override string ToString() { - return pb::JsonFormatter.ToDiagnosticString(this); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void WriteTo(pb::CodedOutputStream output) { - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - output.WriteRawMessage(this); - #else - if (HasType) { - output.WriteRawTag(8); - output.WriteEnum((int) Type); - } - if (HasMaxHealth) { - output.WriteRawTag(21); - output.WriteFloat(MaxHealth); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(output); - } - #endif - } - - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (HasType) { - output.WriteRawTag(8); - output.WriteEnum((int) Type); - } - if (HasMaxHealth) { - output.WriteRawTag(21); - output.WriteFloat(MaxHealth); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(ref output); - } - } - #endif - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public int CalculateSize() { - int size = 0; - if (HasType) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type); - } - if (HasMaxHealth) { - 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(CrewHealth other) { - if (other == null) { - return; - } if (other.HasType) { Type = other.Type; } - if (other.HasMaxHealth) { - MaxHealth = other.MaxHealth; - } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -2197,12 +376,23 @@ namespace Blitzkit { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 8: { - Type = (global::Blitzkit.CrewType) input.ReadEnum(); + case 10: { + Id = input.ReadString(); break; } - case 21: { - MaxHealth = input.ReadFloat(); + case 18: { + if (name_ == null) { + Name = new global::Blitzkit.I18n(); + } + input.ReadMessage(Name); + break; + } + case 24: { + Class = (global::Blitzkit.TankClass) input.ReadEnum(); + break; + } + case 32: { + Type = (global::Blitzkit.TankType) input.ReadEnum(); break; } } @@ -2224,1293 +414,23 @@ namespace Blitzkit { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - case 8: { - Type = (global::Blitzkit.CrewType) input.ReadEnum(); + case 10: { + Id = input.ReadString(); break; } - case 21: { - MaxHealth = input.ReadFloat(); + case 18: { + if (name_ == null) { + Name = new global::Blitzkit.I18n(); + } + input.ReadMessage(Name); break; } - } - } - } - #endif - - } - - [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] - public sealed partial class Shell : pb::IMessage - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - , pb::IBufferMessage - #endif - { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Shell()); - private pb::UnknownFieldSet _unknownFields; - private int _hasBits0; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pbr::MessageDescriptor Descriptor { - get { return global::Blitzkit.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 Shell() { - OnConstruction(); - } - - partial void OnConstruction(); - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public Shell(Shell other) : this() { - _hasBits0 = other._hasBits0; - speed_ = other.speed_; - gravity_ = other.gravity_; - armorDamage_ = other.armorDamage_; - moduleDamage_ = other.moduleDamage_; - caliber_ = other.caliber_; - piercingPower_ = other.piercingPower_; - piercingPower500M_ = other.piercingPower500M_; - normalization_ = other.normalization_; - maxDistance_ = other.maxDistance_; - ricochetAngle_ = other.ricochetAngle_; - piercingPowerLossFactorByDistance_ = other.piercingPowerLossFactorByDistance_; - explosionRadius_ = other.explosionRadius_; - maxCount_ = other.maxCount_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public Shell Clone() { - return new Shell(this); - } - - /// Field number for the "speed" field. - public const int SpeedFieldNumber = 1; - private readonly static float SpeedDefaultValue = 0F; - - private float speed_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public float Speed { - get { if ((_hasBits0 & 1) != 0) { return speed_; } else { return SpeedDefaultValue; } } - set { - _hasBits0 |= 1; - speed_ = value; - } - } - /// Gets whether the "speed" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasSpeed { - get { return (_hasBits0 & 1) != 0; } - } - /// Clears the value of the "speed" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearSpeed() { - _hasBits0 &= ~1; - } - - /// Field number for the "gravity" field. - public const int GravityFieldNumber = 2; - private readonly static float GravityDefaultValue = 0F; - - private float gravity_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public float Gravity { - get { if ((_hasBits0 & 2) != 0) { return gravity_; } else { return GravityDefaultValue; } } - set { - _hasBits0 |= 2; - gravity_ = value; - } - } - /// Gets whether the "gravity" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasGravity { - get { return (_hasBits0 & 2) != 0; } - } - /// Clears the value of the "gravity" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearGravity() { - _hasBits0 &= ~2; - } - - /// Field number for the "armor_damage" field. - public const int ArmorDamageFieldNumber = 3; - private readonly static float ArmorDamageDefaultValue = 0F; - - private float armorDamage_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public float ArmorDamage { - get { if ((_hasBits0 & 4) != 0) { return armorDamage_; } else { return ArmorDamageDefaultValue; } } - set { - _hasBits0 |= 4; - armorDamage_ = value; - } - } - /// Gets whether the "armor_damage" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasArmorDamage { - get { return (_hasBits0 & 4) != 0; } - } - /// Clears the value of the "armor_damage" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearArmorDamage() { - _hasBits0 &= ~4; - } - - /// Field number for the "module_damage" field. - public const int ModuleDamageFieldNumber = 4; - private readonly static float ModuleDamageDefaultValue = 0F; - - private float moduleDamage_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public float ModuleDamage { - get { if ((_hasBits0 & 8) != 0) { return moduleDamage_; } else { return ModuleDamageDefaultValue; } } - set { - _hasBits0 |= 8; - moduleDamage_ = value; - } - } - /// Gets whether the "module_damage" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasModuleDamage { - get { return (_hasBits0 & 8) != 0; } - } - /// Clears the value of the "module_damage" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearModuleDamage() { - _hasBits0 &= ~8; - } - - /// Field number for the "caliber" field. - public const int CaliberFieldNumber = 5; - private readonly static float CaliberDefaultValue = 0F; - - private float caliber_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public float Caliber { - get { if ((_hasBits0 & 16) != 0) { return caliber_; } else { return CaliberDefaultValue; } } - set { - _hasBits0 |= 16; - caliber_ = value; - } - } - /// Gets whether the "caliber" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasCaliber { - get { return (_hasBits0 & 16) != 0; } - } - /// Clears the value of the "caliber" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearCaliber() { - _hasBits0 &= ~16; - } - - /// Field number for the "piercing_power" field. - public const int PiercingPowerFieldNumber = 6; - private readonly static float PiercingPowerDefaultValue = 0F; - - private float piercingPower_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public float PiercingPower { - get { if ((_hasBits0 & 32) != 0) { return piercingPower_; } else { return PiercingPowerDefaultValue; } } - set { - _hasBits0 |= 32; - piercingPower_ = value; - } - } - /// Gets whether the "piercing_power" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasPiercingPower { - get { return (_hasBits0 & 32) != 0; } - } - /// Clears the value of the "piercing_power" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearPiercingPower() { - _hasBits0 &= ~32; - } - - /// Field number for the "piercing_power_500m" field. - public const int PiercingPower500MFieldNumber = 7; - private readonly static float PiercingPower500MDefaultValue = 0F; - - private float piercingPower500M_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public float PiercingPower500M { - get { if ((_hasBits0 & 64) != 0) { return piercingPower500M_; } else { return PiercingPower500MDefaultValue; } } - set { - _hasBits0 |= 64; - piercingPower500M_ = value; - } - } - /// Gets whether the "piercing_power_500m" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasPiercingPower500M { - get { return (_hasBits0 & 64) != 0; } - } - /// Clears the value of the "piercing_power_500m" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearPiercingPower500M() { - _hasBits0 &= ~64; - } - - /// Field number for the "normalization" field. - public const int NormalizationFieldNumber = 8; - private readonly static float NormalizationDefaultValue = 0F; - - private float normalization_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public float Normalization { - get { if ((_hasBits0 & 128) != 0) { return normalization_; } else { return NormalizationDefaultValue; } } - set { - _hasBits0 |= 128; - normalization_ = value; - } - } - /// Gets whether the "normalization" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasNormalization { - get { return (_hasBits0 & 128) != 0; } - } - /// Clears the value of the "normalization" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearNormalization() { - _hasBits0 &= ~128; - } - - /// Field number for the "max_distance" field. - public const int MaxDistanceFieldNumber = 9; - private readonly static float MaxDistanceDefaultValue = 0F; - - private float maxDistance_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public float MaxDistance { - get { if ((_hasBits0 & 256) != 0) { return maxDistance_; } else { return MaxDistanceDefaultValue; } } - set { - _hasBits0 |= 256; - maxDistance_ = value; - } - } - /// Gets whether the "max_distance" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasMaxDistance { - get { return (_hasBits0 & 256) != 0; } - } - /// Clears the value of the "max_distance" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearMaxDistance() { - _hasBits0 &= ~256; - } - - /// Field number for the "ricochet_angle" field. - public const int RicochetAngleFieldNumber = 10; - private readonly static float RicochetAngleDefaultValue = 0F; - - private float ricochetAngle_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public float RicochetAngle { - get { if ((_hasBits0 & 512) != 0) { return ricochetAngle_; } else { return RicochetAngleDefaultValue; } } - set { - _hasBits0 |= 512; - ricochetAngle_ = value; - } - } - /// Gets whether the "ricochet_angle" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasRicochetAngle { - get { return (_hasBits0 & 512) != 0; } - } - /// Clears the value of the "ricochet_angle" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearRicochetAngle() { - _hasBits0 &= ~512; - } - - /// Field number for the "piercing_power_loss_factor_by_distance" field. - public const int PiercingPowerLossFactorByDistanceFieldNumber = 11; - private readonly static float PiercingPowerLossFactorByDistanceDefaultValue = 0F; - - private float piercingPowerLossFactorByDistance_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public float PiercingPowerLossFactorByDistance { - get { if ((_hasBits0 & 1024) != 0) { return piercingPowerLossFactorByDistance_; } else { return PiercingPowerLossFactorByDistanceDefaultValue; } } - set { - _hasBits0 |= 1024; - piercingPowerLossFactorByDistance_ = value; - } - } - /// Gets whether the "piercing_power_loss_factor_by_distance" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasPiercingPowerLossFactorByDistance { - get { return (_hasBits0 & 1024) != 0; } - } - /// Clears the value of the "piercing_power_loss_factor_by_distance" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearPiercingPowerLossFactorByDistance() { - _hasBits0 &= ~1024; - } - - /// Field number for the "explosion_radius" field. - public const int ExplosionRadiusFieldNumber = 12; - private readonly static float ExplosionRadiusDefaultValue = 0F; - - private float explosionRadius_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public float ExplosionRadius { - get { if ((_hasBits0 & 2048) != 0) { return explosionRadius_; } else { return ExplosionRadiusDefaultValue; } } - set { - _hasBits0 |= 2048; - explosionRadius_ = value; - } - } - /// Gets whether the "explosion_radius" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasExplosionRadius { - get { return (_hasBits0 & 2048) != 0; } - } - /// Clears the value of the "explosion_radius" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearExplosionRadius() { - _hasBits0 &= ~2048; - } - - /// Field number for the "max_count" field. - public const int MaxCountFieldNumber = 13; - private readonly static int MaxCountDefaultValue = 0; - - private int maxCount_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public int MaxCount { - get { if ((_hasBits0 & 4096) != 0) { return maxCount_; } else { return MaxCountDefaultValue; } } - set { - _hasBits0 |= 4096; - maxCount_ = value; - } - } - /// Gets whether the "max_count" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasMaxCount { - get { return (_hasBits0 & 4096) != 0; } - } - /// Clears the value of the "max_count" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearMaxCount() { - _hasBits0 &= ~4096; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override bool Equals(object other) { - return Equals(other as Shell); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(Shell other) { - if (ReferenceEquals(other, null)) { - return false; - } - if (ReferenceEquals(other, this)) { - return true; - } - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Speed, other.Speed)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Gravity, other.Gravity)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(ArmorDamage, other.ArmorDamage)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(ModuleDamage, other.ModuleDamage)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Caliber, other.Caliber)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(PiercingPower, other.PiercingPower)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(PiercingPower500M, other.PiercingPower500M)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Normalization, other.Normalization)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MaxDistance, other.MaxDistance)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(RicochetAngle, other.RicochetAngle)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(PiercingPowerLossFactorByDistance, other.PiercingPowerLossFactorByDistance)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(ExplosionRadius, other.ExplosionRadius)) return false; - if (MaxCount != other.MaxCount) 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 (HasSpeed) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Speed); - if (HasGravity) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Gravity); - if (HasArmorDamage) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(ArmorDamage); - if (HasModuleDamage) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(ModuleDamage); - if (HasCaliber) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Caliber); - if (HasPiercingPower) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(PiercingPower); - if (HasPiercingPower500M) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(PiercingPower500M); - if (HasNormalization) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Normalization); - if (HasMaxDistance) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MaxDistance); - if (HasRicochetAngle) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(RicochetAngle); - if (HasPiercingPowerLossFactorByDistance) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(PiercingPowerLossFactorByDistance); - if (HasExplosionRadius) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(ExplosionRadius); - if (HasMaxCount) hash ^= MaxCount.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 (HasSpeed) { - output.WriteRawTag(13); - output.WriteFloat(Speed); - } - if (HasGravity) { - output.WriteRawTag(21); - output.WriteFloat(Gravity); - } - if (HasArmorDamage) { - output.WriteRawTag(29); - output.WriteFloat(ArmorDamage); - } - if (HasModuleDamage) { - output.WriteRawTag(37); - output.WriteFloat(ModuleDamage); - } - if (HasCaliber) { - output.WriteRawTag(45); - output.WriteFloat(Caliber); - } - if (HasPiercingPower) { - output.WriteRawTag(53); - output.WriteFloat(PiercingPower); - } - if (HasPiercingPower500M) { - output.WriteRawTag(61); - output.WriteFloat(PiercingPower500M); - } - if (HasNormalization) { - output.WriteRawTag(69); - output.WriteFloat(Normalization); - } - if (HasMaxDistance) { - output.WriteRawTag(77); - output.WriteFloat(MaxDistance); - } - if (HasRicochetAngle) { - output.WriteRawTag(85); - output.WriteFloat(RicochetAngle); - } - if (HasPiercingPowerLossFactorByDistance) { - output.WriteRawTag(93); - output.WriteFloat(PiercingPowerLossFactorByDistance); - } - if (HasExplosionRadius) { - output.WriteRawTag(101); - output.WriteFloat(ExplosionRadius); - } - if (HasMaxCount) { - output.WriteRawTag(104); - output.WriteInt32(MaxCount); - } - 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 (HasSpeed) { - output.WriteRawTag(13); - output.WriteFloat(Speed); - } - if (HasGravity) { - output.WriteRawTag(21); - output.WriteFloat(Gravity); - } - if (HasArmorDamage) { - output.WriteRawTag(29); - output.WriteFloat(ArmorDamage); - } - if (HasModuleDamage) { - output.WriteRawTag(37); - output.WriteFloat(ModuleDamage); - } - if (HasCaliber) { - output.WriteRawTag(45); - output.WriteFloat(Caliber); - } - if (HasPiercingPower) { - output.WriteRawTag(53); - output.WriteFloat(PiercingPower); - } - if (HasPiercingPower500M) { - output.WriteRawTag(61); - output.WriteFloat(PiercingPower500M); - } - if (HasNormalization) { - output.WriteRawTag(69); - output.WriteFloat(Normalization); - } - if (HasMaxDistance) { - output.WriteRawTag(77); - output.WriteFloat(MaxDistance); - } - if (HasRicochetAngle) { - output.WriteRawTag(85); - output.WriteFloat(RicochetAngle); - } - if (HasPiercingPowerLossFactorByDistance) { - output.WriteRawTag(93); - output.WriteFloat(PiercingPowerLossFactorByDistance); - } - if (HasExplosionRadius) { - output.WriteRawTag(101); - output.WriteFloat(ExplosionRadius); - } - if (HasMaxCount) { - output.WriteRawTag(104); - output.WriteInt32(MaxCount); - } - 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 (HasSpeed) { - size += 1 + 4; - } - if (HasGravity) { - size += 1 + 4; - } - if (HasArmorDamage) { - size += 1 + 4; - } - if (HasModuleDamage) { - size += 1 + 4; - } - if (HasCaliber) { - size += 1 + 4; - } - if (HasPiercingPower) { - size += 1 + 4; - } - if (HasPiercingPower500M) { - size += 1 + 4; - } - if (HasNormalization) { - size += 1 + 4; - } - if (HasMaxDistance) { - size += 1 + 4; - } - if (HasRicochetAngle) { - size += 1 + 4; - } - if (HasPiercingPowerLossFactorByDistance) { - size += 1 + 4; - } - if (HasExplosionRadius) { - size += 1 + 4; - } - if (HasMaxCount) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaxCount); - } - if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); - } - return size; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(Shell other) { - if (other == null) { - return; - } - if (other.HasSpeed) { - Speed = other.Speed; - } - if (other.HasGravity) { - Gravity = other.Gravity; - } - if (other.HasArmorDamage) { - ArmorDamage = other.ArmorDamage; - } - if (other.HasModuleDamage) { - ModuleDamage = other.ModuleDamage; - } - if (other.HasCaliber) { - Caliber = other.Caliber; - } - if (other.HasPiercingPower) { - PiercingPower = other.PiercingPower; - } - if (other.HasPiercingPower500M) { - PiercingPower500M = other.PiercingPower500M; - } - if (other.HasNormalization) { - Normalization = other.Normalization; - } - if (other.HasMaxDistance) { - MaxDistance = other.MaxDistance; - } - if (other.HasRicochetAngle) { - RicochetAngle = other.RicochetAngle; - } - if (other.HasPiercingPowerLossFactorByDistance) { - PiercingPowerLossFactorByDistance = other.PiercingPowerLossFactorByDistance; - } - if (other.HasExplosionRadius) { - ExplosionRadius = other.ExplosionRadius; - } - if (other.HasMaxCount) { - MaxCount = other.MaxCount; - } - _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: { - Speed = input.ReadFloat(); + case 24: { + Class = (global::Blitzkit.TankClass) input.ReadEnum(); break; } - case 21: { - Gravity = input.ReadFloat(); - break; - } - case 29: { - ArmorDamage = input.ReadFloat(); - break; - } - case 37: { - ModuleDamage = input.ReadFloat(); - break; - } - case 45: { - Caliber = input.ReadFloat(); - break; - } - case 53: { - PiercingPower = input.ReadFloat(); - break; - } - case 61: { - PiercingPower500M = input.ReadFloat(); - break; - } - case 69: { - Normalization = input.ReadFloat(); - break; - } - case 77: { - MaxDistance = input.ReadFloat(); - break; - } - case 85: { - RicochetAngle = input.ReadFloat(); - break; - } - case 93: { - PiercingPowerLossFactorByDistance = input.ReadFloat(); - break; - } - case 101: { - ExplosionRadius = input.ReadFloat(); - break; - } - case 104: { - MaxCount = input.ReadInt32(); - break; - } - } - } - #endif - } - - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { - uint tag; - while ((tag = input.ReadTag()) != 0) { - if ((tag & 7) == 4) { - // Abort on any end group tag. - return; - } - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); - break; - case 13: { - Speed = input.ReadFloat(); - break; - } - case 21: { - Gravity = input.ReadFloat(); - break; - } - case 29: { - ArmorDamage = input.ReadFloat(); - break; - } - case 37: { - ModuleDamage = input.ReadFloat(); - break; - } - case 45: { - Caliber = input.ReadFloat(); - break; - } - case 53: { - PiercingPower = input.ReadFloat(); - break; - } - case 61: { - PiercingPower500M = input.ReadFloat(); - break; - } - case 69: { - Normalization = input.ReadFloat(); - break; - } - case 77: { - MaxDistance = input.ReadFloat(); - break; - } - case 85: { - RicochetAngle = input.ReadFloat(); - break; - } - case 93: { - PiercingPowerLossFactorByDistance = input.ReadFloat(); - break; - } - case 101: { - ExplosionRadius = input.ReadFloat(); - break; - } - case 104: { - MaxCount = input.ReadInt32(); - break; - } - } - } - } - #endif - - } - - [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] - public sealed partial class ModuleHealth : pb::IMessage - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - , pb::IBufferMessage - #endif - { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ModuleHealth()); - private pb::UnknownFieldSet _unknownFields; - private int _hasBits0; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pbr::MessageDescriptor Descriptor { - get { return global::Blitzkit.TankReflection.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 ModuleHealth() { - OnConstruction(); - } - - partial void OnConstruction(); - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public ModuleHealth(ModuleHealth other) : this() { - _hasBits0 = other._hasBits0; - maxHealth_ = other.maxHealth_; - maxRegenHealth_ = other.maxRegenHealth_; - hysteresisHealth_ = other.hysteresisHealth_; - healthRegenPerSec_ = other.healthRegenPerSec_; - healthBurnPerSec_ = other.healthBurnPerSec_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public ModuleHealth Clone() { - return new ModuleHealth(this); - } - - /// Field number for the "max_health" field. - public const int MaxHealthFieldNumber = 1; - private readonly static float MaxHealthDefaultValue = 0F; - - private float maxHealth_; - /// - /// max health, assigned by default at the start of the battle - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public float MaxHealth { - get { if ((_hasBits0 & 1) != 0) { return maxHealth_; } else { return MaxHealthDefaultValue; } } - set { - _hasBits0 |= 1; - maxHealth_ = value; - } - } - /// Gets whether the "max_health" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasMaxHealth { - get { return (_hasBits0 & 1) != 0; } - } - /// Clears the value of the "max_health" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearMaxHealth() { - _hasBits0 &= ~1; - } - - /// Field number for the "max_regen_health" field. - public const int MaxRegenHealthFieldNumber = 2; - private readonly static float MaxRegenHealthDefaultValue = 0F; - - private float maxRegenHealth_; - /// - /// max health reached as the module regenerates after breaking - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public float MaxRegenHealth { - get { if ((_hasBits0 & 2) != 0) { return maxRegenHealth_; } else { return MaxRegenHealthDefaultValue; } } - set { - _hasBits0 |= 2; - maxRegenHealth_ = value; - } - } - /// Gets whether the "max_regen_health" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasMaxRegenHealth { - get { return (_hasBits0 & 2) != 0; } - } - /// Clears the value of the "max_regen_health" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearMaxRegenHealth() { - _hasBits0 &= ~2; - } - - /// Field number for the "hysteresis_health" field. - public const int HysteresisHealthFieldNumber = 3; - private readonly static float HysteresisHealthDefaultValue = 0F; - - private float hysteresisHealth_; - /// - /// the range from 0 to this where the module is "red" and doesn't function - /// all the while healing; after surpassing this, the "yellow" phase is reached - /// undefined for modules like ammo bays - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public float HysteresisHealth { - get { if ((_hasBits0 & 4) != 0) { return hysteresisHealth_; } else { return HysteresisHealthDefaultValue; } } - set { - _hasBits0 |= 4; - hysteresisHealth_ = value; - } - } - /// Gets whether the "hysteresis_health" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasHysteresisHealth { - get { return (_hasBits0 & 4) != 0; } - } - /// Clears the value of the "hysteresis_health" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearHysteresisHealth() { - _hasBits0 &= ~4; - } - - /// Field number for the "health_regen_per_sec" field. - public const int HealthRegenPerSecFieldNumber = 4; - private readonly static float HealthRegenPerSecDefaultValue = 0F; - - private float healthRegenPerSec_; - /// - /// the heal rate (per second); this won't apply if the health is at or above - /// max_regen hence always leaving it in the "yellow" phase until repaired - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public float HealthRegenPerSec { - get { if ((_hasBits0 & 8) != 0) { return healthRegenPerSec_; } else { return HealthRegenPerSecDefaultValue; } } - set { - _hasBits0 |= 8; - healthRegenPerSec_ = value; - } - } - /// Gets whether the "health_regen_per_sec" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasHealthRegenPerSec { - get { return (_hasBits0 & 8) != 0; } - } - /// Clears the value of the "health_regen_per_sec" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearHealthRegenPerSec() { - _hasBits0 &= ~8; - } - - /// Field number for the "health_burn_per_sec" field. - public const int HealthBurnPerSecFieldNumber = 5; - private readonly static float HealthBurnPerSecDefaultValue = 0F; - - private float healthBurnPerSec_; - /// - /// damage received (per second) to the modules when caught on fire; this can - /// be undefined for some modules like the gun or chassis - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public float HealthBurnPerSec { - get { if ((_hasBits0 & 16) != 0) { return healthBurnPerSec_; } else { return HealthBurnPerSecDefaultValue; } } - set { - _hasBits0 |= 16; - healthBurnPerSec_ = value; - } - } - /// Gets whether the "health_burn_per_sec" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasHealthBurnPerSec { - get { return (_hasBits0 & 16) != 0; } - } - /// Clears the value of the "health_burn_per_sec" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearHealthBurnPerSec() { - _hasBits0 &= ~16; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override bool Equals(object other) { - return Equals(other as ModuleHealth); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(ModuleHealth other) { - if (ReferenceEquals(other, null)) { - return false; - } - if (ReferenceEquals(other, this)) { - return true; - } - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MaxHealth, other.MaxHealth)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MaxRegenHealth, other.MaxRegenHealth)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(HysteresisHealth, other.HysteresisHealth)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(HealthRegenPerSec, other.HealthRegenPerSec)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(HealthBurnPerSec, other.HealthBurnPerSec)) 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 (HasMaxHealth) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MaxHealth); - if (HasMaxRegenHealth) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MaxRegenHealth); - if (HasHysteresisHealth) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(HysteresisHealth); - if (HasHealthRegenPerSec) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(HealthRegenPerSec); - if (HasHealthBurnPerSec) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(HealthBurnPerSec); - 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 (HasMaxHealth) { - output.WriteRawTag(13); - output.WriteFloat(MaxHealth); - } - if (HasMaxRegenHealth) { - output.WriteRawTag(21); - output.WriteFloat(MaxRegenHealth); - } - if (HasHysteresisHealth) { - output.WriteRawTag(29); - output.WriteFloat(HysteresisHealth); - } - if (HasHealthRegenPerSec) { - output.WriteRawTag(37); - output.WriteFloat(HealthRegenPerSec); - } - if (HasHealthBurnPerSec) { - output.WriteRawTag(45); - output.WriteFloat(HealthBurnPerSec); - } - 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 (HasMaxHealth) { - output.WriteRawTag(13); - output.WriteFloat(MaxHealth); - } - if (HasMaxRegenHealth) { - output.WriteRawTag(21); - output.WriteFloat(MaxRegenHealth); - } - if (HasHysteresisHealth) { - output.WriteRawTag(29); - output.WriteFloat(HysteresisHealth); - } - if (HasHealthRegenPerSec) { - output.WriteRawTag(37); - output.WriteFloat(HealthRegenPerSec); - } - if (HasHealthBurnPerSec) { - output.WriteRawTag(45); - output.WriteFloat(HealthBurnPerSec); - } - 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 (HasMaxHealth) { - size += 1 + 4; - } - if (HasMaxRegenHealth) { - size += 1 + 4; - } - if (HasHysteresisHealth) { - size += 1 + 4; - } - if (HasHealthRegenPerSec) { - size += 1 + 4; - } - if (HasHealthBurnPerSec) { - 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(ModuleHealth other) { - if (other == null) { - return; - } - if (other.HasMaxHealth) { - MaxHealth = other.MaxHealth; - } - if (other.HasMaxRegenHealth) { - MaxRegenHealth = other.MaxRegenHealth; - } - if (other.HasHysteresisHealth) { - HysteresisHealth = other.HysteresisHealth; - } - if (other.HasHealthRegenPerSec) { - HealthRegenPerSec = other.HealthRegenPerSec; - } - if (other.HasHealthBurnPerSec) { - HealthBurnPerSec = other.HealthBurnPerSec; - } - _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: { - MaxHealth = input.ReadFloat(); - break; - } - case 21: { - MaxRegenHealth = input.ReadFloat(); - break; - } - case 29: { - HysteresisHealth = input.ReadFloat(); - break; - } - case 37: { - HealthRegenPerSec = input.ReadFloat(); - break; - } - case 45: { - HealthBurnPerSec = 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: { - MaxHealth = input.ReadFloat(); - break; - } - case 21: { - MaxRegenHealth = input.ReadFloat(); - break; - } - case 29: { - HysteresisHealth = input.ReadFloat(); - break; - } - case 37: { - HealthRegenPerSec = input.ReadFloat(); - break; - } - case 45: { - HealthBurnPerSec = input.ReadFloat(); + case 32: { + Type = (global::Blitzkit.TankType) input.ReadEnum(); break; } }