Skip to content

Replace EffectBundle with fully generic bundles. - #8

Merged
AlephCubed merged 9 commits into
mainfrom
dev
Apr 2, 2026
Merged

Replace EffectBundle with fully generic bundles.#8
AlephCubed merged 9 commits into
mainfrom
dev

Conversation

@AlephCubed

@AlephCubed AlephCubed commented Apr 2, 2026

Copy link
Copy Markdown
Owner

Fixes #6.
With this change, any bundle that implements Clone can be added as an effect.

Migration Guide

with_effect

Before:

commands.entity(target).with_effect(EffectBundle {
    name: Name::new("Effect"),
    bundle: MyEffect,
    ..default()
});

After:

commands.entity(target).with_effect((
    Name::new("Effect"), 
    MyEffect,
));

EffectedBy::spawn

Before:

commands.spawn((
    Name::new("Target"),
    EffectedBy::spawn(EffectBundle {
        name: Name::new("Effect"),
        bundle: MyEffect,
        ..default()
    }),
));

After:

commands.spawn((
    Name::new("Target"),
    EffectedBy::spawn(Effect((
        Name::new("Effect"), 
        MyEffect,
    ))),
));

Also updates to Auto Plugin V0.10 and Immediate Stats V0.5, and adds margin to the examples' UI.

@AlephCubed
AlephCubed merged commit 33e2c80 into main Apr 2, 2026
3 checks passed
@AlephCubed
AlephCubed deleted the dev branch April 2, 2026 05:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Switch to fully generic bundles.

1 participant