Repository navigation
v0.5.0 - Merge System Overhaul
What's Changed
- Merge system overhaul by @AlephCubed in #9
Full Changelog: v0.4.0...v0.5.0
Migration Guide
The effect merging system has be overhauled, making temporary entities fully isolated from the main world.
This change also makes merge functions themselves more ergonomic, providing an EntityRef instead of an entity ID. Note that this swaps the direction of the merge! The results of merge logic should now be applied to the existing component.
Before:
fn merge_my_effect(mut new: EntityWorldMut, outgoing: Entity) {
let outgoing = new.world().get::<MyEffect>(outgoing).unwrap().clone();
let mut new = new.get_mut::<MyEffect>().unwrap();
new.0 += outgoing.0;
}After:
fn merge_my_effect(mut existing: EntityWorldMut, incoming: EntityRef) {
let mut existing = existing.get_mut::<MyEffect>().unwrap();
let incoming = incoming.get::<MyEffect>().unwrap();
existing.0 += incoming.0;
}