Skip to content

Commit a235065

Browse files
authored
docs: Update 0.9.9.md
1 parent 1d390dc commit a235065

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

release-notes/0.9.9.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,24 @@
44

55
## Summary
66
- Dynamic Systems are here! [^1]
7-
- TODO
7+
- it's now possible to query schedules, systems, and inject new event handlers from scripts themselves:
8+
```lua
9+
local post_update_schedule = world.get_schedule_by_name("PostUpdate")
10+
11+
local test_system = post_update_schedule:get_system_by_name("on_test_post_update")
12+
13+
local system_after = world.add_system(
14+
post_update_schedule,
15+
system_builder("custom_system_after", script_id)
16+
:after(test_system)
17+
)
18+
19+
local system_before = world.add_system(
20+
post_update_schedule,
21+
system_builder("custom_system_before", script_id)
22+
:before(test_system)
23+
)
24+
```
825
- `WithWorldGuard` and `HandlerContext<Plugin>` system parameters can be used in conjunction to create custom event handler systems
926
```rust
1027
fn my_handler(with_guard: WithWorldGuard<HandlerContext<Plugin>>) {

0 commit comments

Comments
 (0)