From 1efdc36b22532807d21a0beac94524e3eacfe7bc Mon Sep 17 00:00:00 2001 From: Kahrl Date: Sat, 21 Jan 2012 21:21:41 +0100 Subject: Inventory menu (with dragging) improved. Crafting is now handled via a IACTION_CRAFT inventory action. --- src/inventorymanager.h | 40 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) (limited to 'src/inventorymanager.h') diff --git a/src/inventorymanager.h b/src/inventorymanager.h index f6ae4feba..890d05168 100644 --- a/src/inventorymanager.h +++ b/src/inventorymanager.h @@ -92,6 +92,7 @@ public: #define IACTION_MOVE 0 #define IACTION_DROP 1 +#define IACTION_CRAFT 2 struct InventoryAction { @@ -99,7 +100,8 @@ struct InventoryAction virtual u16 getType() const = 0; virtual void serialize(std::ostream &os) const = 0; - virtual void apply(InventoryManager *mgr, ServerActiveObject *player) = 0; + virtual void apply(InventoryManager *mgr, ServerActiveObject *player, + IGameDef *gamedef) = 0; }; struct IMoveAction : public InventoryAction @@ -139,7 +141,7 @@ struct IMoveAction : public InventoryAction os<