mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add IDropAction and related stuff
This commit is contained in:
parent
82a460ec90
commit
f42c57d9a8
7 changed files with 229 additions and 17 deletions
14
src/game.cpp
14
src/game.cpp
|
@ -1215,9 +1215,19 @@ void the_game(
|
|||
input->step(dtime);
|
||||
|
||||
/*
|
||||
Launch menus according to keys
|
||||
Launch menus and trigger stuff according to keys
|
||||
*/
|
||||
if(input->wasKeyDown(getKeySetting("keymap_inventory")))
|
||||
if(input->wasKeyDown(getKeySetting("keymap_drop")))
|
||||
{
|
||||
// drop selected item
|
||||
IDropAction *a = new IDropAction();
|
||||
a->count = 0;
|
||||
a->from_inv = "current_player";
|
||||
a->from_list = "main";
|
||||
a->from_i = g_selected_item;
|
||||
client.inventoryAction(a);
|
||||
}
|
||||
else if(input->wasKeyDown(getKeySetting("keymap_inventory")))
|
||||
{
|
||||
infostream<<"the_game: "
|
||||
<<"Launching inventory"<<std::endl;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue