summaryrefslogtreecommitdiff
path: root/src/inventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r--src/inventory.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp
index a913430e6..e9600ece5 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -354,6 +354,15 @@ bool ToolItem::isKnown() const
CraftItem
*/
+CraftItem::CraftItem(IGameDef *gamedef, std::string subname, u16 count):
+ InventoryItem(gamedef, count)
+{
+ // Convert directly to the correct name through aliases.
+ // This is necessary because CraftItem callbacks are stored in
+ // Lua refenced by their correct name
+ m_subname = gamedef->cidef()->getAlias(subname);
+}
+
#ifndef SERVER
video::ITexture * CraftItem::getImage() const
{