mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5999 3b4a5df2-a311-0410-b5c6-a8a6f20db521
47 lines
1.6 KiB
C++
47 lines
1.6 KiB
C++
/**
|
|
* @file
|
|
* @author feynman (bears-pit.com)
|
|
*/
|
|
|
|
#ifndef NULL_PLAN_FACTORY_H_
|
|
#define NULL_PLAN_FACTORY_H_
|
|
|
|
#include "AbstractPlanFactory.h"
|
|
#include <string>
|
|
|
|
namespace AI
|
|
{
|
|
namespace tactical
|
|
{
|
|
/**@class NullPlanFactory
|
|
* @brief Concrete Factory. Generates the NullPlan, making a NPC do absolutely nothing.
|
|
*
|
|
* The purpose of this factory is two-fold. Firstly, it is a good starting point for new plan factories; to use
|
|
* it as such, perform a
|
|
|
|
* \c svn copy include/NullPlanFactory.h include/YourPlanFactory.h\n
|
|
* \c svn copy src/NullPlanFactory.cpp src/YourPlanFactory.cpp
|
|
*
|
|
* Remember to
|
|
* - Adjust the include guards
|
|
* - Adjust the string returned by get_name()
|
|
* - Add a line in PlanFactoryLibrary.cpp to create an instance of the new factory in the library's
|
|
* constructor; otherwise, it won't be accessible via the configuration file.
|
|
*
|
|
* And secondly, it is a debugging tool. Change the configuration file to use this AI factory for a certain
|
|
* AI_INDEX to have said group do... nothing (e.g. to measure performance differences).
|
|
*/
|
|
class NullPlanFactory : public AbstractPlanFactory
|
|
{
|
|
private:
|
|
public:
|
|
static std::string get_name() {return "NullPlanFactory";}
|
|
virtual Plan* create_plan(const AIInputData& input);
|
|
virtual void update_plan(const AIInputData& input, Plan* plan_to_change);
|
|
};
|
|
}
|
|
}
|
|
|
|
#endif
|
|
|