summaryrefslogblamecommitdiffstats
path: root/src/Mobs/Villager.h
blob: 9502f387c41f8d124d5647449627e5eff28b8fa0 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                      


                          






                                 


                                              

                                  

                                                                   


                                                                         
                                                    
                                                        



                   

                            
 




   

#pragma once

#include "PassiveMonster.h"





class cVillager :
	public cPassiveMonster
{
	typedef cPassiveMonster super;
	
public:

	enum eVillagerType
	{
		vtFarmer     = 0,
		vtLibrarian  = 1,
		vtPriest     = 2,
		vtBlacksmith = 3,
		vtButcher    = 4,
		vtGeneric    = 5,
		vtMax
	} ;

	cVillager(eVillagerType VillagerType);

	CLASS_PROTODEF(cVillager);

	virtual void DoTakeDamage(TakeDamageInfo & a_TDI) override;
	virtual void Tick        (float a_Dt, cChunk & a_Chunk) override;

	void HandleFarmer();
	bool IsBlockFarmable(BLOCKTYPE a_BlockType);
	int GetVilType(void) const { return m_Type; }	

private:

	int m_Type;
	bool m_DidFindCrops;
	Vector3i m_CropsPos;

} ;