From: Perttu Ahola Date: Tue, 24 May 2011 17:13:21 +0000 (+0300) Subject: Merged CiaranG's fence and fixed two things X-Git-Tag: 0.2.20110731_3~175 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=12ca835e1404a6c9750a17d327a7d8bd97bafcb4;p=oweals%2Fminetest.git Merged CiaranG's fence and fixed two things --- 12ca835e1404a6c9750a17d327a7d8bd97bafcb4 diff --cc src/mapnode.cpp index c8e4e8449,199a5c656..ca36697ef --- 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 5c03ea8f6,75b47e498..9248e6298 --- 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) {