@@ 297,7 297,14 @@ fn on_message(
(Without<PlanetType>, Without<Player>),
>,
mut player_query: Query<
- (Entity, &mut Player, &Transform, &Velocity, &mut Attach, &mut PartFlags),
+ (
+ Entity,
+ &mut Player,
+ &Transform,
+ &Velocity,
+ &mut Attach,
+ &mut PartFlags,
+ ),
Without<PlanetType>,
>,
mut packet_recv: Local<ManualEventReader<WsEvent>>,
@@ 648,7 655,8 @@ fn on_message(
module.2.translation = vec3(x, y, 0.);
if *module.1 == PartType::LandingThruster {
let sub_entity = attach.children[2].unwrap();
- let mut suspension = attached_query.get_mut(sub_entity).unwrap();
+ let mut suspension =
+ attached_query.get_mut(sub_entity).unwrap();
suspension.2.translation = vec3(x, y, 0.);
}
break;
@@ 1017,7 1025,14 @@ fn detach_recursive(
(Without<PlanetType>, Without<Player>),
>,
player_query: &mut Query<
- (Entity, &mut Player, &Transform, &Velocity, &mut Attach, &mut PartFlags),
+ (
+ Entity,
+ &mut Player,
+ &Transform,
+ &Velocity,
+ &mut Attach,
+ &mut PartFlags,
+ ),
Without<PlanetType>,
>,
) {
@@ 1030,8 1045,7 @@ fn detach_recursive(
detach_recursive(commands, *child, attached_query, player_query);
}
let (entity, part_type, attach, mut flags) = if attached_query.contains(this) {
- let (entity, part_type, _, attach, _, _, _, flags) =
- attached_query.get_mut(this).unwrap();
+ let (entity, part_type, _, attach, _, _, _, flags) = attached_query.get_mut(this).unwrap();
(entity, part_type, attach, flags)
} else {
let (entity, _, _, _, attach, part_flags) = player_query.get_mut(this).unwrap();
@@ 1102,7 1116,14 @@ fn attach_on_module_tree(
(Without<PlanetType>, Without<Player>, Without<Attach>),
>,
player_query: &mut Query<
- (Entity, &mut Player, &Transform, &Velocity, &mut Attach, &mut PartFlags),
+ (
+ Entity,
+ &mut Player,
+ &Transform,
+ &Velocity,
+ &mut Attach,
+ &mut PartFlags,
+ ),
Without<PlanetType>,
>,
) -> bool {
@@ 1508,7 1529,17 @@ fn break_modules(
),
(Without<PlanetType>, Without<Player>),
>,
- mut player_query: Query<(Entity, &mut Player, &Transform, &Velocity, &mut Attach, &mut PartFlags), Without<PlanetType>>,
+ mut player_query: Query<
+ (
+ Entity,
+ &mut Player,
+ &Transform,
+ &Velocity,
+ &mut Attach,
+ &mut PartFlags,
+ ),
+ Without<PlanetType>,
+ >,
) {
let joints = rapier_context.entity2impulse_joint();
let mut detach_list = Vec::new();
@@ 1524,7 1555,12 @@ fn break_modules(
}
}
for (entity, _part_type, _attach) in detach_list {
- detach_recursive(&mut commands, entity, &mut attached_query, &mut player_query);
+ detach_recursive(
+ &mut commands,
+ entity,
+ &mut attached_query,
+ &mut player_query,
+ );
}
}