diff options
author | Kahrl <kahrl@gmx.net> | 2012-01-21 00:11:44 +0100 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2012-01-22 17:24:50 +0200 |
commit | 157a4cf18cb9c098f465b8baecd7d2cd5705f2dd (patch) | |
tree | a194b86e0452d1dc892aec6b3ac940327ce85e2a /src/materials.cpp | |
parent | f22c73f50169b978f13c0b6511805b9d4a1a6871 (diff) | |
download | minetest-157a4cf18cb9c098f465b8baecd7d2cd5705f2dd.tar.gz minetest-157a4cf18cb9c098f465b8baecd7d2cd5705f2dd.tar.bz2 minetest-157a4cf18cb9c098f465b8baecd7d2cd5705f2dd.zip |
Node placement / mineral / serialization / iron freq / node_dig callback
- Node placement code moved to Lua
- Mineral system removed (added default:stone_with_coal and default:stone_with_iron).
- MapBlock and MapNode serialization updated.
- Mapgen: Frequency of iron increased.
- node_dig callback and related changes.
Diffstat (limited to 'src/materials.cpp')
-rw-r--r-- | src/materials.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/materials.cpp b/src/materials.cpp index 146209d58..c37b7c505 100644 --- a/src/materials.cpp +++ b/src/materials.cpp @@ -18,8 +18,6 @@ with this program; if not, write to the Free Software Foundation, Inc., */ #include "materials.h" -#include "mapnode.h" -#include "nodedef.h" #include "utility.h" void MaterialProperties::serialize(std::ostream &os) @@ -139,13 +137,6 @@ DiggingProperties getDiggingProperties(const MaterialProperties *mp, return getDiggingProperties(mp, tp, 1000000); } -DiggingProperties getDiggingProperties(u16 content, - const ToolDiggingProperties *tp, INodeDefManager *nodemgr) -{ - const MaterialProperties &mp = nodemgr->get(content).material; - return getDiggingProperties(&mp, tp); -} - HittingProperties getHittingProperties(const MaterialProperties *mp, const ToolDiggingProperties *tp, float time_from_last_punch) { @@ -160,3 +151,9 @@ HittingProperties getHittingProperties(const MaterialProperties *mp, return HittingProperties(hp, wear); } +HittingProperties getHittingProperties(const MaterialProperties *mp, + const ToolDiggingProperties *tp) +{ + return getHittingProperties(mp, tp, 1000000); +} + |