]> git.localhorst.tv Git - blobs.git/blobdiff - src/creature/LocateResourceGoal.hpp
moar intelligent search
[blobs.git] / src / creature / LocateResourceGoal.hpp
index f0937c93c3e00d4f92109864b806438565226e97..fb4dad58016b920309c3c4f8aabc33ef91c3850f 100644 (file)
@@ -16,6 +16,7 @@ public:
        ~LocateResourceGoal() noexcept override;
 
 public:
+       void SetMinimum(double m) noexcept { minimum = m; }
        void Accept(int resource, double attractiveness);
 
        std::string Describe() const override;
@@ -26,16 +27,17 @@ public:
 private:
        void LocateResource();
        void SearchVicinity();
-       bool OnTargetTile() const noexcept;
+       void Remember();
+       void RandomWalk();
+       bool OnTarget() const noexcept;
 
 private:
        Composition accept;
        bool found;
        glm::dvec3 target_pos;
-       int target_srf;
-       glm::ivec2 target_tile;
        bool searching;
        double reevaluate;
+       double minimum;
 
 };