#include <mock_inventorymanager.h>
Public Member Functions | |
MockInventoryManager (IGameDef *gamedef) | |
Inventory * | getInventory (const InventoryLocation &loc) override |
void | setInventoryModified (const InventoryLocation &loc) override |
Public Member Functions inherited from ServerInventoryManager | |
ServerInventoryManager () | |
virtual | ~ServerInventoryManager ()=default |
void | setEnv (ServerEnvironment *env) |
Inventory * | createDetachedInventory (const std::string &name, IItemDefManager *idef, const std::string &player="") |
bool | removeDetachedInventory (const std::string &name) |
bool | checkDetachedInventoryAccess (const InventoryLocation &loc, const std::string &player) const |
void | sendDetachedInventories (const std::string &peer_name, bool incremental, std::function< void(const std::string &, Inventory *)> apply_cb) |
Public Member Functions inherited from InventoryManager | |
InventoryManager ()=default | |
virtual | ~InventoryManager ()=default |
virtual void | inventoryAction (InventoryAction *a) |
Public Attributes | |
Inventory | p1 |
Inventory | p2 |
Additional Inherited Members | |
Protected Attributes inherited from ServerInventoryManager | |
ServerEnvironment * | m_env = nullptr |
std::unordered_map< std::string, DetachedInventory > | m_detached_inventories |
|
inline |
|
inlineoverridevirtual |
Reimplemented from ServerInventoryManager.
References InventoryLocation::name, p1, p2, InventoryLocation::PLAYER, and InventoryLocation::type.
|
inlineoverridevirtual |
Reimplemented from ServerInventoryManager.
Inventory MockInventoryManager::p1 |
Referenced by getInventory(), TestMoveAction::testCallbacks(), TestMoveAction::testCallbacksSwap(), TestMoveAction::testMove(), TestMoveAction::testMoveFillStack(), TestMoveAction::testMovePartial(), TestMoveAction::testMoveSomewhere(), TestMoveAction::testMoveSomewherePartial(), TestMoveAction::testMoveUnallowed(), TestMoveAction::testSwap(), TestMoveAction::testSwapFromUnallowed(), and TestMoveAction::testSwapToUnallowed().
Inventory MockInventoryManager::p2 |
Referenced by getInventory(), TestMoveAction::testCallbacks(), TestMoveAction::testCallbacksSwap(), TestMoveAction::testMove(), TestMoveAction::testMovePartial(), TestMoveAction::testMoveSomewhere(), TestMoveAction::testMoveSomewherePartial(), TestMoveAction::testMoveUnallowed(), TestMoveAction::testSwap(), TestMoveAction::testSwapFromUnallowed(), and TestMoveAction::testSwapToUnallowed().