summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/actions/actions.cpp13
-rw-r--r--src/actions/actions.h1
-rw-r--r--src/input/inputaction.h1
-rw-r--r--src/input/inputactionmap.h9
4 files changed, 24 insertions, 0 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp
index 0b501bdbf..135fec27f 100644
--- a/src/actions/actions.cpp
+++ b/src/actions/actions.cpp
@@ -1421,4 +1421,17 @@ impHandler(invToStorageHalf)
return true;
}
+impHandler(invToStorageAll1)
+{
+ Item *const item = getItemByInvIndex(event);
+ if (!item)
+ return true;
+
+ inventoryHandler->moveItem2(Inventory::INVENTORY,
+ item->getInvIndex(),
+ item->getQuantity() - 1,
+ Inventory::STORAGE);
+ return true;
+}
+
} // namespace Actions
diff --git a/src/actions/actions.h b/src/actions/actions.h
index 0ab312351..36daa9c21 100644
--- a/src/actions/actions.h
+++ b/src/actions/actions.h
@@ -101,6 +101,7 @@ namespace Actions
decHandler(invToStorage);
decHandler(invToStorage10);
decHandler(invToStorageHalf);
+ decHandler(invToStorageAll1);
} // namespace Actions
#undef decHandler
diff --git a/src/input/inputaction.h b/src/input/inputaction.h
index 2cbfe8ab1..044df1ab1 100644
--- a/src/input/inputaction.h
+++ b/src/input/inputaction.h
@@ -508,6 +508,7 @@ namespace InputAction
INV_TO_STORAGE,
INV_TO_STORAGE_10,
INV_TO_STORAGE_HALF,
+ INV_TO_STORAGE_ALL_1,
TOTAL
};
} // namespace InputAction
diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h
index 03a199e38..f8427e397 100644
--- a/src/input/inputactionmap.h
+++ b/src/input/inputactionmap.h
@@ -4315,6 +4315,15 @@ static const InputActionData inputActionData[InputAction::TOTAL] = {
InputCondition::INGAME,
"invtostoragehalf|invstoragehalf",
true},
+ {"keyInvToStorageAll1",
+ InputType::UNKNOWN, InputAction::NO_VALUE,
+ InputType::UNKNOWN, InputAction::NO_VALUE,
+ Input::GRP_DEFAULT,
+ &Actions::invToStorageAll1,
+ InputAction::NO_VALUE, 50,
+ InputCondition::INGAME,
+ "invtostorageall1|invstorageall1",
+ true},
};
#endif // INPUT_INPUTACTIONMAP_H