move cook result to ContentFeatures, add glass panes
After Width: | Height: | Size: 140 B |
After Width: | Height: | Size: 139 B |
After Width: | Height: | Size: 139 B |
After Width: | Height: | Size: 139 B |
After Width: | Height: | Size: 139 B |
After Width: | Height: | Size: 139 B |
After Width: | Height: | Size: 139 B |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 139 B |
After Width: | Height: | Size: 393 B |
After Width: | Height: | Size: 366 B |
After Width: | Height: | Size: 375 B |
After Width: | Height: | Size: 466 B |
Before Width: | Height: | Size: 469 B |
Before Width: | Height: | Size: 284 B After Width: | Height: | Size: 285 B |
|
@ -108,7 +108,7 @@ struct CraftDef {
|
|||
*/
|
||||
InventoryItem *craft_get_result(InventoryItem **items)
|
||||
{
|
||||
static CraftDef defs[174];
|
||||
static CraftDef defs[196];
|
||||
static int defs_init = 0;
|
||||
|
||||
// only initialise (and hence allocate) these once
|
||||
|
@ -200,9 +200,9 @@ InventoryItem *craft_get_result(InventoryItem **items)
|
|||
|
||||
// Stone pick
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
|
||||
defs[defs_init].specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
|
||||
defs[defs_init].specs[2] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[2] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[4] = ItemSpec(ITEM_CRAFT, "Stick");
|
||||
defs[defs_init].specs[7] = ItemSpec(ITEM_CRAFT, "Stick");
|
||||
defs[defs_init].item = new ToolItem("STPick", 0);
|
||||
|
@ -242,7 +242,7 @@ InventoryItem *craft_get_result(InventoryItem **items)
|
|||
|
||||
// Stone shovel
|
||||
{
|
||||
defs[defs_init].specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
|
||||
defs[defs_init].specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[4] = ItemSpec(ITEM_CRAFT, "Stick");
|
||||
defs[defs_init].specs[7] = ItemSpec(ITEM_CRAFT, "Stick");
|
||||
defs[defs_init].item = new ToolItem("STShovel", 0);
|
||||
|
@ -271,9 +271,9 @@ InventoryItem *craft_get_result(InventoryItem **items)
|
|||
|
||||
// Stone axe
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
|
||||
defs[defs_init].specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[4] = ItemSpec(ITEM_CRAFT, "Stick");
|
||||
defs[defs_init].specs[7] = ItemSpec(ITEM_CRAFT, "Stick");
|
||||
defs[defs_init].item = new ToolItem("STAxe", 0);
|
||||
|
@ -313,8 +313,8 @@ InventoryItem *craft_get_result(InventoryItem **items)
|
|||
|
||||
// Stone sword
|
||||
{
|
||||
defs[defs_init].specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
|
||||
defs[defs_init].specs[4] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
|
||||
defs[defs_init].specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[4] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[7] = ItemSpec(ITEM_CRAFT, "Stick");
|
||||
defs[defs_init].item = new ToolItem("STSword", 0);
|
||||
defs_init++;
|
||||
|
@ -398,18 +398,29 @@ InventoryItem *craft_get_result(InventoryItem **items)
|
|||
|
||||
// Furnace
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
|
||||
defs[defs_init].specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
|
||||
defs[defs_init].specs[2] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
|
||||
defs[defs_init].specs[5] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
|
||||
defs[defs_init].specs[6] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
|
||||
defs[defs_init].specs[7] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
|
||||
defs[defs_init].specs[8] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[2] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[5] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[6] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[7] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[8] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_FURNACE, 1);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// Cobble
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[2] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[4] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[6] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[8] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_COBBLE, 5);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// Steel block
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_CRAFT, "steel_ingot");
|
||||
|
@ -753,10 +764,10 @@ InventoryItem *craft_get_result(InventoryItem **items)
|
|||
|
||||
// cobble slabs
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
|
||||
defs[defs_init].specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
|
||||
defs[defs_init].specs[2] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_COBBLE_SLAB, 3);
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[2] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_ROUGHSTONE_SLAB, 3);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
|
@ -816,25 +827,25 @@ InventoryItem *craft_get_result(InventoryItem **items)
|
|||
|
||||
// cobble stairs
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
|
||||
defs[defs_init].specs[4] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
|
||||
defs[defs_init].specs[6] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
|
||||
defs[defs_init].specs[7] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
|
||||
defs[defs_init].specs[8] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_COBBLE_STAIR, 6);
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[4] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[6] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[7] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[8] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_ROUGHSTONE_STAIR, 6);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// cobble stairs
|
||||
{
|
||||
defs[defs_init].specs[2] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
|
||||
defs[defs_init].specs[4] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
|
||||
defs[defs_init].specs[5] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
|
||||
defs[defs_init].specs[6] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
|
||||
defs[defs_init].specs[7] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
|
||||
defs[defs_init].specs[8] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_COBBLE_STAIR, 6);
|
||||
defs[defs_init].specs[2] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[4] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[5] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[6] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[7] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[8] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_ROUGHSTONE_STAIR, 6);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
|
@ -995,10 +1006,10 @@ InventoryItem *craft_get_result(InventoryItem **items)
|
|||
|
||||
// stone brick
|
||||
{
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[4] = ItemSpec(ITEM_MATERIAL, CONTENT_STONE);
|
||||
defs[defs_init].specs[6] = ItemSpec(ITEM_MATERIAL, CONTENT_STONE);
|
||||
defs[defs_init].specs[7] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
|
||||
defs[defs_init].specs[7] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_STONEBRICK, 4);
|
||||
defs_init++;
|
||||
}
|
||||
|
@ -1006,8 +1017,8 @@ InventoryItem *craft_get_result(InventoryItem **items)
|
|||
// stone brick
|
||||
{
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_STONE);
|
||||
defs[defs_init].specs[4] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
|
||||
defs[defs_init].specs[6] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
|
||||
defs[defs_init].specs[4] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[6] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[7] = ItemSpec(ITEM_MATERIAL, CONTENT_STONE);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_STONEBRICK, 4);
|
||||
defs_init++;
|
||||
|
@ -1023,6 +1034,56 @@ InventoryItem *craft_get_result(InventoryItem **items)
|
|||
defs_init++;
|
||||
}
|
||||
|
||||
// stone brick
|
||||
{
|
||||
defs[defs_init].specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_STONE);
|
||||
defs[defs_init].specs[2] = ItemSpec(ITEM_MATERIAL, CONTENT_STONE);
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_STONE);
|
||||
defs[defs_init].specs[4] = ItemSpec(ITEM_MATERIAL, CONTENT_STONE);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_STONEBRICK, 4);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// stone brick
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_STONE);
|
||||
defs[defs_init].specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_STONE);
|
||||
defs[defs_init].specs[4] = ItemSpec(ITEM_MATERIAL, CONTENT_STONE);
|
||||
defs[defs_init].specs[5] = ItemSpec(ITEM_MATERIAL, CONTENT_STONE);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_STONEBRICK, 4);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// roughstone brick
|
||||
{
|
||||
defs[defs_init].specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[2] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[4] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_ROUGHSTONEBRICK, 4);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// roughstone brick
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[4] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[5] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_ROUGHSTONEBRICK, 4);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// roughstone block
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[4] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_ROUGHSTONEBLOCK, 4);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// wood door
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
|
||||
|
@ -1371,6 +1432,18 @@ InventoryItem *craft_get_result(InventoryItem **items)
|
|||
defs_init++;
|
||||
}
|
||||
|
||||
// Roughstone wall
|
||||
{
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[4] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[5] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[6] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[7] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].specs[8] = ItemSpec(ITEM_MATERIAL, CONTENT_ROUGHSTONE);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_ROUGHSTONE_WALL, 6);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// Cobble wall
|
||||
{
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
|
||||
|
@ -1805,6 +1878,134 @@ InventoryItem *craft_get_result(InventoryItem **items)
|
|||
defs[defs_init].item = new MaterialItem(CONTENT_TNT, 1);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// glass pane
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_GLASS);
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_GLASS);
|
||||
defs[defs_init].specs[6] = ItemSpec(ITEM_MATERIAL, CONTENT_GLASS);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_GLASS_PANE, 3);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// blue glass pane
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_GLASS_BLUE);
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_GLASS_BLUE);
|
||||
defs[defs_init].specs[6] = ItemSpec(ITEM_MATERIAL, CONTENT_GLASS_BLUE);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_GLASS_PANE_BLUE, 3);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// blue glass pane
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_CRAFT, "blue_dye");
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_GLASS_PANE);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_GLASS_PANE_BLUE, 1);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// green glass pane
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_GLASS_GREEN);
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_GLASS_GREEN);
|
||||
defs[defs_init].specs[6] = ItemSpec(ITEM_MATERIAL, CONTENT_GLASS_GREEN);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_GLASS_PANE_GREEN, 3);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// green glass pane
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_CRAFT, "green_dye");
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_GLASS_PANE);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_GLASS_PANE_GREEN, 1);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// orange glass pane
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_GLASS_ORANGE);
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_GLASS_ORANGE);
|
||||
defs[defs_init].specs[6] = ItemSpec(ITEM_MATERIAL, CONTENT_GLASS_ORANGE);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_GLASS_PANE_ORANGE, 3);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// orange glass pane
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_CRAFT, "orange_dye");
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_GLASS_PANE);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_GLASS_PANE_ORANGE, 1);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// purple glass pane
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_GLASS_PURPLE);
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_GLASS_PURPLE);
|
||||
defs[defs_init].specs[6] = ItemSpec(ITEM_MATERIAL, CONTENT_GLASS_PURPLE);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_GLASS_PANE_PURPLE, 3);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// purple glass pane
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_CRAFT, "purple_dye");
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_GLASS_PANE);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_GLASS_PANE_PURPLE, 1);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// red glass pane
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_GLASS_RED);
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_GLASS_RED);
|
||||
defs[defs_init].specs[6] = ItemSpec(ITEM_MATERIAL, CONTENT_GLASS_RED);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_GLASS_PANE_RED, 3);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// red glass pane
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_CRAFT, "red_dye");
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_GLASS_PANE);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_GLASS_PANE_RED, 1);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// yellow glass pane
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_GLASS_YELLOW);
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_GLASS_YELLOW);
|
||||
defs[defs_init].specs[6] = ItemSpec(ITEM_MATERIAL, CONTENT_GLASS_YELLOW);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_GLASS_PANE_YELLOW, 3);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// yellow glass pane
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_CRAFT, "yellow_dye");
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_GLASS_PANE);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_GLASS_PANE_YELLOW, 1);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// black glass pane
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_GLASS_BLACK);
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_GLASS_BLACK);
|
||||
defs[defs_init].specs[6] = ItemSpec(ITEM_MATERIAL, CONTENT_GLASS_BLACK);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_GLASS_PANE_BLACK, 3);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// black glass pane
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_CRAFT, "black_dye");
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_GLASS_PANE);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_GLASS_PANE_BLACK, 1);
|
||||
defs_init++;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i=0; i<defs_init; i++) {
|
||||
|
@ -1848,7 +2049,7 @@ void craft_set_creative_inventory(Player *player)
|
|||
// CONTENT_IGNORE-terminated list
|
||||
content_t material_items[] = {
|
||||
CONTENT_TORCH,
|
||||
CONTENT_COBBLE,
|
||||
CONTENT_ROUGHSTONE,
|
||||
CONTENT_MUD,
|
||||
CONTENT_STONE,
|
||||
CONTENT_SAND,
|
||||
|
@ -1911,7 +2112,7 @@ void craft_give_initial_stuff(Player *player)
|
|||
assert(r == NULL);
|
||||
}
|
||||
{
|
||||
InventoryItem *item = new MaterialItem(CONTENT_COBBLE, 99);
|
||||
InventoryItem *item = new MaterialItem(CONTENT_ROUGHSTONE, 99);
|
||||
void* r = player->inventory.addItem("main", item);
|
||||
assert(r == NULL);
|
||||
}
|
||||
|
|
|
@ -23,38 +23,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
//#include "serverobject.h"
|
||||
#include "content_sao.h"
|
||||
|
||||
bool item_material_is_cookable(content_t content)
|
||||
{
|
||||
if (
|
||||
content == CONTENT_TREE
|
||||
|| content == CONTENT_COBBLE
|
||||
|| content == CONTENT_SAND
|
||||
|| content == CONTENT_FLOWER_POT_RAW
|
||||
|| content == CONTENT_CLAY
|
||||
|| content == CONTENT_MESE
|
||||
)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
InventoryItem* item_material_create_cook_result(content_t content)
|
||||
{
|
||||
if (content == CONTENT_TREE) {
|
||||
return new CraftItem("lump_of_charcoal", 1);
|
||||
}else if (content == CONTENT_COBBLE) {
|
||||
return new MaterialItem(CONTENT_STONE, 1);
|
||||
}else if (content == CONTENT_SAND) {
|
||||
return new MaterialItem(CONTENT_GLASS, 1);
|
||||
}else if (content == CONTENT_FLOWER_POT_RAW) {
|
||||
return new MaterialItem(CONTENT_FLOWER_POT, 1);
|
||||
}else if (content == CONTENT_CLAY) {
|
||||
return new MaterialItem(CONTENT_TERRACOTTA, 1);
|
||||
}else if (content == CONTENT_MESE) {
|
||||
return new CraftItem("saltpeter", 1);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
std::string item_craft_get_image_name(const std::string &subname)
|
||||
{
|
||||
if (subname == "Stick") {
|
||||
|
|
|
@ -28,9 +28,6 @@ class InventoryItem;
|
|||
class ServerActiveObject;
|
||||
class ServerEnvironment;
|
||||
|
||||
bool item_material_is_cookable(content_t content);
|
||||
InventoryItem* item_material_create_cook_result(content_t content);
|
||||
|
||||
std::string item_craft_get_image_name(const std::string &subname);
|
||||
std::string item_craft_get_name(const std::string &subname);
|
||||
ServerActiveObject* item_craft_create_object(const std::string &subname,
|
||||
|
|
|
@ -1448,29 +1448,33 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
|
|||
// Handles facedir rotation for textures
|
||||
tiles[i] = n.getTile(tile_dirs[i]);
|
||||
}
|
||||
u32 lt = 0;
|
||||
u32 ltp;
|
||||
u8 ld = 0;
|
||||
for (s16 tx=-1; tx<2; tx++) {
|
||||
for (s16 ty=-1; ty<2; ty++) {
|
||||
for (s16 tz=-1; tz<2; tz++) {
|
||||
if (!tx && !ty && !tz)
|
||||
continue;
|
||||
MapNode n = data->m_vmanip.getNodeNoEx(blockpos_nodes + v3s16(x+tx,y+ty,z+tz));
|
||||
if (ty<1 && n.getContent() != CONTENT_AIR)
|
||||
continue;
|
||||
ltp = decode_light(n.getLightBlend(data->m_daynight_ratio));
|
||||
if (!ltp)
|
||||
continue;
|
||||
lt += ltp;
|
||||
ld++;
|
||||
}
|
||||
}
|
||||
u8 l = 0;
|
||||
if (content_features(n).param_type == CPT_LIGHT) {
|
||||
l = decode_light(n.getLightBlend(data->m_daynight_ratio));
|
||||
}else{
|
||||
u32 lt = 0;
|
||||
u32 ltp;
|
||||
u8 ld = 0;
|
||||
for (s16 tx=-1; tx<2; tx++) {
|
||||
for (s16 ty=-1; ty<2; ty++) {
|
||||
for (s16 tz=-1; tz<2; tz++) {
|
||||
if (!tx && !ty && !tz)
|
||||
continue;
|
||||
MapNode tn = data->m_vmanip.getNodeNoEx(blockpos_nodes + v3s16(x+tx,y+ty,z+tz));
|
||||
if (ty<1 && tn.getContent() != CONTENT_AIR)
|
||||
continue;
|
||||
ltp = decode_light(tn.getLightBlend(data->m_daynight_ratio));
|
||||
if (!ltp)
|
||||
continue;
|
||||
lt += ltp;
|
||||
ld++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ld)
|
||||
l = lt/ld;
|
||||
}
|
||||
|
||||
u8 l = 0;
|
||||
if (ld)
|
||||
l = lt/ld;
|
||||
video::SColor c = MapBlock_LightColor(255, l);
|
||||
|
||||
v3f pos = intToFloat(p+blockpos_nodes, BS);
|
||||
|
|
|
@ -673,7 +673,7 @@ void content_mapnode_init()
|
|||
f->draw_type = CDT_CUBELIKE;
|
||||
f->is_ground_content = true;
|
||||
f->often_contains_mineral = true;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_COBBLE)+" 1";
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_ROUGHSTONE)+" 1";
|
||||
setStoneLikeDiggingProperties(f->digging_properties, 1.0);
|
||||
if(invisible_stone)
|
||||
f->solidness = 0; // For debugging, hides regular stone
|
||||
|
@ -724,6 +724,28 @@ void content_mapnode_init()
|
|||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
setStoneLikeDiggingProperties(f->digging_properties, 1.0);
|
||||
|
||||
i = CONTENT_ROUGHSTONEBRICK;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Rough Stone Brick");
|
||||
f->setAllTextures("roughstone_brick.png");
|
||||
f->setInventoryTextureCube("roughstone_brick.png", "roughstone_brick.png", "roughstone_brick.png");
|
||||
f->param_type = CPT_NONE;
|
||||
f->draw_type = CDT_CUBELIKE;
|
||||
f->is_ground_content = true;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
setStoneLikeDiggingProperties(f->digging_properties, 1.0);
|
||||
|
||||
i = CONTENT_ROUGHSTONEBLOCK;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Rough Stone Block");
|
||||
f->setAllTextures("roughstone_block.png");
|
||||
f->setInventoryTextureCube("roughstone_block.png", "roughstone_block.png", "roughstone_block.png");
|
||||
f->param_type = CPT_NONE;
|
||||
f->draw_type = CDT_CUBELIKE;
|
||||
f->is_ground_content = true;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
setStoneLikeDiggingProperties(f->digging_properties, 1.0);
|
||||
|
||||
i = CONTENT_GRASS;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Grass");
|
||||
|
@ -766,6 +788,7 @@ void content_mapnode_init()
|
|||
f->draw_type = CDT_CUBELIKE;
|
||||
f->is_ground_content = true;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
f->cook_result = std::string("MaterialItem2 ")+itos(CONTENT_GLASS)+" 1";
|
||||
setDirtLikeDiggingProperties(f->digging_properties, 1.0);
|
||||
|
||||
i = CONTENT_GRAVEL;
|
||||
|
@ -823,6 +846,7 @@ void content_mapnode_init()
|
|||
f->draw_type = CDT_CUBELIKE;
|
||||
f->is_ground_content = true;
|
||||
f->dug_item = std::string("CraftItem lump_of_clay 4");
|
||||
f->cook_result = std::string("MaterialItem2 ")+itos(CONTENT_TERRACOTTA)+" 1";
|
||||
setDirtLikeDiggingProperties(f->digging_properties, 1.0);
|
||||
|
||||
i = CONTENT_CLAY_BLUE;
|
||||
|
@ -983,6 +1007,7 @@ void content_mapnode_init()
|
|||
f->is_ground_content = true;
|
||||
f->flammable = 2; // can be set on fire
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
f->cook_result = std::string("CraftItem lump_of_charcoal 1");
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 1.0);
|
||||
|
||||
i = CONTENT_JUNGLETREE;
|
||||
|
@ -1251,6 +1276,230 @@ void content_mapnode_init()
|
|||
f->setInventoryTextureCube("glass_black.png", "glass_black.png", "glass_black.png");
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.15);
|
||||
|
||||
i = CONTENT_GLASS_PANE;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Glass Pane");
|
||||
//f->light_propagates = true;
|
||||
//f->sunlight_propagates = true;
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->is_ground_content = true;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->visual_solidness = 1;
|
||||
f->setAllTextures("glass_pane_side.png");
|
||||
f->setTexture(4,"glass.png");
|
||||
f->setTexture(5,"glass.png");
|
||||
#ifndef SERVER
|
||||
f->setAllTextureTypes(MATERIAL_ALPHA_BLEND);
|
||||
#endif
|
||||
f->setNodeBox(core::aabbox3d<f32>(
|
||||
-0.5*BS,
|
||||
-0.5*BS,
|
||||
-0.05*BS,
|
||||
0.5*BS,
|
||||
0.5*BS,
|
||||
0.05*BS
|
||||
));
|
||||
f->setInventoryTextureNodeBox(i,"glass_pane_side.png", "glass.png", "glass_pane_side.png");
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.15);
|
||||
|
||||
i = CONTENT_GLASS_PANE_BLUE;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Blue Glass Pane");
|
||||
//f->light_propagates = true;
|
||||
//f->sunlight_propagates = true;
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->is_ground_content = true;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->visual_solidness = 1;
|
||||
f->setAllTextures("glass_pane_blue_side.png");
|
||||
f->setTexture(4,"glass_blue.png");
|
||||
f->setTexture(5,"glass_blue.png");
|
||||
#ifndef SERVER
|
||||
f->setAllTextureTypes(MATERIAL_ALPHA_BLEND);
|
||||
#endif
|
||||
f->setNodeBox(core::aabbox3d<f32>(
|
||||
-0.5*BS,
|
||||
-0.5*BS,
|
||||
-0.05*BS,
|
||||
0.5*BS,
|
||||
0.5*BS,
|
||||
0.05*BS
|
||||
));
|
||||
f->setInventoryTextureNodeBox(i,"glass_pane_blue_side.png", "glass_blue.png", "glass_pane_blue_side.png");
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.15);
|
||||
|
||||
i = CONTENT_GLASS_PANE_GREEN;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Green Glass Pane");
|
||||
//f->light_propagates = true;
|
||||
//f->sunlight_propagates = true;
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->is_ground_content = true;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->visual_solidness = 1;
|
||||
f->setAllTextures("glass_pane_green_side.png");
|
||||
f->setTexture(4,"glass_green.png");
|
||||
f->setTexture(5,"glass_green.png");
|
||||
#ifndef SERVER
|
||||
f->setAllTextureTypes(MATERIAL_ALPHA_BLEND);
|
||||
#endif
|
||||
f->setNodeBox(core::aabbox3d<f32>(
|
||||
-0.5*BS,
|
||||
-0.5*BS,
|
||||
-0.05*BS,
|
||||
0.5*BS,
|
||||
0.5*BS,
|
||||
0.05*BS
|
||||
));
|
||||
f->setInventoryTextureNodeBox(i,"glass_pane_green_side.png", "glass_green.png", "glass_pane_green_side.png");
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.15);
|
||||
|
||||
i = CONTENT_GLASS_PANE_ORANGE;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Orange Glass Pane");
|
||||
//f->light_propagates = true;
|
||||
//f->sunlight_propagates = true;
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->is_ground_content = true;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->visual_solidness = 1;
|
||||
f->setAllTextures("glass_pane_orange_side.png");
|
||||
f->setTexture(4,"glass_orange.png");
|
||||
f->setTexture(5,"glass_orange.png");
|
||||
#ifndef SERVER
|
||||
f->setAllTextureTypes(MATERIAL_ALPHA_BLEND);
|
||||
#endif
|
||||
f->setNodeBox(core::aabbox3d<f32>(
|
||||
-0.5*BS,
|
||||
-0.5*BS,
|
||||
-0.05*BS,
|
||||
0.5*BS,
|
||||
0.5*BS,
|
||||
0.05*BS
|
||||
));
|
||||
f->setInventoryTextureNodeBox(i,"glass_pane_orange_side.png", "glass_orange.png", "glass_pane_orange_side.png");
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.15);
|
||||
|
||||
i = CONTENT_GLASS_PANE_PURPLE;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Purple Glass Pane");
|
||||
//f->light_propagates = true;
|
||||
//f->sunlight_propagates = true;
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->is_ground_content = true;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->visual_solidness = 1;
|
||||
f->setAllTextures("glass_pane_purple_side.png");
|
||||
f->setTexture(4,"glass_purple.png");
|
||||
f->setTexture(5,"glass_purple.png");
|
||||
#ifndef SERVER
|
||||
f->setAllTextureTypes(MATERIAL_ALPHA_BLEND);
|
||||
#endif
|
||||
f->setNodeBox(core::aabbox3d<f32>(
|
||||
-0.5*BS,
|
||||
-0.5*BS,
|
||||
-0.05*BS,
|
||||
0.5*BS,
|
||||
0.5*BS,
|
||||
0.05*BS
|
||||
));
|
||||
f->setInventoryTextureNodeBox(i,"glass_pane_purple_side.png", "glass_purple.png", "glass_pane_purple_side.png");
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.15);
|
||||
|
||||
i = CONTENT_GLASS_PANE_RED;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Red Glass Pane");
|
||||
//f->light_propagates = true;
|
||||
//f->sunlight_propagates = true;
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->is_ground_content = true;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->visual_solidness = 1;
|
||||
f->setAllTextures("glass_pane_red_side.png");
|
||||
f->setTexture(4,"glass_red.png");
|
||||
f->setTexture(5,"glass_red.png");
|
||||
#ifndef SERVER
|
||||
f->setAllTextureTypes(MATERIAL_ALPHA_BLEND);
|
||||
#endif
|
||||
f->setNodeBox(core::aabbox3d<f32>(
|
||||
-0.5*BS,
|
||||
-0.5*BS,
|
||||
-0.05*BS,
|
||||
0.5*BS,
|
||||
0.5*BS,
|
||||
0.05*BS
|
||||
));
|
||||
f->setInventoryTextureNodeBox(i,"glass_pane_red_side.png", "glass_red.png", "glass_pane_red_side.png");
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.15);
|
||||
|
||||
i = CONTENT_GLASS_PANE_YELLOW;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Yellow Glass Pane");
|
||||
//f->light_propagates = true;
|
||||
//f->sunlight_propagates = true;
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->is_ground_content = true;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->visual_solidness = 1;
|
||||
f->setAllTextures("glass_pane_yellow_side.png");
|
||||
f->setTexture(4,"glass_yellow.png");
|
||||
f->setTexture(5,"glass_yellow.png");
|
||||
#ifndef SERVER
|
||||
f->setAllTextureTypes(MATERIAL_ALPHA_BLEND);
|
||||
#endif
|
||||
f->setNodeBox(core::aabbox3d<f32>(
|
||||
-0.5*BS,
|
||||
-0.5*BS,
|
||||
-0.05*BS,
|
||||
0.5*BS,
|
||||
0.5*BS,
|
||||
0.05*BS
|
||||
));
|
||||
f->setInventoryTextureNodeBox(i,"glass_pane_yellow_side.png", "glass_yellow.png", "glass_pane_yellow_side.png");
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.15);
|
||||
|
||||
i = CONTENT_GLASS_PANE_BLACK;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Black Glass Pane");
|
||||
//f->light_propagates = true;
|
||||
//f->sunlight_propagates = true;
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->is_ground_content = true;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->visual_solidness = 1;
|
||||
f->setAllTextures("glass_pane_black_side.png");
|
||||
f->setTexture(4,"glass_black.png");
|
||||
f->setTexture(5,"glass_black.png");
|
||||
#ifndef SERVER
|
||||
f->setAllTextureTypes(MATERIAL_ALPHA_BLEND);
|
||||
#endif
|
||||
f->setNodeBox(core::aabbox3d<f32>(
|
||||
-0.5*BS,
|
||||
-0.5*BS,
|
||||
-0.05*BS,
|
||||
0.5*BS,
|
||||
0.5*BS,
|
||||
0.05*BS
|
||||
));
|
||||
f->setInventoryTextureNodeBox(i,"glass_pane_black_side.png", "glass_black.png", "glass_pane_black_side.png");
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.15);
|
||||
|
||||
i = CONTENT_GLASSLIGHT;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Glass Light");
|
||||
|
@ -1362,6 +1611,7 @@ void content_mapnode_init()
|
|||
f->draw_type = CDT_CUBELIKE;
|
||||
f->is_ground_content = true;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
f->cook_result = std::string("CraftItem saltpeter 1");
|
||||
setStoneLikeDiggingProperties(f->digging_properties, 0.5);
|
||||
|
||||
i = CONTENT_SPONGE;
|
||||
|
@ -1496,9 +1746,11 @@ void content_mapnode_init()
|
|||
f = &content_features(i);
|
||||
f->description = std::string("Carpet");
|
||||
f->setAllTextures("cotton.png");
|
||||
f->param_type = CPT_MINERAL;
|
||||
f->param_type = CPT_LIGHT;
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->is_ground_content = true;
|
||||
f->light_propagates = true;
|
||||
f->sunlight_propagates = true;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
content_mapnode_nodebox_carpet(f);
|
||||
|
@ -1510,9 +1762,11 @@ void content_mapnode_init()
|
|||
f = &content_features(i);
|
||||
f->description = std::string("Blue Carpet");
|
||||
f->setAllTextures("cotton_blue.png");
|
||||
f->param_type = CPT_MINERAL;
|
||||
f->param_type = CPT_LIGHT;
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->is_ground_content = true;
|
||||
f->light_propagates = true;
|
||||
f->sunlight_propagates = true;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
content_mapnode_nodebox_carpet(f);
|
||||
|
@ -1524,9 +1778,11 @@ void content_mapnode_init()
|
|||
f = &content_features(i);
|
||||
f->description = std::string("Green Carpet");
|
||||
f->setAllTextures("cotton_green.png");
|
||||
f->param_type = CPT_MINERAL;
|
||||
f->param_type = CPT_LIGHT;
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->is_ground_content = true;
|
||||
f->light_propagates = true;
|
||||
f->sunlight_propagates = true;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
content_mapnode_nodebox_carpet(f);
|
||||
|
@ -1538,9 +1794,11 @@ void content_mapnode_init()
|
|||
f = &content_features(i);
|
||||
f->description = std::string("Orange Carpet");
|
||||
f->setAllTextures("cotton_orange.png");
|
||||
f->param_type = CPT_MINERAL;
|
||||
f->param_type = CPT_LIGHT;
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->is_ground_content = true;
|
||||
f->light_propagates = true;
|
||||
f->sunlight_propagates = true;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
content_mapnode_nodebox_carpet(f);
|
||||
|
@ -1552,9 +1810,11 @@ void content_mapnode_init()
|
|||
f = &content_features(i);
|
||||
f->description = std::string("Purple Carpet");
|
||||
f->setAllTextures("cotton_purple.png");
|
||||
f->param_type = CPT_MINERAL;
|
||||
f->param_type = CPT_LIGHT;
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->is_ground_content = true;
|
||||
f->light_propagates = true;
|
||||
f->sunlight_propagates = true;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
content_mapnode_nodebox_carpet(f);
|
||||
|
@ -1566,9 +1826,11 @@ void content_mapnode_init()
|
|||
f = &content_features(i);
|
||||
f->description = std::string("Red Carpet");
|
||||
f->setAllTextures("cotton_red.png");
|
||||
f->param_type = CPT_MINERAL;
|
||||
f->param_type = CPT_LIGHT;
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->is_ground_content = true;
|
||||
f->light_propagates = true;
|
||||
f->sunlight_propagates = true;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
content_mapnode_nodebox_carpet(f);
|
||||
|
@ -1580,9 +1842,11 @@ void content_mapnode_init()
|
|||
f = &content_features(i);
|
||||
f->description = std::string("Yellow Carpet");
|
||||
f->setAllTextures("cotton_yellow.png");
|
||||
f->param_type = CPT_MINERAL;
|
||||
f->param_type = CPT_LIGHT;
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->is_ground_content = true;
|
||||
f->light_propagates = true;
|
||||
f->sunlight_propagates = true;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
content_mapnode_nodebox_carpet(f);
|
||||
|
@ -1594,9 +1858,11 @@ void content_mapnode_init()
|
|||
f = &content_features(i);
|
||||
f->description = std::string("Black Carpet");
|
||||
f->setAllTextures("cotton_black.png");
|
||||
f->param_type = CPT_MINERAL;
|
||||
f->param_type = CPT_LIGHT;
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->is_ground_content = true;
|
||||
f->light_propagates = true;
|
||||
f->sunlight_propagates = true;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
content_mapnode_nodebox_carpet(f);
|
||||
|
@ -1897,7 +2163,7 @@ void content_mapnode_init()
|
|||
f->wall_mounted = true;
|
||||
f->air_equivalent = true;
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_SIGN)+" 1";
|
||||
if(f->initial_metadata == NULL)
|
||||
f->initial_metadata = new SignNodeMetadata("Some sign");
|
||||
f->digging_properties.set("", DiggingProperties(true, 0.5, 0));
|
||||
|
@ -1908,12 +2174,11 @@ void content_mapnode_init()
|
|||
f->setAllTextures("sign.png");
|
||||
f->setTexture(4, "sign_back.png");
|
||||
f->setTexture(5, "sign_front.png"); // Z-
|
||||
f->setInventoryTexture("sign_inventory.png");
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_SIGN_WALL)+" 1";
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
if(f->initial_metadata == NULL)
|
||||
f->initial_metadata = new SignNodeMetadata("Some sign");
|
||||
f->digging_properties.set("", DiggingProperties(true, 0.5, 0));
|
||||
|
@ -1933,6 +2198,7 @@ void content_mapnode_init()
|
|||
0.4*BS,
|
||||
-0.05*BS
|
||||
));
|
||||
f->setInventoryTextureNodeBox(i,"sign.png", "sign_front.png", "sign.png");
|
||||
|
||||
i = CONTENT_SIGN_UD;
|
||||
f = &content_features(i);
|
||||
|
@ -1940,12 +2206,11 @@ void content_mapnode_init()
|
|||
f->setAllTextures("sign.png");
|
||||
f->setTexture(4, "sign_back_ud.png");
|
||||
f->setTexture(5, "sign_front_ud.png"); // Z-
|
||||
f->setInventoryTexture("sign_inventory.png");
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_SIGN_WALL)+" 1";
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_SIGN)+" 1";
|
||||
if(f->initial_metadata == NULL)
|
||||
f->initial_metadata = new SignNodeMetadata("Some sign");
|
||||
f->digging_properties.set("", DiggingProperties(true, 0.5, 0));
|
||||
|
@ -1965,6 +2230,7 @@ void content_mapnode_init()
|
|||
0.,
|
||||
-0.05*BS
|
||||
));
|
||||
f->setInventoryTextureNodeBox(i,"sign.png", "sign_front.png", "sign.png");
|
||||
|
||||
i = CONTENT_CHEST;
|
||||
f = &content_features(i);
|
||||
|
@ -2011,6 +2277,18 @@ void content_mapnode_init()
|
|||
f->initial_metadata = new FurnaceNodeMetadata();
|
||||
setStoneLikeDiggingProperties(f->digging_properties, 3.0);
|
||||
|
||||
i = CONTENT_ROUGHSTONE;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Rough Stone");
|
||||
f->setAllTextures("roughstone.png");
|
||||
f->setInventoryTextureCube("roughstone.png", "roughstone.png", "roughstone.png");
|
||||
f->param_type = CPT_NONE;
|
||||
f->draw_type = CDT_CUBELIKE;
|
||||
f->is_ground_content = true;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
f->cook_result = std::string("MaterialItem2 ")+itos(CONTENT_STONE)+" 1";
|
||||
setStoneLikeDiggingProperties(f->digging_properties, 0.9);
|
||||
|
||||
i = CONTENT_COBBLE;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Cobble Stone");
|
||||
|
@ -2154,18 +2432,18 @@ void content_mapnode_init()
|
|||
f->digging_properties.set("", DiggingProperties(true, 0.0, 0));
|
||||
|
||||
// slabs
|
||||
i = CONTENT_COBBLE_SLAB;
|
||||
i = CONTENT_ROUGHSTONE_SLAB;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Cobble Stone Slab");
|
||||
f->setAllTextures("cobble.png");
|
||||
f->description = std::string("Rough Stone Slab");
|
||||
f->setAllTextures("roughstone.png");
|
||||
f->param_type = CPT_NONE;
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
f->slab_cube_type = CONTENT_COBBLE;
|
||||
f->slab_cube_type = CONTENT_ROUGHSTONE;
|
||||
content_mapnode_nodebox_slab(f);
|
||||
f->setInventoryTextureNodeBox(i,"cobble.png", "cobble.png", "cobble.png");
|
||||
f->setInventoryTextureNodeBox(i,"rouchstone.png", "roughstone.png", "roughstone.png");
|
||||
setStoneLikeDiggingProperties(f->digging_properties, 0.9);
|
||||
|
||||
i = CONTENT_MOSSYCOBBLE_SLAB;
|
||||
|
@ -2254,17 +2532,17 @@ void content_mapnode_init()
|
|||
setDirtLikeDiggingProperties(f->digging_properties, 1.0);
|
||||
|
||||
// upside down slabs
|
||||
i = CONTENT_COBBLE_SLAB_UD;
|
||||
i = CONTENT_ROUGHSTONE_SLAB_UD;
|
||||
f = &content_features(i);
|
||||
f->setAllTextures("cobble.png");
|
||||
f->setAllTextures("roughstone.png");
|
||||
f->param_type = CPT_NONE;
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_COBBLE_SLAB)+" 1";
|
||||
f->slab_cube_type = CONTENT_COBBLE;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_ROUGHSTONE_SLAB)+" 1";
|
||||
f->slab_cube_type = CONTENT_ROUGHSTONE;
|
||||
content_mapnode_nodebox_slabud(f);
|
||||
f->setInventoryTextureNodeBox(i,"cobble.png", "cobble.png", "cobble.png");
|
||||
f->setInventoryTextureNodeBox(i,"roughstone.png", "roughstone.png", "roughstone.png");
|
||||
setStoneLikeDiggingProperties(f->digging_properties, 0.9);
|
||||
|
||||
i = CONTENT_MOSSYCOBBLE_SLAB_UD;
|
||||
|
@ -2347,17 +2625,17 @@ void content_mapnode_init()
|
|||
setDirtLikeDiggingProperties(f->digging_properties, 1.0);
|
||||
|
||||
// stairs
|
||||
i = CONTENT_COBBLE_STAIR;
|
||||
i = CONTENT_ROUGHSTONE_STAIR;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Cobble Stone Stair");
|
||||
f->description = std::string("Rough Stone Stair");
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->setAllTextures("cobble.png");
|
||||
f->setAllTextures("roughstone.png");
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
content_mapnode_nodebox_stair(f);
|
||||
f->setInventoryTextureNodeBox(i,"cobble.png", "cobble.png", "cobble.png");
|
||||
f->setInventoryTextureNodeBox(i,"roughstone.png", "roughstone.png", "roughstone.png");
|
||||
setStoneLikeDiggingProperties(f->digging_properties, 0.9);
|
||||
|
||||
i = CONTENT_MOSSYCOBBLE_STAIR;
|
||||
|
@ -2442,16 +2720,16 @@ void content_mapnode_init()
|
|||
setDirtLikeDiggingProperties(f->digging_properties, 1.0);
|
||||
|
||||
// upside down stairs
|
||||
i = CONTENT_COBBLE_STAIR_UD;
|
||||
i = CONTENT_ROUGHSTONE_STAIR_UD;
|
||||
f = &content_features(i);
|
||||
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||
f->setAllTextures("cobble.png");
|
||||
f->setAllTextures("roughstone.png");
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_COBBLE_STAIR)+" 1";
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_ROUGHSTONE_STAIR)+" 1";
|
||||
content_mapnode_nodebox_stairud(f);
|
||||
f->setInventoryTextureNodeBox(i,"cobble.png", "cobble.png", "cobble.png");
|
||||
f->setInventoryTextureNodeBox(i,"roughstone.png", "roughstone.png", "roughstone.png");
|
||||
setStoneLikeDiggingProperties(f->digging_properties, 0.9);
|
||||
|
||||
i = CONTENT_MOSSYCOBBLE_STAIR_UD;
|
||||
|
@ -3311,6 +3589,7 @@ void content_mapnode_init()
|
|||
f->setAllTextures("wildgrass_short.png");
|
||||
f->setAllTextureFlags(0);
|
||||
f->light_propagates = true;
|
||||
f->sunlight_propagates = true;
|
||||
f->param_type = CPT_LIGHT;
|
||||
f->draw_type = CDT_PLANTLIKE;
|
||||
f->air_equivalent = false; // grass grows underneath
|
||||
|
@ -3329,6 +3608,7 @@ void content_mapnode_init()
|
|||
f->setAllTextures("wildgrass_long.png");
|
||||
f->setAllTextureFlags(0);
|
||||
f->light_propagates = true;
|
||||
f->sunlight_propagates = true;
|
||||
f->param_type = CPT_LIGHT;
|
||||
f->draw_type = CDT_PLANTLIKE;
|
||||
f->air_equivalent = false; // grass grows underneath
|
||||
|
@ -3346,6 +3626,7 @@ void content_mapnode_init()
|
|||
f->setAllTextures("deadgrass.png");
|
||||
f->setAllTextureFlags(0);
|
||||
f->light_propagates = true;
|
||||
f->sunlight_propagates = true;
|
||||
f->param_type = CPT_LIGHT;
|
||||
f->draw_type = CDT_PLANTLIKE;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
|
@ -3362,6 +3643,7 @@ void content_mapnode_init()
|
|||
f->setAllTextures("flower_stem.png");
|
||||
f->setAllTextureFlags(0);
|
||||
f->light_propagates = true;
|
||||
f->sunlight_propagates = true;
|
||||
f->param_type = CPT_LIGHT;
|
||||
f->draw_type = CDT_PLANTLIKE;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
|
@ -3378,6 +3660,7 @@ void content_mapnode_init()
|
|||
f->setAllTextures("flower_rose.png");
|
||||
f->setAllTextureFlags(0);
|
||||
f->light_propagates = true;
|
||||
f->sunlight_propagates = true;
|
||||
f->param_type = CPT_LIGHT;
|
||||
f->draw_type = CDT_PLANTLIKE;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
|
@ -3394,6 +3677,7 @@ void content_mapnode_init()
|
|||
f->setAllTextures("flower_daffodil.png");
|
||||
f->setAllTextureFlags(0);
|
||||
f->light_propagates = true;
|
||||
f->sunlight_propagates = true;
|
||||
f->param_type = CPT_LIGHT;
|
||||
f->draw_type = CDT_PLANTLIKE;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
|
@ -3410,6 +3694,7 @@ void content_mapnode_init()
|
|||
f->setAllTextures("flower_tulip.png");
|
||||
f->setAllTextureFlags(0);
|
||||
f->light_propagates = true;
|
||||
f->sunlight_propagates = true;
|
||||
f->param_type = CPT_LIGHT;
|
||||
f->draw_type = CDT_PLANTLIKE;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
|
@ -3427,8 +3712,11 @@ void content_mapnode_init()
|
|||
f->setTexture(0,"flower_pot_raw_top.png");
|
||||
f->setTexture(1,"flower_pot_raw_bottom.png");
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->light_propagates = true;
|
||||
f->sunlight_propagates = true;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
f->cook_result = std::string("MaterialItem2 ")+itos(CONTENT_FLOWER_POT)+" 1";
|
||||
setStoneLikeDiggingProperties(f->digging_properties, 0.75);
|
||||
f->setNodeBox(core::aabbox3d<f32>(
|
||||
-0.5*BS,
|
||||
|
@ -3480,6 +3768,8 @@ void content_mapnode_init()
|
|||
f->setTexture(0,"flower_pot_top.png");
|
||||
f->setTexture(1,"flower_pot_bottom.png");
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->light_propagates = true;
|
||||
f->sunlight_propagates = true;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
setStoneLikeDiggingProperties(f->digging_properties, 0.75);
|
||||
|
@ -3540,6 +3830,20 @@ void content_mapnode_init()
|
|||
f->setInventoryTexture("cobble_wall_inv.png");
|
||||
setStoneLikeDiggingProperties(f->digging_properties, 0.9);
|
||||
|
||||
i = CONTENT_ROUGHSTONE_WALL;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Rough Stone Wall");
|
||||
f->setAllTextures("roughstone.png");
|
||||
f->light_propagates = true;
|
||||
f->param_type = CPT_LIGHT;
|
||||
f->draw_type = CDT_WALLLIKE;
|
||||
f->is_ground_content = true;
|
||||
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->setInventoryTexture("roughstone_wall_inv.png");
|
||||
setStoneLikeDiggingProperties(f->digging_properties, 0.9);
|
||||
|
||||
i = CONTENT_MOSSYCOBBLE_WALL;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Mossy Cobblestone Wall");
|
||||
|
@ -3597,6 +3901,25 @@ void content_mapnode_init()
|
|||
f->initial_metadata = new TNTNodeMetadata();
|
||||
setDirtLikeDiggingProperties(f->digging_properties, 1.0);
|
||||
|
||||
i = CONTENT_FLASH;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("In-Progress explosion - how did you get this???");
|
||||
f->setAllTextures("flash.png");
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->param_type = CPT_LIGHT;
|
||||
f->draw_type = CDT_GLASSLIKE;
|
||||
f->light_propagates = true;
|
||||
f->light_source = LIGHT_MAX-1;
|
||||
f->walkable = false;
|
||||
f->pointable = false;
|
||||
f->diggable = false;
|
||||
f->buildable_to = true;
|
||||
f->damage_per_second = 50;
|
||||
#ifndef SERVER
|
||||
f->setAllTextureTypes(MATERIAL_ALPHA_BLEND);
|
||||
f->post_effect_color = video::SColor(192, 255, 255, 64);
|
||||
#endif
|
||||
|
||||
// NOTE: Remember to add frequently used stuff to the texture atlas in tile.cpp
|
||||
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ MapNode mapnode_translate_to_internal(MapNode n_from, u8 version);
|
|||
#define CONTENT_BORDERSTONE 0x807 //11
|
||||
#define CONTENT_WOOD 0x808 //12
|
||||
#define CONTENT_SAND 0x809 //13
|
||||
#define CONTENT_COBBLE 0x80a //18
|
||||
#define CONTENT_ROUGHSTONE 0x80a //18
|
||||
#define CONTENT_STEEL 0x80b //19
|
||||
#define CONTENT_GLASS 0x80c //20
|
||||
#define CONTENT_MOSSYCOBBLE 0x80d //22
|
||||
|
@ -92,7 +92,7 @@ MapNode mapnode_translate_to_internal(MapNode n_from, u8 version);
|
|||
#define CONTENT_STONEBLOCK 0x81c
|
||||
#define CONTENT_SAPLING 0x820
|
||||
// slabs
|
||||
#define CONTENT_COBBLE_SLAB 0x821
|
||||
#define CONTENT_ROUGHSTONE_SLAB 0x821
|
||||
#define CONTENT_MOSSYCOBBLE_SLAB 0x822
|
||||
#define CONTENT_STONE_SLAB 0x823
|
||||
#define CONTENT_WOOD_SLAB 0x824
|
||||
|
@ -100,7 +100,7 @@ MapNode mapnode_translate_to_internal(MapNode n_from, u8 version);
|
|||
#define CONTENT_BRICK_SLAB 0x826
|
||||
#define CONTENT_SANDSTONE_SLAB 0x827
|
||||
// stairs
|
||||
#define CONTENT_COBBLE_STAIR 0x828
|
||||
#define CONTENT_ROUGHSTONE_STAIR 0x828
|
||||
#define CONTENT_MOSSYCOBBLE_STAIR 0x829
|
||||
#define CONTENT_STONE_STAIR 0x82a
|
||||
#define CONTENT_WOOD_STAIR 0x82b
|
||||
|
@ -113,7 +113,7 @@ MapNode mapnode_translate_to_internal(MapNode n_from, u8 version);
|
|||
#define CONTENT_SLAB_STAIR_MAX 0x82F
|
||||
#define CONTENT_SLAB_STAIR_FLIP 0x010
|
||||
// upside down slabs
|
||||
#define CONTENT_COBBLE_SLAB_UD 0x831
|
||||
#define CONTENT_ROUGHSTONE_SLAB_UD 0x831
|
||||
#define CONTENT_MOSSYCOBBLE_SLAB_UD 0x832
|
||||
#define CONTENT_STONE_SLAB_UD 0x833
|
||||
#define CONTENT_WOOD_SLAB_UD 0x834
|
||||
|
@ -121,7 +121,7 @@ MapNode mapnode_translate_to_internal(MapNode n_from, u8 version);
|
|||
#define CONTENT_BRICK_SLAB_UD 0x836
|
||||
#define CONTENT_SANDSTONE_SLAB_UD 0x837
|
||||
// upside down stairs
|
||||
#define CONTENT_COBBLE_STAIR_UD 0x838
|
||||
#define CONTENT_ROUGHSTONE_STAIR_UD 0x838
|
||||
#define CONTENT_MOSSYCOBBLE_STAIR_UD 0x839
|
||||
#define CONTENT_STONE_STAIR_UD 0x83a
|
||||
#define CONTENT_WOOD_STAIR_UD 0x83b
|
||||
|
@ -213,10 +213,11 @@ MapNode mapnode_translate_to_internal(MapNode n_from, u8 version);
|
|||
#define CONTENT_COTTON_YELLOW 0x895
|
||||
#define CONTENT_COTTON_BLACK 0x896
|
||||
// walls
|
||||
#define CONTENT_COBBLE_WALL 0x89A
|
||||
#define CONTENT_ROUGHSTONE_WALL 0x89A
|
||||
#define CONTENT_MOSSYCOBBLE_WALL 0x89B
|
||||
#define CONTENT_SANDSTONE_WALL 0x89C
|
||||
#define CONTENT_STONE_WALL 0x89D
|
||||
#define CONTENT_COBBLE_WALL 0x89E
|
||||
// sponge
|
||||
#define CONTENT_SPONGE 0x8A0
|
||||
#define CONTENT_SPONGE_FULL 0x8A1
|
||||
|
@ -261,6 +262,20 @@ MapNode mapnode_translate_to_internal(MapNode n_from, u8 version);
|
|||
#define CONTENT_FIRE 0x8C6
|
||||
#define CONTENT_FIRE_SHORTTERM 0x8C7
|
||||
#define CONTENT_TNT 0x8C8
|
||||
#define CONTENT_FLASH 0x8C9
|
||||
#define CONTENT_MESE_DIGGING 0x8CA
|
||||
#define CONTENT_COBBLE 0x8CB
|
||||
#define CONTENT_ROUGHSTONEBRICK 0x8CC
|
||||
#define CONTENT_ROUGHSTONEBLOCK 0x8CD
|
||||
// glass pane
|
||||
#define CONTENT_GLASS_PANE 0x900
|
||||
#define CONTENT_GLASS_PANE_BLUE 0x901
|
||||
#define CONTENT_GLASS_PANE_GREEN 0x902
|
||||
#define CONTENT_GLASS_PANE_ORANGE 0x903
|
||||
#define CONTENT_GLASS_PANE_PURPLE 0x904
|
||||
#define CONTENT_GLASS_PANE_RED 0x905
|
||||
#define CONTENT_GLASS_PANE_YELLOW 0x906
|
||||
#define CONTENT_GLASS_PANE_BLACK 0x907
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1103,7 +1103,7 @@ void ServerEnvironment::step(float dtime)
|
|||
*/
|
||||
if (n.getContent() == CONTENT_GRASS)
|
||||
{
|
||||
int f = (1000-(p.Y*2))+10;
|
||||
int f = (700-(p.Y*2))+10;
|
||||
if (p.Y > 1 && myrand()%f == 0) {
|
||||
MapNode n_top = m_map->getNodeNoEx(p+v3s16(0,1,0));
|
||||
if (n_top.getContent() == CONTENT_AIR && n_top.getLightBlend(getDayNightRatio()) >= 13) {
|
||||
|
@ -1262,7 +1262,7 @@ void ServerEnvironment::step(float dtime)
|
|||
if (n.getContent() == CONTENT_TNT) {
|
||||
NodeMetadata *meta = m_map->getNodeMetadata(p);
|
||||
if (meta && meta->getEnergy() == ENERGY_MAX) {
|
||||
bool can_spread = true;
|
||||
bool can_spread = g_settings->getBool("enable_tnt");
|
||||
s16 bs_rad = g_settings->getS16("borderstone_radius");
|
||||
bs_rad += 3;
|
||||
// if any node is border stone protected, don't destroy anything
|
||||
|
@ -1305,12 +1305,26 @@ void ServerEnvironment::step(float dtime)
|
|||
if (myrand()%3 == 0)
|
||||
continue;
|
||||
}
|
||||
m_map->removeNodeWithEvent(p+v3s16(x,y,z));
|
||||
n_test.setContent(CONTENT_FLASH);
|
||||
m_map->addNodeWithEvent(p+v3s16(x,y,z),n_test);
|
||||
}
|
||||
}
|
||||
// but still blow up
|
||||
m_map->removeNodeWithEvent(p);
|
||||
// TODO: damage nearby players
|
||||
}
|
||||
}
|
||||
/*
|
||||
mese prettiness
|
||||
*/
|
||||
if (n.getContent() == CONTENT_MESE_DIGGING) {
|
||||
v3f pp;
|
||||
pp.X = p.X;
|
||||
pp.Y = p.Y;
|
||||
pp.Z = p.Z;
|
||||
Player *nearest = getNearestConnectedPlayer(pp);
|
||||
if (nearest == NULL || nearest->getPosition().getDistanceFrom(pp*BS)/BS > 6.0) {
|
||||
n.setContent(CONTENT_MESE);
|
||||
m_map->addNodeWithEvent(p, n);
|
||||
}
|
||||
}
|
||||
/*
|
||||
|
|
58
src/game.cpp
|
@ -568,18 +568,52 @@ void getPointedNode(Client *client, v3f player_position,
|
|||
box.MaxEdge += npf;
|
||||
|
||||
if (box.intersectsWithLine(shootline)) {
|
||||
nodefound = true;
|
||||
nodepos = np;
|
||||
neighbourpos = np;
|
||||
mindistance = distance;
|
||||
const float d = 0.502;
|
||||
core::aabbox3d<f32> nodebox
|
||||
(-BS*d, -BS*d, -BS*d, BS*d, BS*d, BS*d);
|
||||
v3f nodepos_f = intToFloat(nodepos, BS);
|
||||
nodebox.MinEdge += nodepos_f;
|
||||
nodebox.MaxEdge += nodepos_f;
|
||||
nodehilightbox = nodebox;
|
||||
break;
|
||||
for(u16 i=0; i<6; i++) {
|
||||
v3f dir_f = v3f(dirs[i].X,
|
||||
dirs[i].Y, dirs[i].Z);
|
||||
v3f centerpoint = npf + dir_f * BS/2;
|
||||
f32 distance =
|
||||
(centerpoint - camera_position).getLength();
|
||||
|
||||
if(distance < mindistance)
|
||||
{
|
||||
core::CMatrix4<f32> m;
|
||||
m.buildRotateFromTo(v3f(0,0,1), dir_f);
|
||||
|
||||
// This is the back face
|
||||
v3f corners[2] = {
|
||||
v3f(BS/2, BS/2, BS/2),
|
||||
v3f(-BS/2, -BS/2, BS/2+d)
|
||||
};
|
||||
|
||||
for(u16 j=0; j<2; j++)
|
||||
{
|
||||
m.rotateVect(corners[j]);
|
||||
corners[j] += npf;
|
||||
}
|
||||
|
||||
core::aabbox3d<f32> facebox(corners[0]);
|
||||
facebox.addInternalPoint(corners[1]);
|
||||
|
||||
if(facebox.intersectsWithLine(shootline))
|
||||
{
|
||||
nodefound = true;
|
||||
nodepos = np;
|
||||
neighbourpos = np + dirs[i];
|
||||
mindistance = distance;
|
||||
|
||||
//nodehilightbox = facebox;
|
||||
|
||||
const float d = 0.502;
|
||||
core::aabbox3d<f32> nodebox
|
||||
(-BS*d, -BS*d, -BS*d, BS*d, BS*d, BS*d);
|
||||
v3f nodepos_f = intToFloat(nodepos, BS);
|
||||
nodebox.MinEdge += nodepos_f;
|
||||
nodebox.MaxEdge += nodepos_f;
|
||||
nodehilightbox = nodebox;
|
||||
}
|
||||
} // if distance < mindistance
|
||||
} // for dirs
|
||||
}
|
||||
}
|
||||
boxes.clear();
|
||||
|
|
|
@ -146,12 +146,13 @@ ServerActiveObject* InventoryItem::createSAO(ServerEnvironment *env, u16 id, v3f
|
|||
|
||||
bool MaterialItem::isCookable() const
|
||||
{
|
||||
return item_material_is_cookable(m_content);
|
||||
return (content_features(m_content).cook_result != "");
|
||||
}
|
||||
|
||||
InventoryItem *MaterialItem::createCookResult() const
|
||||
{
|
||||
return item_material_create_cook_result(m_content);
|
||||
std::istringstream is(content_features(m_content).cook_result, std::ios::binary);
|
||||
return InventoryItem::deSerialize(is);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -203,6 +203,9 @@ struct ContentFeatures
|
|||
std::string extra_dug_item;
|
||||
s32 extra_dug_item_rarity;
|
||||
|
||||
// the result of cooking this node
|
||||
std::string cook_result;
|
||||
|
||||
// Initial metadata is cloned from this
|
||||
NodeMetadata *initial_metadata;
|
||||
|
||||
|
@ -268,6 +271,9 @@ struct ContentFeatures
|
|||
often_contains_mineral = false;
|
||||
dug_item = "";
|
||||
slab_cube_type = CONTENT_IGNORE;
|
||||
extra_dug_item = "";
|
||||
extra_dug_item_rarity = 2;
|
||||
cook_result = "";
|
||||
initial_metadata = NULL;
|
||||
liquid_alternative_flowing = CONTENT_IGNORE;
|
||||
liquid_alternative_source = CONTENT_IGNORE;
|
||||
|
|
|
@ -2499,6 +2499,24 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
|
|||
if (meta && !meta->getEnergy())
|
||||
meta->energise(ENERGY_MAX,player->getPosition(),player->getPosition(),p_under);
|
||||
}
|
||||
}else if (n.getContent() == CONTENT_MESE) {
|
||||
core::list<u16> far_players;
|
||||
core::map<v3s16, MapBlock*> modified_blocks;
|
||||
n.setContent(CONTENT_MESE_DIGGING);
|
||||
sendAddNode(p_under, n, 0, &far_players, 30);
|
||||
{
|
||||
MapEditEventIgnorer ign(&m_ignore_map_edit_events);
|
||||
|
||||
std::string p_name = std::string(player->getName());
|
||||
m_env.getMap().addNodeAndUpdate(p_under, n, modified_blocks, p_name);
|
||||
}
|
||||
for(core::list<u16>::Iterator i = far_players.begin(); i != far_players.end(); i++) {
|
||||
u16 peer_id = *i;
|
||||
RemoteClient *client = getClient(peer_id);
|
||||
if (client == NULL)
|
||||
continue;
|
||||
client->SetBlocksNotSent(modified_blocks);
|
||||
}
|
||||
}
|
||||
/*
|
||||
NOTE: This can be used in the future to check if
|
||||
|
@ -3100,10 +3118,6 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
|
|||
<<(int)mitem->getMaterial()
|
||||
<<" at "<<PP(p_under)<<std::endl;
|
||||
|
||||
// Calculate direction for wall mounted stuff
|
||||
if(content_features(n).wall_mounted)
|
||||
n.param2 = packDir(p_under - p_over);
|
||||
|
||||
// Stairs and Slabs special functions
|
||||
if (n.getContent() >= CONTENT_SLAB_STAIR_MIN && n.getContent() <= CONTENT_SLAB_STAIR_UD_MAX) {
|
||||
MapNode abv = m_env.getMap().getNodeNoEx(p_over+p_dir);
|
||||
|
@ -3118,14 +3132,18 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
|
|||
}
|
||||
|
||||
// Signs?
|
||||
if (n.getContent() == CONTENT_SIGN_WALL) {
|
||||
if (n.getContent() == CONTENT_SIGN) {
|
||||
if (p_dir.Y == 1) {
|
||||
n.setContent(CONTENT_SIGN_UD);
|
||||
}else if (p_dir.Y == -1) {
|
||||
n.setContent(CONTENT_SIGN);
|
||||
}else if (p_dir.Y != -1) {
|
||||
n.setContent(CONTENT_SIGN_WALL);
|
||||
}
|
||||
}
|
||||
|
||||
// Calculate direction for wall mounted stuff
|
||||
if(content_features(n).wall_mounted)
|
||||
n.param2 = packDir(p_under - p_over);
|
||||
|
||||
// Calculate the direction for furnaces and chests and stuff
|
||||
if(content_features(n).param_type == CPT_FACEDIR_SIMPLE)
|
||||
{
|
||||
|
|