Repository navigation
Conversation
makspll
added this pull request to stack #649
October 22, 2026 15:40
Contributor
|
| Project | Bevy Scripting |
| Branch | agent/script-systems-scheduling |
| Testbed | linux-gha |
🐰 View full continuous benchmarking report in Bencher
⚠️ WARNING: Truncated view!The full continuous benchmarking report exceeds the maximum length allowed on this platform.
- `after_script_system` / `before_script_system` order against another script's system by (label, attachment), resolved through ScriptSystems - `in_set` / `after_set` / `before_set` take set names: sets registered with `app.register_script_system_set(name, set)`, otherwise a ScriptNamedSet - `run_if` with `bms.conditions` (resource_exists/changed/added, any_with_component, on_timer, run_once, not_/and_/or_), evaluated in Rust by a read only condition system declaring its accesses
makspll
force-pushed
the
agent/script-systems-scheduling
branch
from
October 23, 2026 12:07
b73748e to
80cacf2
Compare
…tems-scheduling # Conflicts: # crates/bevy_mod_scripting_core/src/script_system.rs
…s in script namespaces, Rust ones as namespace members
…tems-scheduling # Conflicts: # docs/src/ReleaseNotes/0.23-to-0.24.md
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #648. Third of the script system PRs.
Ordering
:after_script_system(label, attachment)/:before_script_system(..)order against another script's system. The(attachment, label)pair is resolved throughScriptSystemsto that system's slot set. The other system must already exist, otherwiseadd_systemreturns an error.:in_set(name)/:after_set(name)/:before_set(name): a name resolves to a Rust set the game registered withapp.register_script_system_set(name, set)(ScriptSystemSetRegistry), otherwise toScriptNamedSet(name), which scripts share to group their systems. Each distinct name is interned once.orders_against, so a slot isn't recycled while another system orders against it.Run conditions
bms.conditionsis a namespace value holding theScriptRunConditiontype, the same waybms.worldholdsWorld. Its static functions build conditions:resource_exists,resource_changed,resource_added,any_with_component,on_timer(secs),run_once,not_,and_,or_. The combinators end in_becausenot,andandorare Lua keywords.:run_if(c)stacks; all conditions must hold.ScriptConditionSystem, aReadOnlySystempassed to Bevy'srun_if. It declares exactly what it reads:add_resource_readany_with_component: aWith<C>query's accesson_timer: a read ofTimeresource_changed/resource_addedread change ticks throughresource_entities()andget_change_ticks_by_id. Every top-level condition is evaluated each run, so timers keep ticking.and_/or_short-circuit, like Bevy's combinators.bevy_timein core, foron_timer;bevy_mod_scripting_bindings_domainin functions, for the namespace value's type info.Tests
resource_changedacross runs,on_timerwith an advancedTime, ordering against a registered Rust set.🤖 Generated with Claude Code