diff options
Diffstat (limited to 'src/BlockInfo.h')
-rw-r--r-- | src/BlockInfo.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/BlockInfo.h b/src/BlockInfo.h index d42987794..adf370c13 100644 --- a/src/BlockInfo.h +++ b/src/BlockInfo.h @@ -70,6 +70,9 @@ public: /** Sound when placing this block */ AString m_PlaceSound; + /** Block's hardness. The greater the value the longer the player needs to break the block. */ + float m_Hardness; + // tolua_end /** Associated block handler. */ @@ -89,6 +92,7 @@ public: inline static bool CanBeTerraformed (BLOCKTYPE a_Type) { return Get(a_Type).m_CanBeTerraformed; } inline static float GetBlockHeight (BLOCKTYPE a_Type) { return Get(a_Type).m_BlockHeight; } inline static AString GetPlaceSound (BLOCKTYPE a_Type) { return Get(a_Type).m_PlaceSound; } + inline static float GetHardness (BLOCKTYPE a_Type) { return Get(a_Type).m_Hardness; } // tolua_end @@ -112,6 +116,7 @@ protected: , m_CanBeTerraformed(false) , m_BlockHeight(1.0) , m_PlaceSound("") + , m_Hardness(0.0f) , m_Handler(nullptr) {} |