summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/actions/commands.cpp13
-rw-r--r--src/actions/commands.h1
-rw-r--r--src/dyetool/actions/commands.cpp2
-rw-r--r--src/enums/input/inputaction.h1
-rw-r--r--src/input/inputactionmap.h6
5 files changed, 22 insertions, 1 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp
index a87db0a16..84011b3ec 100644
--- a/src/actions/commands.cpp
+++ b/src/actions/commands.cpp
@@ -41,9 +41,10 @@
#endif
#include "gui/windows/chatwindow.h"
+#include "gui/windows/inventorywindow.h"
+#include "gui/windows/outfitwindow.h"
#include "gui/windows/skilldialog.h"
#include "gui/windows/socialwindow.h"
-#include "gui/windows/outfitwindow.h"
#include "gui/widgets/tabs/chat/whispertab.h"
@@ -1122,4 +1123,14 @@ impHandler(skill)
return true;
}
+impHandler(craft)
+{
+ const std::string args = event.args;
+ if (args.empty() || !inventoryWindow)
+ return false;
+
+ inventoryWindow->moveItemToCraft(atoi(args.c_str()));
+ return true;
+}
+
} // namespace Actions
diff --git a/src/actions/commands.h b/src/actions/commands.h
index 6eceaa208..d901683b1 100644
--- a/src/actions/commands.h
+++ b/src/actions/commands.h
@@ -92,6 +92,7 @@ namespace Actions
decHandler(slide);
decHandler(selectSkillLevel);
decHandler(skill);
+ decHandler(craft);
} // namespace Actions
#undef decHandler
diff --git a/src/dyetool/actions/commands.cpp b/src/dyetool/actions/commands.cpp
index ccee0836e..44ff371d6 100644
--- a/src/dyetool/actions/commands.cpp
+++ b/src/dyetool/actions/commands.cpp
@@ -92,4 +92,6 @@ impHandlerVoid(serverConfGet)
impHandlerVoid(slide)
impHandlerVoid(selectSkillLevel)
impHandlerVoid(skill)
+impHandlerVoid(craft)
+
} // namespace Actions
diff --git a/src/enums/input/inputaction.h b/src/enums/input/inputaction.h
index 1b004f93b..f5fa6b675 100644
--- a/src/enums/input/inputaction.h
+++ b/src/enums/input/inputaction.h
@@ -616,6 +616,7 @@ enumStart(InputAction)
CRAFT_7,
CRAFT_8,
CRAFT_9,
+ CRAFT,
TOTAL
}
enumEnd(InputAction);
diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h
index f76e8cb53..1daf6f856 100644
--- a/src/input/inputactionmap.h
+++ b/src/input/inputactionmap.h
@@ -5185,6 +5185,12 @@ static const InputActionData inputActionData
"",
UseArgs_false,
Protected_true},
+ {"keyCraft",
+ defaultAction(&Actions::craft),
+ InputCondition::INGAME,
+ "craft",
+ UseArgs_true,
+ Protected_true},
};
#undef defaultAction