X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fcreature%2FMemory.hpp;h=192d03aab091574b30199dce1c70407ca3b585ef;hb=cead4f0686af352cdbac1f2c2df9b6a21ad9faec;hp=a6910cc196b6cab64be32c68daf074a55d3a6e74;hpb=69dade793864169f7773cc133d54277eea9bf760;p=blobs.git diff --git a/src/creature/Memory.hpp b/src/creature/Memory.hpp index a6910cc..192d03a 100644 --- a/src/creature/Memory.hpp +++ b/src/creature/Memory.hpp @@ -19,8 +19,7 @@ class Memory { public: struct Location { world::Planet *planet; - int surface; - glm::ivec2 coords; + glm::dvec3 position; }; public: @@ -28,6 +27,16 @@ public: ~Memory(); public: + /// 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: @@ -45,6 +54,11 @@ private: double time_spent; }; std::map known_types; + struct Profile { + double annoyance = 0.0; + double familiarity = 0.0; + }; + std::map known_creatures; };