X-Git-Url: http://git.localhorst.tv/?p=blobs.git;a=blobdiff_plain;f=src%2Fcreature%2Fgoal.cpp;h=65de6c0c78317ab43e16e788cc6f023dce2e62cc;hp=55fa6c9ea7cc20b53565f96cffc9428b3748bd4a;hb=00f55d5b55ff993d2516f00f8d635887562983c7;hpb=d609fd0169ed442ff20fbf9f4bd187a597418b4f diff --git a/src/creature/goal.cpp b/src/creature/goal.cpp index 55fa6c9..65de6c0 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(); @@ -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)