1
0

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:
madmaxoft@gmail.com
2013-05-26 20:52:39 +00:00
parent 46ce9df7d9
commit edbc2790e3
9 changed files with 142 additions and 87 deletions

View File

@@ -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);