2013-01-11 23:46:01 -05:00
|
|
|
|
2012-07-15 16:36:34 -04:00
|
|
|
#pragma once
|
|
|
|
|
2012-09-23 18:09:57 -04:00
|
|
|
#include "ItemHandler.h"
|
|
|
|
#include "../World.h"
|
|
|
|
#include "../Player.h"
|
2012-07-15 16:36:34 -04:00
|
|
|
|
2013-01-11 23:46:01 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class cItemLighterHandler :
|
|
|
|
public cItemHandler
|
2012-07-15 16:36:34 -04:00
|
|
|
{
|
|
|
|
public:
|
2013-01-11 23:46:01 -05:00
|
|
|
cItemLighterHandler(int a_ItemType) :
|
|
|
|
cItemHandler(a_ItemType)
|
2012-07-15 16:36:34 -04:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2013-01-11 23:46:01 -05:00
|
|
|
virtual bool OnItemUse(cWorld * a_World, cPlayer * a_Player, cItem * a_Item, int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace) override
|
2012-07-15 16:36:34 -04:00
|
|
|
{
|
2013-01-11 23:46:01 -05:00
|
|
|
if (a_BlockFace < 0)
|
2012-10-18 15:41:29 -04:00
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2012-07-15 16:36:34 -04:00
|
|
|
a_Player->UseEquippedItem();
|
|
|
|
|
2013-01-11 23:46:01 -05:00
|
|
|
AddFaceDirection(a_BlockX, a_BlockY, a_BlockZ, a_BlockFace);
|
2012-07-15 16:36:34 -04:00
|
|
|
|
2012-10-18 15:41:29 -04:00
|
|
|
a_World->SetBlock(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_FIRE, 0); //0 -> new fire TODO: Make Firesimulator use this
|
2012-07-15 16:36:34 -04:00
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
2013-01-11 23:46:01 -05:00
|
|
|
} ;
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-15 16:36:34 -04:00
|
|
|
|