aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNils Dagsson Moskopp <nils@dieweltistgarnichtso.net>2011-05-28 02:17:19 +0200
committerNils Dagsson Moskopp <nils@dieweltistgarnichtso.net>2011-05-29 18:44:42 +0200
commite76f4155d52e7f79fd40e4f9ac0b9321c1ab9706 (patch)
tree76a552284ab504387cdec820967e2b28a9a49f45 /src
parentacd7ce897d2ea30699ca83aa1304987b1eea7880 (diff)
downloadminetest-e76f4155d52e7f79fd40e4f9ac0b9321c1ab9706.tar.gz
minetest-e76f4155d52e7f79fd40e4f9ac0b9321c1ab9706.tar.bz2
minetest-e76f4155d52e7f79fd40e4f9ac0b9321c1ab9706.zip
+ sandstone
Diffstat (limited to 'src')
-rw-r--r--src/mapnode.cpp8
-rw-r--r--src/mapnode.h1
-rw-r--r--src/materials.cpp1
-rw-r--r--src/server.cpp16
-rw-r--r--src/tile.cpp1
5 files changed, 27 insertions, 0 deletions
diff --git a/src/mapnode.cpp b/src/mapnode.cpp
index ca36697ef..c006b8222 100644
--- a/src/mapnode.cpp
+++ b/src/mapnode.cpp
@@ -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");
diff --git a/src/mapnode.h b/src/mapnode.h
index 57382aa2b..ad256585f 100644
--- a/src/mapnode.h
+++ b/src/mapnode.h
@@ -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
diff --git a/src/materials.cpp b/src/materials.cpp
index 841f1d655..60c1894bf 100644
--- a/src/materials.cpp
+++ b/src/materials.cpp
@@ -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);
diff --git a/src/server.cpp b/src/server.cpp
index 9248e6298..c7b64f413 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -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,
diff --git a/src/tile.cpp b/src/tile.cpp
index dabc1dcf3..8b0c3f2ea 100644
--- a/src/tile.cpp
+++ b/src/tile.cpp
@@ -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");