diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-07-23 19:04:37 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-07-23 19:04:37 +0300 |
commit | 2587bb361cfc96b3a695d1476e39b9c0ecaa6553 (patch) | |
tree | 6e6a35e0ee35883201189df9c545cc44b7a06658 /src/content_mapnode.cpp | |
parent | 90d793f8f369bf1431d7a915198cd49b98bbe2d7 (diff) | |
parent | 976ec31c1faedc3a34935c3aafd6a868e222d1ad (diff) | |
download | minetest-2587bb361cfc96b3a695d1476e39b9c0ecaa6553.tar.gz minetest-2587bb361cfc96b3a695d1476e39b9c0ecaa6553.tar.bz2 minetest-2587bb361cfc96b3a695d1476e39b9c0ecaa6553.zip |
merged the content type extension and delta
Diffstat (limited to 'src/content_mapnode.cpp')
-rw-r--r-- | src/content_mapnode.cpp | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/src/content_mapnode.cpp b/src/content_mapnode.cpp index e2aed2458..8701ab887 100644 --- a/src/content_mapnode.cpp +++ b/src/content_mapnode.cpp @@ -47,6 +47,12 @@ content_t trans_table_19[][2] = { {CONTENT_GLASS, 20}, {CONTENT_MOSSYCOBBLE, 22}, {CONTENT_GRAVEL, 23}, + {CONTENT_SANDSTONE, 24}, + {CONTENT_CACTUS, 25}, + {CONTENT_BRICK, 26}, + {CONTENT_CLAY, 27}, + {CONTENT_PAPYRUS, 28}, + {CONTENT_BOOKSHELF, 29}, }; MapNode mapnode_translate_from_internal(MapNode n_from, u8 version) @@ -152,6 +158,33 @@ void content_mapnode_init() 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"); @@ -180,6 +213,40 @@ void content_mapnode_init() f->dug_item = std::string("MaterialItem ")+itos(i)+" 1"; setWoodLikeDiggingProperties(f->digging_properties, 0.15); + i = CONTENT_CACTUS; + f = &content_features(i); + f->setAllTextures("cactus_side.png"); + f->setTexture(0, "cactus_top.png"); + f->setTexture(1, "cactus_top.png"); + f->setInventoryTextureCube("cactus_top.png", "cactus_side.png", "cactus_side.png"); + f->param_type = CPT_MINERAL; + f->is_ground_content = true; + f->dug_item = std::string("MaterialItem ")+itos(i)+" 1"; + setWoodLikeDiggingProperties(f->digging_properties, 0.75); + + i = CONTENT_PAPYRUS; + f = &content_features(i); + f->setInventoryTexture("papyrus.png"); + 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->walkable = false; + setWoodLikeDiggingProperties(f->digging_properties, 0.25); + + i = CONTENT_BOOKSHELF; + f = &content_features(i); + f->setAllTextures("bookshelf.png"); + f->setTexture(0, "wood.png"); + f->setTexture(1, "wood.png"); + // FIXME: setInventoryTextureCube() only cares for the first texture + f->setInventoryTextureCube("bookshelf.png", "bookshelf.png", "bookshelf.png"); + //f->setInventoryTextureCube("wood.png", "bookshelf.png", "bookshelf.png"); + f->param_type = CPT_MINERAL; + f->is_ground_content = true; + setWoodLikeDiggingProperties(f->digging_properties, 0.75); + i = CONTENT_GLASS; f = &content_features(i); f->light_propagates = true; @@ -201,6 +268,18 @@ void content_mapnode_init() f->setInventoryTexture("item_fence.png"); setWoodLikeDiggingProperties(f->digging_properties, 0.75); + i = CONTENT_RAIL; + f = &content_features(i); + f->setInventoryTexture("rail.png"); + 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->air_equivalent = true; // grass grows underneath + f->walkable = false; + setDirtLikeDiggingProperties(f->digging_properties, 0.75); + // Deprecated i = CONTENT_COALSTONE; f = &content_features(i); @@ -255,6 +334,7 @@ void content_mapnode_init() f->buildable_to = true; f->liquid_type = LIQUID_FLOWING; f->liquid_alternative_flowing = CONTENT_WATER; + f->liquid_alternative_source = CONTENT_WATERSOURCE; i = CONTENT_WATERSOURCE; f = &content_features(i); @@ -286,6 +366,7 @@ void content_mapnode_init() f->liquid_type = LIQUID_SOURCE; f->dug_item = std::string("MaterialItem ")+itos(i)+" 1"; f->liquid_alternative_flowing = CONTENT_WATER; + f->liquid_alternative_source = CONTENT_WATERSOURCE; i = CONTENT_TORCH; f = &content_features(i); |