Skip to content

Commit 2e0696c

Browse files
committed
update bevy to 0.19
1 parent 0c851ce commit 2e0696c

21 files changed

Lines changed: 1445 additions & 1452 deletions

File tree

Cargo.lock

Lines changed: 1405 additions & 1409 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ members = [
1010
"crates/core",
1111
"crates/codegen",
1212
"crates/internal_shared",
13-
"demo",
13+
# "demo", # waiting for bevy_sprite3d to be updated to bevy 0.19
1414
"examples/bevy_yarnspinner",
1515
"examples/yarnspinner_without_bevy",
1616
]

crates/bevy_plugin/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ sha2 = "0.10"
2626
variadics_please = "1"
2727

2828
[dependencies.bevy]
29-
version = "0.18"
29+
version = "0.19"
3030
default-features = false
3131
features = [ "bevy_asset", "multi_threaded", "bevy_log" ]
3232

@@ -35,7 +35,7 @@ tempfile = "3"
3535
static_assertions = "1.1.0"
3636

3737
[dev-dependencies.bevy]
38-
version = "0.18"
38+
version = "0.19"
3939
default-features = false
4040
features = [ "bevy_core_pipeline", "bevy_audio" ]
4141

crates/bevy_plugin/src/dialogue_runner/runtime_interaction.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ fn continue_runtime(
3838
Commands,
3939
)> = SystemState::new(world);
4040

41-
let (mut dialogue_runners, loaded_untyped_assets, mut commands) = system_state.get_mut(world);
41+
let (mut dialogue_runners, loaded_untyped_assets, mut commands) = system_state.get_mut(world)?;
4242

4343
let mut dialogues: HashMap<_, _, FixedHasher> = HashMap::default();
4444

@@ -125,7 +125,7 @@ fn continue_runtime(
125125
Commands,
126126
)> = SystemState::new(world);
127127

128-
let (mut dialogue_runners, project, mut commands) = system_state.get_mut(world);
128+
let (mut dialogue_runners, project, mut commands) = system_state.get_mut(world)?;
129129

130130
for (source, mut dialogue_runner) in dialogue_runners.iter_mut() {
131131
if let Some((dialogue, is_sending_missed_events, _, Some(events))) =

crates/bevy_plugin/src/line_provider/asset_provider/file_extension_asset_provider_plugin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ impl FileExtensionAssetProvider {
230230
);
231231
let path = dir.join(file_name);
232232
let asset_path = path.to_string_lossy().replace('\\', "/");
233-
let handle = asset_server.load_untyped(asset_path);
233+
let handle = asset_server.load_builder().load_untyped(asset_path);
234234
self.loading_handles.insert(path, handle);
235235
}
236236
}

