mirror of
https://git.ngram.ca/OpenJam/rc-servers
synced 2026-08-23 23:08:52 +00:00
Readability fixes for cargo clippy
This commit is contained in:
@@ -31,7 +31,7 @@ impl ChatChannelMember {
|
||||
pub fn as_transmissible(&self) -> Typed {
|
||||
Typed::HashMap(vec![
|
||||
(Typed::Str("name".into()), Typed::Str(self.name.clone().into())),
|
||||
(Typed::Str("useCustomAvatar".into()), Typed::Bool(self.use_custom_avatar.into())),
|
||||
(Typed::Str("useCustomAvatar".into()), Typed::Bool(self.use_custom_avatar)),
|
||||
(Typed::Str("state".into()), Typed::Int(self.state as _)),
|
||||
if self.use_custom_avatar {
|
||||
(Typed::Str("customAvatar".into()), Typed::Bytes(self.custom_avatar.clone().into()))
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
use std::i64;
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub struct ShopItemListFilters {
|
||||
pub page: u32,
|
||||
|
||||
@@ -30,13 +30,13 @@ impl <C: Clone> CubeInfo<C> {
|
||||
(Typed::Str("cpuRating".into()), Typed::Int(self.cpu as i32)),
|
||||
(Typed::Str("health".into()), Typed::Int(self.health as i32)),
|
||||
(Typed::Str("healthBoost".into()), Typed::Float(self.health_boost)),
|
||||
(Typed::Str("GreyOutInTutorial".into()), Typed::Bool(self.grey_out_in_tutorial.into())),
|
||||
(Typed::Str("GreyOutInTutorial".into()), Typed::Bool(self.grey_out_in_tutorial)),
|
||||
(Typed::Str("buildVisibility".into()), Typed::Str(self.visibility.as_str().into())),
|
||||
(Typed::Str("isIndestructible".into()), Typed::Bool(self.indestructible.into())),
|
||||
(Typed::Str("isIndestructible".into()), Typed::Bool(self.indestructible)),
|
||||
(Typed::Str("ItemCategory".into()), Typed::Int(self.category as i32)),
|
||||
(Typed::Str("PlacementFaces".into()), Typed::Int(self.placements as i32)),
|
||||
(Typed::Str("protoniumCrystal".into()), Typed::Bool(self.protonium.into())),
|
||||
(Typed::Str("UnlockedByLeague".into()), Typed::Bool(self.unlocked_by_league.into())),
|
||||
(Typed::Str("protoniumCrystal".into()), Typed::Bool(self.protonium)),
|
||||
(Typed::Str("UnlockedByLeague".into()), Typed::Bool(self.unlocked_by_league)),
|
||||
(Typed::Str("LeagueUnlockIndex".into()), Typed::Int(self.league_unlock_index)),
|
||||
(Typed::Str("DisplayStats".into()), {
|
||||
let items: Vec<(Typed<C>, Typed<C>)> = self.stats.iter().map(|(key, val)| (Typed::<C>::Str(key.into()), val.to_owned())).collect();
|
||||
@@ -51,9 +51,9 @@ impl <C: Clone> CubeInfo<C> {
|
||||
(Typed::Str("ItemSize".into()), Typed::Int(self.size as i32)),
|
||||
(Typed::Str("ItemType".into()), Typed::Str(self.type_.as_str().into())),
|
||||
(Typed::Str("robotRanking".into()), Typed::Int(self.ranking)),
|
||||
(Typed::Str("isCosmetic".into()), Typed::Bool(self.cosmetic.into())),
|
||||
(Typed::Str("isCosmetic".into()), Typed::Bool(self.cosmetic)),
|
||||
(Typed::Str("variantOf".into()), Typed::Str(self.variant_of.clone().into())),
|
||||
(Typed::Str("ignoreInWeaponsList".into()), Typed::Bool(self.ignore_in_weapon_list.into())), // optional
|
||||
(Typed::Str("ignoreInWeaponsList".into()), Typed::Bool(self.ignore_in_weapon_list)), // optional
|
||||
].into())
|
||||
}
|
||||
|
||||
|
||||
@@ -29,10 +29,10 @@ impl GarageSlotInfo {
|
||||
(Typed::Str("name".into()), Typed::Str(self.name.clone().into())),
|
||||
(Typed::Str("numberCubes".into()), Typed::Int(self.cubes as i32)),
|
||||
(Typed::Str("crfId".into()), Typed::Int(self.crf_id as i32)),
|
||||
(Typed::Str("wasRated".into()), Typed::Bool(self.was_rated.into())),
|
||||
(Typed::Str("wasRated".into()), Typed::Bool(self.was_rated)),
|
||||
(Typed::Str("movementCategories".into()), Typed::Arr(Arr {
|
||||
ty: TypePrefix::Int, // int
|
||||
items: self.movement_categories.iter().map(|x| Typed::Int(x.but_bigger() as i32)).collect(),
|
||||
items: self.movement_categories.iter().map(|x| Typed::Int(x.but_bigger())).collect(),
|
||||
})),
|
||||
(Typed::Str("uniqueId1".into()), Typed::Int(self.uuid.0 as i32)),
|
||||
(Typed::Str("uniqueId2".into()), Typed::Int(self.uuid.1 as i32)),
|
||||
@@ -41,7 +41,7 @@ impl GarageSlotInfo {
|
||||
(Typed::Str("totalCosmeticCPU".into()), Typed::Int(self.total_cosmetic_cpu as i32)),
|
||||
(Typed::Str("totalRobotRanking".into()), Typed::Int(self.total_robot_ranking as i32)),
|
||||
(Typed::Str("bayCpu".into()), Typed::Int(self.bay_cpu as i32)),
|
||||
(Typed::Str("tutorialRobot".into()), Typed::Bool(self.tutorial_robot.into())),
|
||||
(Typed::Str("tutorialRobot".into()), Typed::Bool(self.tutorial_robot)),
|
||||
(Typed::Str("starterRobotIndex".into()), Typed::Int(self.starter_robot_index)),
|
||||
(Typed::Str("controlType".into()), Typed::Int(self.control_type as i32)),
|
||||
(Typed::Str("controlOptions".into()), self.control_options.as_transmissible()),
|
||||
@@ -86,9 +86,9 @@ impl ControlOptions {
|
||||
Typed::Arr(Arr {
|
||||
ty: TypePrefix::Bool, // bool
|
||||
items: vec![
|
||||
Typed::Bool(self.vertical_strafing.into()),
|
||||
Typed::Bool(self.sideways_driving.into()),
|
||||
Typed::Bool(self.tracks_turn_on_spot.into()),
|
||||
Typed::Bool(self.vertical_strafing),
|
||||
Typed::Bool(self.sideways_driving),
|
||||
Typed::Bool(self.tracks_turn_on_spot),
|
||||
],
|
||||
})
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ pub fn encode_7_bit_i32(mut src: i32) -> Vec<u8> {
|
||||
let mut out = Vec::with_capacity(5);
|
||||
while src != 0 {
|
||||
let last_7 = (src & 0x7F) as u8;
|
||||
src = src >> 7;
|
||||
src >>= 7;
|
||||
if src != 0 {
|
||||
out.push(last_7 | 0x80);
|
||||
} else {
|
||||
@@ -65,5 +65,5 @@ pub fn read_str_for_binwriter(reader: &mut dyn std::io::Read) -> std::io::Result
|
||||
}
|
||||
|
||||
pub fn cube_id_to_str(id: u32) -> String {
|
||||
hex::encode(id.to_be_bytes()).into()
|
||||
hex::encode(id.to_be_bytes())
|
||||
}
|
||||
|
||||
@@ -21,13 +21,13 @@ pub struct MovementCategoryData {
|
||||
impl MovementCategoryData {
|
||||
pub fn as_transmissible<C>(&self) -> Typed<C> {
|
||||
let mut out = Vec::new();
|
||||
self.horizontal_top_speed.map(|x| out.push((Typed::Str("horizontalTopSpeed".into()), Typed::Float(x))));
|
||||
self.vertical_top_speed.map(|x| out.push((Typed::Str("verticalTopSpeed".into()), Typed::Float(x))));
|
||||
self.min_required_items.map(|x| out.push((Typed::Str("minRequiredItems".into()), Typed::Int(x))));
|
||||
self.min_item_modifier.map(|x| out.push((Typed::Str("minItemsModifier".into()), Typed::Float(x))));
|
||||
self.max_hover_height.map(|x| out.push((Typed::Str("maxHoverHeight".into()), Typed::Float(x))));
|
||||
self.light_machine_mass.map(|x| out.push((Typed::Str("lightMachineMass".into()), Typed::Float(x))));
|
||||
self.heavy_machine_mass.map(|x| out.push((Typed::Str("heavyMachineMass".into()), Typed::Float(x))));
|
||||
if let Some(x) = self.horizontal_top_speed { out.push((Typed::Str("horizontalTopSpeed".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.vertical_top_speed { out.push((Typed::Str("verticalTopSpeed".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.min_required_items { out.push((Typed::Str("minRequiredItems".into()), Typed::Int(x))) }
|
||||
if let Some(x) = self.min_item_modifier { out.push((Typed::Str("minItemsModifier".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.max_hover_height { out.push((Typed::Str("maxHoverHeight".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.light_machine_mass { out.push((Typed::Str("lightMachineMass".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.heavy_machine_mass { out.push((Typed::Str("heavyMachineMass".into()), Typed::Float(x))) }
|
||||
out.append(&mut self.specifics.as_transmissible());
|
||||
for (tier, mov_data) in self.stats.iter() {
|
||||
out.push((Typed::Str(tier.as_str().into()), mov_data.as_transmissible()));
|
||||
@@ -35,7 +35,7 @@ impl MovementCategoryData {
|
||||
Typed::Dict(Dict {
|
||||
key_ty: TypePrefix::Str,
|
||||
val_ty: TypePrefix::Any,
|
||||
items: out.into(),
|
||||
items: out,
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -136,15 +136,15 @@ pub struct MovementData {
|
||||
impl MovementData {
|
||||
pub fn as_transmissible<C>(&self) -> Typed<C> {
|
||||
let mut out = Vec::new();
|
||||
self.speed_boost.map(|x| out.push((Typed::Str("speedBoost".into()), Typed::Float(x))));
|
||||
self.max_carry_mass.map(|x| out.push((Typed::Str("maxCarryMass".into()), Typed::Float(x))));
|
||||
self.horizontal_top_speed.map(|x| out.push((Typed::Str("horizontalTopSpeed".into()), Typed::Float(x))));
|
||||
self.vertical_top_speed.map(|x| out.push((Typed::Str("verticalTopSpeed".into()), Typed::Float(x))));
|
||||
if let Some(x) = self.speed_boost { out.push((Typed::Str("speedBoost".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.max_carry_mass { out.push((Typed::Str("maxCarryMass".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.horizontal_top_speed { out.push((Typed::Str("horizontalTopSpeed".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.vertical_top_speed { out.push((Typed::Str("verticalTopSpeed".into()), Typed::Float(x))) }
|
||||
out.append(&mut self.specifics.as_transmissible());
|
||||
Typed::Dict(Dict {
|
||||
key_ty: TypePrefix::Str, // str
|
||||
val_ty: TypePrefix::Any, // any
|
||||
items: out.into(),
|
||||
items: out,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,8 +16,8 @@ impl TechTreeNode {
|
||||
(Typed::Str("mainCubeId".into()), Typed::Str(hex::encode(self.main_cube_id.to_be_bytes()).into())),
|
||||
(Typed::Str("positionX".into()), Typed::Int(self.position_x)),
|
||||
(Typed::Str("positionY".into()), Typed::Int(self.position_y)),
|
||||
(Typed::Str("isUnlocked".into()), Typed::Bool(self.is_unlocked.into())),
|
||||
(Typed::Str("isUnlockable".into()), Typed::Bool(self.is_unlockable.into())),
|
||||
(Typed::Str("isUnlocked".into()), Typed::Bool(self.is_unlocked)),
|
||||
(Typed::Str("isUnlockable".into()), Typed::Bool(self.is_unlockable)),
|
||||
(Typed::Str("tp".into()), Typed::Int(self.tech_points as i32)),
|
||||
(Typed::Str("neighbours".into()), Typed::Arr(Arr {
|
||||
ty: TypePrefix::Str, // str
|
||||
|
||||
@@ -71,47 +71,47 @@ impl WeaponData {
|
||||
pub fn as_transmissible<C>(&self) -> Typed<C> {
|
||||
let mut out = Vec::new();
|
||||
|
||||
self.damage_inflicted.map(|x| out.push((Typed::Str("damageInflicted".into()), Typed::Int(x))));
|
||||
self.protonium_damage_scale.map(|x| out.push((Typed::Str("protoniumDamageScale".into()), Typed::Float(x))));
|
||||
self.projectile_speed.map(|x| out.push((Typed::Str("projectileSpeed".into()), Typed::Float(x))));
|
||||
self.projectile_range.map(|x| out.push((Typed::Str("projectileRange".into()), Typed::Float(x))));
|
||||
self.base_inaccuracy.map(|x| out.push((Typed::Str("baseInaccuracy".into()), Typed::Float(x))));
|
||||
self.base_air_inaccuracy.map(|x| out.push((Typed::Str("baseAirInaccuracy".into()), Typed::Float(x))));
|
||||
self.movement_inaccuracy.map(|x| out.push((Typed::Str("movementInaccuracy".into()), Typed::Float(x))));
|
||||
self.movement_max_speed.map(|x| out.push((Typed::Str("movementMaxThresholdSpeed".into()), Typed::Float(x))));
|
||||
self.movement_min_speed.map(|x| out.push((Typed::Str("movementMinThresholdSpeed".into()), Typed::Float(x))));
|
||||
self.gun_rotation_slow.map(|x| out.push((Typed::Str("gunRotationThresholdSlow".into()), Typed::Float(x))));
|
||||
self.movement_inaccuracy_decay.map(|x| out.push((Typed::Str("movementInaccuracyDecayTime".into()), Typed::Float(x))));
|
||||
self.slow_rotation_decay.map(|x| out.push((Typed::Str("slowRotationInaccuracyDecayTime".into()), Typed::Float(x))));
|
||||
self.quick_rotation_decay.map(|x| out.push((Typed::Str("quickRotationInaccuracyDecayTime".into()), Typed::Float(x))));
|
||||
self.movement_inaccuracy_recovery.map(|x| out.push((Typed::Str("movementInaccuracyRecoveryTime".into()), Typed::Float(x))));
|
||||
self.repeat_fire_inaccuracy_total_degrees.map(|x| out.push((Typed::Str("repeatFireInaccuracyTotalDegrees".into()), Typed::Float(x))));
|
||||
self.repeat_fire_inaccuracy_decay.map(|x| out.push((Typed::Str("repeatFireInaccuracyDecayTime".into()), Typed::Float(x))));
|
||||
self.repeat_fire_innaccuracy_recovery.map(|x| out.push((Typed::Str("repeatFireInaccuracyRecoveryTime".into()), Typed::Float(x))));
|
||||
self.fire_instant_accuracy_decay.map(|x| out.push((Typed::Str("fireInstantAccuracyDecayDegrees".into()), Typed::Float(x)))); // degrees
|
||||
self.accuracy_non_recover_time.map(|x| out.push((Typed::Str("accuracyNonRecoverTime".into()), Typed::Float(x))));
|
||||
self.accuracy_decay.map(|x| out.push((Typed::Str("accuracyDecayTime".into()), Typed::Float(x))));
|
||||
self.damage_radius.map(|x| out.push((Typed::Str("damageRadius".into()), Typed::Float(x))));
|
||||
self.plasma_time_to_full_damage.map(|x| out.push((Typed::Str("plasmaTimeToFullDamage".into()), Typed::Float(x))));
|
||||
self.plasma_starting_radius_scale.map(|x| out.push((Typed::Str("plasmaStartingRadiusScale".into()), Typed::Float(x))));
|
||||
self.nano_dps.map(|x| out.push((Typed::Str("nanoDPS".into()), Typed::Float(x))));
|
||||
self.nano_hps.map(|x| out.push((Typed::Str("nanoHPS".into()), Typed::Float(x))));
|
||||
self.tesla_damage.map(|x| out.push((Typed::Str("teslaDamage".into()), Typed::Float(x))));
|
||||
self.tesla_charges.map(|x| out.push((Typed::Str("teslaCharges".into()), Typed::Float(x))));
|
||||
self.aeroflak_proximity_damage.map(|x| out.push((Typed::Str("aeroflakProximityDamage".into()), Typed::Float(x))));
|
||||
self.aeroflak_damage_radius.map(|x| out.push((Typed::Str("aeroflakDamageRadius".into()), Typed::Float(x))));
|
||||
self.aeroflak_explosion_radius.map(|x| out.push((Typed::Str("aeroflakExplosionRadius".into()), Typed::Float(x))));
|
||||
self.aeroflak_ground_clearance.map(|x| out.push((Typed::Str("aeroflakGroundClearance".into()), Typed::Float(x))));
|
||||
self.aeroflak_max_stacks.map(|x| out.push((Typed::Str("aeroflakBuffMaxStacks".into()), Typed::Int(x))));
|
||||
self.aeroflak_damage_per_stack.map(|x| out.push((Typed::Str("aeroflakBuffDamagePerStack".into()), Typed::Int(x))));
|
||||
self.aeroflak_stack_expire.map(|x| out.push((Typed::Str("aeroflakBuffTimeToExpire".into()), Typed::Float(x))));
|
||||
self.shot_cooldown.map(|x| out.push((Typed::Str("cooldownBetweenShots".into()), Typed::Float(x))));
|
||||
self.smart_rotation_cooldown.map(|x| out.push((Typed::Str("smartRotationCooldown".into()), Typed::Float(x))));
|
||||
self.smart_rotation_cooldown_extra.map(|x| out.push((Typed::Str("smartRotationExtraCooldownTime".into()), Typed::Float(x))));
|
||||
self.smart_rotation_max_stacks.map(|x| out.push((Typed::Str("smartRotationMaxStacks".into()), Typed::Float(x))));
|
||||
self.spin_up_time.map(|x| out.push((Typed::Str("spinUpTime".into()), Typed::Float(x))));
|
||||
self.spin_down_time.map(|x| out.push((Typed::Str("spinDownTime".into()), Typed::Float(x))));
|
||||
self.spin_initial_cooldown.map(|x| out.push((Typed::Str("spinInitialCooldown".into()), Typed::Float(x))));
|
||||
if let Some(x) = self.damage_inflicted { out.push((Typed::Str("damageInflicted".into()), Typed::Int(x))) }
|
||||
if let Some(x) = self.protonium_damage_scale { out.push((Typed::Str("protoniumDamageScale".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.projectile_speed { out.push((Typed::Str("projectileSpeed".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.projectile_range { out.push((Typed::Str("projectileRange".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.base_inaccuracy { out.push((Typed::Str("baseInaccuracy".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.base_air_inaccuracy { out.push((Typed::Str("baseAirInaccuracy".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.movement_inaccuracy { out.push((Typed::Str("movementInaccuracy".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.movement_max_speed { out.push((Typed::Str("movementMaxThresholdSpeed".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.movement_min_speed { out.push((Typed::Str("movementMinThresholdSpeed".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.gun_rotation_slow { out.push((Typed::Str("gunRotationThresholdSlow".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.movement_inaccuracy_decay { out.push((Typed::Str("movementInaccuracyDecayTime".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.slow_rotation_decay { out.push((Typed::Str("slowRotationInaccuracyDecayTime".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.quick_rotation_decay { out.push((Typed::Str("quickRotationInaccuracyDecayTime".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.movement_inaccuracy_recovery { out.push((Typed::Str("movementInaccuracyRecoveryTime".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.repeat_fire_inaccuracy_total_degrees { out.push((Typed::Str("repeatFireInaccuracyTotalDegrees".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.repeat_fire_inaccuracy_decay { out.push((Typed::Str("repeatFireInaccuracyDecayTime".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.repeat_fire_innaccuracy_recovery { out.push((Typed::Str("repeatFireInaccuracyRecoveryTime".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.fire_instant_accuracy_decay { out.push((Typed::Str("fireInstantAccuracyDecayDegrees".into()), Typed::Float(x))) } // degrees
|
||||
if let Some(x) = self.accuracy_non_recover_time { out.push((Typed::Str("accuracyNonRecoverTime".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.accuracy_decay { out.push((Typed::Str("accuracyDecayTime".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.damage_radius { out.push((Typed::Str("damageRadius".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.plasma_time_to_full_damage { out.push((Typed::Str("plasmaTimeToFullDamage".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.plasma_starting_radius_scale { out.push((Typed::Str("plasmaStartingRadiusScale".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.nano_dps { out.push((Typed::Str("nanoDPS".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.nano_hps { out.push((Typed::Str("nanoHPS".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.tesla_damage { out.push((Typed::Str("teslaDamage".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.tesla_charges { out.push((Typed::Str("teslaCharges".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.aeroflak_proximity_damage { out.push((Typed::Str("aeroflakProximityDamage".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.aeroflak_damage_radius { out.push((Typed::Str("aeroflakDamageRadius".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.aeroflak_explosion_radius { out.push((Typed::Str("aeroflakExplosionRadius".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.aeroflak_ground_clearance { out.push((Typed::Str("aeroflakGroundClearance".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.aeroflak_max_stacks { out.push((Typed::Str("aeroflakBuffMaxStacks".into()), Typed::Int(x))) }
|
||||
if let Some(x) = self.aeroflak_damage_per_stack { out.push((Typed::Str("aeroflakBuffDamagePerStack".into()), Typed::Int(x))) }
|
||||
if let Some(x) = self.aeroflak_stack_expire { out.push((Typed::Str("aeroflakBuffTimeToExpire".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.shot_cooldown { out.push((Typed::Str("cooldownBetweenShots".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.smart_rotation_cooldown { out.push((Typed::Str("smartRotationCooldown".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.smart_rotation_cooldown_extra { out.push((Typed::Str("smartRotationExtraCooldownTime".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.smart_rotation_max_stacks { out.push((Typed::Str("smartRotationMaxStacks".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.spin_up_time { out.push((Typed::Str("spinUpTime".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.spin_down_time { out.push((Typed::Str("spinDownTime".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.spin_initial_cooldown { out.push((Typed::Str("spinInitialCooldown".into()), Typed::Float(x))) }
|
||||
|
||||
if !self.group_fire_scales.is_empty() {
|
||||
let typed_arr: Vec<Typed<C>> = self.group_fire_scales.iter().map(|x| Typed::Float(*x)).collect();
|
||||
@@ -121,26 +121,26 @@ impl WeaponData {
|
||||
})));
|
||||
}
|
||||
|
||||
self.mana_cost.map(|x| out.push((Typed::Str("manaCost".into()), Typed::Float(x))));
|
||||
self.lock_time.map(|x| out.push((Typed::Str("lockTime".into()), Typed::Float(x))));
|
||||
self.full_lock_release.map(|x| out.push((Typed::Str("fullLockRelease".into()), Typed::Float(x))));
|
||||
self.change_lock_time.map(|x| out.push((Typed::Str("changeLockTime".into()), Typed::Float(x))));
|
||||
self.max_rotation_speed.map(|x| out.push((Typed::Str("maxRotationSpeed".into()), Typed::Float(x))));
|
||||
self.initial_rotation_speed.map(|x| out.push((Typed::Str("initialRotationSpeed".into()), Typed::Float(x))));
|
||||
self.rotation_acceleration.map(|x| out.push((Typed::Str("rotationAcceleration".into()), Typed::Float(x))));
|
||||
self.nano_healing_priority_time.map(|x| out.push((Typed::Str("nanoHealingPriorityTime".into()), Typed::Float(x))));
|
||||
self.module_range.map(|x| out.push((Typed::Str("moduleRange".into()), Typed::Float(x))));
|
||||
self.shield_lifetime.map(|x| out.push((Typed::Str("shieldLifetime".into()), Typed::Float(x))));
|
||||
self.teleport_time.map(|x| out.push((Typed::Str("teleportTime".into()), Typed::Float(x))));
|
||||
self.camera_time.map(|x| out.push((Typed::Str("cameraTime".into()), Typed::Float(x))));
|
||||
self.camera_delay.map(|x| out.push((Typed::Str("cameraDelay".into()), Typed::Float(x))));
|
||||
self.to_invisible_speed.map(|x| out.push((Typed::Str("toInvisibleSpeed".into()), Typed::Float(x))));
|
||||
self.to_invisible_duration.map(|x| out.push((Typed::Str("toInvisibleDuration".into()), Typed::Float(x))));
|
||||
self.to_visible_duration.map(|x| out.push((Typed::Str("toVisibleDuration".into()), Typed::Float(x))));
|
||||
self.countdown_time.map(|x| out.push((Typed::Str("countdownTime".into()), Typed::Float(x))));
|
||||
self.stun_time.map(|x| out.push((Typed::Str("stunTime".into()), Typed::Float(x))));
|
||||
self.stun_radius.map(|x| out.push((Typed::Str("stunRadius".into()), Typed::Float(x))));
|
||||
self.effect_duration.map(|x| out.push((Typed::Str("effectDuration".into()), Typed::Float(x))));
|
||||
if let Some(x) = self.mana_cost { out.push((Typed::Str("manaCost".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.lock_time { out.push((Typed::Str("lockTime".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.full_lock_release { out.push((Typed::Str("fullLockRelease".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.change_lock_time { out.push((Typed::Str("changeLockTime".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.max_rotation_speed { out.push((Typed::Str("maxRotationSpeed".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.initial_rotation_speed { out.push((Typed::Str("initialRotationSpeed".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.rotation_acceleration { out.push((Typed::Str("rotationAcceleration".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.nano_healing_priority_time { out.push((Typed::Str("nanoHealingPriorityTime".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.module_range { out.push((Typed::Str("moduleRange".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.shield_lifetime { out.push((Typed::Str("shieldLifetime".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.teleport_time { out.push((Typed::Str("teleportTime".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.camera_time { out.push((Typed::Str("cameraTime".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.camera_delay { out.push((Typed::Str("cameraDelay".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.to_invisible_speed { out.push((Typed::Str("toInvisibleSpeed".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.to_invisible_duration { out.push((Typed::Str("toInvisibleDuration".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.to_visible_duration { out.push((Typed::Str("toVisibleDuration".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.countdown_time { out.push((Typed::Str("countdownTime".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.stun_time { out.push((Typed::Str("stunTime".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.stun_radius { out.push((Typed::Str("stunRadius".into()), Typed::Float(x))) }
|
||||
if let Some(x) = self.effect_duration { out.push((Typed::Str("effectDuration".into()), Typed::Float(x))) }
|
||||
Typed::HashMap(out.into())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user