Skip to content

Commit

Permalink
Release 0.12 (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
hikikones authored Nov 30, 2024
1 parent b05e78a commit 6ad6e45
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 106 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## Version 0.12.0-dev
## Version 0.12.0

- [Update to Bevy 0.15][103]
- [Add `SequentialActions` marker for required components][106]
Expand Down
19 changes: 6 additions & 13 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bevy-sequential-actions"
version = "0.12.0-dev"
version = "0.12.0"
edition = "2021"
license = "MIT OR Apache-2.0"
authors = ["hikikones"]
Expand All @@ -12,16 +12,9 @@ categories = ["game-development"]
readme = "README.md"

[dependencies]
bevy_ecs = { version = "0.15.0-rc.1", default-features = false }
bevy_app = { version = "0.15.0-rc.1", default-features = false }
bevy_log = { version = "0.15.0-rc.1", default-features = false }
bevy_utils = { version = "0.15.0-rc.1", default-features = false }
bevy_derive = { version = "0.15.0-rc.1", default-features = false }
bevy_ecs = { version = "0.15", default-features = false }
bevy_app = { version = "0.15", default-features = false }
bevy_log = { version = "0.15", default-features = false }
bevy_utils = { version = "0.15", default-features = false }
bevy_derive = { version = "0.15", default-features = false }
downcast-rs = { version = "1.2", default-features = false }

[dev-dependencies]
criterion = { version = "0.5", default-features = false }

[[bench]]
name = "benches"
harness = false
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
[![MIT/Apache 2.0](https://img.shields.io/crates/l/bevy-sequential-actions?style=flat-square)](https://github.com/hikikones/bevy-sequential-actions#license)


A [Bevy](https://bevyengine.org) library that aims to execute a queue of various actions in a sequential manner.
This generally means that one action runs at a time, and when it is done,
the next action will start and so on until the queue is empty.
A simple library for managing and sequencing various actions in [Bevy](https://bevyengine.org).

https://user-images.githubusercontent.com/19198785/167969191-48258eb3-8acb-4f38-a326-f34e055a1b40.mp4
<figure>
<img src="https://github.com/user-attachments/assets/66b5b15e-96af-47bd-9371-eee8809d1294"/>
<p><em>An entity with a queue of repeating actions</em></p>
</figure>

</div>

Expand Down Expand Up @@ -178,6 +179,7 @@ Each example can be run with `cargo run --example <example>`.
| bevy | bevy-sequential-actions |
| ---- | ----------------------- |
| 0.15 | 0.12 |
| 0.14 | 0.11 |
| 0.13 | 0.10 |
| 0.12 | 0.9 |
Expand Down
78 changes: 0 additions & 78 deletions benches/benches.rs

This file was deleted.

8 changes: 2 additions & 6 deletions src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,9 @@ impl ModifyActions for AgentCommands<'_, '_, '_> {
1 => {
let agent = self.agent;
let config = self.config;
let action = actions.next().unwrap();
self.commands.queue(move |world: &mut World| {
SequentialActionsPlugin::add_action(
agent,
config,
actions.next().unwrap(),
world,
);
SequentialActionsPlugin::add_action(agent, config, action, world);
});
}
_ => {
Expand Down
9 changes: 6 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@
[![github.com](https://img.shields.io/github/stars/hikikones/bevy-sequential-actions?logo=github&style=flat-square)](https://github.com/hikikones/bevy-sequential-actions)
[![MIT/Apache 2.0](https://img.shields.io/crates/l/bevy-sequential-actions?style=flat-square)](https://github.com/hikikones/bevy-sequential-actions#license)
A [Bevy](https://bevyengine.org) library that aims to execute a queue of various actions in a sequential manner.
This generally means that one action runs at a time, and when it is done,
the next action will start and so on until the queue is empty.
A simple library for managing and sequencing various actions in [Bevy](https://bevyengine.org).
<figure>
<img src="https://github.com/user-attachments/assets/66b5b15e-96af-47bd-9371-eee8809d1294"/>
<p><em>An entity with a queue of repeating actions</em></p>
</figure>
</div>
Expand Down
4 changes: 3 additions & 1 deletion src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,11 @@ impl SequentialActionsPlugin {
pub fn add_action(
agent: Entity,
config: AddConfig,
mut action: BoxedAction,
action: impl IntoBoxedAction,
world: &mut World,
) {
let mut action = action.into_boxed_action();

if world.get_entity(agent).is_err() {
warn!("Cannot add action {action:?} to non-existent agent {agent}.");
return;
Expand Down

0 comments on commit 6ad6e45

Please sign in to comment.