From 6a76c226e10e92c3e3339096f07f8ab065e2098b Mon Sep 17 00:00:00 2001 From: Kahrl Date: Thu, 12 Jan 2012 06:10:39 +0100 Subject: The huge item definition and item namespace unification patch (itemdef), see http://c55.me/minetest/wiki/doku.php?id=changes:itemdef --- src/materials.h | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'src/materials.h') diff --git a/src/materials.h b/src/materials.h index b25d047be..face7d5df 100644 --- a/src/materials.h +++ b/src/materials.h @@ -72,6 +72,29 @@ struct MaterialProperties void deSerialize(std::istream &is); }; +struct ToolDiggingProperties +{ + // time = basetime + sum(feature here * feature in MaterialProperties) + float full_punch_interval; + float basetime; + float dt_weight; + float dt_crackiness; + float dt_crumbliness; + float dt_cuttability; + float basedurability; + float dd_weight; + float dd_crackiness; + float dd_crumbliness; + float dd_cuttability; + + ToolDiggingProperties(float full_punch_interval_=2.0, + float a=0.75, float b=0, float c=0, float d=0, float e=0, + float f=50, float g=0, float h=0, float i=0, float j=0); + + void serialize(std::ostream &os); + void deSerialize(std::istream &is); +}; + struct DiggingProperties { bool diggable; @@ -87,7 +110,6 @@ struct DiggingProperties {} }; -struct ToolDiggingProperties; class INodeDefManager; DiggingProperties getDiggingProperties(const MaterialProperties *mp, -- cgit v1.2.3