File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change 4
4
5
5
## Summary
6
6
- 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
+ ```
8
25
- ` WithWorldGuard ` and ` HandlerContext<Plugin> ` system parameters can be used in conjunction to create custom event handler systems
9
26
``` rust
10
27
fn my_handler (with_guard : WithWorldGuard <HandlerContext <Plugin >>) {
You can’t perform that action at this time.
0 commit comments