summaryrefslogtreecommitdiffstats
path: root/source/Defines.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/Defines.h')
-rw-r--r--source/Defines.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/source/Defines.h b/source/Defines.h
index 444aef683..fae466e4a 100644
--- a/source/Defines.h
+++ b/source/Defines.h
@@ -192,7 +192,7 @@ inline float GetSpecialSignf( float a_Val )
-
+//tolua_begin
namespace ItemCategory
{
inline bool IsPickaxe(ENUM_ITEM_ID a_ItemID)
@@ -247,10 +247,21 @@ namespace ItemCategory
|| (a_ItemID == E_ITEM_GOLD_SHOVEL)
|| (a_ItemID == E_ITEM_DIAMOND_SHOVEL);
}
-}
+ inline bool IsTool(ENUM_ITEM_ID a_ItemID)
+ {
+ return IsPickaxe( a_ItemID )
+ || IsAxe ( a_ItemID )
+ || IsSword ( a_ItemID )
+ || IsHoe ( a_ItemID )
+ || IsShovel ( a_ItemID );
+ }
+}
+//tolua_end
+
+
//tolua_begin