From bd3d27c79b3240a643b19fed61a872829dd64114 Mon Sep 17 00:00:00 2001 From: Dydzio Date: Fri, 10 Aug 2018 16:48:42 +0200 Subject: [PATCH] Leftover stuff: rename GET_OBJ --- AI/VCAI/Goals.cpp | 8 ++++---- AI/VCAI/Goals.h | 2 +- AI/VCAI/VCAI.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/AI/VCAI/Goals.cpp b/AI/VCAI/Goals.cpp index 39cc9161c..1b507ec6f 100644 --- a/AI/VCAI/Goals.cpp +++ b/AI/VCAI/Goals.cpp @@ -77,7 +77,7 @@ std::string Goals::AbstractGoal::name() const //TODO: virtualize case GATHER_TROOPS: desc = "GATHER TROOPS"; break; - case GET_OBJ: + case VISIT_OBJ: { auto obj = cb->getObjInstance(ObjectInstanceID(objid)); if(obj) @@ -153,7 +153,7 @@ bool Goals::AbstractGoal::operator==(AbstractGoal & g) break; //assigned hero and object - case GET_OBJ: + case VISIT_OBJ: case FIND_OBJ: //TODO: use subtype? case VISIT_HERO: case GET_ART_TYPE: @@ -560,13 +560,13 @@ TSubgoal VisitObj::whatToDoToAchieve() { auto bestGoal = fh->chooseSolution(getAllPossibleSubgoals()); - if(bestGoal->goalType == Goals::GET_OBJ && bestGoal->hero) + if(bestGoal->goalType == Goals::VISIT_OBJ && bestGoal->hero) bestGoal->setisElementar(true); return bestGoal; } -Goals::VisitObj::VisitObj(int Objid) : CGoal(Goals::GET_OBJ) +Goals::VisitObj::VisitObj(int Objid) : CGoal(Goals::VISIT_OBJ) { objid = Objid; tile = ai->myCb->getObjInstance(ObjectInstanceID(objid))->visitablePos(); diff --git a/AI/VCAI/Goals.h b/AI/VCAI/Goals.h index 3884748a0..89806f630 100644 --- a/AI/VCAI/Goals.h +++ b/AI/VCAI/Goals.h @@ -46,7 +46,7 @@ enum EGoals GATHER_TROOPS, // val of creatures with objid OBJECT_GOALS_BEGIN, - GET_OBJ, //visit or defeat or collect the object + VISIT_OBJ, //visit or defeat or collect the object FIND_OBJ, //find and visit any obj with objid + resid //TODO: consider universal subid for various types (aid, bid) VISIT_HERO, //heroes can move around - set goal abstract and track hero every turn diff --git a/AI/VCAI/VCAI.cpp b/AI/VCAI/VCAI.cpp index 98699d662..c8845232d 100644 --- a/AI/VCAI/VCAI.cpp +++ b/AI/VCAI/VCAI.cpp @@ -1470,7 +1470,7 @@ void VCAI::wander(HeroPtr h) decomposeGoal(bestObjectGoal)->accept(this); //wander should not cause heroes to be reserved - they are always considered free - if(bestObjectGoal->goalType == Goals::GET_OBJ) + if(bestObjectGoal->goalType == Goals::VISIT_OBJ) { auto chosenObject = cb->getObjInstance(ObjectInstanceID(bestObjectGoal->objid)); if(chosenObject != nullptr)