summaryrefslogtreecommitdiffstats
path: root/source/Defines.h
diff options
context:
space:
mode:
authorfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-06-13 20:14:20 +0200
committerfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-06-13 20:14:20 +0200
commit79f984144951b27b54dfc050e06cce89c4499441 (patch)
treeb0b17a2930ee0a3ea622fa3a68fc30324967ca7e /source/Defines.h
parentAdded a BlockToPickup hook for modifying pickups when a player breaks a block. (diff)
downloadcuberite-79f984144951b27b54dfc050e06cce89c4499441.tar
cuberite-79f984144951b27b54dfc050e06cce89c4499441.tar.gz
cuberite-79f984144951b27b54dfc050e06cce89c4499441.tar.bz2
cuberite-79f984144951b27b54dfc050e06cce89c4499441.tar.lz
cuberite-79f984144951b27b54dfc050e06cce89c4499441.tar.xz
cuberite-79f984144951b27b54dfc050e06cce89c4499441.tar.zst
cuberite-79f984144951b27b54dfc050e06cce89c4499441.zip
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