From 8c43857b739566be1e59d61aec192ef63e77cbb1 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sat, 8 Sep 2012 16:08:29 +0000 Subject: Added the ItemToString() and ItemTypeToString() functions. Ref.: http://forum.mc-server.org/showthread.php?tid=434&pid=4506#pid4506 git-svn-id: http://mc-server.googlecode.com/svn/trunk@847 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/BlockID.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source/BlockID.h') diff --git a/source/BlockID.h b/source/BlockID.h index a66e7f026..5833a6d1d 100644 --- a/source/BlockID.h +++ b/source/BlockID.h @@ -631,6 +631,12 @@ extern BLOCKTYPE BlockStringToType(const AString & a_BlockTypeString); // tolua /// Translates an itemtype string into an item. Takes either a number, number^number, number:number or an items.ini alias as input. Returns true if successful. extern bool StringToItem(const AString & a_ItemTypeString, cItem & a_Item); // tolua_export +/// Translates a full item into a string. If the ItemType is not recognized, the ItemType number is output into the string. +extern AString ItemToString(const cItem & a_Item); // tolua_export + +/// Translates itemtype into a string. If the type is not recognized, the itemtype number is output into the string. +extern AString ItemTypeToString(short a_ItemType); // tolua_export + /// Translates a biome string to biome enum. Takes either a number or a biome alias (built-in). Returns -1 on failure. extern EMCSBiome StringToBiome(const AString & a_BiomeString); @@ -645,7 +651,7 @@ extern bool g_BlockTransparent[256]; extern bool g_BlockOneHitDig[256]; extern bool g_BlockPistonBreakable[256]; extern bool g_BlockIsSnowable[256]; -extern bool g_BlockRequiresSpecialTool[256]; +extern bool g_BlockRequiresSpecialTool[256]; -- cgit v1.2.3