]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/mapnode.cpp
Moved the temporary mapgen test files and added a modified map.cpp too... These are...
[dragonfireclient.git] / src / mapnode.cpp
index f498d9e75548a7b5a59b36db843948db9c160e31..c27f4848b4358ef41ace137e4000d1c1eebb8fa9 100644 (file)
@@ -25,6 +25,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "mineral.h"
 // For g_settings
 #include "main.h"
+#include "nodemetadata.h"
 
 ContentFeatures::~ContentFeatures()
 {
@@ -127,6 +128,9 @@ void init_mapnode()
        for(u16 i=0; i<256; i++)
        {
                ContentFeatures *f = &g_content_features[i];
+               // Re-initialize
+               *f = ContentFeatures();
+
                for(u16 j=0; j<6; j++)
                        f->tiles[j].material_type = initial_material_type;
        }
@@ -140,7 +144,7 @@ void init_mapnode()
        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(i)+" 1";
+       f->dug_item = std::string("MaterialItem ")+itos(CONTENT_COBBLE)+" 1";
        
        i = CONTENT_GRASS;
        f = &g_content_features[i];
@@ -200,7 +204,17 @@ void init_mapnode()
                f->setAllTextures("[noalpha:leaves.png");
        }
        f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
-       
+
+       i = CONTENT_GLASS;
+       f = &g_content_features[i];
+       f->light_propagates = true;
+       f->param_type = CPT_LIGHT;
+       f->is_ground_content = true;
+       f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
+       f->solidness = 0; // drawn separately, makes no faces
+       f->setInventoryTextureCube("glass.png", "glass.png", "glass.png");
+
+
        // Deprecated
        i = CONTENT_COALSTONE;
        f = &g_content_features[i];
@@ -283,6 +297,7 @@ void init_mapnode()
        f->setInventoryTexture("torch_on_floor.png");
        f->param_type = CPT_LIGHT;
        f->light_propagates = true;
+       f->sunlight_propagates = true;
        f->solidness = 0; // drawn separately, makes no faces
        f->walkable = false;
        f->wall_mounted = true;
@@ -320,8 +335,29 @@ void init_mapnode()
        f->setAllTextures("furnace_side.png");
        f->setTexture(5, "furnace_front.png"); // Z-
        f->setInventoryTexture("furnace_front.png");
+       //f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
+       f->dug_item = std::string("MaterialItem ")+itos(CONTENT_COBBLE)+" 6";
+       if(f->initial_metadata == NULL)
+               f->initial_metadata = new FurnaceNodeMetadata();
+       
+       i = CONTENT_COBBLE;
+       f = &g_content_features[i];
+       f->setAllTextures("cobble.png");
+       f->setInventoryTextureCube("cobble.png", "cobble.png", "cobble.png");
+       f->param_type = CPT_NONE;
+       f->is_ground_content = true;
+       f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
+       
+       i = CONTENT_STEEL;
+       f = &g_content_features[i];
+       f->setAllTextures("steel_block.png");
+       f->setInventoryTextureCube("steel_block.png", "steel_block.png",
+                       "steel_block.png");
+       f->param_type = CPT_NONE;
+       f->is_ground_content = true;
        f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
        
+       // NOTE: Remember to add frequently used stuff to the texture atlas in tile.cpp
 }
 
 v3s16 facedir_rotate(u8 facedir, v3s16 dir)