+ paper, book, bookshelf
This commit is contained in:
parent
176ac0b0bf
commit
8835433b5e
Binary file not shown.
After Width: | Height: | Size: 292 B |
Binary file not shown.
After Width: | Height: | Size: 597 B |
Binary file not shown.
After Width: | Height: | Size: 242 B |
|
@ -156,6 +156,10 @@ video::ITexture * CraftItem::getImage()
|
|||
|
||||
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")
|
||||
|
|
|
@ -251,6 +251,17 @@ void init_mapnode()
|
|||
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;
|
||||
|
|
|
@ -106,6 +106,7 @@ void init_content_inventory_texture_paths();
|
|||
#define CONTENT_BRICK 24
|
||||
#define CONTENT_CLAY 25
|
||||
#define CONTENT_PAPYRUS 26
|
||||
#define CONTENT_BOOKSHELF 27
|
||||
|
||||
/*
|
||||
Content feature list
|
||||
|
|
|
@ -80,6 +80,7 @@ void initializeMaterialProperties()
|
|||
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("",
|
||||
|
|
|
@ -4017,6 +4017,54 @@ void Server::UpdateCrafting(u16 peer_id)
|
|||
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
|
||||
|
@ -4112,6 +4160,7 @@ void setCreativeInventory(Player *player)
|
|||
CONTENT_LEAVES,
|
||||
CONTENT_CACTUS,
|
||||
CONTENT_PAPYRUS,
|
||||
CONTENT_BOOKSHELF,
|
||||
CONTENT_GLASS,
|
||||
CONTENT_FENCE,
|
||||
CONTENT_MESE,
|
||||
|
|
|
@ -518,6 +518,7 @@ void TextureSource::buildMainAtlas()
|
|||
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");
|
||||
|
|
Loading…
Reference in New Issue