From 85f119e1e6cc958a54eaf8468f2a302aa8c60dbe Mon Sep 17 00:00:00 2001 From: Mark Holmquist Date: Tue, 16 Aug 2011 02:14:49 -0700 Subject: Adding (most) of the sapling functionality. It has yet to work, since MEET_OTHER was not implemented at the time of this commit. Hopefully it will work when merged with celeron's latest. --- src/content_mapnode.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/content_mapnode.cpp') diff --git a/src/content_mapnode.cpp b/src/content_mapnode.cpp index 09a84156a..308397735 100644 --- a/src/content_mapnode.cpp +++ b/src/content_mapnode.cpp @@ -242,6 +242,8 @@ void content_mapnode_init() { f->setAllTextures("[noalpha:leaves.png"); } + f->extra_dug_item = std::string("MaterialItem2 ")+itos(CONTENT_SAPLING)+" 1"; + f->extra_dug_item_rarity = 10; f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1"; setWoodLikeDiggingProperties(f->digging_properties, 0.15); @@ -629,6 +631,18 @@ void content_mapnode_init() f->setInventoryTexture("nc_rb.png"); f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1"; setStoneLikeDiggingProperties(f->digging_properties, 3.0); + + i = CONTENT_SAPLING; + f = &content_features(i); + f->param_type = CPT_LIGHT; + f->setAllTextures("sapling.png"); + f->setInventoryTexture("sapling.png"); + f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1"; + f->light_propagates = true; + f->air_equivalent = false; + f->solidness = 0; // drawn separately, makes no faces + f->walkable = false; + f->digging_properties.set("", DiggingProperties(true, 0.0, 0)); i = CONTENT_APPLE; f = &content_features(i); -- cgit v1.2.3