From 2c1fd29884adec17564d39c0f7792633cbc55f9a Mon Sep 17 00:00:00 2001 From: est31 Date: Sat, 20 Jun 2015 12:55:48 +0200 Subject: Add MoveSomewhere inventory action Improve shift+click experience --- src/inventorymanager.h | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) (limited to 'src/inventorymanager.h') diff --git a/src/inventorymanager.h b/src/inventorymanager.h index a255e979a..bbeb5117c 100644 --- a/src/inventorymanager.h +++ b/src/inventorymanager.h @@ -143,15 +143,24 @@ struct IMoveAction : public InventoryAction InventoryLocation to_inv; std::string to_list; s16 to_i; + bool move_somewhere; + + // treat these as private + // related to movement to somewhere + bool caused_by_move_somewhere; + u32 move_count; IMoveAction() { count = 0; from_i = -1; to_i = -1; + move_somewhere = false; + caused_by_move_somewhere = false; + move_count = 0; } - IMoveAction(std::istream &is); + IMoveAction(std::istream &is, bool somewhere); u16 getType() const { @@ -160,14 +169,18 @@ struct IMoveAction : public InventoryAction void serialize(std::ostream &os) const { - os<<"Move "; - os<