bool diggable;
bool buildable_to;
enum LiquidType liquid_type;
- bool wall_mounted; // If true, param2 is set to direction when placed
+ // If true, param2 is set to direction when placed
+ // NOTE: the direction format is quite inefficient and should be changed
+ bool wall_mounted;
+
+ // Inventory item string as which the node appears in inventory when dug.
+ // Mineral overrides this.
+ std::string dug_item;
//TODO: Move more properties here
buildable_to = false;
liquid_type = LIQUID_NONE;
wall_mounted = false;
+ dug_item = "";
}
~ContentFeatures();
}
}
- /*void setTexture(u16 i, AtlasPointer p, u8 alpha=255)
- {
- tiles[i].texture = p;
- if(alpha != 255)
- {
- tiles[i].alpha = alpha;
- tiles[i].material_type = MATERIAL_ALPHA_VERTEX;
- }
- }
- void setAllTextures(AtlasPointer p, u8 alpha=255)
- {
- for(u16 i=0; i<6; i++)
- {
- setTexture(i, p, alpha);
- }
- }*/
-
void setTile(u16 i, const TileSpec &tile)
{
tiles[i] = tile;
}
};
-/*
- Returns integer position of the node in given
- floating point position.
-*/
-inline v3s16 floatToInt(v3f p)
-{
- v3s16 p2(
- (p.X + (p.X>0 ? BS/2 : -BS/2))/BS,
- (p.Y + (p.Y>0 ? BS/2 : -BS/2))/BS,
- (p.Z + (p.Z>0 ? BS/2 : -BS/2))/BS);
- return p2;
-}
-
-/*
- The same thing backwards
-*/
-inline v3f intToFloat(v3s16 p)
-{
- v3f p2(
- p.X * BS,
- p.Y * BS,
- p.Z * BS
- );
- return p2;
-}
-
#endif