crates/bevy_plugin/src/localization/line_id_generation.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ pub(crate) fn line_id_generation_plugin(app: &mut App) {
1515
(
1616
handle_yarn_file_events
1717
.pipe(panic_on_err)
18-
.run_if(in_development.and(has_localizations)),
18+
.run_if(in_development.and_then(has_localizations)),
1919
handle_yarn_file_events_outside_development.run_if(
20-
resource_exists::<YarnProject>.and(not(in_development.and(has_localizations))),
20+
resource_exists::<YarnProject>
21+
.and_then(not(in_development.and_then(has_localizations))),
2122
),
2223
)
2324
.chain()
@@ -135,7 +136,7 @@ fn handle_yarn_file_events(
135136
if is_watching {
136137
added_tags.insert(*id);
137138
} else {
138-
let yarn_file = assets.get_mut(*id).unwrap();
139+
let mut yarn_file = assets.get_mut(*id).unwrap();
139140
yarn_file.file.source = source_with_added_ids;
140141

141142
let string_table = YarnCompiler::new()

crates/bevy_plugin/src/localization/strings_file/updating.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ pub(crate) fn strings_file_updating_plugin(app: &mut App) {
1313
.in_set(YarnSpinnerSystemSet)
1414
.run_if(
1515
in_development
16-
.and(has_localizations)
17-
.and(resource_exists::<YarnProject>)
18-
.and(events_in_queue::<UpdateAllStringsFilesForStringTableEvent>()),
16+
.and_then(has_localizations)
17+
.and_then(resource_exists::<YarnProject>)
18+
.and_then(events_in_queue::<UpdateAllStringsFilesForStringTableEvent>()),
1919
),)
2020
.chain(),
2121
);
@@ -77,9 +77,9 @@ fn update_all_strings_files_for_string_table(
7777
.collect();
7878
let file_names = file_names.into_iter().collect::<Vec<_>>().join(", ");
7979
for (language, strings_file_handle) in languages_to_handles.clone() {
80-
let strings_file = strings_files.get_mut(&strings_file_handle).unwrap();
80+
let mut strings_file = strings_files.get_mut(&strings_file_handle).unwrap();
8181
lint_strings_file(
82-
strings_file,
82+
&strings_file,
8383
&expected_file_names,
8484
&asset_server,
8585
&strings_file_handle,

crates/bevy_plugin/tests/test_strings_tables.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ fn appends_to_pre_existing_strings_file() -> anyhow::Result<()> {
174174
let handle = app
175175
.world()
176176
.resource::<AssetServer>()
177+
.load_builder()
177178
.load_untyped("dialogue/de-CH.strings.csv");
178179
while app
179180
.world()
@@ -241,7 +242,7 @@ fn replaces_entries_in_strings_file() -> anyhow::Result<()> {
241242
.world_mut()
242243
.get_resource_mut::<Assets<YarnFile>>()
243244
.unwrap();
244-
let yarn_file = yarn_file_assets.get_mut(&handle).unwrap();
245+
let mut yarn_file = yarn_file_assets.get_mut(&handle).unwrap();
245246

246247
let strings_file_source =
247248
fs::read_to_string(&strings_file_path)?.replace("*third*", "*dritter*");
@@ -252,7 +253,8 @@ fn replaces_entries_in_strings_file() -> anyhow::Result<()> {
252253
*lines.get_mut(3).unwrap() = "Changed line with prior translation#line:2";
253254
lines.insert(4, "Inserted line #line:13");
254255
lines.remove(6);
255-
yarn_file.set_content(lines.join("\n"))?;
256+
let content = lines.join("\n");
257+
yarn_file.set_content(content)?;
256258
}
257259

258260
while !app

crates/bevy_plugin/tests/utils/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ impl AppExt for App {
8080
}
8181
let mut system_state: SystemState<(Commands, Res<YarnProject>)> =
8282
SystemState::new(self.world_mut());
83-
let (mut commands, yarn_project) = system_state.get_mut(self.world_mut());
83+
let (mut commands, yarn_project) = system_state.get_mut(self.world_mut()).unwrap();
8484
yarn_project.build_dialogue_runner(&mut commands)
8585
}
8686

@@ -126,7 +126,7 @@ impl AppExt for App {
126126
self.load_project();
127127
let mut system_state: SystemState<(Commands, Res<YarnProject>)> =
128128
SystemState::new(self.world_mut());
129-
let (mut commands, yarn_project) = system_state.get_mut(self.world_mut());
129+
let (mut commands, yarn_project) = system_state.get_mut(self.world_mut()).unwrap();
130130
let dialogue_runner = yarn_project.create_dialogue_runner(&mut commands);
131131
system_state.apply(self.world_mut());
132132
self.world_mut().spawn(dialogue_runner).id()

crates/compiler/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ yarnspinner_core = { path = "../core", version = "0.8.0" }
2323
annotate-snippets = "0.12"
2424
serde = { version = "1", features = [ "derive" ], optional = true }
2525
serde_json = { version = "1", optional = true }
26-
bevy = { version = "0.18", default-features = false, optional = true }
26+
bevy = { version = "0.19", default-features = false, optional = true }
2727
rand = { version = "0.10", default-features = false }
2828
crc32fast = "1.5"
2929
globset = "0.4"

0 commit comments

Comments
 (0)