]> git.localhorst.tv Git - blobs.git/blobdiff - src/creature/LocateResourceGoal.hpp
overhaul need system
[blobs.git] / src / creature / LocateResourceGoal.hpp
index afa5b93d00ee6ef8d0b364cd4988c03d716803f1..f0937c93c3e00d4f92109864b806438565226e97 100644 (file)
@@ -1,7 +1,8 @@
 #ifndef BLOBS_CREATURE_LOCATERESOURCEGOAL_HPP_
 #define BLOBS_CREATURE_LOCATERESOURCEGOAL_HPP_
 
-#include "../graphics/glm.hpp"
+#include "Composition.hpp"
+#include "../math/glm.hpp"
 
 
 namespace blobs {
@@ -11,10 +12,12 @@ class LocateResourceGoal
 : public Goal {
 
 public:
-       LocateResourceGoal(Creature &, int resource);
+       LocateResourceGoal(Creature &);
        ~LocateResourceGoal() noexcept override;
 
 public:
+       void Accept(int resource, double attractiveness);
+
        std::string Describe() const override;
        void Enable() override;
        void Tick(double dt) override;
@@ -26,11 +29,13 @@ private:
        bool OnTargetTile() const noexcept;
 
 private:
-       int res;
+       Composition accept;
        bool found;
        glm::dvec3 target_pos;
        int target_srf;
        glm::ivec2 target_tile;
+       bool searching;
+       double reevaluate;
 
 };