diff --git a/src/guiInventoryMenu.cpp b/src/guiInventoryMenu.cpp index 165d4d8..7d49aca 100644 --- a/src/guiInventoryMenu.cpp +++ b/src/guiInventoryMenu.cpp @@ -27,6 +27,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include #include #include +#include "log.h" void drawInventoryItem(video::IVideoDriver *driver, gui::IGUIFont *font, @@ -326,11 +327,11 @@ bool GUIInventoryMenu::OnEvent(const SEvent& event) if(amount >= 0) { v2s32 p(event.MouseInput.X, event.MouseInput.Y); - //dstream<<"Mouse down at p=("<getList(s.listname); if(list_from == NULL) - dstream<<"from list doesn't exist"<getItem(m_selected_item->i) != NULL) { - dstream<<"Handing IACTION_MOVE to manager"<count = amount; a->from_inv = m_selected_item->inventoryname; @@ -408,7 +409,7 @@ bool GUIInventoryMenu::OnEvent(const SEvent& event) { if(!canTakeFocus(event.GUIEvent.Element)) { - dstream<<"GUIInventoryMenu: Not allowing focus change." + infostream<<"GUIInventoryMenu: Not allowing focus change." <current_player == NULL) + return "current_player=NULL"; + else + return std::string("current_player=") + c->current_player->getName(); +} + void IMoveAction::apply(InventoryContext *c, InventoryManager *mgr) { -#if 1 - - /*dstream<<"from_inv="<getList(from_list); InventoryList *list_to = inv_to->getList(to_list); - /*dstream<<"list_from="<getItem(from_i)="<getItem(from_i) - <getItem(to_i)="<getItem(to_i) - <getItem(from_i) == NULL) { - dstream<<__FUNCTION_NAME<<": Operation not allowed " - <<"(the source item doesn't exist)" - <