1
0
mirror of https://github.com/moparisthebest/minetest synced 2024-11-17 23:05:07 -05:00
minetest/src/materials.cpp

21 lines
432 B
C++
Raw Normal View History

2010-12-24 18:54:39 -05:00
#include "materials.h"
#include "mapnode.h"
2010-12-24 18:54:39 -05:00
// NOTE: DEPRECATED
2010-12-24 18:54:39 -05:00
2011-07-23 09:55:26 -04:00
DiggingPropertiesList * getDiggingPropertiesList(u16 content)
2010-12-24 18:54:39 -05:00
{
return &content_features(content).digging_properties;
2010-12-24 18:54:39 -05:00
}
2011-07-23 09:55:26 -04:00
DiggingProperties getDiggingProperties(u16 content, const std::string &tool)
2010-12-24 18:54:39 -05:00
{
DiggingPropertiesList *mprop = getDiggingPropertiesList(content);
2010-12-24 18:54:39 -05:00
if(mprop == NULL)
// Not diggable
return DiggingProperties();
return mprop->get(tool);
2010-12-24 18:54:39 -05:00
}