Skip to content

Commit e7db4d6

Browse files
authored
Merge branch 'main' into feat/refactor-handler-context-as-system-param
2 parents 7b44afb + 4af18c0 commit e7db4d6

File tree

17 files changed

+62
-23
lines changed

17 files changed

+62
-23
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Changelog
22

3+
## [0.9.8](https://github.com/makspll/bevy_mod_scripting/compare/v0.9.7...v0.9.8) - 2025-02-25
4+
5+
### Added
6+
7+
- Allow trailing comma in callback_labels. (#325)
8+
9+
### Fixed
10+
11+
- `enable_context_sharing` not returning the plugin like a real builder
12+
313
## [0.9.7](https://github.com/makspll/bevy_mod_scripting/compare/v0.9.6...v0.9.7) - 2025-02-23
414

515
### Added

Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "bevy_mod_scripting"
3-
version = "0.9.7"
3+
version = "0.9.8"
44
authors = ["Maksymilian Mozolewski <makspl17@gmail.com>"]
55
edition = "2021"
66
license = "MIT OR Apache-2.0"
@@ -53,18 +53,18 @@ rhai = ["bevy_mod_scripting_rhai"]
5353
[dependencies]
5454
bevy = { workspace = true }
5555
bevy_mod_scripting_core = { workspace = true }
56-
bevy_mod_scripting_lua = { path = "crates/languages/bevy_mod_scripting_lua", version = "0.9.7", optional = true }
57-
bevy_mod_scripting_rhai = { path = "crates/languages/bevy_mod_scripting_rhai", version = "0.9.7", optional = true }
56+
bevy_mod_scripting_lua = { path = "crates/languages/bevy_mod_scripting_lua", version = "0.9.8", optional = true }
57+
bevy_mod_scripting_rhai = { path = "crates/languages/bevy_mod_scripting_rhai", version = "0.9.8", optional = true }
5858
# bevy_mod_scripting_rune = { path = "crates/languages/bevy_mod_scripting_rune", version = "0.9.0-alpha.2", optional = true }
5959
bevy_mod_scripting_functions = { workspace = true }
6060
bevy_mod_scripting_derive = { workspace = true }
6161

6262
[workspace.dependencies]
6363
profiling = { version = "1.0" }
6464
bevy = { version = "0.15.2", default-features = false }
65-
bevy_mod_scripting_core = { path = "crates/bevy_mod_scripting_core", version = "0.9.7" }
66-
bevy_mod_scripting_functions = { path = "crates/bevy_mod_scripting_functions", version = "0.9.7", default-features = false }
67-
bevy_mod_scripting_derive = { path = "crates/bevy_mod_scripting_derive", version = "0.9.7" }
65+
bevy_mod_scripting_core = { path = "crates/bevy_mod_scripting_core", version = "0.9.8" }
66+
bevy_mod_scripting_functions = { path = "crates/bevy_mod_scripting_functions", version = "0.9.8", default-features = false }
67+
bevy_mod_scripting_derive = { path = "crates/bevy_mod_scripting_derive", version = "0.9.8" }
6868

6969
# test utilities
7070
script_integration_test_harness = { path = "crates/testing_crates/script_integration_test_harness" }
@@ -77,7 +77,7 @@ rand = "0.8.5"
7777
bevy_console = "0.13"
7878
# rhai-rand = "0.1"
7979
ansi-parser = "0.9"
80-
ladfile_builder = { path = "crates/ladfile_builder", version = "0.2.1" }
80+
ladfile_builder = { path = "crates/ladfile_builder", version = "0.2.2" }
8181

8282
[workspace]
8383
members = [

crates/bevy_mod_scripting_core/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.9.8](https://github.com/makspll/bevy_mod_scripting/compare/bevy_mod_scripting_core-v0.9.7...bevy_mod_scripting_core-v0.9.8) - 2025-02-25
11+
12+
### Added
13+
14+
- Allow trailing comma in callback_labels. (#325)
15+
16+
### Fixed
17+
18+
- `enable_context_sharing` not returning the plugin like a real builder
19+
1020
## [0.9.7](https://github.com/makspll/bevy_mod_scripting/compare/bevy_mod_scripting_core-v0.9.6...bevy_mod_scripting_core-v0.9.7) - 2025-02-23
1121

1222
### Added

crates/bevy_mod_scripting_core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "bevy_mod_scripting_core"
3-
version = "0.9.7"
3+
version = "0.9.8"
44
authors = ["Maksymilian Mozolewski <makspl17@gmail.com>"]
55
edition = "2021"
66
license = "MIT OR Apache-2.0"

crates/bevy_mod_scripting_core/src/event.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ impl CallbackLabel {
5757
#[macro_export]
5858
/// Creates a set of callback labels
5959
macro_rules! callback_labels {
60-
($($name:ident => $label:expr),*) => {
60+
($($name:ident => $label:expr),* $(,)?) => {
6161

6262
$(
6363
#[doc = "A callback label for the event: "]
@@ -74,7 +74,7 @@ macro_rules! callback_labels {
7474

7575
callback_labels!(
7676
OnScriptLoaded => "on_script_loaded",
77-
OnScriptUnloaded => "on_script_unloaded"
77+
OnScriptUnloaded => "on_script_unloaded",
7878
);
7979

8080
/// A trait for types that can be converted into a callback label

crates/bevy_mod_scripting_core/src/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,8 @@ pub trait ConfigureScriptPlugin {
197197
/// Switch the context assigning strategy to a global context assigner.
198198
///
199199
/// This means that all scripts will share the same context. This is useful for when you want to share data between scripts easilly.
200-
/// Be careful however as this also means that scripts can interfere with each other in unexpected ways!.
201-
fn enable_context_sharing(self);
200+
/// Be careful however as this also means that scripts can interfere with each other in unexpected ways! Including overwriting each other's handlers.
201+
fn enable_context_sharing(self) -> Self;
202202
}
203203

204204
impl<P: IntoScriptPluginParams + AsMut<ScriptingPlugin<P>>> ConfigureScriptPlugin for P {
@@ -223,8 +223,9 @@ impl<P: IntoScriptPluginParams + AsMut<ScriptingPlugin<P>>> ConfigureScriptPlugi
223223
self
224224
}
225225

226-
fn enable_context_sharing(mut self) {
226+
fn enable_context_sharing(mut self) -> Self {
227227
self.as_mut().context_assigner = ContextAssigner::new_global_context_assigner();
228+
self
228229
}
229230
}
230231

crates/bevy_mod_scripting_derive/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.9.8](https://github.com/makspll/bevy_mod_scripting/compare/bevy_mod_scripting_derive-v0.9.7...bevy_mod_scripting_derive-v0.9.8) - 2025-02-25
11+
12+
### Fixed
13+
14+
- Generate IntoScript implementation with the correct path (#326)
15+
1016
## [0.9.7](https://github.com/makspll/bevy_mod_scripting/compare/bevy_mod_scripting_derive-v0.9.6...bevy_mod_scripting_derive-v0.9.7) - 2025-02-23
1117

1218
### Added

crates/bevy_mod_scripting_derive/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "bevy_mod_scripting_derive"
3-
version = "0.9.7"
3+
version = "0.9.8"
44
edition = "2021"
55
authors = ["Maksymilian Mozolewski <makspl17@gmail.com>"]
66
license = "MIT OR Apache-2.0"

crates/bevy_mod_scripting_derive/src/derive/into_script.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub fn into_script(input: TokenStream) -> TokenStream {
1313
let (impl_generics, type_generics, where_clause) = generics.split_for_impl();
1414

1515
quote! {
16-
impl #impl_generics ::bevy_mod_scripting::bindings::function::into::IntoScript for #ident #type_generics #where_clause {
16+
impl #impl_generics ::bevy_mod_scripting::core::bindings::function::into::IntoScript for #ident #type_generics #where_clause {
1717
fn into_script(self, world: ::bevy_mod_scripting::core::bindings::WorldGuard) -> Result<::bevy_mod_scripting::core::bindings::script_value::ScriptValue, ::bevy_mod_scripting::core::error::InteropError> {
1818
::bevy_mod_scripting::core::bindings::function::into::IntoScript::into_script(
1919
::bevy_mod_scripting::core::bindings::function::from::Val(self),

crates/bevy_mod_scripting_functions/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "bevy_mod_scripting_functions"
3-
version = "0.9.7"
3+
version = "0.9.8"
44
edition = "2021"
55
authors = ["Maksymilian Mozolewski <makspl17@gmail.com>"]
66
license = "MIT OR Apache-2.0"

crates/lad_backends/mdbook_lad_preprocessor/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.1.2](https://github.com/makspll/bevy_mod_scripting/compare/mdbook_lad_preprocessor-v0.1.1...mdbook_lad_preprocessor-v0.1.2) - 2025-02-25
11+
12+
### Added
13+
14+
- *(mdbook)* improve mdbook generics behaviour and fix broken links (#319)
15+
1016
## [0.1.1](https://github.com/makspll/bevy_mod_scripting/compare/mdbook_lad_preprocessor-v0.1.0...mdbook_lad_preprocessor-v0.1.1) - 2025-02-23
1117

1218
### Added

crates/lad_backends/mdbook_lad_preprocessor/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mdbook_lad_preprocessor"
3-
version = "0.1.1"
3+
version = "0.1.2"
44
edition = "2021"
55
authors = ["Maksymilian Mozolewski <makspl17@gmail.com>"]
66
license = "MIT OR Apache-2.0"
@@ -15,7 +15,7 @@ readme = "readme.md"
1515
[dependencies]
1616
clap = "4"
1717
mdbook = "0.4"
18-
ladfile = { path = "../../ladfile", version = "0.3.0" }
18+
ladfile = { path = "../../ladfile", version = "0.3.1" }
1919
env_logger = "0.11"
2020
log = "0.4"
2121
serde_json = "1.0"

crates/ladfile/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.3.1](https://github.com/makspll/bevy_mod_scripting/compare/v0.3.0-ladfile...v0.3.1-ladfile) - 2025-02-25
11+
12+
### Added
13+
14+
- *(mdbook)* improve mdbook generics behaviour and fix broken links (#319)
15+
1016
## [0.3.0](https://github.com/makspll/bevy_mod_scripting/compare/v0.2.0-ladfile...v0.3.0-ladfile) - 2025-02-23
1117

1218
### Added

crates/ladfile/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ladfile"
3-
version = "0.3.0"
3+
version = "0.3.1"
44
edition = "2021"
55
authors = ["Maksymilian Mozolewski <makspl17@gmail.com>"]
66
license = "MIT OR Apache-2.0"

crates/ladfile_builder/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ladfile_builder"
3-
version = "0.2.1"
3+
version = "0.2.2"
44
edition = "2021"
55
authors = ["Maksymilian Mozolewski <makspl17@gmail.com>"]
66
license = "MIT OR Apache-2.0"
@@ -17,7 +17,7 @@ bevy_mod_scripting_core = { workspace = true }
1717
# I don't think bevy has a top level feature for this :C
1818
bevy = { workspace = true }
1919
bevy_reflect = { version = "0.15.2", features = ["documentation"] }
20-
ladfile = { version = "0.3.0", path = "../ladfile" }
20+
ladfile = { version = "0.3.1", path = "../ladfile" }
2121
regex = "1.11"
2222

2323
[dev-dependencies]

crates/languages/bevy_mod_scripting_lua/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "bevy_mod_scripting_lua"
3-
version = "0.9.7"
3+
version = "0.9.8"
44
authors = ["Maksymilian Mozolewski <makspl17@gmail.com>"]
55
edition = "2021"
66
license = "MIT OR Apache-2.0"

crates/languages/bevy_mod_scripting_rhai/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "bevy_mod_scripting_rhai"
3-
version = "0.9.7"
3+
version = "0.9.8"
44
authors = ["Maksymilian Mozolewski <makspl17@gmail.com>"]
55
edition = "2021"
66
license = "MIT OR Apache-2.0"

0 commit comments

Comments
 (0)