From 4a6ffbd08067b64143e0535518a3822953943d80 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 9 Dec 2014 13:10:54 +0300 Subject: Add buy action. New chat command: /buy [name] --- src/input/inputaction.h | 1 + src/input/inputactionmap.h | 9 +++++++++ src/input/pages/basic.cpp | 6 ++++++ 3 files changed, 16 insertions(+) (limited to 'src/input') diff --git a/src/input/inputaction.h b/src/input/inputaction.h index 91c49ebc6..7187e2914 100644 --- a/src/input/inputaction.h +++ b/src/input/inputaction.h @@ -490,6 +490,7 @@ namespace InputAction PREV_INV_TAB, NEXT_INV_TAB, CONTEXT_MENU, + BUY, TOTAL }; } // namespace InputAction diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h index 585334713..2a8904503 100644 --- a/src/input/inputactionmap.h +++ b/src/input/inputactionmap.h @@ -4153,6 +4153,15 @@ static const InputActionData inputActionData[InputAction::TOTAL] = { | InputCondition::NOMODAL | InputCondition::INGAME, "contextmenu", false}, + {"keyBuy", + InputType::UNKNOWN, InputAction::NO_VALUE, + InputType::UNKNOWN, InputAction::NO_VALUE, + Input::GRP_DEFAULT, + &Actions::buy, + InputAction::NO_VALUE, 50, + InputCondition::GAME, + "buy", + false}, }; #endif // INPUT_INPUTACTIONMAP_H diff --git a/src/input/pages/basic.cpp b/src/input/pages/basic.cpp index c4b0db2d3..f514d388b 100644 --- a/src/input/pages/basic.cpp +++ b/src/input/pages/basic.cpp @@ -235,6 +235,12 @@ SetupActionData setupActionDataBasic[] = InputAction::HOMUNCULUS_FIRE, "", }, + { + // TRANSLATORS: input action name + N_("Buy"), + InputAction::BUY, + "", + }, { // TRANSLATORS: input action name N_("Open context menu"), -- cgit v1.2.3-60-g2f50