Skip to content

Commit

Permalink
Migration changes
Browse files Browse the repository at this point in the history
  • Loading branch information
stargazing-dino committed Jun 17, 2024
1 parent 128f55e commit 8bfb2ba
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ homepage = "https://github.com/zkat/big-brain"
[workspace]

[dependencies]
bevy = { version = "0.13.2", default-features = false }
bevy = { version = "0.14.0-rc.3", default-features = false }
big-brain-derive = { version = "=0.19.0", path = "./derive" }

[dev-dependencies]
bevy = { version = "0.13.2", default-features = true }
bevy = { version = "0.14.0-rc.3", default-features = true }
rand = { version = "0.8.5", features = ["small_rng"] }
bevy-scene-hook = "10.0.0"
bevy-scene-hook = { git = "https://github.com/stargazing-dino/bevy-scene-hook.git", branch = "update-14.0" }

[features]
trace = []
10 changes: 5 additions & 5 deletions examples/farming_sim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
//! - When not tired, find the farm field and harvest items over time
//! - When inventory is full, find the market and sell items for money

use bevy::{log::LogPlugin, prelude::*};
use bevy::{color::palettes::css, log::LogPlugin, prelude::*};
use bevy_scene_hook::{HookPlugin, HookedSceneBundle, SceneHook};
use big_brain::prelude::*;
use big_brain_derive::ActionBuilder;

const DEFAULT_COLOR: Color = Color::BLACK;
const SLEEP_COLOR: Color = Color::RED;
const FARM_COLOR: Color = Color::BLUE;
const DEFAULT_COLOR: Color = Color::Srgba(css::BLACK);
const SLEEP_COLOR: Color = Color::Srgba(css::RED);
const FARM_COLOR: Color = Color::Srgba(css::BLUE);
const MAX_DISTANCE: f32 = 0.1;
const MAX_INVENTORY_ITEMS: f32 = 20.0;
const WORK_NEED_SCORE: f32 = 0.6;
Expand Down Expand Up @@ -608,7 +608,7 @@ fn main() {
// Use `RUST_LOG=big_brain=trace,farming_sim=trace cargo run --example
// farming_sim --features=trace` to see extra tracing output.
filter: "big_brain=debug,farming_sim=debug".to_string(),
update_subscriber: None,
custom_layer: |_| None,
}))
.add_plugins(HookPlugin)
.add_plugins(BigBrainPlugin::new(PreUpdate))
Expand Down
5 changes: 4 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,10 @@ pub mod prelude {
};
}

use bevy::{ecs::schedule::ScheduleLabel, prelude::*, utils::intern::Interned};
use bevy::{
ecs::{intern::Interned, schedule::ScheduleLabel},
prelude::*,
};

/// Core [`Plugin`] for Big Brain behavior. Required for any of the
/// [`Thinker`](thinker::Thinker)-related magic to work.
Expand Down
2 changes: 1 addition & 1 deletion tests/steps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ fn exit_action(
*state = ActionState::Executing;
}
if *state == ActionState::Executing {
app_exit_events.send(AppExit);
app_exit_events.send(AppExit::Success);
}
}
}
Expand Down

0 comments on commit 8bfb2ba

Please sign in to comment.