Pārlūkot izejas kodu

Leftover stuff: rename GET_OBJ

Dydzio 7 gadi atpakaļ
vecāks
revīzija
bd3d27c79b
3 mainītis faili ar 6 papildinājumiem un 6 dzēšanām
  1. 4 4
      AI/VCAI/Goals.cpp
  2. 1 1
      AI/VCAI/Goals.h
  3. 1 1
      AI/VCAI/VCAI.cpp

+ 4 - 4
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();

+ 1 - 1
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
 

+ 1 - 1
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)