|
3 | 3 | 
|
4 | 4 |
|
5 | 5 | ## Summary
|
6 |
| -- Dynamic Systems are here! [^1]. it's now possible to query schedules, systems, and inject new event handlers from scripts themselves: |
| 6 | +- [Dynamic Systems](https://makspll.github.io/bevy_mod_scripting/ScriptSystems/introduction.html) are here! [^1]. it's now possible to query schedules, systems, and inject new event handlers from scripts themselves: |
7 | 7 | ```lua
|
8 | 8 | local post_update_schedule = world.get_schedule_by_name("PostUpdate")
|
9 | 9 |
|
|
19 | 19 | print("i will run after the existing system in PostUpdate!")
|
20 | 20 | end
|
21 | 21 | ```
|
22 |
| -- `WithWorldGuard` and `HandlerContext<Plugin>` system parameters can be used in conjunction to create custom event handler systems |
| 22 | +- `WithWorldGuard` and `HandlerContext<Plugin>` system parameters can be used together to create custom event handler systems. The parameter will read the state of the schedule and initialize access maps correctly, allowing scripts to be executed against ANY inner system parameters [^2] |
23 | 23 | ```rust
|
24 | 24 | fn my_handler(with_guard: WithWorldGuard<HandlerContext<Plugin>>) {
|
25 | 25 | let (guard, ctxt) = with_guard.get_mut();
|
26 | 26 | ctxt.call("my_script.lua", ...)
|
27 | 27 | }
|
28 |
| - ``` |
| 28 | + ``` |
29 | 29 | - Global functions are now exported via the `ladfile_builder` plugin, BMS globals can be seen in the book
|
30 |
| -- `HashMap` fields can now be set by reflection |
| 30 | +- `HashMap` fields can now be set by reflection (but not reflected into due to reflection limitations) |
31 | 31 | - Tuples now have a `FromScript` implementation
|
32 | 32 |
|
33 | 33 | ## Fixes
|
34 | 34 | - `callback_labels!` allows for trailing commas
|
35 | 35 | - `enable_context_sharing` not having a builder signature
|
36 |
| -- `HashMap`'s `FromReflect` supports `Vec` types meaning empty Lua maps `{}` work as expected |
| 36 | +- `HashMap`'s `FromReflect` supports `List` types meaning empty Lua maps `{}` work as expected, and unit variant construction is supported. |
37 | 37 |
|
38 | 38 | ## Changelog
|
39 | 39 | See a detailed changelog [here](https://github.com/makspll/bevy_mod_scripting/blob/main/CHANGELOG.md)
|
40 | 40 |
|
41 | 41 | [^1] Experimental and early in development but here!
|
| 42 | + |
| 43 | +[^2] With the caveat that `WithWorldGuard<P>` will not allow `&mut World` access the moment P accesses anything (with the exception of `HandlerContext` state) |
0 commit comments