70 return (
p == other.
p);
78 return !(*
this == other);
87 std::string
dump()
const;
162 os <<
"MoveSomewhere ";
248 std::vector<ItemStack> &output_replacements,
249 bool decrementInput,
IGameDef *gamedef);
Definition inventorymanager.h:96
virtual void inventoryAction(InventoryAction *a)
Definition inventorymanager.h:106
virtual void setInventoryModified(const InventoryLocation &loc)
Definition inventorymanager.h:104
InventoryManager()=default
virtual ~InventoryManager()=default
virtual Inventory * getInventory(const InventoryLocation &loc)
Definition inventorymanager.h:102
Definition inventory.h:314
Definition serveractiveobject.h:41
bool getCraftingResult(Inventory *inv, ItemStack &result, std::vector< ItemStack > &output_replacements, bool decrementInput, IGameDef *gamedef)
Definition inventorymanager.cpp:985
IAction
Definition inventorymanager.h:109
core::vector3d< s16 > v3s16
Definition irr_v3d.h:13
Definition inventorymanager.h:220
void serialize(std::ostream &os) const
Definition inventorymanager.h:234
IAction getType() const
Definition inventorymanager.h:229
u16 count
Definition inventorymanager.h:222
void clientApply(InventoryManager *mgr, IGameDef *gamedef)
Definition inventorymanager.cpp:977
void apply(InventoryManager *mgr, ServerActiveObject *player, IGameDef *gamedef)
Definition inventorymanager.cpp:864
InventoryLocation craft_inv
Definition inventorymanager.h:223
Definition inventorymanager.h:192
void serialize(std::ostream &os) const
Definition inventorymanager.h:205
IAction getType() const
Definition inventorymanager.h:200
void clientApply(InventoryManager *mgr, IGameDef *gamedef)
Definition inventorymanager.cpp:822
void apply(InventoryManager *mgr, ServerActiveObject *player, IGameDef *gamedef)
Definition inventorymanager.cpp:671
u16 count
Definition inventorymanager.h:194
Definition inventorymanager.h:138
int allowMove(int try_take_count, ServerActiveObject *player) const
Definition inventorymanager.cpp:219
void clientApply(InventoryManager *mgr, IGameDef *gamedef)
Definition inventorymanager.cpp:620
void swapDirections()
Definition inventorymanager.cpp:143
void onMove(int count, ServerActiveObject *player) const
Definition inventorymanager.cpp:176
u32 move_count
Definition inventorymanager.h:146
IAction getType() const
Definition inventorymanager.h:152
int allowPut(const ItemStack &dst_item, ServerActiveObject *player) const
Definition inventorymanager.cpp:189
bool move_somewhere
Definition inventorymanager.h:141
int allowTake(const ItemStack &src_item, ServerActiveObject *player) const
Definition inventorymanager.cpp:204
void apply(InventoryManager *mgr, ServerActiveObject *player, IGameDef *gamedef)
Definition inventorymanager.cpp:234
void onTake(const ItemStack &src_item, ServerActiveObject *player) const
Definition inventorymanager.cpp:150
void onPut(const ItemStack &src_item, ServerActiveObject *player) const
Definition inventorymanager.cpp:163
void serialize(std::ostream &os) const
Definition inventorymanager.h:157
bool caused_by_move_somewhere
Definition inventorymanager.h:145
u16 count
Definition inventorymanager.h:140
Definition inventorymanager.h:116
virtual IAction getType() const =0
virtual void serialize(std::ostream &os) const =0
virtual ~InventoryAction()=default
virtual void clientApply(InventoryManager *mgr, IGameDef *gamedef)=0
virtual void apply(InventoryManager *mgr, ServerActiveObject *player, IGameDef *gamedef)=0
static InventoryAction * deSerialize(std::istream &is)
Definition inventorymanager.cpp:92
Definition inventorymanager.h:18
void setCurrentPlayer()
Definition inventorymanager.h:38
std::string dump() const
Definition inventorymanager.cpp:24
enum InventoryLocation::Type type
bool operator!=(const InventoryLocation &other) const
Definition inventorymanager.h:76
void setUndefined()
Definition inventorymanager.h:34
void setNodeMeta(const v3s16 &p_)
Definition inventorymanager.h:47
InventoryLocation()
Definition inventorymanager.h:30
void setPlayer(const std::string &name_)
Definition inventorymanager.h:42
v3s16 p
Definition inventorymanager.h:28
void serialize(std::ostream &os) const
Definition inventorymanager.cpp:31
void applyCurrentPlayer(const std::string &name_)
Definition inventorymanager.h:81
bool operator==(const InventoryLocation &other) const
Definition inventorymanager.h:58
void deSerialize(std::istream &is)
Definition inventorymanager.cpp:54
std::string name
Definition inventorymanager.h:27
void setDetached(const std::string &name_)
Definition inventorymanager.h:52
Type
Definition inventorymanager.h:19
@ CURRENT_PLAYER
Definition inventorymanager.h:21
@ DETACHED
Definition inventorymanager.h:24
@ UNDEFINED
Definition inventorymanager.h:20
@ PLAYER
Definition inventorymanager.h:22
@ NODEMETA
Definition inventorymanager.h:23
Definition inventory.h:19
Definition inventorymanager.h:128
InventoryLocation from_inv
Definition inventorymanager.h:129
std::string to_list
Definition inventorymanager.h:133
s16 from_i
Definition inventorymanager.h:131
InventoryLocation to_inv
Definition inventorymanager.h:132
s16 to_i
Definition inventorymanager.h:134
std::string from_list
Definition inventorymanager.h:130