From: Perttu Ahola Date: Tue, 24 May 2011 17:13:21 +0000 (+0300) Subject: Merged CiaranG's fence and fixed two things X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=12ca835e1404a6c9750a17d327a7d8bd97bafcb4;p=zefram%2Fminetest%2Fminetest_engine.git Merged CiaranG's fence and fixed two things --- 12ca835e1404a6c9750a17d327a7d8bd97bafcb4 diff --cc src/mapnode.cpp index c8e4e844,199a5c65..ca36697e --- a/src/mapnode.cpp +++ b/src/mapnode.cpp @@@ -216,6 -216,13 +216,14 @@@ void init_mapnode( f->solidness = 0; // drawn separately, makes no faces f->setInventoryTextureCube("glass.png", "glass.png", "glass.png"); + i = CONTENT_FENCE; + f = &g_content_features[i]; + 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 // Deprecated i = CONTENT_COALSTONE; diff --cc src/server.cpp index 5c03ea8f,75b47e49..9248e629 --- a/src/server.cpp +++ b/src/server.cpp @@@ -3664,6 -3670,23 +3670,23 @@@ void Server::UpdateCrafting(u16 peer_id } } + // Fence + if(!found) + { + ItemSpec specs[9]; ++ specs[3] = ItemSpec(ITEM_CRAFT, "Stick"); + specs[4] = ItemSpec(ITEM_CRAFT, "Stick"); + specs[5] = ItemSpec(ITEM_CRAFT, "Stick"); + specs[6] = ItemSpec(ITEM_CRAFT, "Stick"); + specs[7] = ItemSpec(ITEM_CRAFT, "Stick"); + specs[8] = ItemSpec(ITEM_CRAFT, "Stick"); - specs[9] = ItemSpec(ITEM_CRAFT, "Stick"); + if(checkItemCombination(items, specs)) + { + rlist->addItem(new MaterialItem(CONTENT_FENCE, 2)); + found = true; + } + } + // Sign if(!found) {