different fences and bookshelves for different wood types

This commit is contained in:
darkrose 2015-08-14 00:21:50 +10:00
parent 8dd8bb91f3
commit d7b462aa84
13 changed files with 133 additions and 4 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 741 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 741 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 741 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 657 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 657 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 657 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 347 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 307 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

View File

@ -89,7 +89,10 @@ MapNode mapnode_translate_to_internal(MapNode n_from, u8 version);
#define CONTENT_SANDSTONE_WALL 0x027
#define CONTENT_STONE_WALL 0x028
#define CONTENT_COBBLE_WALL 0x029
// FREE 2A-0x7C
// fences
#define CONTENT_JUNGLE_FENCE 0x02A
#define CONTENT_PINE_FENCE 0x02B
// FREE 2C-0x7C
// 0x7D-0x7F reserved values, air, ignore, etc
// FREE 0x80-0x7FE
#define CONTENT_GROWING_GRASS 0x7FF
@ -134,6 +137,8 @@ MapNode mapnode_translate_to_internal(MapNode n_from, u8 version);
// FREE 826-82E
#define CONTENT_PARCEL 0x82F
#define CONTENT_CLOCK 0x830
#define CONTENT_BOOKSHELF_PINE 0x831
#define CONTENT_BOOKSHELF_JUNGLE 0x832
// FREE 931-835
#define CONTENT_COUCH_CENTRE 0x836

View File

@ -64,13 +64,81 @@ void content_mapnode_furniture(bool repeat)
};
crafting::setRecipe(r,CONTENT_BOOKSHELF,1);
}
f->pressure_type = CST_SOLID;
lists::add("craftguide",i);
lists::add("creative",i);
f->suffocation_per_second = 0;
i = CONTENT_BOOKSHELF_JUNGLE;
f = &content_features(i);
f->description = wgettext("Junglewood Book Shelf");
f->setAllTextures("bookshelf_jungle_front.png");
f->setTexture(0, "bookshelf_jungle_top.png");
f->setTexture(1, "bookshelf_jungle_top.png");
f->setTexture(2, "bookshelf_jungle_side.png");
f->setTexture(3, "bookshelf_jungle_side.png");
f->setAllMetaTextures("bookshelf_book.png");
f->setMetaTexture(0, "bookshelf_book_top.png");
f->rotate_tile_with_nodebox = true;
//f->setInventoryTextureCube("wood.png", "bookshelf.png", "bookshelf.png");
f->draw_type = CDT_NODEBOX_META;
f->param_type = CPT_FACEDIR_SIMPLE;
f->is_ground_content = true;
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
f->fuel_time = 30/4;
f->type = CMT_WOOD;
f->hardness = 0.75;
f->solidness = 0;
content_nodebox_bookshelf(f);
f->setInventoryTextureNodeBox(i,"bookshelf_jungle_top.png", "bookshelf_jungle_front.png", "bookshelf_jungle_side.png");
if (f->initial_metadata == NULL)
f->initial_metadata = new BookShelfNodeMetadata();
{
u16 r[9] = {
CONTENT_JUNGLEWOOD, CONTENT_JUNGLEWOOD, CONTENT_JUNGLEWOOD,
CONTENT_IGNORE, CONTENT_IGNORE, CONTENT_IGNORE,
CONTENT_JUNGLEWOOD, CONTENT_JUNGLEWOOD, CONTENT_JUNGLEWOOD
};
crafting::setRecipe(r,CONTENT_BOOKSHELF,1);
crafting::setRecipe(r,CONTENT_BOOKSHELF_JUNGLE,1);
}
f->pressure_type = CST_SOLID;
lists::add("craftguide",i);
lists::add("creative",i);
f->suffocation_per_second = 0;
i = CONTENT_BOOKSHELF_PINE;
f = &content_features(i);
f->description = wgettext("Pine Book Shelf");
f->setAllTextures("bookshelf_pine_front.png");
f->setTexture(0, "bookshelf_pine_top.png");
f->setTexture(1, "bookshelf_pine_top.png");
f->setTexture(2, "bookshelf_pine_side.png");
f->setTexture(3, "bookshelf_pine_side.png");
f->setAllMetaTextures("bookshelf_book.png");
f->setMetaTexture(0, "bookshelf_book_top.png");
f->rotate_tile_with_nodebox = true;
//f->setInventoryTextureCube("wood.png", "bookshelf.png", "bookshelf.png");
f->draw_type = CDT_NODEBOX_META;
f->param_type = CPT_FACEDIR_SIMPLE;
f->is_ground_content = true;
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
f->fuel_time = 30/4;
f->type = CMT_WOOD;
f->hardness = 0.75;
f->solidness = 0;
content_nodebox_bookshelf(f);
f->setInventoryTextureNodeBox(i,"bookshelf_pine_top.png", "bookshelf_pine_front.png", "bookshelf_pine_side.png");
if (f->initial_metadata == NULL)
f->initial_metadata = new BookShelfNodeMetadata();
{
u16 r[9] = {
CONTENT_WOOD_PINE, CONTENT_WOOD_PINE, CONTENT_WOOD_PINE,
CONTENT_IGNORE, CONTENT_IGNORE, CONTENT_IGNORE,
CONTENT_WOOD_PINE, CONTENT_WOOD_PINE, CONTENT_WOOD_PINE
};
crafting::setRecipe(r,CONTENT_BOOKSHELF_PINE,1);
}
f->pressure_type = CST_SOLID;
lists::add("craftguide",i);

