+ sandstone
authorNils Dagsson Moskopp <nils@dieweltistgarnichtso.net>
Sat, 28 May 2011 00:17:19 +0000 (02:17 +0200)
committerNils Dagsson Moskopp <nils@dieweltistgarnichtso.net>
Sun, 29 May 2011 16:44:42 +0000 (18:44 +0200)
data/sandstone.png [new file with mode: 0644]
src/mapnode.cpp
src/mapnode.h
src/materials.cpp
src/server.cpp
src/tile.cpp

diff --git a/data/sandstone.png b/data/sandstone.png
new file mode 100644 (file)
index 0000000..c4759b4
Binary files /dev/null and b/data/sandstone.png differ
index ca36697efa93f1e2fd01f1cccd468be0c719a74c..c006b8222ec13e75ebc3c9ad47fc446219927c84 100644 (file)
@@ -181,6 +181,14 @@ void init_mapnode()
        f->is_ground_content = true;
        f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
        
+       i = CONTENT_SANDSTONE;
+       f = &g_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";
+       
        i = CONTENT_TREE;
        f = &g_content_features[i];
        f->setAllTextures("tree.png");
index 57382aa2b9fe6bbd218dfbd5670791b8b7f053b8..ad256585ff425aaa3c2f232c0fa709546b5bbac0 100644 (file)
@@ -101,6 +101,7 @@ void init_content_inventory_texture_paths();
 #define CONTENT_STEEL 19
 #define CONTENT_GLASS 20
 #define CONTENT_FENCE 21
+#define CONTENT_SANDSTONE 22
 
 /*
        Content feature list
index 841f1d6552911733c146ea01a74a3e7a552c2504..60c1894bff6a70a4a0bbf061938c5feb6d8a40fc 100644 (file)
@@ -59,6 +59,7 @@ void initializeMaterialProperties()
        */
 
        setStoneLikeDiggingProperties(CONTENT_STONE, 1.0);
+       setStoneLikeDiggingProperties(CONTENT_SANDSTONE, 1.0);
        setStoneLikeDiggingProperties(CONTENT_MESE, 0.5);
        setStoneLikeDiggingProperties(CONTENT_COALSTONE, 1.5);
        setStoneLikeDiggingProperties(CONTENT_FURNACE, 3.0);
index 9248e62984696caf7f5ba0f305aa9cbddedcecc9..c7b64f413eee08fc3b5c77bcacc5e9e213f6c039 100644 (file)
@@ -3972,6 +3972,21 @@ void Server::UpdateCrafting(u16 peer_id)
                                        found = true;
                                }
                        }
+
+                       // Sandstone
+                       if(!found)
+                       {
+                               ItemSpec specs[9];
+                               specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_SAND);
+                               specs[4] = ItemSpec(ITEM_MATERIAL, CONTENT_SAND);
+                               specs[6] = ItemSpec(ITEM_MATERIAL, CONTENT_SAND);
+                               specs[7] = ItemSpec(ITEM_MATERIAL, CONTENT_SAND);
+                               if(checkItemCombination(items, specs))
+                               {
+                                       rlist->addItem(new MaterialItem(CONTENT_SANDSTONE, 1));
+                                       found = true;
+                               }
+                       }
                }
        
        } // if creative_mode == false
@@ -4060,6 +4075,7 @@ void setCreativeInventory(Player *player)
                CONTENT_MUD,
                CONTENT_STONE,
                CONTENT_SAND,
+               CONTENT_SANDSTONE,
                CONTENT_TREE,
                CONTENT_LEAVES,
                CONTENT_GLASS,
index dabc1dcf3764b6eeaa5a1f9855bfac15b1b7c4c8..8b0c3f2ea155230541ff773cae1834ea90364bb7 100644 (file)
@@ -506,6 +506,7 @@ void TextureSource::buildMainAtlas()
        sourcelist.push_back("stone.png");
        sourcelist.push_back("mud.png");
        sourcelist.push_back("sand.png");
+       sourcelist.push_back("sandstone.png");
        sourcelist.push_back("grass.png");
        sourcelist.push_back("grass_footsteps.png");
        sourcelist.push_back("tree.png");