Skip to content

Commit 4cc8968

Browse files
committed
Fix line endings
1 parent 9b6ae19 commit 4cc8968

File tree

7 files changed

+130
-132
lines changed

7 files changed

+130
-132
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
* text=auto eol=lf
2+
*.sln text eol=crlf

.gitignore

-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,4 @@ assets/scenes/*-[1-9].scn.ron
99
blender_assets.cats.txt*
1010
*.blend1
1111

12-
installer/
13-
Trunk.toml
14-
1512
trace-*.json

assets/config/config.game.toml

+37-37
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
1-
[camera]
2-
mouse_sensitivity_x = 8e-4
3-
mouse_sensitivity_y = 5e-4
4-
5-
[camera.fixed_angle]
6-
min_distance = 10.0
7-
max_distance = 20.0
8-
zoom_speed = 0.7
9-
rotation_smoothing = 1.0
10-
translation_smoothing = 0.9
11-
zoom_in_smoothing = 0.2
12-
zoom_out_smoothing = 1.2
13-
pitch = -80.0
14-
15-
[camera.first_person]
16-
translation_smoothing = 0.05
17-
rotation_smoothing = 0.1
18-
max_pitch = 80
19-
min_pitch = -80
20-
tracking_smoothing = 1.5
21-
22-
[camera.third_person]
23-
translation_smoothing = 1.2
24-
rotation_smoothing = 0.5
25-
tracking_smoothing = 1.0
26-
max_pitch = 80
27-
min_pitch = -80
28-
min_distance = 1.0
29-
max_distance = 10.0
30-
zoom_speed = 0.7
31-
min_distance_to_objects = 4e-1
32-
zoom_in_smoothing = 0.2
33-
zoom_out_smoothing = 1.2
34-
35-
[player]
36-
sprint_effect_speed_threshold = 8.1
37-
1+
[camera]
2+
mouse_sensitivity_x = 8e-4
3+
mouse_sensitivity_y = 5e-4
4+
5+
[camera.fixed_angle]
6+
min_distance = 10.0
7+
max_distance = 20.0
8+
zoom_speed = 0.7
9+
rotation_smoothing = 1.0
10+
translation_smoothing = 0.9
11+
zoom_in_smoothing = 0.2
12+
zoom_out_smoothing = 1.2
13+
pitch = -80.0
14+
15+
[camera.first_person]
16+
translation_smoothing = 0.05
17+
rotation_smoothing = 0.1
18+
max_pitch = 80
19+
min_pitch = -80
20+
tracking_smoothing = 1.5
21+
22+
[camera.third_person]
23+
translation_smoothing = 1.2
24+
rotation_smoothing = 0.5
25+
tracking_smoothing = 1.0
26+
max_pitch = 80
27+
min_pitch = -80
28+
min_distance = 1.0
29+
max_distance = 10.0
30+
zoom_speed = 0.7
31+
min_distance_to_objects = 4e-1
32+
zoom_in_smoothing = 0.2
33+
zoom_out_smoothing = 1.2
34+
35+
[player]
36+
sprint_effect_speed_threshold = 8.1
37+

build/macos/create_icns.sh

100755100644
File mode changed.

src/file_system_interaction/config.rs

+65-65
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,65 @@
1-
use bevy::prelude::*;
2-
3-
use serde::{Deserialize, Serialize};
4-
5-
#[derive(Debug, Clone, PartialEq, Reflect, Asset, Serialize, Deserialize, Default, Resource)]
6-
#[reflect(Serialize, Deserialize, Resource)]
7-
pub(crate) struct GameConfig {
8-
pub(crate) camera: Camera,
9-
pub(crate) player: PlayerEffects,
10-
}
11-
12-
#[derive(Debug, Clone, PartialEq, Reflect, Serialize, Deserialize, Default)]
13-
#[reflect(Serialize, Deserialize)]
14-
pub(crate) struct Camera {
15-
pub(crate) fixed_angle: FixedAngle,
16-
pub(crate) first_person: FirstPerson,
17-
pub(crate) third_person: ThirdPerson,
18-
pub(crate) mouse_sensitivity_x: f32,
19-
pub(crate) mouse_sensitivity_y: f32,
20-
}
21-
22-
#[derive(Debug, Clone, PartialEq, Reflect, Serialize, Deserialize, Default)]
23-
#[reflect(Serialize, Deserialize)]
24-
pub(crate) struct FixedAngle {
25-
pub(crate) min_distance: f32,
26-
pub(crate) max_distance: f32,
27-
pub(crate) zoom_speed: f32,
28-
pub(crate) rotation_smoothing: f32,
29-
pub(crate) translation_smoothing: f32,
30-
pub(crate) zoom_in_smoothing: f32,
31-
pub(crate) zoom_out_smoothing: f32,
32-
pub(crate) pitch: f32,
33-
}
34-
35-
#[derive(Debug, Clone, PartialEq, Reflect, Serialize, Deserialize, Default)]
36-
#[reflect(Serialize, Deserialize)]
37-
pub(crate) struct FirstPerson {
38-
pub(crate) translation_smoothing: f32,
39-
pub(crate) rotation_smoothing: f32,
40-
pub(crate) max_pitch: f32,
41-
pub(crate) min_pitch: f32,
42-
pub(crate) tracking_smoothing: f32,
43-
}
44-
45-
#[derive(Debug, Clone, PartialEq, Reflect, Serialize, Deserialize, Default)]
46-
#[reflect(Serialize, Deserialize)]
47-
pub(crate) struct ThirdPerson {
48-
pub(crate) translation_smoothing: f32,
49-
pub(crate) rotation_smoothing: f32,
50-
pub(crate) max_pitch: f32,
51-
pub(crate) min_pitch: f32,
52-
pub(crate) min_distance: f32,
53-
pub(crate) max_distance: f32,
54-
pub(crate) zoom_speed: f32,
55-
pub(crate) min_distance_to_objects: f32,
56-
pub(crate) tracking_smoothing: f32,
57-
pub(crate) zoom_in_smoothing: f32,
58-
pub(crate) zoom_out_smoothing: f32,
59-
}
60-
61-
#[derive(Debug, Clone, PartialEq, Reflect, Serialize, Deserialize, Default)]
62-
#[reflect(Serialize, Deserialize)]
63-
pub(crate) struct PlayerEffects {
64-
pub(crate) sprint_effect_speed_threshold: f32,
65-
}
1+
use bevy::prelude::*;
2+
3+
use serde::{Deserialize, Serialize};
4+
5+
#[derive(Debug, Clone, PartialEq, Reflect, Asset, Serialize, Deserialize, Default, Resource)]
6+
#[reflect(Serialize, Deserialize, Resource)]
7+
pub(crate) struct GameConfig {
8+
pub(crate) camera: Camera,
9+
pub(crate) player: PlayerEffects,
10+
}
11+
12+
#[derive(Debug, Clone, PartialEq, Reflect, Serialize, Deserialize, Default)]
13+
#[reflect(Serialize, Deserialize)]
14+
pub(crate) struct Camera {
15+
pub(crate) fixed_angle: FixedAngle,
16+
pub(crate) first_person: FirstPerson,
17+
pub(crate) third_person: ThirdPerson,
18+
pub(crate) mouse_sensitivity_x: f32,
19+
pub(crate) mouse_sensitivity_y: f32,
20+
}
21+
22+
#[derive(Debug, Clone, PartialEq, Reflect, Serialize, Deserialize, Default)]
23+
#[reflect(Serialize, Deserialize)]
24+
pub(crate) struct FixedAngle {
25+
pub(crate) min_distance: f32,
26+
pub(crate) max_distance: f32,
27+
pub(crate) zoom_speed: f32,
28+
pub(crate) rotation_smoothing: f32,
29+
pub(crate) translation_smoothing: f32,
30+
pub(crate) zoom_in_smoothing: f32,
31+
pub(crate) zoom_out_smoothing: f32,
32+
pub(crate) pitch: f32,
33+
}
34+
35+
#[derive(Debug, Clone, PartialEq, Reflect, Serialize, Deserialize, Default)]
36+
#[reflect(Serialize, Deserialize)]
37+
pub(crate) struct FirstPerson {
38+
pub(crate) translation_smoothing: f32,
39+
pub(crate) rotation_smoothing: f32,
40+
pub(crate) max_pitch: f32,
41+
pub(crate) min_pitch: f32,
42+
pub(crate) tracking_smoothing: f32,
43+
}
44+
45+
#[derive(Debug, Clone, PartialEq, Reflect, Serialize, Deserialize, Default)]
46+
#[reflect(Serialize, Deserialize)]
47+
pub(crate) struct ThirdPerson {
48+
pub(crate) translation_smoothing: f32,
49+
pub(crate) rotation_smoothing: f32,
50+
pub(crate) max_pitch: f32,
51+
pub(crate) min_pitch: f32,
52+
pub(crate) min_distance: f32,
53+
pub(crate) max_distance: f32,
54+
pub(crate) zoom_speed: f32,
55+
pub(crate) min_distance_to_objects: f32,
56+
pub(crate) tracking_smoothing: f32,
57+
pub(crate) zoom_in_smoothing: f32,
58+
pub(crate) zoom_out_smoothing: f32,
59+
}
60+
61+
#[derive(Debug, Clone, PartialEq, Reflect, Serialize, Deserialize, Default)]
62+
#[reflect(Serialize, Deserialize)]
63+
pub(crate) struct PlayerEffects {
64+
pub(crate) sprint_effect_speed_threshold: f32,
65+
}

src/player_control/camera/ui.rs

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
use bevy::prelude::*;
2-
use serde::{Deserialize, Serialize};
3-
4-
#[derive(Debug, Clone, Eq, PartialEq, Component, Reflect, Serialize, Deserialize, Default)]
5-
#[reflect(Component, Serialize, Deserialize)]
6-
pub(crate) struct UiCamera;
7-
8-
pub(crate) fn spawn_ui_camera(mut commands: Commands) {
9-
commands.spawn((Camera2dBundle::default(), UiCamera, Name::new("UI Camera")));
10-
}
11-
12-
pub(crate) fn despawn_ui_camera(mut commands: Commands, query: Query<Entity, With<UiCamera>>) {
13-
for entity in &query {
14-
commands.entity(entity).despawn_recursive();
15-
}
16-
}
1+
use bevy::prelude::*;
2+
use serde::{Deserialize, Serialize};
3+
4+
#[derive(Debug, Clone, Eq, PartialEq, Component, Reflect, Serialize, Deserialize, Default)]
5+
#[reflect(Component, Serialize, Deserialize)]
6+
pub(crate) struct UiCamera;
7+
8+
pub(crate) fn spawn_ui_camera(mut commands: Commands) {
9+
commands.spawn((Camera2dBundle::default(), UiCamera, Name::new("UI Camera")));
10+
}
11+
12+
pub(crate) fn despawn_ui_camera(mut commands: Commands, query: Query<Entity, With<UiCamera>>) {
13+
for entity in &query {
14+
commands.entity(entity).despawn_recursive();
15+
}
16+
}

src/util/criteria.rs

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
use crate::player_control::actions::ActionsFrozen;
2-
use bevy::prelude::*;
3-
4-
pub(crate) fn is_frozen(actions_frozen: Res<ActionsFrozen>) -> bool {
5-
actions_frozen.is_frozen()
6-
}
7-
8-
#[allow(unused)]
9-
pub(crate) fn never() -> bool {
10-
false
11-
}
1+
use crate::player_control::actions::ActionsFrozen;
2+
use bevy::prelude::*;
3+
4+
pub(crate) fn is_frozen(actions_frozen: Res<ActionsFrozen>) -> bool {
5+
actions_frozen.is_frozen()
6+
}
7+
8+
#[allow(unused)]
9+
pub(crate) fn never() -> bool {
10+
false
11+
}

0 commit comments

Comments
 (0)