View File

@ -32,7 +32,6 @@ void content_mapnode_special(bool repeat)
content_t i;
ContentFeatures *f = NULL;
i = CONTENT_FENCE;
f = &content_features(i);
f->description = wgettext("Fence");
@ -59,7 +58,6 @@ void content_mapnode_special(bool repeat)
content_nodebox_fence(f);
f->setInventoryTextureNodeBox(i,"fence.png","fence_top.png","fence.png");
crafting::setWallRecipe(CONTENT_CRAFTITEM_WOOD_PLANK,CONTENT_FENCE);
crafting::setWallRecipe(CONTENT_CRAFTITEM_JUNGLE_PLANK,CONTENT_FENCE);
lists::add("craftguide",i);
lists::add("creative",i);
@ -91,6 +89,64 @@ void content_mapnode_special(bool repeat)
lists::add("craftguide",i);
lists::add("creative",i);
i = CONTENT_JUNGLE_FENCE;
f = &content_features(i);
f->description = wgettext("Jungle Wood Fence");
f->setAllTextures("fence_jungle.png");
f->setTexture(0,"fence_jungle_top.png");
f->setTexture(1,"fence_jungle_top.png");
f->light_propagates = true;
f->param_type = CPT_LIGHT;
f->param2_type = CPT_SPECIAL;
f->draw_type = CDT_FENCELIKE;
f->is_ground_content = true;
f->jumpable = false;
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
f->solidness = 0; // drawn separately, makes no faces
f->air_equivalent = true; // grass grows underneath
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
f->fuel_time = 15;
f->special_alternate_node = CONTENT_JUNGLEWOOD;
f->type = CMT_WOOD;
f->hardness = 0.75;
f->pressure_type = CST_CRUSHABLE;
f->suffocation_per_second = 0;
content_nodebox_fence_inv(f);
content_nodebox_fence(f);
f->setInventoryTextureNodeBox(i,"fence_jungle.png","fence_jungle_top.png","fence_jungle.png");
crafting::setWallRecipe(CONTENT_CRAFTITEM_JUNGLE_PLANK,CONTENT_JUNGLE_FENCE);
lists::add("craftguide",i);
lists::add("creative",i);
i = CONTENT_PINE_FENCE;
f = &content_features(i);
f->description = wgettext("Pine Fence");
f->setAllTextures("fence_pine.png");
f->setTexture(0,"fence_pine_top.png");
f->setTexture(1,"fence_pine_top.png");
f->light_propagates = true;
f->param_type = CPT_LIGHT;
f->param2_type = CPT_SPECIAL;
f->draw_type = CDT_FENCELIKE;
f->is_ground_content = true;
f->jumpable = false;
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
f->solidness = 0; // drawn separately, makes no faces
f->air_equivalent = true; // grass grows underneath
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
f->fuel_time = 15;
f->special_alternate_node = CONTENT_WOOD_PINE;
f->type = CMT_WOOD;
f->hardness = 0.75;
f->pressure_type = CST_CRUSHABLE;
f->suffocation_per_second = 0;
content_nodebox_fence_inv(f);
content_nodebox_fence(f);
f->setInventoryTextureNodeBox(i,"fence_pine.png","fence_pine_top.png","fence_pine.png");
crafting::setWallRecipe(CONTENT_CRAFTITEM_PINE_PLANK,CONTENT_PINE_FENCE);
lists::add("craftguide",i);
lists::add("creative",i);
i = CONTENT_STEEL_BARS;
f = &content_features(i);
f->description = wgettext("Steel Bars");