From 8993d9dd8321aad1243f4fb7fc55259c3747224f Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sat, 23 Jul 2011 02:04:24 +0300 Subject: Jungle biome/whatever thing --- src/content_mapnode.cpp | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'src/content_mapnode.cpp') diff --git a/src/content_mapnode.cpp b/src/content_mapnode.cpp index 79e10fd61..be7f95adc 100644 --- a/src/content_mapnode.cpp +++ b/src/content_mapnode.cpp @@ -136,12 +136,34 @@ void content_mapnode_init() f->dug_item = std::string("MaterialItem ")+itos(i)+" 1"; setWoodLikeDiggingProperties(f->digging_properties, 1.0); + i = CONTENT_JUNGLETREE; + f = &content_features(i); + f->setAllTextures("jungletree.png"); + f->setTexture(0, "jungletree_top.png"); + f->setTexture(1, "jungletree_top.png"); + f->param_type = CPT_MINERAL; + //f->is_ground_content = true; + f->dug_item = std::string("MaterialItem ")+itos(i)+" 1"; + setWoodLikeDiggingProperties(f->digging_properties, 1.0); + + i = CONTENT_JUNGLEGRASS; + f = &content_features(i); + f->setInventoryTexture("junglegrass.png"); + f->light_propagates = true; + f->param_type = CPT_LIGHT; + //f->is_ground_content = true; + f->air_equivalent = false; // grass grows underneath + 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.10); + i = CONTENT_LEAVES; f = &content_features(i); f->light_propagates = true; //f->param_type = CPT_MINERAL; f->param_type = CPT_LIGHT; - f->is_ground_content = true; + //f->is_ground_content = true; if(new_style_leaves) { f->solidness = 0; // drawn separately, makes no faces -- cgit v1.2.3 From 90d793f8f369bf1431d7a915198cd49b98bbe2d7 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sat, 23 Jul 2011 16:55:26 +0300 Subject: extended content-type range --- src/content_mapnode.cpp | 55 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) (limited to 'src/content_mapnode.cpp') diff --git a/src/content_mapnode.cpp b/src/content_mapnode.cpp index d82ccc5c9..e2aed2458 100644 --- a/src/content_mapnode.cpp +++ b/src/content_mapnode.cpp @@ -31,6 +31,59 @@ void setStoneLikeDiggingProperties(DiggingPropertiesList &list, float toughness) void setDirtLikeDiggingProperties(DiggingPropertiesList &list, float toughness); void setWoodLikeDiggingProperties(DiggingPropertiesList &list, float toughness); +content_t trans_table_19[][2] = { + {CONTENT_GRASS, 1}, + {CONTENT_TREE, 4}, + {CONTENT_LEAVES, 5}, + {CONTENT_GRASS_FOOTSTEPS, 6}, + {CONTENT_MESE, 7}, + {CONTENT_MUD, 8}, + {CONTENT_CLOUD, 10}, + {CONTENT_COALSTONE, 11}, + {CONTENT_WOOD, 12}, + {CONTENT_SAND, 13}, + {CONTENT_COBBLE, 18}, + {CONTENT_STEEL, 19}, + {CONTENT_GLASS, 20}, + {CONTENT_MOSSYCOBBLE, 22}, + {CONTENT_GRAVEL, 23}, +}; + +MapNode mapnode_translate_from_internal(MapNode n_from, u8 version) +{ + MapNode result = n_from; + if(version <= 19) + { + content_t c_from = n_from.getContent(); + for(u32 i=0; i Date: Sat, 23 Jul 2011 20:28:05 +0300 Subject: Fixed issue #15: Glass blocks a lot of light --- src/content_mapnode.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/content_mapnode.cpp') diff --git a/src/content_mapnode.cpp b/src/content_mapnode.cpp index 146b806ef..db036ebd9 100644 --- a/src/content_mapnode.cpp +++ b/src/content_mapnode.cpp @@ -272,6 +272,7 @@ void content_mapnode_init() i = CONTENT_GLASS; f = &content_features(i); f->light_propagates = true; + f->sunlight_propagates = true; f->param_type = CPT_LIGHT; f->is_ground_content = true; f->dug_item = std::string("MaterialItem ")+itos(i)+" 1"; -- cgit v1.2.3