/***************************************************************************
 *
 * PROJECT: The Dark Mod
 * $Revision$
 * $Date$
 * $Author$
 *
 ***************************************************************************/

#ifndef __AI_EAS_ROUTENODE_H__
#define __AI_EAS_ROUTENODE_H__

#include <list>
#include <boost/shared_ptr.hpp>

namespace eas {

enum ActionType {
	ACTION_WALK = 0,		// AI just needs to walk to the target
	ACTION_USE_ELEVATOR,	// AI needs to use an elevator
	NUM_ACTIONS,
};

struct RouteNode
{
	ActionType type;		// what needs to be done in this route section (walk?, use elevator?)
	int toArea;				// the target AAS area number
	int toCluster;			// the target AAS cluster number
	int elevator;			// the elevator number (is -1 if no elevator to be used in this node)
	int elevatorStation;	// The elevator station number of this position (-1 if unused)

	// Default constructor
	RouteNode();

	// Specialised constructor
	RouteNode(ActionType t, int goalArea, int goalCluster, int elevatorNum = -1, int elevatorStationNum = -1);

	// Copy constructor
	RouteNode(const RouteNode& other);

	bool operator==(const RouteNode& other) const;
	bool operator!=(const RouteNode& other) const;

	void Save(idSaveGame* savefile) const;
	void Restore(idRestoreGame* savefile);
};
typedef boost::shared_ptr<RouteNode> RouteNodePtr;
typedef std::list<RouteNodePtr> RouteNodeList;

} // namespace eas

#endif /* __AI_EAS_ROUTENODE_H__ */
