summaryrefslogtreecommitdiff
path: root/src/inventorymanager.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/inventorymanager.h')
-rw-r--r--src/inventorymanager.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/inventorymanager.h b/src/inventorymanager.h
index 9ae92e5f4..30a82d4bf 100644
--- a/src/inventorymanager.h
+++ b/src/inventorymanager.h
@@ -134,16 +134,20 @@ struct InventoryAction
virtual ~InventoryAction() = default;;
};
-struct IMoveAction : public InventoryAction
+struct MoveAction
{
- // count=0 means "everything"
- u16 count = 0;
InventoryLocation from_inv;
std::string from_list;
s16 from_i = -1;
InventoryLocation to_inv;
std::string to_list;
s16 to_i = -1;
+};
+
+struct IMoveAction : public InventoryAction, public MoveAction
+{
+ // count=0 means "everything"
+ u16 count = 0;
bool move_somewhere = false;
// treat these as private
@@ -181,13 +185,10 @@ struct IMoveAction : public InventoryAction
void clientApply(InventoryManager *mgr, IGameDef *gamedef);
};
-struct IDropAction : public InventoryAction
+struct IDropAction : public InventoryAction, public MoveAction
{
// count=0 means "everything"
u16 count = 0;
- InventoryLocation from_inv;
- std::string from_list;
- s16 from_i = -1;
IDropAction() = default;