- // Read some settings
- bool new_style_water = g_settings.getBool("new_style_water");
- bool new_style_leaves = g_settings.getBool("new_style_leaves");
- bool invisible_stone = g_settings.getBool("invisible_stone");
-
- u8 i;
- ContentFeatures *f = NULL;
-
- i = CONTENT_STONE;
- f = &content_features(i);
- f->setAllTextures("stone.png");
- f->setInventoryTextureCube("stone.png", "stone.png", "stone.png");
- f->param_type = CPT_MINERAL;
- f->is_ground_content = true;
- f->dug_item = std::string("MaterialItem ")+itos(CONTENT_COBBLE)+" 1";
- setStoneLikeDiggingProperties(f->digging_properties, 1.0);
- if(invisible_stone)
- f->solidness = 0; // For debugging, hides regular stone
-
- i = CONTENT_GRASS;
- f = &content_features(i);
- f->setAllTextures("mud.png^grass_side.png");
- f->setTexture(0, "grass.png");
- f->setTexture(1, "mud.png");
- f->param_type = CPT_MINERAL;
- f->is_ground_content = true;
- f->dug_item = std::string("MaterialItem ")+itos(CONTENT_MUD)+" 1";
- setDirtLikeDiggingProperties(f->digging_properties, 1.0);
-
- i = CONTENT_GRASS_FOOTSTEPS;
- f = &content_features(i);
- f->setAllTextures("mud.png^grass_side.png");
- f->setTexture(0, "grass_footsteps.png");
- f->setTexture(1, "mud.png");
- f->param_type = CPT_MINERAL;
- f->is_ground_content = true;
- f->dug_item = std::string("MaterialItem ")+itos(CONTENT_MUD)+" 1";
- setDirtLikeDiggingProperties(f->digging_properties, 1.0);
-
- i = CONTENT_MUD;
- f = &content_features(i);
- f->setAllTextures("mud.png");
- f->setInventoryTextureCube("mud.png", "mud.png", "mud.png");
- f->param_type = CPT_MINERAL;
- f->is_ground_content = true;
- f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
- setDirtLikeDiggingProperties(f->digging_properties, 1.0);
-
- i = CONTENT_SAND;
- f = &content_features(i);
- f->setAllTextures("sand.png");
- f->setInventoryTextureCube("sand.png", "sand.png", "sand.png");
- f->param_type = CPT_MINERAL;
- f->is_ground_content = true;
- f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
- setDirtLikeDiggingProperties(f->digging_properties, 1.0);
-
- i = CONTENT_GRAVEL;
- f = &content_features(i);
- f->setAllTextures("gravel.png");
- f->setInventoryTextureCube("gravel.png", "gravel.png", "gravel.png");
- f->param_type = CPT_MINERAL;
- f->is_ground_content = true;
- f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
- setDirtLikeDiggingProperties(f->digging_properties, 1.75);
-
- i = CONTENT_SANDSTONE;
- f = &content_features(i);
- f->setAllTextures("sandstone.png");
- f->setInventoryTextureCube("sandstone.png", "sandstone.png", "sandstone.png");
- f->param_type = CPT_MINERAL;
- f->is_ground_content = true;
- f->dug_item = std::string("MaterialItem ")+itos(CONTENT_SAND)+" 1";
- setDirtLikeDiggingProperties(f->digging_properties, 1.0);
-
- i = CONTENT_CLAY;
- f = &content_features(i);
- f->setAllTextures("clay.png");
- f->setInventoryTextureCube("clay.png", "clay.png", "clay.png");
- f->param_type = CPT_MINERAL;
- f->is_ground_content = true;
- f->dug_item = std::string("CraftItem lump_of_clay 4");
- setDirtLikeDiggingProperties(f->digging_properties, 1.0);
-
- i = CONTENT_BRICK;
- f = &content_features(i);
- f->setAllTextures("brick.png");
- f->setInventoryTextureCube("brick.png", "brick.png", "brick.png");
- f->param_type = CPT_MINERAL;
- f->is_ground_content = true;
- f->dug_item = std::string("CraftItem clay_brick 4");
- setStoneLikeDiggingProperties(f->digging_properties, 1.0);
-
- i = CONTENT_TREE;
- f = &content_features(i);
- f->setAllTextures("tree.png");
- f->setTexture(0, "tree_top.png");
- f->setTexture(1, "tree_top.png");
- f->param_type = CPT_MINERAL;
- f->is_ground_content = true;
- f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
- setWoodLikeDiggingProperties(f->digging_properties, 1.0);
-
- i = CONTENT_LEAVES;
- f = &content_features(i);
- f->light_propagates = true;
- //f->param_type = CPT_MINERAL;
- f->param_type = CPT_LIGHT;
- f->is_ground_content = true;
- if(new_style_leaves)
- {
- f->solidness = 0; // drawn separately, makes no faces
- f->setInventoryTextureCube("leaves.png", "leaves.png", "leaves.png");
- }
- else