Fixed cItemGrid API, no more changeable GetSlot().
Also fixed possible water and lava duplication glitches in the dispenser. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1520 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
@@ -81,15 +81,6 @@ const cItem & cItemGrid::GetSlot(int a_X, int a_Y) const
|
||||
|
||||
|
||||
|
||||
cItem & cItemGrid::GetSlot(int a_X, int a_Y)
|
||||
{
|
||||
return GetSlot(GetSlotNum(a_X, a_Y));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const cItem & cItemGrid::GetSlot(int a_SlotNum) const
|
||||
{
|
||||
if ((a_SlotNum < 0) || (a_SlotNum >= m_NumSlots))
|
||||
@@ -106,22 +97,6 @@ const cItem & cItemGrid::GetSlot(int a_SlotNum) const
|
||||
|
||||
|
||||
|
||||
cItem & cItemGrid::GetSlot(int a_SlotNum)
|
||||
{
|
||||
if ((a_SlotNum < 0) || (a_SlotNum >= m_NumSlots))
|
||||
{
|
||||
LOGWARNING("%s: Invalid slot number, %d out of %d slots",
|
||||
__FUNCTION__, a_SlotNum, m_NumSlots
|
||||
);
|
||||
return m_Slots[0];
|
||||
}
|
||||
return m_Slots[a_SlotNum];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void cItemGrid::SetSlot(int a_X, int a_Y, const cItem & a_Item)
|
||||
{
|
||||
SetSlot(GetSlotNum(a_X, a_Y), a_Item);
|
||||
|
||||
Reference in New Issue
Block a user