From 08951036a24eb795f963c08d5f938dc20ecb043f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kat=20March=C3=A1n?= <kzm@zkat.tech>
Date: Wed, 7 Apr 2021 23:12:50 -0700
Subject: [PATCH] add BigBrainPlugin

---
 examples/thirst.rs |  3 +--
 src/lib.rs         | 10 ++++++++++
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/examples/thirst.rs b/examples/thirst.rs
index b7a29dd..34ce231 100644
--- a/examples/thirst.rs
+++ b/examples/thirst.rs
@@ -154,11 +154,10 @@ fn main() {
     // Once all that's done, we just add our systems and off we go!
     App::build()
         .add_plugins(DefaultPlugins)
+        .add_plugin(BigBrainPlugin)
         .add_startup_system(init_entities.system())
         .add_system(thirst_system.system())
         .add_system(thirst_consideration_system.system())
         .add_system(drink_action_system.system())
-        // Don't forget the Thinker system itself! This is the heart of it all!
-        .add_system(big_brain::thinker_system.system())
         .run();
 }
diff --git a/src/lib.rs b/src/lib.rs
index f887f8e..2299188 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -16,3 +16,13 @@ mod actions;
 mod choices;
 mod considerations;
 mod thinker;
+
+use bevy::prelude::*;
+
+pub struct BigBrainPlugin;
+
+impl Plugin for BigBrainPlugin {
+    fn build(&self, app: &mut AppBuilder) {
+        app.add_system(thinker_system.system());
+    }
+}
-- 
GitLab