1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Raise hotbar limit to 32 slots, add associated keybinding options (#7916)

add associated keybinding options
update docs and settingtypes
This commit is contained in:
Vanessa Dannenberg 2018-12-02 17:34:29 -05:00 committed by sfan5
parent 42166fff74
commit 1b0fd195c6
7 changed files with 65 additions and 11 deletions

View file

@ -68,6 +68,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "irrlicht_changes/static_text.h"
#include "version.h"
#include "script/scripting_client.h"
#include "hud.h"
#if USE_SOUND
#include "client/sound_openal.h"
@ -2004,12 +2005,10 @@ void Game::processItemSelection(u16 *new_playeritem)
/* Item selection using hotbar slot keys
*/
for (u16 i = 0; i < 23; i++) {
for (u16 i = 0; i <= max_item; i++) {
if (wasKeyDown((GameKeyType) (KeyType::SLOT_1 + i))) {
if (i < PLAYER_INVENTORY_SIZE && i < player->hud_hotbar_itemcount) {
*new_playeritem = i;
infostream << "Selected item: " << new_playeritem << std::endl;
}
*new_playeritem = i;
infostream << "Selected item: " << new_playeritem << std::endl;
break;
}
}