summaryrefslogtreecommitdiffstats
path: root/src/UI
diff options
context:
space:
mode:
Diffstat (limited to 'src/UI')
-rw-r--r--src/UI/Window.cpp28
-rw-r--r--src/UI/Window.h3
2 files changed, 30 insertions, 1 deletions
diff --git a/src/UI/Window.cpp b/src/UI/Window.cpp
index fd80a017d..d83336f75 100644
--- a/src/UI/Window.cpp
+++ b/src/UI/Window.cpp
@@ -58,6 +58,34 @@ cWindow::~cWindow()
+const AString cWindow::GetWindowTypeName(void) const
+{
+ switch (m_WindowType)
+ {
+ case wtChest: return "minecraft:chest";
+ case wtWorkbench: return "minecraft:crafting_table";
+ case wtFurnace: return "minecraft:furnace";
+ case wtDropSpenser: return "minecraft:dispenser";
+ case wtEnchantment: return "minecraft:enchanting_table";
+ case wtBrewery: return "minecraft:brewing_stand";
+ case wtNPCTrade: return "minecraft:villager";
+ case wtBeacon: return "minecraft:beacon";
+ case wtAnvil: return "minecraft:anvil";
+ case wtHopper: return "minecraft:hopper";
+ case wtDropper: return "minecraft:dropper";
+ case wtAnimalChest: return "EntityHorse";
+ default:
+ {
+ ASSERT(!"Unknown inventory type!");
+ return "";
+ }
+ }
+}
+
+
+
+
+
int cWindow::GetNumSlots(void) const
{
int res = 0;
diff --git a/src/UI/Window.h b/src/UI/Window.h
index f47cf4b99..6b6dce346 100644
--- a/src/UI/Window.h
+++ b/src/UI/Window.h
@@ -64,7 +64,7 @@ public:
wtBeacon = 7,
wtAnvil = 8,
wtHopper = 9,
- // Unknown: 10
+ wtDropper = 10,
wtAnimalChest = 11,
};
@@ -77,6 +77,7 @@ public:
char GetWindowID(void) const { return m_WindowID; } // tolua_export
int GetWindowType(void) const { return m_WindowType; } // tolua_export
+ const AString GetWindowTypeName(void) const; // tolua_export
cWindowOwner * GetOwner(void) { return m_Owner; }
void SetOwner( cWindowOwner * a_Owner) { m_Owner = a_Owner; }