From 17a96c972cd483fa556a79c4cd60e5d7490177a4 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 26 Aug 2014 21:29:18 +0300 Subject: Move chat command /uptime into actions. --- src/input/inputaction.h | 1 + src/input/inputactionmap.h | 11 ++++++++++- src/input/pages/other.cpp | 6 ++++++ 3 files changed, 17 insertions(+), 1 deletion(-) (limited to 'src/input') diff --git a/src/input/inputaction.h b/src/input/inputaction.h index ec410f8f0..028b384bb 100644 --- a/src/input/inputaction.h +++ b/src/input/inputaction.h @@ -388,6 +388,7 @@ namespace InputAction DIRS, INFO, WAIT, + UPTIME, TOTAL }; } // namespace InputAction diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h index 7a7b148cd..ce06d13fe 100644 --- a/src/input/inputactionmap.h +++ b/src/input/inputactionmap.h @@ -3261,7 +3261,16 @@ static const InputActionData inputActionData[InputAction::TOTAL] = { InputAction::NO_VALUE, 50, InputCondition::INGAME, "wait", - true} + true}, + {"keyUptime", + InputType::UNKNOWN, InputAction::NO_VALUE, + InputType::UNKNOWN, InputAction::NO_VALUE, + Input::GRP_DEFAULT, + &Actions::uptime, + InputAction::NO_VALUE, 50, + InputCondition::INGAME, + "uptime", + false}, }; #endif // INPUT_INPUTACTIONMAP_H diff --git a/src/input/pages/other.cpp b/src/input/pages/other.cpp index f730db629..4931c1216 100644 --- a/src/input/pages/other.cpp +++ b/src/input/pages/other.cpp @@ -273,6 +273,12 @@ SetupActionData setupActionDataOther[] = InputAction::DIRS, "", }, + { + // TRANSLATORS: input action name + N_("Print client uptime in chat"), + InputAction::UPTIME, + "", + }, { "", InputAction::NO_VALUE, -- cgit v1.2.3-70-g09d2