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