//----------------------------------------------------------------------
// File			: ToolsAVP_Entity_MarineSquad.h
// Created		: 01 / 11 / 07
// Created By	: Gareth Thomas
// Copyright (C) 2007 Rebellion. All Rights Reserved.
//----------------------------------------------------------------------

//----------------------------------------------------------------------
// BEGIN FILE WRAPPER
//----------------------------------------------------------------------
#ifdef ASURA_USE_PRAGMA_ONCE
#pragma once
#endif
#ifndef __TOOLSAVP_ENTITY_MARINESQUAD_H__
#define __TOOLSAVP_ENTITY_MARINESQUAD_H__ 1
//----------------------------------------------------------------------
// END FILE WRAPPER
//----------------------------------------------------------------------

//----------------------------------------------------------------------
// INCLUDES
//----------------------------------------------------------------------

#include "Entity/Controller/ToolsAVP_Entity_Squad.h"
#include "Objects/Tools_Object_System.h"

//----------------------------------------------------------------------
// FORWARD DECLARATIONS
//----------------------------------------------------------------------
class AVP_ServerEntity_Squad_Marine;
class ToolsAVP_Entity_Human;

//----------------------------------------------------------------------
// ToolsAVP_Entity_MarineSquad
//----------------------------------------------------------------------
class ToolsAVP_Entity_MarineSquad : public ToolsAVP_Entity_Squad
{
	typedef ToolsAVP_Entity_Squad PARENT;

public:

	enum {MAX_SQUAD_MEMBERS = 8};

	ToolsAVP_Entity_MarineSquad( Asura_Entity* pxEntity );
	virtual ~ToolsAVP_Entity_MarineSquad();

	// public virtuals
	virtual const char* GetTypeDescription			(void)							{return "Marine Squad";}
	virtual bool        CanBeCopied					(void)							{return false;}
	virtual void		OnDeselection				(void);
	virtual void		OnSelection					(void);
	virtual void		UpdateWhileSelected			(void);
	virtual void		Update						(void);
	virtual	void		Render						(void);
	virtual bool        HandlesThisMessage			(int iMessageID);
	virtual bool		HandlesThisEvent			(int iEventID) const;
	virtual void		AddOverlayControls			(Asura_Overlay* pxNewOverlay, Asura_Vector_2& xOffset);

	// public  statics
	static void			Project_Create				(void);

	static const Asura_Hashed_List<ToolsAVP_Entity_MarineSquad>* GetList(void)					{return &s_xList;}
	static ToolsAVP_Entity_MarineSquad* FindEntity( Asura_Guid uGuid ) { return s_xList.FindEntity( uGuid ); }

	static void	Create();
	static Tools_Object* Create(Asura_Entity* pxEntity);

	static ToolsAVP_Entity_MarineSquad* s_pxToolsMarineSquad;

protected:

	static void			SelectMarineTeam( void );
	static void			SelectGPVForCombatZone( void );
	static void			SelectCombatZoneGPV( void );
	static void			ClearCombatZoneGPV( void );
	static void			SetCombatZoneGPVGuid( Asura_Guid uGuid );

private:

	// Entity Pointer
	AVP_ServerEntity_Squad_Marine*	m_pxMarineSquad;

	static Asura_Hashed_List<ToolsAVP_Entity_MarineSquad>	s_xList;

	
	static bool						s_bSquadChanged;
	static bool						s_bAILedSquadChanged;
	static bool						s_bIngoreAlertStateChanged;
	static bool						s_bCombatZoneRestrictionChanged;

	bool							m_bIsPlayersSquad;
	bool							m_bIsAILedPlayersSquad;
	bool							m_bIgnoreAlertState;
	bool							m_bRestrictToCombatZone;
	Asura_Guid						m_uCombatzoneGPVGuid;
	int								m_iSquadCombatState;
	bool							m_bCombatStateChanged;
};




#endif //__TOOLSAVP_ENTITY_MARINESQUAD_H__
