1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-18 18:55:29 +02:00

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.
This commit is contained in:
Kahrl
2012-01-21 00:11:44 +01:00
committed by Perttu Ahola
parent f22c73f501
commit 157a4cf18c
36 changed files with 1610 additions and 1454 deletions

View File

@@ -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);
}