From 42e502e108b669142b17c09caacc06efc7205327 Mon Sep 17 00:00:00 2001 From: Trihedraf Date: Sat, 24 Dec 2022 10:52:35 -0800 Subject: [PATCH] Add key for using potions from belt Add key for using potions from belt like controller and virtual controller --- Source/diablo.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Source/diablo.cpp b/Source/diablo.cpp index c6b8614df..5f9e7fc4b 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -1606,6 +1606,22 @@ void InitKeymapActions() CanPlayerTakeAction, i + 1); } + sgOptions.Keymapper.AddAction( + "UseHealthPotion", + N_("Use health potion"), + N_("Use health potions from belt."), + SDLK_UNKNOWN, + [] { UseBeltItem(BLT_HEALING); }, + nullptr, + CanPlayerTakeAction); + sgOptions.Keymapper.AddAction( + "UseManaPotion", + N_("Use mana potion"), + N_("Use mana potions from belt."), + SDLK_UNKNOWN, + [] { UseBeltItem(BLT_MANA); }, + nullptr, + CanPlayerTakeAction); sgOptions.Keymapper.AddAction( "DisplaySpells", N_("Speedbook"),