]> git.localhorst.tv Git - blobs.git/blobdiff - src/creature/Memory.hpp
aggression
[blobs.git] / src / creature / Memory.hpp
index c58fd26420576067d0688df153da1b5b0b6dd5df..192d03aab091574b30199dce1c70407ca3b585ef 100644 (file)
@@ -27,10 +27,18 @@ public:
        ~Memory();
 
 public:
-       void Tick(double dt);
-
+       /// remove all memories
        void Erase();
 
+       /// try to remember where stuff was
+       /// when true, pos contains an approximation of the
+       /// location of the best fitting resource
+       bool RememberLocation(const Composition &, glm::dvec3 &pos) const noexcept;
+
+       void TrackCollision(Creature &);
+
+       void Tick(double dt);
+
 private:
        /// track time spent on a tile
        void TrackStay(const Location &, double t);
@@ -46,6 +54,11 @@ private:
                double time_spent;
        };
        std::map<int, Stay> known_types;
+       struct Profile {
+               double annoyance = 0.0;
+               double familiarity = 0.0;
+       };
+       std::map<Creature *, Profile> known_creatures;
 
 };