Plugin System Replacement: Fine grained schedule modding
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
## What problem does this solve or what need does it fill?
I want to give Plugin consumers an extra level of fine tuning by allowing them to replace preexisting systems in a schedule with their own system.
## What solution would you like?
When system `foo` is replaced with system `bar`:
- `foo` is removed from the schedule, and `bar` is added.
- All `SystemSet`s that `foo` was in, `bar` should be added to.
- Preexisting schedule constraints for `foo` should be copied over to `bar`.
- Any schedule constraint added later to `foo` should be instead rerouted to `bar`.
Suggested API:
```rust
impl App {
// Note that its some new singular `IntoSystemConfig` type rather than the plural `IntoSystemConfigs`.
// Allowing multiple systems on either side would make this too complex.
pub fn replace_system(&mut self, schedule: impl ScheduleLabel, from: impl IntoSystemConfig, to: impl IntoSystemConfig);
}
```
This also means the system to be replaced must be nameable/visible (non-private) to consumers.
## What alternative(s) have you considered?
Require consumers to replace whole Plugins.
Contributor guide
Research direction
Start by tracing the App API, ScheduleLabel, IntoSystemConfig, and SystemSet concepts named in the proposal. Determine how schedules store systems, sets, and constraints before assessing the suggested replace_system API. Done means replacing one named system removes it, transfers its sets and existing constraints, and reroutes later constraints to the replacement.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- game-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100