X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fcreature%2Fgoal.cpp;h=abac4679dcbb93f822f7e54339e9c930071c5d5b;hb=96b12298b5aacfdd8564eb3eeff7fef453b9c8a0;hp=55fa6c9ea7cc20b53565f96cffc9428b3748bd4a;hpb=c49dd02dfabb123e0c6c4b49f761ce6578dfc464;p=blobs.git diff --git a/src/creature/goal.cpp b/src/creature/goal.cpp index 55fa6c9..abac467 100644 --- a/src/creature/goal.cpp +++ b/src/creature/goal.cpp @@ -260,7 +260,7 @@ std::string summarize(const Composition &comp, const app::Assets &assets) { IngestGoal::IngestGoal(Creature &c, Creature::Stat &stat) : Goal(c) , stat(stat) -, accept() +, accept(Assets().data.resources) , locate_subtask(nullptr) , ingesting(false) , resource(-1) @@ -298,7 +298,7 @@ void IngestGoal::Tick(double dt) { } if (ingesting) { if (OnSuitableTile() && !GetSituation().Moving()) { - GetCreature().Ingest(resource, yield * GetCreature().GetComposition().Compatibility(Assets().data.resources, resource) * dt); + GetCreature().Ingest(resource, yield * GetCreature().GetComposition().Compatibility(resource) * dt); stat.Add(-1.0 * yield * dt); if (stat.Empty()) { SetComplete(); @@ -340,7 +340,7 @@ void IngestGoal::Action() { } bool IngestGoal::OnSuitableTile() { - if (!GetSituation().OnSurface()) { + if (!GetSituation().OnGround()) { return false; } const world::TileType &t = GetSituation().GetTileType(); @@ -358,7 +358,7 @@ bool IngestGoal::OnSuitableTile() { LocateResourceGoal::LocateResourceGoal(Creature &c) : Goal(c) -, accept() +, accept(Assets().data.resources) , found(false) , target_pos(0.0) , searching(false)