diff options
-rw-r--r-- | src/actions/actions.cpp | 13 | ||||
-rw-r--r-- | src/actions/actions.h | 1 | ||||
-rw-r--r-- | src/input/inputaction.h | 1 | ||||
-rw-r--r-- | src/input/inputactionmap.h | 9 |
4 files changed, 24 insertions, 0 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp index bc641d331..165a9add0 100644 --- a/src/actions/actions.cpp +++ b/src/actions/actions.cpp @@ -1390,4 +1390,17 @@ impHandler(useItemInv) return true; } +impHandler(invToStorage) +{ + const int index = atoi(event.args.c_str()); + const Inventory *const inv = PlayerInfo::getInventory(); + if (inv) + { + Item *const item = inv->getItem(index); + ItemAmountWindow::showWindow(ItemAmountWindow::StoreAdd, + inventoryWindow, item); + } + return true; +} + } // namespace Actions diff --git a/src/actions/actions.h b/src/actions/actions.h index 5d7482642..eaf900fbe 100644 --- a/src/actions/actions.h +++ b/src/actions/actions.h @@ -98,6 +98,7 @@ namespace Actions decHandler(mercenaryFire); decHandler(useItem); decHandler(useItemInv); + decHandler(invToStorage); } // namespace Actions #undef decHandler diff --git a/src/input/inputaction.h b/src/input/inputaction.h index 12f989a07..dc63508d3 100644 --- a/src/input/inputaction.h +++ b/src/input/inputaction.h @@ -505,6 +505,7 @@ namespace InputAction DROP_INV, DROP_INV_ALL, USE_INV, + INV_TO_STORAGE, TOTAL }; } // namespace InputAction diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h index b27b9755a..b23032728 100644 --- a/src/input/inputactionmap.h +++ b/src/input/inputactionmap.h @@ -4288,6 +4288,15 @@ static const InputActionData inputActionData[InputAction::TOTAL] = { InputCondition::INGAME, "useinv", true}, + {"keyInvToStorage", + InputType::UNKNOWN, InputAction::NO_VALUE, + InputType::UNKNOWN, InputAction::NO_VALUE, + Input::GRP_DEFAULT, + &Actions::invToStorage, + InputAction::NO_VALUE, 50, + InputCondition::INGAME, + "invtostorage|invstorage", + true}, }; #endif // INPUT_INPUTACTIONMAP_H |