Added dispensers (they can't dispense items yet)
Fixed crash when digging snow Moved BlockPlace hook check, so Core plugin will no longer block item usage Player chat messages are now visible in the console git-svn-id: http://mc-server.googlecode.com/svn/trunk@1081 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include "SlotArea.h"
|
||||
#include "../Player.h"
|
||||
#include "../ChestEntity.h"
|
||||
#include "../DispenserEntity.h"
|
||||
#include "../FurnaceEntity.h"
|
||||
#include "../Items/ItemHandler.h"
|
||||
#include "Window.h"
|
||||
@@ -414,6 +415,53 @@ cCraftingRecipe & cSlotAreaCrafting::GetRecipeForPlayer(cPlayer & a_Player)
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// cSlotAreaFurnace:
|
||||
|
||||
cSlotAreaDispenser::cSlotAreaDispenser(cDispenserEntity * a_Dispenser, cWindow & a_ParentWindow) :
|
||||
cSlotArea(9, a_ParentWindow),
|
||||
m_Dispenser(a_Dispenser)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void cSlotAreaDispenser::Clicked(cPlayer & a_Player, int a_SlotNum, bool a_IsRightClick, bool a_IsShiftPressed, const cItem & a_ClickedItem)
|
||||
{
|
||||
super::Clicked(a_Player, a_SlotNum, a_IsRightClick, a_IsShiftPressed, a_ClickedItem);
|
||||
|
||||
if (m_Dispenser == NULL)
|
||||
{
|
||||
LOGERROR("cSlotAreaDispenser::Clicked(): m_Dispenser == NULL");
|
||||
ASSERT(!"cSlotAreaDispenser::Clicked(): m_Dispenser == NULL");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const cItem * cSlotAreaDispenser::GetSlot(int a_SlotNum, cPlayer & a_Player)
|
||||
{
|
||||
return m_Dispenser->GetSlot(a_SlotNum);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void cSlotAreaDispenser::SetSlot(int a_SlotNum, cPlayer & a_Player, const cItem & a_Item)
|
||||
{
|
||||
m_Dispenser->SetSlot(a_SlotNum, a_Item);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// cSlotAreaFurnace:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user