if(m_subname == "Stick")
name = "stick.png";
+ else if(m_subname == "paper")
+ name = "paper.png";
+ else if(m_subname == "book")
+ name = "book.png";
else if(m_subname == "lump_of_coal")
name = "lump_of_coal.png";
else if(m_subname == "lump_of_iron")
f->solidness = 0; // drawn separately, makes no faces
f->walkable = false;
+ i = CONTENT_BOOKSHELF;
+ f = &g_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;
+
i = CONTENT_GLASS;
f = &g_content_features[i];
f->light_propagates = true;
#define CONTENT_BRICK 24
#define CONTENT_CLAY 25
#define CONTENT_PAPYRUS 26
+#define CONTENT_BOOKSHELF 27
/*
Content feature list
setWoodLikeDiggingProperties(CONTENT_GLASS, 0.15);
setWoodLikeDiggingProperties(CONTENT_FENCE, 0.75);
setWoodLikeDiggingProperties(CONTENT_WOOD, 0.75);
+ setWoodLikeDiggingProperties(CONTENT_BOOKSHELF, 0.75);
setWoodLikeDiggingProperties(CONTENT_CHEST, 1.0);
g_material_properties[CONTENT_SIGN_WALL].setDiggingProperties("",
found = true;
}
}
+
+ // Paper
+ if(!found)
+ {
+ ItemSpec specs[9];
+ specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_PAPYRUS);
+ specs[4] = ItemSpec(ITEM_MATERIAL, CONTENT_PAPYRUS);
+ specs[5] = ItemSpec(ITEM_MATERIAL, CONTENT_PAPYRUS);
+ if(checkItemCombination(items, specs))
+ {
+ rlist->addItem(new CraftItem("paper", 1));
+ found = true;
+ }
+ }
+
+ // Book
+ if(!found)
+ {
+ ItemSpec specs[9];
+ specs[1] = ItemSpec(ITEM_CRAFT, "paper");
+ specs[4] = ItemSpec(ITEM_CRAFT, "paper");
+ specs[7] = ItemSpec(ITEM_CRAFT, "paper");
+ if(checkItemCombination(items, specs))
+ {
+ rlist->addItem(new CraftItem("book", 1));
+ found = true;
+ }
+ }
+
+ // Book shelf
+ if(!found)
+ {
+ ItemSpec specs[9];
+ specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
+ specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
+ specs[2] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
+ specs[3] = ItemSpec(ITEM_CRAFT, "book");
+ specs[4] = ItemSpec(ITEM_CRAFT, "book");
+ specs[5] = ItemSpec(ITEM_CRAFT, "book");
+ specs[6] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
+ specs[7] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
+ specs[8] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
+ if(checkItemCombination(items, specs))
+ {
+ rlist->addItem(new MaterialItem(CONTENT_BOOKSHELF, 1));
+ found = true;
+ }
+ }
}
} // if creative_mode == false
CONTENT_LEAVES,
CONTENT_CACTUS,
CONTENT_PAPYRUS,
+ CONTENT_BOOKSHELF,
CONTENT_GLASS,
CONTENT_FENCE,
CONTENT_MESE,
sourcelist.push_back("cactus_side.png");
sourcelist.push_back("cactus_top.png");
sourcelist.push_back("papyrus.png");
+ sourcelist.push_back("bookshelf.png");
sourcelist.push_back("glass.png");
sourcelist.push_back("mud.png^grass_side.png");
sourcelist.push_back("cobble.png");