fire,tnt,stained clay, hay, sponges,terracotta, stained glass, flint, firestarter, gunpowder, walls, gates, more ores...
After Width: | Height: | Size: 470 B |
After Width: | Height: | Size: 446 B |
After Width: | Height: | Size: 249 B |
After Width: | Height: | Size: 362 B |
After Width: | Height: | Size: 847 B |
After Width: | Height: | Size: 207 B |
After Width: | Height: | Size: 757 B |
After Width: | Height: | Size: 388 B |
After Width: | Height: | Size: 383 B |
After Width: | Height: | Size: 404 B |
After Width: | Height: | Size: 395 B |
After Width: | Height: | Size: 404 B |
After Width: | Height: | Size: 403 B |
After Width: | Height: | Size: 387 B |
After Width: | Height: | Size: 277 B |
After Width: | Height: | Size: 358 B |
After Width: | Height: | Size: 405 B |
After Width: | Height: | Size: 208 B |
After Width: | Height: | Size: 382 B |
After Width: | Height: | Size: 261 B |
After Width: | Height: | Size: 364 B |
After Width: | Height: | Size: 224 B |
After Width: | Height: | Size: 356 B |
After Width: | Height: | Size: 361 B |
After Width: | Height: | Size: 258 B |
After Width: | Height: | Size: 222 B |
After Width: | Height: | Size: 288 B |
After Width: | Height: | Size: 259 B |
After Width: | Height: | Size: 254 B |
After Width: | Height: | Size: 273 B |
After Width: | Height: | Size: 367 B |
After Width: | Height: | Size: 384 B |
After Width: | Height: | Size: 270 B |
After Width: | Height: | Size: 350 B |
After Width: | Height: | Size: 269 B |
After Width: | Height: | Size: 361 B |
After Width: | Height: | Size: 186 B |
After Width: | Height: | Size: 161 B |
After Width: | Height: | Size: 264 B |
After Width: | Height: | Size: 370 B |
|
@ -22,6 +22,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "content_mapnode.h"
|
||||
#include "player.h"
|
||||
#include "mapnode.h" // For content_t
|
||||
#include "settings.h" // for g_settings
|
||||
|
||||
struct CraftDef {
|
||||
ItemSpec specs[9];
|
||||
|
@ -107,7 +108,7 @@ struct CraftDef {
|
|||
*/
|
||||
InventoryItem *craft_get_result(InventoryItem **items)
|
||||
{
|
||||
static CraftDef defs[135];
|
||||
static CraftDef defs[174];
|
||||
static int defs_init = 0;
|
||||
|
||||
// only initialise (and hence allocate) these once
|
||||
|
@ -431,6 +432,116 @@ InventoryItem *craft_get_result(InventoryItem **items)
|
|||
defs_init++;
|
||||
}
|
||||
|
||||
// copper block
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_CRAFT, "copper_ingot");
|
||||
defs[defs_init].specs[1] = ItemSpec(ITEM_CRAFT, "copper_ingot");
|
||||
defs[defs_init].specs[2] = ItemSpec(ITEM_CRAFT, "copper_ingot");
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_CRAFT, "copper_ingot");
|
||||
defs[defs_init].specs[4] = ItemSpec(ITEM_CRAFT, "copper_ingot");
|
||||
defs[defs_init].specs[5] = ItemSpec(ITEM_CRAFT, "copper_ingot");
|
||||
defs[defs_init].specs[6] = ItemSpec(ITEM_CRAFT, "copper_ingot");
|
||||
defs[defs_init].specs[7] = ItemSpec(ITEM_CRAFT, "copper_ingot");
|
||||
defs[defs_init].specs[8] = ItemSpec(ITEM_CRAFT, "copper_ingot");
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_COPPER, 1);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// Uncrafted Copper block
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_COPPER);
|
||||
defs[defs_init].item = new CraftItem("copper_ingot", 9);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// gold block
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_CRAFT, "gold_ingot");
|
||||
defs[defs_init].specs[1] = ItemSpec(ITEM_CRAFT, "gold_ingot");
|
||||
defs[defs_init].specs[2] = ItemSpec(ITEM_CRAFT, "gold_ingot");
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_CRAFT, "gold_ingot");
|
||||
defs[defs_init].specs[4] = ItemSpec(ITEM_CRAFT, "gold_ingot");
|
||||
defs[defs_init].specs[5] = ItemSpec(ITEM_CRAFT, "gold_ingot");
|
||||
defs[defs_init].specs[6] = ItemSpec(ITEM_CRAFT, "gold_ingot");
|
||||
defs[defs_init].specs[7] = ItemSpec(ITEM_CRAFT, "gold_ingot");
|
||||
defs[defs_init].specs[8] = ItemSpec(ITEM_CRAFT, "gold_ingot");
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_GOLD, 1);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// Uncrafted gold block
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_GOLD);
|
||||
defs[defs_init].item = new CraftItem("gold_ingot", 9);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// silver block
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_CRAFT, "silver_ingot");
|
||||
defs[defs_init].specs[1] = ItemSpec(ITEM_CRAFT, "silver_ingot");
|
||||
defs[defs_init].specs[2] = ItemSpec(ITEM_CRAFT, "silver_ingot");
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_CRAFT, "silver_ingot");
|
||||
defs[defs_init].specs[4] = ItemSpec(ITEM_CRAFT, "silver_ingot");
|
||||
defs[defs_init].specs[5] = ItemSpec(ITEM_CRAFT, "silver_ingot");
|
||||
defs[defs_init].specs[6] = ItemSpec(ITEM_CRAFT, "silver_ingot");
|
||||
defs[defs_init].specs[7] = ItemSpec(ITEM_CRAFT, "silver_ingot");
|
||||
defs[defs_init].specs[8] = ItemSpec(ITEM_CRAFT, "silver_ingot");
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_SILVER, 1);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// Uncrafted silver block
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_SILVER);
|
||||
defs[defs_init].item = new CraftItem("silver_ingot", 9);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// tin block
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_CRAFT, "tin_ingot");
|
||||
defs[defs_init].specs[1] = ItemSpec(ITEM_CRAFT, "tin_ingot");
|
||||
defs[defs_init].specs[2] = ItemSpec(ITEM_CRAFT, "tin_ingot");
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_CRAFT, "tin_ingot");
|
||||
defs[defs_init].specs[4] = ItemSpec(ITEM_CRAFT, "tin_ingot");
|
||||
defs[defs_init].specs[5] = ItemSpec(ITEM_CRAFT, "tin_ingot");
|
||||
defs[defs_init].specs[6] = ItemSpec(ITEM_CRAFT, "tin_ingot");
|
||||
defs[defs_init].specs[7] = ItemSpec(ITEM_CRAFT, "tin_ingot");
|
||||
defs[defs_init].specs[8] = ItemSpec(ITEM_CRAFT, "tin_ingot");
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_TIN, 1);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// Uncrafted tin block
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_TIN);
|
||||
defs[defs_init].item = new CraftItem("tin_ingot", 9);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// quartz block
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_CRAFT, "lump_of_quartz");
|
||||
defs[defs_init].specs[1] = ItemSpec(ITEM_CRAFT, "lump_of_quartz");
|
||||
defs[defs_init].specs[2] = ItemSpec(ITEM_CRAFT, "lump_of_quartz");
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_CRAFT, "lump_of_quartz");
|
||||
defs[defs_init].specs[4] = ItemSpec(ITEM_CRAFT, "lump_of_quartz");
|
||||
defs[defs_init].specs[5] = ItemSpec(ITEM_CRAFT, "lump_of_quartz");
|
||||
defs[defs_init].specs[6] = ItemSpec(ITEM_CRAFT, "lump_of_quartz");
|
||||
defs[defs_init].specs[7] = ItemSpec(ITEM_CRAFT, "lump_of_quartz");
|
||||
defs[defs_init].specs[8] = ItemSpec(ITEM_CRAFT, "lump_of_quartz");
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_QUARTZ, 1);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// Uncrafted quartz block
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_QUARTZ);
|
||||
defs[defs_init].item = new CraftItem("lump_of_quartz", 9);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// Sandstone
|
||||
{
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_SAND);
|
||||
|
@ -1249,6 +1360,17 @@ InventoryItem *craft_get_result(InventoryItem **items)
|
|||
defs_init++;
|
||||
}
|
||||
|
||||
// Tin bucket
|
||||
{
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_CRAFT, "tin_ingot");
|
||||
defs[defs_init].specs[5] = ItemSpec(ITEM_CRAFT, "tin_ingot");
|
||||
defs[defs_init].specs[6] = ItemSpec(ITEM_CRAFT, "tin_ingot");
|
||||
defs[defs_init].specs[7] = ItemSpec(ITEM_CRAFT, "tin_ingot");
|
||||
defs[defs_init].specs[8] = ItemSpec(ITEM_CRAFT, "tin_ingot");
|
||||
defs[defs_init].item = new ToolItem("TinBucket", 0);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// Cobble wall
|
||||
{
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_COBBLE);
|
||||
|
@ -1438,6 +1560,251 @@ InventoryItem *craft_get_result(InventoryItem **items)
|
|||
defs[defs_init].item = new MaterialItem(CONTENT_CLAY_BLACK, 1);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// blue glass
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_CRAFT, "dye_blue");
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_GLASS);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_GLASS_BLUE, 1);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// green glass
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_CRAFT, "dye_green");
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_GLASS);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_GLASS_GREEN, 1);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// orange glass
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_CRAFT, "dye_orange");
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_GLASS);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_GLASS_ORANGE, 1);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// purple glass
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_CRAFT, "dye_purple");
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_GLASS);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_GLASS_PURPLE, 1);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// red glass
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_CRAFT, "dye_red");
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_GLASS);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_GLASS_RED, 1);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// yellow glass
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_CRAFT, "dye_yellow");
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_GLASS);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_GLASS_YELLOW, 1);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// black glass
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_CRAFT, "dye_black");
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_GLASS);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_GLASS_BLACK, 1);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// Carpet
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_COTTON);
|
||||
defs[defs_init].specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_COTTON);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_CARPET, 3);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// blue Carpet
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_COTTON_BLUE);
|
||||
defs[defs_init].specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_COTTON_BLUE);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_CARPET_BLUE, 3);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// blue Carpet
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_CRAFT, "dye_blue");
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_CARPET);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_CARPET_BLUE, 1);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// green Carpet
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_COTTON_GREEN);
|
||||
defs[defs_init].specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_COTTON_GREEN);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_CARPET_GREEN, 3);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// green Carpet
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_CRAFT, "dye_green");
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_CARPET);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_CARPET_GREEN, 1);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// orange Carpet
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_COTTON_ORANGE);
|
||||
defs[defs_init].specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_COTTON_ORANGE);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_CARPET_ORANGE, 3);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// orange Carpet
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_CRAFT, "dye_orange");
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_CARPET);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_CARPET_ORANGE, 1);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// purple Carpet
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_COTTON_PURPLE);
|
||||
defs[defs_init].specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_COTTON_PURPLE);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_CARPET_PURPLE, 3);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// purple Carpet
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_CRAFT, "dye_purple");
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_CARPET);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_CARPET_PURPLE, 1);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// red Carpet
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_COTTON_RED);
|
||||
defs[defs_init].specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_COTTON_RED);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_CARPET_RED, 3);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// red Carpet
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_CRAFT, "dye_red");
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_CARPET);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_CARPET_RED, 1);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// yellow Carpet
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_COTTON_YELLOW);
|
||||
defs[defs_init].specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_COTTON_YELLOW);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_CARPET_YELLOW, 3);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// yellow Carpet
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_CRAFT, "dye_yellow");
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_CARPET);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_CARPET_YELLOW, 1);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// black Carpet
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_COTTON_BLACK);
|
||||
defs[defs_init].specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_COTTON_BLACK);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_CARPET_BLACK, 3);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// black Carpet
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_CRAFT, "dye_black");
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_CARPET);
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_CARPET_BLACK, 1);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// Coal block
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_CRAFT, "lump_of_coal");
|
||||
defs[defs_init].specs[1] = ItemSpec(ITEM_CRAFT, "lump_of_coal");
|
||||
defs[defs_init].specs[2] = ItemSpec(ITEM_CRAFT, "lump_of_coal");
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_CRAFT, "lump_of_coal");
|
||||
defs[defs_init].specs[4] = ItemSpec(ITEM_CRAFT, "lump_of_coal");
|
||||
defs[defs_init].specs[5] = ItemSpec(ITEM_CRAFT, "lump_of_coal");
|
||||
defs[defs_init].specs[6] = ItemSpec(ITEM_CRAFT, "lump_of_coal");
|
||||
defs[defs_init].specs[7] = ItemSpec(ITEM_CRAFT, "lump_of_coal");
|
||||
defs[defs_init].specs[8] = ItemSpec(ITEM_CRAFT, "lump_of_coal");
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_COAL, 1);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// Charoal block
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_CRAFT, "lump_of_charcoal");
|
||||
defs[defs_init].specs[1] = ItemSpec(ITEM_CRAFT, "lump_of_charcoal");
|
||||
defs[defs_init].specs[2] = ItemSpec(ITEM_CRAFT, "lump_of_charcoal");
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_CRAFT, "lump_of_charcoal");
|
||||
defs[defs_init].specs[4] = ItemSpec(ITEM_CRAFT, "lump_of_charcoal");
|
||||
defs[defs_init].specs[5] = ItemSpec(ITEM_CRAFT, "lump_of_charcoal");
|
||||
defs[defs_init].specs[6] = ItemSpec(ITEM_CRAFT, "lump_of_charcoal");
|
||||
defs[defs_init].specs[7] = ItemSpec(ITEM_CRAFT, "lump_of_charcoal");
|
||||
defs[defs_init].specs[8] = ItemSpec(ITEM_CRAFT, "lump_of_charcoal");
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_CHARCOAL, 1);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// fire starter
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_CRAFT, "lump_of_flint");
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_CRAFT, "steel_ingot");
|
||||
defs[defs_init].item = new ToolItem("FireStarter", 0);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// quartz dust
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_CRAFT, "lump_of_quartz");
|
||||
defs[defs_init].item = new CraftItem("quartz_dust", 1);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// gun powder
|
||||
{
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_CRAFT, "lump_of_charcoal");
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_CRAFT, "saltpeter");
|
||||
defs[defs_init].specs[6] = ItemSpec(ITEM_CRAFT, "lump_of_flint");
|
||||
defs[defs_init].item = new CraftItem("gunpowder", 2);
|
||||
defs_init++;
|
||||
}
|
||||
|
||||
// tnt
|
||||
if (g_settings->getBool("enable_tnt")) {
|
||||
defs[defs_init].specs[0] = ItemSpec(ITEM_CRAFT, "gunpowder");
|
||||
defs[defs_init].specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_SAND);
|
||||
defs[defs_init].specs[2] = ItemSpec(ITEM_CRAFT, "gunpowder");
|
||||
defs[defs_init].specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_SAND);
|
||||
defs[defs_init].specs[4] = ItemSpec(ITEM_CRAFT, "gunpowder");
|
||||
defs[defs_init].specs[5] = ItemSpec(ITEM_MATERIAL, CONTENT_SAND);
|
||||
defs[defs_init].specs[6] = ItemSpec(ITEM_CRAFT, "gunpowder");
|
||||
defs[defs_init].specs[7] = ItemSpec(ITEM_MATERIAL, CONTENT_SAND);
|
||||
defs[defs_init].specs[8] = ItemSpec(ITEM_CRAFT, "gunpowder");
|
||||
defs[defs_init].item = new MaterialItem(CONTENT_TNT, 1);
|
||||
defs_init++;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i=0; i<defs_init; i++) {
|
||||
|
|
|
@ -25,31 +25,33 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
bool item_material_is_cookable(content_t content)
|
||||
{
|
||||
if(content == CONTENT_TREE)
|
||||
return true;
|
||||
else if(content == CONTENT_COBBLE)
|
||||
return true;
|
||||
else if(content == CONTENT_SAND)
|
||||
return true;
|
||||
else if(content == CONTENT_FLOWER_POT_RAW)
|
||||
return true;
|
||||
else if(content == CONTENT_CLAY)
|
||||
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_coal", 1);
|
||||
else if(content == CONTENT_COBBLE)
|
||||
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)
|
||||
}else if (content == CONTENT_SAND) {
|
||||
return new MaterialItem(CONTENT_GLASS, 1);
|
||||
else if(content == CONTENT_FLOWER_POT_RAW)
|
||||
}else if (content == CONTENT_FLOWER_POT_RAW) {
|
||||
return new MaterialItem(CONTENT_FLOWER_POT, 1);
|
||||
else if(content == CONTENT_CLAY)
|
||||
}else if (content == CONTENT_CLAY) {
|
||||
return new MaterialItem(CONTENT_TERRACOTTA, 1);
|
||||
}else if (content == CONTENT_MESE) {
|
||||
return new CraftItem("saltpeter", 1);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -61,14 +63,36 @@ std::string item_craft_get_image_name(const std::string &subname)
|
|||
return "paper.png";
|
||||
}else if (subname == "book") {
|
||||
return "book.png";
|
||||
}else if (subname == "lump_of_charcoal") {
|
||||
return "lump_of_charcoal.png";
|
||||
}else if (subname == "lump_of_coal") {
|
||||
return "lump_of_coal.png";
|
||||
}else if (subname == "lump_of_iron") {
|
||||
return "lump_of_iron.png";
|
||||
}else if (subname == "lump_of_clay") {
|
||||
return "lump_of_clay.png";
|
||||
}else if (subname == "lump_of_tin") {
|
||||
return "lump_of_tin.png";
|
||||
}else if (subname == "lump_of_copper") {
|
||||
return "lump_of_copper.png";
|
||||
}else if (subname == "lump_of_silver") {
|
||||
return "lump_of_silver.png";
|
||||
}else if (subname == "lump_of_gold") {
|
||||
return "lump_of_gold.png";
|
||||
}else if (subname == "lump_of_quartz") {
|
||||
return "lump_of_quartz.png";
|
||||
}else if (subname == "lump_of_flint") {
|
||||
return "lump_of_flint.png";
|
||||
}else if (subname == "steel_ingot") {
|
||||
return "steel_ingot.png";
|
||||
}else if (subname == "tin_ingot") {
|
||||
return "tin_ingot.png";
|
||||
}else if (subname == "copper_ingot") {
|
||||
return "copper_ingot.png";
|
||||
}else if (subname == "silver_ingot") {
|
||||
return "silver_ingot.png";
|
||||
}else if (subname == "gold_ingot") {
|
||||
return "gold_ingot.png";
|
||||
}else if (subname == "clay_brick") {
|
||||
return "clay_brick.png";
|
||||
}else if (subname == "rat") {
|
||||
|
@ -99,6 +123,12 @@ std::string item_craft_get_image_name(const std::string &subname)
|
|||
return "dye_white.png";
|
||||
}else if (subname == "dye_black") {
|
||||
return "dye_black.png";
|
||||
}else if (subname == "quartz_dust") {
|
||||
return "quartz_dust.png";
|
||||
}else if (subname == "saltpeter") {
|
||||
return "saltpeter.png";
|
||||
}else if (subname == "gunpowder") {
|
||||
return "gunpowder.png";
|
||||
}else{
|
||||
return "cotton.png"; // just something
|
||||
}
|
||||
|
@ -110,12 +140,34 @@ std::string item_craft_get_name(const std::string &subname)
|
|||
return "Paper";
|
||||
}else if (subname == "book") {
|
||||
return "Book";
|
||||
}else if (subname == "lump_of_charcoal") {
|
||||
return "Charcoal Lump";
|
||||
}else if (subname == "lump_of_coal") {
|
||||
return "Coal Lump";
|
||||
}else if (subname == "lump_of_iron") {
|
||||
return "Iron Lump";
|
||||
return "Iron Ore";
|
||||
}else if (subname == "lump_of_clay") {
|
||||
return "Clay Lump";
|
||||
}else if (subname == "lump_of_tin") {
|
||||
return "Tin Ore";
|
||||
}else if (subname == "lump_of_copper") {
|
||||
return "Copper Ore";
|
||||
}else if (subname == "lump_of_silver") {
|
||||
return "Silver Ore";
|
||||
}else if (subname == "lump_of_gold") {
|
||||
return "Gold Ore";
|
||||
}else if (subname == "lump_of_quartz") {
|
||||
return "Quartz Crystal";
|
||||
}else if (subname == "tin_ingot") {
|
||||
return "Tin Ingot";
|
||||
}else if (subname == "copper_ingot") {
|
||||
return "Copper Ingot";
|
||||
}else if (subname == "silver_ingot") {
|
||||
return "Silver Ingot";
|
||||
}else if (subname == "gold_ingot") {
|
||||
return "Gold Ingot";
|
||||
}else if (subname == "lump_of_flint") {
|
||||
return "Flint";
|
||||
}else if (subname == "steel_ingot") {
|
||||
return "Steel Ingot";
|
||||
}else if (subname == "clay_brick") {
|
||||
|
@ -148,6 +200,12 @@ std::string item_craft_get_name(const std::string &subname)
|
|||
return "White Dye";
|
||||
}else if (subname == "dye_black") {
|
||||
return "Black Dye";
|
||||
}else if (subname == "quartz_dust") {
|
||||
return "Quartz Dust";
|
||||
}else if (subname == "saltpeter") {
|
||||
return "Salt Peter";
|
||||
}else if (subname == "gunpowder") {
|
||||
return "Gun Powder";
|
||||
}
|
||||
|
||||
return subname;
|
||||
|
@ -180,7 +238,16 @@ s16 item_craft_get_drop_count(const std::string &subname)
|
|||
|
||||
bool item_craft_is_cookable(const std::string &subname)
|
||||
{
|
||||
if(subname == "lump_of_iron" || subname == "lump_of_clay" || subname == "rat" || subname == "cooked_rat")
|
||||
if (
|
||||
subname == "lump_of_iron"
|
||||
|| subname == "lump_of_tin"
|
||||
|| subname == "lump_of_copper"
|
||||
|| subname == "lump_of_silver"
|
||||
|| subname == "lump_of_gold"
|
||||
|| subname == "lump_of_clay"
|
||||
|| subname == "rat"
|
||||
|| subname == "cooked_rat"
|
||||
)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
@ -188,37 +255,47 @@ bool item_craft_is_cookable(const std::string &subname)
|
|||
|
||||
InventoryItem* item_craft_create_cook_result(const std::string &subname)
|
||||
{
|
||||
if(subname == "lump_of_iron")
|
||||
if (subname == "lump_of_iron") {
|
||||
return new CraftItem("steel_ingot", 1);
|
||||
else if(subname == "lump_of_clay")
|
||||
}else if (subname == "lump_of_tin") {
|
||||
return new CraftItem("tin_ingot", 1);
|
||||
}else if (subname == "lump_of_copper") {
|
||||
return new CraftItem("copper_ingot", 1);
|
||||
}else if (subname == "lump_of_silver") {
|
||||
return new CraftItem("silver_ingot", 1);
|
||||
}else if (subname == "lump_of_gold") {
|
||||
return new CraftItem("gold_ingot", 1);
|
||||
}else if (subname == "lump_of_clay") {
|
||||
return new CraftItem("clay_brick", 1);
|
||||
else if(subname == "rat")
|
||||
}else if (subname == "rat") {
|
||||
return new CraftItem("cooked_rat", 1);
|
||||
else if(subname == "cooked_rat")
|
||||
}else if (subname == "cooked_rat") {
|
||||
return new CraftItem("scorched_stuff", 1);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool item_craft_is_eatable(const std::string &subname)
|
||||
{
|
||||
if(subname == "cooked_rat")
|
||||
return true;
|
||||
else if(subname == "apple")
|
||||
return true;
|
||||
else if(subname == "apple_iron")
|
||||
if (
|
||||
subname == "cooked_rat"
|
||||
|| subname == "apple"
|
||||
|| subname == "apple_iron"
|
||||
)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
s16 item_craft_eat_hp_change(const std::string &subname)
|
||||
{
|
||||
if(subname == "cooked_rat")
|
||||
if (subname == "cooked_rat") {
|
||||
return 6; // 3 hearts
|
||||
else if(subname == "apple")
|
||||
}else if (subname == "apple") {
|
||||
return 4; // 2 hearts
|
||||
else if(subname == "apple_iron")
|
||||
}else if (subname == "apple_iron") {
|
||||
return 8; // 4 hearts
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -575,6 +575,18 @@ static void content_mapnode_nodebox_gateo(ContentFeatures *f)
|
|||
));
|
||||
}
|
||||
|
||||
static void content_mapnode_nodebox_carpet(ContentFeatures *f)
|
||||
{
|
||||
f->setNodeBox(core::aabbox3d<f32>(
|
||||
-0.5*BS,
|
||||
-0.5*BS,
|
||||
-0.5*BS,
|
||||
0.5*BS,
|
||||
-0.4*BS,
|
||||
0.5*BS
|
||||
));
|
||||
}
|
||||
|
||||
/*
|
||||
A conversion table for backwards compatibility.
|
||||
Maps <=v19 content types to current ones.
|
||||
|
@ -666,6 +678,30 @@ void content_mapnode_init()
|
|||
if(invisible_stone)
|
||||
f->solidness = 0; // For debugging, hides regular stone
|
||||
|
||||
i = CONTENT_COAL;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Coal Block");
|
||||
f->setAllTextures("coal.png");
|
||||
f->setInventoryTextureCube("coal.png", "coal.png", "coal.png");
|
||||
f->param_type = CPT_MINERAL;
|
||||
f->draw_type = CDT_CUBELIKE;
|
||||
f->is_ground_content = true;
|
||||
f->flammable = 2; // can be set on fire
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
setStoneLikeDiggingProperties(f->digging_properties, 1.0);
|
||||
|
||||
i = CONTENT_CHARCOAL;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Charcoal Block");
|
||||
f->setAllTextures("charcoal.png");
|
||||
f->setInventoryTextureCube("charcoal.png", "charcoal.png", "charcoal.png");
|
||||
f->param_type = CPT_MINERAL;
|
||||
f->draw_type = CDT_CUBELIKE;
|
||||
f->is_ground_content = true;
|
||||
f->flammable = 2; // can be set on fire
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
setStoneLikeDiggingProperties(f->digging_properties, 1.0);
|
||||
|
||||
i = CONTENT_STONEBRICK;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Stone Brick");
|
||||
|
@ -741,6 +777,8 @@ void content_mapnode_init()
|
|||
f->draw_type = CDT_CUBELIKE;
|
||||
f->is_ground_content = true;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
f->extra_dug_item = std::string("CraftItem lump_of_flint 1");
|
||||
f->extra_dug_item_rarity = 10;
|
||||
setDirtLikeDiggingProperties(f->digging_properties, 1.75);
|
||||
|
||||
i = CONTENT_SANDSTONE;
|
||||
|
@ -943,6 +981,7 @@ void content_mapnode_init()
|
|||
f->param_type = CPT_MINERAL;
|
||||
f->draw_type = CDT_CUBELIKE;
|
||||
f->is_ground_content = true;
|
||||
f->flammable = 2; // can be set on fire
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 1.0);
|
||||
|
||||
|
@ -956,6 +995,7 @@ void content_mapnode_init()
|
|||
f->param_type = CPT_MINERAL;
|
||||
f->draw_type = CDT_CUBELIKE;
|
||||
//f->is_ground_content = true;
|
||||
f->flammable = 2; // can be set on fire
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 1.0);
|
||||
|
||||
|
@ -973,6 +1013,7 @@ void content_mapnode_init()
|
|||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->walkable = false;
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.10);
|
||||
|
||||
i = CONTENT_LEAVES;
|
||||
|
@ -987,11 +1028,15 @@ void content_mapnode_init()
|
|||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->visual_solidness = 1;
|
||||
f->setAllTextures("leaves.png");
|
||||
#ifndef SERVER
|
||||
f->setAllTextureTypes(MATERIAL_ALPHA_SIMPLE);
|
||||
#endif
|
||||
f->setInventoryTextureCube("leaves.png", "leaves.png", "leaves.png");
|
||||
}else{
|
||||
f->draw_type = CDT_CUBELIKE;
|
||||
f->setAllTextures("[noalpha:leaves.png");
|
||||
}
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
f->extra_dug_item = std::string("MaterialItem2 ")+itos(CONTENT_SAPLING)+" 1";
|
||||
f->extra_dug_item_rarity = 20;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
|
@ -1007,11 +1052,15 @@ void content_mapnode_init()
|
|||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->visual_solidness = 1;
|
||||
f->setAllTextures("leaves.png");
|
||||
#ifndef SERVER
|
||||
f->setAllTextureTypes(MATERIAL_ALPHA_SIMPLE);
|
||||
#endif
|
||||
f->setInventoryTextureCube("leaves.png", "leaves.png", "leaves.png");
|
||||
}else{
|
||||
f->draw_type = CDT_CUBELIKE;
|
||||
f->setAllTextures("[noalpha:leaves.png");
|
||||
}
|
||||
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";
|
||||
setLeafLikeDiggingProperties(f->digging_properties, 0.15);
|
||||
|
||||
|
@ -1025,6 +1074,7 @@ void content_mapnode_init()
|
|||
f->param_type = CPT_MINERAL;
|
||||
f->draw_type = CDT_CUBELIKE;
|
||||
f->is_ground_content = 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";
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.75);
|
||||
|
||||
|
@ -1041,6 +1091,7 @@ void content_mapnode_init()
|
|||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->walkable = false;
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.25);
|
||||
|
||||
i = CONTENT_BOOKSHELF;
|
||||
|
@ -1053,10 +1104,12 @@ void content_mapnode_init()
|
|||
f->param_type = CPT_MINERAL;
|
||||
f->draw_type = CDT_CUBELIKE;
|
||||
f->is_ground_content = true;
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.75);
|
||||
|
||||
i = CONTENT_GLASS;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Glass");
|
||||
f->light_propagates = true;
|
||||
f->sunlight_propagates = true;
|
||||
f->param_type = CPT_LIGHT;
|
||||
|
@ -1066,9 +1119,138 @@ void content_mapnode_init()
|
|||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->visual_solidness = 1;
|
||||
f->setAllTextures("glass.png");
|
||||
#ifndef SERVER
|
||||
f->setAllTextureTypes(MATERIAL_ALPHA_BLEND);
|
||||
#endif
|
||||
f->setInventoryTextureCube("glass.png", "glass.png", "glass.png");
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.15);
|
||||
|
||||
i = CONTENT_GLASS_BLUE;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Blue Glass");
|
||||
f->light_propagates = true;
|
||||
f->sunlight_propagates = true;
|
||||
f->param_type = CPT_LIGHT;
|
||||
f->draw_type = CDT_GLASSLIKE;
|
||||
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_blue.png");
|
||||
#ifndef SERVER
|
||||
f->setAllTextureTypes(MATERIAL_ALPHA_BLEND);
|
||||
#endif
|
||||
f->setInventoryTextureCube("glass_blue.png", "glass_blue.png", "glass_blue.png");
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.15);
|
||||
|
||||
i = CONTENT_GLASS_GREEN;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Green Glass");
|
||||
f->light_propagates = true;
|
||||
f->sunlight_propagates = true;
|
||||
f->param_type = CPT_LIGHT;
|
||||
f->draw_type = CDT_GLASSLIKE;
|
||||
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_green.png");
|
||||
#ifndef SERVER
|
||||
f->setAllTextureTypes(MATERIAL_ALPHA_BLEND);
|
||||
#endif
|
||||
f->setInventoryTextureCube("glass_green.png", "glass_green.png", "glass_green.png");
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.15);
|
||||
|
||||
i = CONTENT_GLASS_ORANGE;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Orange Glass");
|
||||
f->light_propagates = true;
|
||||
f->sunlight_propagates = true;
|
||||
f->param_type = CPT_LIGHT;
|
||||
f->draw_type = CDT_GLASSLIKE;
|
||||
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_orange.png");
|
||||
#ifndef SERVER
|
||||
f->setAllTextureTypes(MATERIAL_ALPHA_BLEND);
|
||||
#endif
|
||||
f->setInventoryTextureCube("glass_orange.png", "glass_orange.png", "glass_orange.png");
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.15);
|
||||
|
||||
i = CONTENT_GLASS_PURPLE;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Purple Glass");
|
||||
f->light_propagates = true;
|
||||
f->sunlight_propagates = true;
|
||||
f->param_type = CPT_LIGHT;
|
||||
f->draw_type = CDT_GLASSLIKE;
|
||||
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_purple.png");
|
||||
#ifndef SERVER
|
||||
f->setAllTextureTypes(MATERIAL_ALPHA_BLEND);
|
||||
#endif
|
||||
f->setInventoryTextureCube("glass_purple.png", "glass_purple.png", "glass_purple.png");
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.15);
|
||||
|
||||
i = CONTENT_GLASS_RED;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Red Glass");
|
||||
f->light_propagates = true;
|
||||
f->sunlight_propagates = true;
|
||||
f->param_type = CPT_LIGHT;
|
||||
f->draw_type = CDT_GLASSLIKE;
|
||||
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_red.png");
|
||||
#ifndef SERVER
|
||||
f->setAllTextureTypes(MATERIAL_ALPHA_BLEND);
|
||||
#endif
|
||||
f->setInventoryTextureCube("glass_red.png", "glass_red.png", "glass_red.png");
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.15);
|
||||
|
||||
i = CONTENT_GLASS_YELLOW;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Yellow Glass");
|
||||
f->light_propagates = true;
|
||||
f->sunlight_propagates = true;
|
||||
f->param_type = CPT_LIGHT;
|
||||
f->draw_type = CDT_GLASSLIKE;
|
||||
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_yellow.png");
|
||||
#ifndef SERVER
|
||||
f->setAllTextureTypes(MATERIAL_ALPHA_BLEND);
|
||||
#endif
|
||||
f->setInventoryTextureCube("glass_yellow.png", "glass_yellow.png", "glass_yellow.png");
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.15);
|
||||
|
||||
i = CONTENT_GLASS_BLACK;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Black Glass");
|
||||
f->light_propagates = true;
|
||||
f->sunlight_propagates = true;
|
||||
f->param_type = CPT_LIGHT;
|
||||
f->draw_type = CDT_GLASSLIKE;
|
||||
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_black.png");
|
||||
#ifndef SERVER
|
||||
f->setAllTextureTypes(MATERIAL_ALPHA_BLEND);
|
||||
#endif
|
||||
f->setInventoryTextureCube("glass_black.png", "glass_black.png", "glass_black.png");
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.15);
|
||||
|
||||
i = CONTENT_GLASSLIGHT;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Glass Light");
|
||||
|
@ -1081,6 +1263,9 @@ void content_mapnode_init()
|
|||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->visual_solidness = 1;
|
||||
f->setAllTextures("glasslight.png");
|
||||
#ifndef SERVER
|
||||
f->setAllTextureTypes(MATERIAL_ALPHA_BLEND);
|
||||
#endif
|
||||
f->setInventoryTextureCube("glasslight.png", "glasslight.png", "glasslight.png");
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.15);
|
||||
f->light_source = LIGHT_MAX-1;
|
||||
|
@ -1098,6 +1283,7 @@ void content_mapnode_init()
|
|||
f->air_equivalent = true; // grass grows underneath
|
||||
f->setInventoryTexture("fence.png");
|
||||
f->used_texturenames["fence.png"] = true;
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.75);
|
||||
|
||||
i = CONTENT_RAIL;
|
||||
|
@ -1130,6 +1316,7 @@ void content_mapnode_init()
|
|||
f->air_equivalent = true;
|
||||
f->walkable = false;
|
||||
f->climbable = true;
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.5);
|
||||
|
||||
i = CONTENT_BORDERSTONE;
|
||||
|
@ -1152,6 +1339,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->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.75);
|
||||
|
||||
i = CONTENT_JUNGLEWOOD;
|
||||
|
@ -1162,6 +1350,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->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.75);
|
||||
|
||||
i = CONTENT_MESE;
|
||||
|
@ -1174,17 +1363,6 @@ void content_mapnode_init()
|
|||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
setStoneLikeDiggingProperties(f->digging_properties, 0.5);
|
||||
|
||||
i = CONTENT_COTTON;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Cotton");
|
||||
f->setAllTextures("cotton.png");
|
||||
f->setInventoryTextureCube("cotton.png", "cotton.png", "cotton.png");
|
||||
f->param_type = CPT_MINERAL;
|
||||
f->draw_type = CDT_CUBELIKE;
|
||||
f->is_ground_content = true;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
setDirtLikeDiggingProperties(f->digging_properties, 1.0);
|
||||
|
||||
i = CONTENT_SPONGE;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Sponge");
|
||||
|
@ -1194,6 +1372,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->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
setDirtLikeDiggingProperties(f->digging_properties, 1.0);
|
||||
|
||||
i = CONTENT_SPONGE_FULL;
|
||||
|
@ -1220,6 +1399,18 @@ void content_mapnode_init()
|
|||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
setLeafLikeDiggingProperties(f->digging_properties, 0.6);
|
||||
|
||||
i = CONTENT_COTTON;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Cotton");
|
||||
f->setAllTextures("cotton.png");
|
||||
f->setInventoryTextureCube("cotton.png", "cotton.png", "cotton.png");
|
||||
f->param_type = CPT_MINERAL;
|
||||
f->draw_type = CDT_CUBELIKE;
|
||||
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
|
||||
setDirtLikeDiggingProperties(f->digging_properties, 1.0);
|
||||
|
||||
i = CONTENT_COTTON_BLUE;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Blue Cotton");
|
||||
|
@ -1229,6 +1420,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->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
setDirtLikeDiggingProperties(f->digging_properties, 1.0);
|
||||
|
||||
i = CONTENT_COTTON_GREEN;
|
||||
|
@ -1240,6 +1432,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->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
setDirtLikeDiggingProperties(f->digging_properties, 1.0);
|
||||
|
||||
i = CONTENT_COTTON_ORANGE;
|
||||
|
@ -1251,6 +1444,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->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
setDirtLikeDiggingProperties(f->digging_properties, 1.0);
|
||||
|
||||
i = CONTENT_COTTON_PURPLE;
|
||||
|
@ -1262,6 +1456,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->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
setDirtLikeDiggingProperties(f->digging_properties, 1.0);
|
||||
|
||||
i = CONTENT_COTTON_RED;
|
||||
|
@ -1273,6 +1468,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->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
setDirtLikeDiggingProperties(f->digging_properties, 1.0);
|
||||
|
||||
i = CONTENT_COTTON_YELLOW;
|
||||
|
@ -1284,6 +1480,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->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
setDirtLikeDiggingProperties(f->digging_properties, 1.0);
|
||||
|
||||
i = CONTENT_COTTON_BLACK;
|
||||
|
@ -1295,6 +1492,119 @@ void content_mapnode_init()
|
|||
f->draw_type = CDT_CUBELIKE;
|
||||
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
|
||||
setDirtLikeDiggingProperties(f->digging_properties, 1.0);
|
||||
|
||||
i = CONTENT_CARPET;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Carpet");
|
||||
f->setAllTextures("cotton.png");
|
||||
f->param_type = CPT_MINERAL;
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->is_ground_content = true;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
content_mapnode_nodebox_carpet(f);
|
||||
f->setInventoryTextureNodeBox(i,"cotton.png", "cotton.png", "cotton.png");
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
setDirtLikeDiggingProperties(f->digging_properties, 1.0);
|
||||
|
||||
i = CONTENT_CARPET_BLUE;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Blue Carpet");
|
||||
f->setAllTextures("cotton_blue.png");
|
||||
f->param_type = CPT_MINERAL;
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->is_ground_content = true;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
content_mapnode_nodebox_carpet(f);
|
||||
f->setInventoryTextureNodeBox(i,"cotton_blue.png", "cotton_blue.png", "cotton_blue.png");
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
setDirtLikeDiggingProperties(f->digging_properties, 1.0);
|
||||
|
||||
i = CONTENT_CARPET_GREEN;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Green Carpet");
|
||||
f->setAllTextures("cotton_green.png");
|
||||
f->param_type = CPT_MINERAL;
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->is_ground_content = true;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
content_mapnode_nodebox_carpet(f);
|
||||
f->setInventoryTextureNodeBox(i,"cotton_green.png", "cotton_green.png", "cotton_green.png");
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
setDirtLikeDiggingProperties(f->digging_properties, 1.0);
|
||||
|
||||
i = CONTENT_CARPET_ORANGE;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Orange Carpet");
|
||||
f->setAllTextures("cotton_orange.png");
|
||||
f->param_type = CPT_MINERAL;
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->is_ground_content = true;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
content_mapnode_nodebox_carpet(f);
|
||||
f->setInventoryTextureNodeBox(i,"cotton_orange.png", "cotton_orange.png", "cotton_orange.png");
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
setDirtLikeDiggingProperties(f->digging_properties, 1.0);
|
||||
|
||||
i = CONTENT_CARPET_PURPLE;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Purple Carpet");
|
||||
f->setAllTextures("cotton_purple.png");
|
||||
f->param_type = CPT_MINERAL;
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->is_ground_content = true;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
content_mapnode_nodebox_carpet(f);
|
||||
f->setInventoryTextureNodeBox(i,"cotton_purple.png", "cotton_purple.png", "cotton_purple.png");
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
setDirtLikeDiggingProperties(f->digging_properties, 1.0);
|
||||
|
||||
i = CONTENT_CARPET_RED;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Red Carpet");
|
||||
f->setAllTextures("cotton_red.png");
|
||||
f->param_type = CPT_MINERAL;
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->is_ground_content = true;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
content_mapnode_nodebox_carpet(f);
|
||||
f->setInventoryTextureNodeBox(i,"cotton_red.png", "cotton_red.png", "cotton_red.png");
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
setDirtLikeDiggingProperties(f->digging_properties, 1.0);
|
||||
|
||||
i = CONTENT_CARPET_YELLOW;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Yellow Carpet");
|
||||
f->setAllTextures("cotton_yellow.png");
|
||||
f->param_type = CPT_MINERAL;
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->is_ground_content = true;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
content_mapnode_nodebox_carpet(f);
|
||||
f->setInventoryTextureNodeBox(i,"cotton_yellow.png", "cotton_yellow.png", "cotton_yellow.png");
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
setDirtLikeDiggingProperties(f->digging_properties, 1.0);
|
||||
|
||||
i = CONTENT_CARPET_BLACK;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Black Carpet");
|
||||
f->setAllTextures("cotton_black.png");
|
||||
f->param_type = CPT_MINERAL;
|
||||
f->draw_type = CDT_NODEBOX;
|
||||
f->is_ground_content = true;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
content_mapnode_nodebox_carpet(f);
|
||||
f->setInventoryTextureNodeBox(i,"cotton_black.png", "cotton_black.png", "cotton_black.png");
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
setDirtLikeDiggingProperties(f->digging_properties, 1.0);
|
||||
|
||||
i = CONTENT_AIR;
|
||||
|
@ -1428,6 +1738,7 @@ void content_mapnode_init()
|
|||
f->pointable = false;
|
||||
f->diggable = false;
|
||||
f->buildable_to = true;
|
||||
f->flammable = 2; // can be set on fire
|
||||
f->liquid_type = LIQUID_FLOWING;
|
||||
f->liquid_alternative_flowing = CONTENT_LAVA;
|
||||
f->liquid_alternative_source = CONTENT_LAVASOURCE;
|
||||
|
@ -1490,6 +1801,7 @@ void content_mapnode_init()
|
|||
f->pointable = false;
|
||||
//f->diggable = false;
|
||||
f->buildable_to = true;
|
||||
f->flammable = 2; // can be set on fire
|
||||
f->liquid_type = LIQUID_SOURCE;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
f->liquid_alternative_flowing = CONTENT_LAVA;
|
||||
|
@ -1517,6 +1829,44 @@ void content_mapnode_init()
|
|||
#endif
|
||||
setWaterLikeDiggingProperties(f->digging_properties, 0.5);
|
||||
|
||||
i = CONTENT_FIRE;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Fire");
|
||||
f->setAllTextures("fire.png");
|
||||
f->setAllTextureFlags(0);
|
||||
f->param_type = CPT_LIGHT;
|
||||
f->draw_type = CDT_PLANTLIKE;
|
||||
f->light_propagates = true;
|
||||
f->light_source = LIGHT_MAX-1;
|
||||
f->solidness = 0; // Drawn separately, makes no faces
|
||||
f->walkable = false;
|
||||
f->pointable = false;
|
||||
f->diggable = false;
|
||||
f->buildable_to = true;
|
||||
f->damage_per_second = 4*2;
|
||||
#ifndef SERVER
|
||||
f->post_effect_color = video::SColor(192, 255, 64, 0);
|
||||
#endif
|
||||
|
||||
i = CONTENT_FIRE_SHORTTERM;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Fire");
|
||||
f->setAllTextures("fire.png");
|
||||
f->setAllTextureFlags(0);
|
||||
f->param_type = CPT_LIGHT;
|
||||
f->draw_type = CDT_PLANTLIKE;
|
||||
f->light_propagates = true;
|
||||
f->light_source = LIGHT_MAX-1;
|
||||
f->solidness = 0; // Drawn separately, makes no faces
|
||||
f->walkable = false;
|
||||
f->pointable = false;
|
||||
f->diggable = false;
|
||||
f->buildable_to = true;
|
||||
f->damage_per_second = 4*2;
|
||||
#ifndef SERVER
|
||||
f->post_effect_color = video::SColor(192, 255, 64, 0);
|
||||
#endif
|
||||
|
||||
i = CONTENT_TORCH;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Torch");
|
||||
|
@ -1530,6 +1880,7 @@ void content_mapnode_init()
|
|||
f->walkable = false;
|
||||
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->light_source = LIGHT_MAX-1;
|
||||
f->digging_properties.set("", DiggingProperties(true, 0.0, 0));
|
||||
|
@ -1547,6 +1898,7 @@ void content_mapnode_init()
|
|||
f->walkable = false;
|
||||
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";
|
||||
if(f->initial_metadata == NULL)
|
||||
f->initial_metadata = new SignNodeMetadata("Some sign");
|
||||
|
@ -1562,6 +1914,7 @@ void content_mapnode_init()
|
|||
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";
|
||||
if(f->initial_metadata == NULL)
|
||||
f->initial_metadata = new SignNodeMetadata("Some sign");
|
||||
|
@ -1593,6 +1946,7 @@ void content_mapnode_init()
|
|||
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";
|
||||
if(f->initial_metadata == NULL)
|
||||
f->initial_metadata = new SignNodeMetadata("Some sign");
|
||||
|
@ -1692,6 +2046,61 @@ void content_mapnode_init()
|
|||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
setStoneLikeDiggingProperties(f->digging_properties, 5.0);
|
||||
|
||||
i = CONTENT_COPPER;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Copper Block");
|
||||
f->setAllTextures("copper_block.png");
|
||||
f->setInventoryTextureCube("copper_block.png", "copper_block.png", "copper_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, 5.0);
|
||||
|
||||
i = CONTENT_GOLD;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Gold Block");
|
||||
f->setAllTextures("gold_block.png");
|
||||
f->setInventoryTextureCube("gold_block.png", "gold_block.png", "gold_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, 5.0);
|
||||
|
||||
i = CONTENT_SILVER;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Silver Block");
|
||||
f->setAllTextures("silver_block.png");
|
||||
f->setInventoryTextureCube("silver_block.png", "silver_block.png", "silver_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, 5.0);
|
||||
|
||||
i = CONTENT_TIN;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Tin Block");
|
||||
f->setAllTextures("tin_block.png");
|
||||
f->setInventoryTextureCube("tin_block.png", "tin_block.png", "tin_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, 5.0);
|
||||
|
||||
i = CONTENT_QUARTZ;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Quartz Block");
|
||||
f->setAllTextures("quartz_block.png");
|
||||
f->setInventoryTextureCube("quartz_block.png", "quartz_block.png", "quartz_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, 5.0);
|
||||
|
||||
i = CONTENT_NC;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("Nyan Cat");
|
||||
|
@ -1726,6 +2135,7 @@ void content_mapnode_init()
|
|||
f->air_equivalent = false;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->walkable = false;
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
f->digging_properties.set("", DiggingProperties(true, 0.0, 0));
|
||||
|
||||
i = CONTENT_APPLE;
|
||||
|
@ -1733,6 +2143,7 @@ void content_mapnode_init()
|
|||
f->description = std::string("Apple");
|
||||
f->setInventoryTexture("apple.png");
|
||||
f->setAllTextures("apple.png");
|
||||
f->setAllTextureFlags(0);
|
||||
f->param_type = CPT_LIGHT;
|
||||
f->draw_type = CDT_PLANTLIKE_SML;
|
||||
f->light_propagates = true;
|
||||
|
@ -1740,6 +2151,7 @@ void content_mapnode_init()
|
|||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->walkable = false;
|
||||
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("CraftItem apple 1");
|
||||
f->digging_properties.set("", DiggingProperties(true, 0.0, 0));
|
||||
|
||||
|
@ -1797,6 +2209,7 @@ void content_mapnode_init()
|
|||
f->slab_cube_type = CONTENT_WOOD;
|
||||
content_mapnode_nodebox_slab(f);
|
||||
f->setInventoryTextureNodeBox(i,"wood.png", "wood.png", "wood.png");
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.75);
|
||||
|
||||
i = CONTENT_JUNGLE_SLAB;
|
||||
|
@ -1811,6 +2224,7 @@ void content_mapnode_init()
|
|||
f->slab_cube_type = CONTENT_JUNGLEWOOD;
|
||||
content_mapnode_nodebox_slab(f);
|
||||
f->setInventoryTextureNodeBox(i,"junglewood.png", "junglewood.png", "junglewood.png");
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 1.0);
|
||||
|
||||
i = CONTENT_BRICK_SLAB;
|
||||
|
@ -1891,6 +2305,7 @@ void content_mapnode_init()
|
|||
f->slab_cube_type = CONTENT_WOOD;
|
||||
content_mapnode_nodebox_slabud(f);
|
||||
f->setInventoryTextureNodeBox(i,"wood.png", "wood.png", "wood.png");
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.75);
|
||||
|
||||
i = CONTENT_JUNGLE_SLAB_UD;
|
||||
|
@ -1904,6 +2319,7 @@ void content_mapnode_init()
|
|||
f->slab_cube_type = CONTENT_JUNGLEWOOD;
|
||||
content_mapnode_nodebox_slabud(f);
|
||||
f->setInventoryTextureNodeBox(i,"junglewood.png", "junglewood.png", "junglewood.png");
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 1.0);
|
||||
|
||||
i = CONTENT_BRICK_SLAB_UD;
|
||||
|
@ -1984,6 +2400,7 @@ void content_mapnode_init()
|
|||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
content_mapnode_nodebox_stair(f);
|
||||
f->setInventoryTextureNodeBox(i,"wood.png", "wood.png", "wood.png");
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.75);
|
||||
|
||||
i = CONTENT_JUNGLE_STAIR;
|
||||
|
@ -1997,6 +2414,7 @@ void content_mapnode_init()
|
|||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
content_mapnode_nodebox_stair(f);
|
||||
f->setInventoryTextureNodeBox(i,"junglewood.png", "junglewood.png", "junglewood.png");
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 1.0);
|
||||
|
||||
i = CONTENT_BRICK_STAIR;
|
||||
|
@ -2072,6 +2490,7 @@ void content_mapnode_init()
|
|||
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_WOOD_STAIR)+" 1";
|
||||
content_mapnode_nodebox_stairud(f);
|
||||
f->setInventoryTextureNodeBox(i,"wood.png", "wood.png", "wood.png");
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.75);
|
||||
|
||||
i = CONTENT_JUNGLE_STAIR_UD;
|
||||
|
@ -2084,6 +2503,7 @@ void content_mapnode_init()
|
|||
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_JUNGLE_STAIR)+" 1";
|
||||
content_mapnode_nodebox_stairud(f);
|
||||
f->setInventoryTextureNodeBox(i,"junglewood.png", "junglewood.png", "junglewood.png");
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 1.0);
|
||||
|
||||
i = CONTENT_BRICK_STAIR_UD;
|
||||
|
@ -2125,6 +2545,7 @@ void content_mapnode_init()
|
|||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i+1)+" 1";
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
content_mapnode_nodebox_door(f);
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.75);
|
||||
i = CONTENT_WOOD_DOOR_LT;
|
||||
|
@ -2141,6 +2562,7 @@ void content_mapnode_init()
|
|||
f->solidness = 0; // drawn separately, makes no faces
|
||||
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
|
||||
content_mapnode_nodebox_door(f);
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.75);
|
||||
|
||||
|
@ -2195,6 +2617,7 @@ void content_mapnode_init()
|
|||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i+1)+" 1";
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
content_mapnode_nodebox_door(f);
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.75);
|
||||
i = CONTENT_WOOD_W_DOOR_LT;
|
||||
|
@ -2211,6 +2634,7 @@ void content_mapnode_init()
|
|||
f->solidness = 0; // drawn separately, makes no faces
|
||||
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
|
||||
content_mapnode_nodebox_doorw(f);
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.75);
|
||||
|
||||
|
@ -2266,6 +2690,7 @@ void content_mapnode_init()
|
|||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i+1)+" 1";
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
content_mapnode_nodebox_door(f);
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.75);
|
||||
i = CONTENT_WOOD_DOOR_RT;
|
||||
|
@ -2282,6 +2707,7 @@ void content_mapnode_init()
|
|||
f->solidness = 0; // drawn separately, makes no faces
|
||||
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
|
||||
content_mapnode_nodebox_door(f);
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.75);
|
||||
|
||||
|
@ -2336,6 +2762,7 @@ void content_mapnode_init()
|
|||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i+1)+" 1";
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
content_mapnode_nodebox_door(f);
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.75);
|
||||
i = CONTENT_WOOD_W_DOOR_RT;
|
||||
|
@ -2352,6 +2779,7 @@ void content_mapnode_init()
|
|||
f->solidness = 0; // drawn separately, makes no faces
|
||||
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
|
||||
content_mapnode_nodebox_doorw(f);
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.75);
|
||||
|
||||
|
@ -2405,6 +2833,7 @@ void content_mapnode_init()
|
|||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_WOOD_DOOR_LT)+" 1";
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
content_mapnode_nodebox_doorol(f);
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.75);
|
||||
i = CONTENT_WOOD_DOOR_LT_OPEN;
|
||||
|
@ -2419,6 +2848,7 @@ void content_mapnode_init()
|
|||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_WOOD_DOOR_LT)+" 1";
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
content_mapnode_nodebox_doorol(f);
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.75);
|
||||
|
||||
|
@ -2467,6 +2897,7 @@ void content_mapnode_init()
|
|||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_WOOD_W_DOOR_LT)+" 1";
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
content_mapnode_nodebox_doorol(f);
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.75);
|
||||
i = CONTENT_WOOD_W_DOOR_LT_OPEN;
|
||||
|
@ -2481,6 +2912,7 @@ void content_mapnode_init()
|
|||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_WOOD_W_DOOR_LT)+" 1";
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
content_mapnode_nodebox_doorwol(f);
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.75);
|
||||
|
||||
|
@ -2532,6 +2964,7 @@ void content_mapnode_init()
|
|||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_WOOD_DOOR_RT)+" 1";
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
content_mapnode_nodebox_dooror(f);
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.75);
|
||||
i = CONTENT_WOOD_DOOR_RT_OPEN;
|
||||
|
@ -2548,6 +2981,7 @@ void content_mapnode_init()
|
|||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_WOOD_DOOR_RT)+" 1";
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
content_mapnode_nodebox_dooror(f);
|
||||
f->setInventoryTextureNodeBox(i,"wood.png", "wood.png", "wood.png");
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.75);
|
||||
|
@ -2603,6 +3037,7 @@ void content_mapnode_init()
|
|||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_WOOD_W_DOOR_RT)+" 1";
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
content_mapnode_nodebox_dooror(f);
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.75);
|
||||
i = CONTENT_WOOD_W_DOOR_RT_OPEN;
|
||||
|
@ -2619,6 +3054,7 @@ void content_mapnode_init()
|
|||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->is_ground_content = true;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_WOOD_W_DOOR_RT)+" 1";
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
content_mapnode_nodebox_doorwor(f);
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.75);
|
||||
|
||||
|
@ -2672,6 +3108,7 @@ void content_mapnode_init()
|
|||
f->solidness = 0; // drawn separately, makes no faces
|
||||
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
|
||||
content_mapnode_nodebox_hatch(f);
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.75);
|
||||
|
||||
|
@ -2704,6 +3141,7 @@ void content_mapnode_init()
|
|||
f->solidness = 0; // drawn separately, makes no faces
|
||||
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
|
||||
content_mapnode_nodebox_hatchw(f);
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.75);
|
||||
|
||||
|
@ -2737,6 +3175,7 @@ void content_mapnode_init()
|
|||
f->solidness = 0; // drawn separately, makes no faces
|
||||
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
|
||||
content_mapnode_nodebox_gate(f);
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.75);
|
||||
|
||||
|
@ -2772,6 +3211,7 @@ void content_mapnode_init()
|
|||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->climbable = true;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_WOOD_HATCH)+" 1";
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
content_mapnode_nodebox_hatcho(f);
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.75);
|
||||
|
||||
|
@ -2808,6 +3248,7 @@ void content_mapnode_init()
|
|||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->climbable = true;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_WOOD_W_HATCH)+" 1";
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
content_mapnode_nodebox_hatchwo(f);
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.75);
|
||||
|
||||
|
@ -2843,6 +3284,7 @@ void content_mapnode_init()
|
|||
f->solidness = 0; // drawn separately, makes no faces
|
||||
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
|
||||
content_mapnode_nodebox_gateo(f);
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.75);
|
||||
|
||||
|
@ -2877,6 +3319,7 @@ void content_mapnode_init()
|
|||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->walkable = false;
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
//f->pointable = false;
|
||||
//f->buildable_to = true;
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.10);
|
||||
|
@ -2894,6 +3337,7 @@ void content_mapnode_init()
|
|||
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_WILDGRASS_SHORT)+" 1";
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->walkable = false;
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.10);
|
||||
|
||||
i = CONTENT_DEADGRASS;
|
||||
|
@ -2908,6 +3352,7 @@ void content_mapnode_init()
|
|||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->walkable = false;
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.10);
|
||||
|
||||
i = CONTENT_FLOWER_STEM;
|
||||
|
@ -2922,6 +3367,7 @@ void content_mapnode_init()
|
|||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->walkable = false;
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.10);
|
||||
|
||||
i = CONTENT_FLOWER_ROSE;
|
||||
|
@ -2936,6 +3382,7 @@ void content_mapnode_init()
|
|||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->walkable = false;
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.10);
|
||||
|
||||
i = CONTENT_FLOWER_DAFFODIL;
|
||||
|
@ -2950,6 +3397,7 @@ void content_mapnode_init()
|
|||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->walkable = false;
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.10);
|
||||
|
||||
i = CONTENT_FLOWER_TULIP;
|
||||
|
@ -2964,6 +3412,7 @@ void content_mapnode_init()
|
|||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->walkable = false;
|
||||
f->flammable = 1; // can be replaced by fire if the node under it is set on fire
|
||||
setWoodLikeDiggingProperties(f->digging_properties, 0.10);
|
||||
|
||||
i = CONTENT_FLOWER_POT_RAW;
|
||||
|
@ -3129,6 +3578,21 @@ void content_mapnode_init()
|
|||
f->setInventoryTexture("sandstone_wall_inv.png");
|
||||
setDirtLikeDiggingProperties(f->digging_properties, 1.0);
|
||||
|
||||
i = CONTENT_TNT;
|
||||
f = &content_features(i);
|
||||
f->description = std::string("TNT");
|
||||
f->setAllTextures("tnt.png");
|
||||
f->setTexture(0, "tnt_top.png");
|
||||
f->setTexture(1, "tnt_bottom.png");
|
||||
f->setInventoryTextureCube("tnt_top.png", "tnt.png", "tnt.png");
|
||||
f->param_type = CPT_MINERAL;
|
||||
f->draw_type = CDT_CUBELIKE;
|
||||
f->is_ground_content = true;
|
||||
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||
if(f->initial_metadata == NULL)
|
||||
f->initial_metadata = new TNTNodeMetadata();
|
||||
setDirtLikeDiggingProperties(f->digging_properties, 1.0);
|
||||
|
||||
// NOTE: Remember to add frequently used stuff to the texture atlas in tile.cpp
|
||||
|
||||
|
||||
|
|
|
@ -233,6 +233,31 @@ MapNode mapnode_translate_to_internal(MapNode n_from, u8 version);
|
|||
#define CONTENT_CLAY_RED 0x8AD
|
||||
#define CONTENT_CLAY_YELLOW 0x8AE
|
||||
#define CONTENT_CLAY_BLACK 0x8AF
|
||||
#define CONTENT_GLASS_BLUE 0x8B0
|
||||
#define CONTENT_GLASS_GREEN 0x8B1
|
||||
#define CONTENT_GLASS_ORANGE 0x8B2
|
||||
#define CONTENT_GLASS_PURPLE 0x8B3
|
||||
#define CONTENT_GLASS_RED 0x8B4
|
||||
#define CONTENT_GLASS_YELLOW 0x8B5
|
||||
#define CONTENT_GLASS_BLACK 0x8B6
|
||||
#define CONTENT_CARPET 0x8B7
|
||||
#define CONTENT_CARPET_BLUE 0x8B8
|
||||
#define CONTENT_CARPET_GREEN 0x8B9
|
||||
#define CONTENT_CARPET_ORANGE 0x8BA
|
||||
#define CONTENT_CARPET_PURPLE 0x8BB
|
||||
#define CONTENT_CARPET_RED 0x8BC
|
||||
#define CONTENT_CARPET_YELLOW 0x8BD
|
||||
#define CONTENT_CARPET_BLACK 0x8BE
|
||||
#define CONTENT_COAL 0x8BF
|
||||
#define CONTENT_CHARCOAL 0x8C0
|
||||
#define CONTENT_TIN 0x8C1
|
||||
#define CONTENT_COPPER 0x8C2
|
||||
#define CONTENT_SILVER 0x8C3
|
||||
#define CONTENT_GOLD 0x8C4
|
||||
#define CONTENT_QUARTZ 0x8C5
|
||||
#define CONTENT_FIRE 0x8C6
|
||||
#define CONTENT_FIRE_SHORTTERM 0x8C7
|
||||
#define CONTENT_TNT 0x8C8
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -550,6 +550,13 @@ bool FurnaceNodeMetadata::step(float dtime)
|
|||
fuel_list->decrementMaterials(1);
|
||||
changed = true;
|
||||
}
|
||||
else if(ItemSpec(ITEM_CRAFT, "lump_of_charcoal").checkItem(fuel_item))
|
||||
{
|
||||
m_fuel_totaltime = 40;
|
||||
m_fuel_time = 0;
|
||||
fuel_list->decrementMaterials(1);
|
||||
changed = true;
|
||||
}
|
||||
else if(ItemSpec(ITEM_CRAFT, "lump_of_coal").checkItem(fuel_item))
|
||||
{
|
||||
m_fuel_totaltime = 40;
|
||||
|
@ -577,4 +584,57 @@ std::string FurnaceNodeMetadata::getInventoryDrawSpecString()
|
|||
"list[current_player;main;0,5;8,4;]";
|
||||
}
|
||||
|
||||
/*
|
||||
LockedDoorNodeMetadata
|
||||
*/
|
||||
|
||||
// Prototype
|
||||
TNTNodeMetadata proto_TNTNodeMetadata;
|
||||
|
||||
TNTNodeMetadata::TNTNodeMetadata():
|
||||
m_armed(false),
|
||||
m_time(0)
|
||||
{
|
||||
NodeMetadata::registerType(typeId(), create);
|
||||
}
|
||||
TNTNodeMetadata::~TNTNodeMetadata()
|
||||
{
|
||||
}
|
||||
u16 TNTNodeMetadata::typeId() const
|
||||
{
|
||||
return CONTENT_TNT;
|
||||
}
|
||||
NodeMetadata* TNTNodeMetadata::create(std::istream &is)
|
||||
{
|
||||
TNTNodeMetadata *d = new TNTNodeMetadata();
|
||||
int temp;
|
||||
is>>temp;
|
||||
d->m_time = (float)temp/10;
|
||||
is>>temp;
|
||||
d->m_armed = (bool)temp;
|
||||
return d;
|
||||
}
|
||||
NodeMetadata* TNTNodeMetadata::clone()
|
||||
{
|
||||
TNTNodeMetadata *d = new TNTNodeMetadata();
|
||||
return d;
|
||||
}
|
||||
bool TNTNodeMetadata::step(float dtime)
|
||||
{
|
||||
if (!m_armed)
|
||||
return false;
|
||||
m_time -= dtime;
|
||||
return true;
|
||||
}
|
||||
void TNTNodeMetadata::serializeBody(std::ostream &os)
|
||||
{
|
||||
os<<itos(m_time*10) << " ";
|
||||
os<<itos(m_armed) << " ";
|
||||
}
|
||||
std::string TNTNodeMetadata::infoText()
|
||||
{
|
||||
if (!m_armed)
|
||||
return std::string("");
|
||||
|
||||
return std::string("Armed Explosive: ")+itos((int)ceil(m_time))+" seconds till detonation";
|
||||
}
|
||||
|
|
|
@ -149,6 +149,28 @@ private:
|
|||
float m_src_time;
|
||||
};
|
||||
|
||||
class TNTNodeMetadata : public NodeMetadata
|
||||
{
|
||||
public:
|
||||
TNTNodeMetadata();
|
||||
~TNTNodeMetadata();
|
||||
|
||||
virtual u16 typeId() const;
|
||||
static NodeMetadata* create(std::istream &is);
|
||||
virtual NodeMetadata* clone();
|
||||
virtual void serializeBody(std::ostream &os);
|
||||
virtual std::string infoText();
|
||||
virtual bool step(float dtime);
|
||||
|
||||
float getTime() {return m_time;}
|
||||
bool getArmed() {return m_armed;}
|
||||
void setArmed(bool state) {m_armed = state; if (state) m_time = 5.0;}
|
||||
|
||||
private:
|
||||
bool m_armed;
|
||||
float m_time;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -114,5 +114,6 @@ void set_default_settings(Settings *settings)
|
|||
settings->setDefault("full_block_send_enable_min_time_from_building", "2.0");
|
||||
settings->setDefault("enable_experimental", "false");
|
||||
settings->setDefault("enable_lavabuckets", "false");
|
||||
settings->setDefault("enable_tnt", "false");
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "porting.h"
|
||||
#include "collision.h"
|
||||
#include "content_mapnode.h"
|
||||
#include "content_nodemeta.h"
|
||||
#include "mapblock.h"
|
||||
#include "serverobject.h"
|
||||
#include "content_sao.h"
|
||||
|
@ -29,6 +30,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "settings.h"
|
||||
#include "log.h"
|
||||
#include "profiler.h"
|
||||
#include "server.h"
|
||||
|
||||
#define PP(x) "("<<(x).X<<","<<(x).Y<<","<<(x).Z<<")"
|
||||
|
||||
|
@ -1101,8 +1103,8 @@ void ServerEnvironment::step(float dtime)
|
|||
*/
|
||||
if (n.getContent() == CONTENT_GRASS)
|
||||
{
|
||||
int f = (1000-(p.Y*2))+10;
|
||||
if (p.Y > -1 && myrand()%f == 0) {
|
||||
int f = (10000-(p.Y*2))+10;
|
||||
if (p.Y > 2 && 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) {
|
||||
v3f pp;
|
||||
|
@ -1119,18 +1121,25 @@ void ServerEnvironment::step(float dtime)
|
|||
}
|
||||
if (n.getContent() == CONTENT_WILDGRASS_SHORT)
|
||||
{
|
||||
if (p.Y > -1 && myrand()%200 == 0) {
|
||||
MapNode n_top = m_map->getNodeNoEx(p+v3s16(0,1,0));
|
||||
MapNode n_btm = m_map->getNodeNoEx(p+v3s16(0,-1,0));
|
||||
if (n_btm.getContent() == CONTENT_GRASS && n_top.getLightBlend(getDayNightRatio()) >= 13) {
|
||||
if (myrand()%5 == 0) {
|
||||
n.setContent(CONTENT_FLOWER_STEM);
|
||||
m_map->addNodeWithEvent(p, n);
|
||||
}else{
|
||||
n.setContent(CONTENT_WILDGRASS_LONG);
|
||||
m_map->addNodeWithEvent(p, n);
|
||||
MapNode n_btm = m_map->getNodeNoEx(p+v3s16(0,-1,0));
|
||||
if (n_btm.getContent() == CONTENT_GRASS || n_btm.getContent() == CONTENT_MUD) {
|
||||
if (p.Y > -1 && myrand()%200 == 0) {
|
||||
MapNode n_top = m_map->getNodeNoEx(p+v3s16(0,1,0));
|
||||
if (n_btm.getContent() == CONTENT_GRASS) {
|
||||
if (n_top.getLightBlend(getDayNightRatio()) >= 13) {
|
||||
if (myrand()%5 == 0) {
|
||||
n.setContent(CONTENT_FLOWER_STEM);
|
||||
m_map->addNodeWithEvent(p, n);
|
||||
}else{
|
||||
n.setContent(CONTENT_WILDGRASS_LONG);
|
||||
m_map->addNodeWithEvent(p, n);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
n.setContent(CONTENT_DEADGRASS);
|
||||
m_map->addNodeWithEvent(p, n);
|
||||
}
|
||||
}
|
||||
if (n.getContent() == CONTENT_WILDGRASS_LONG)
|
||||
|
@ -1142,25 +1151,30 @@ void ServerEnvironment::step(float dtime)
|
|||
}
|
||||
if (n.getContent() == CONTENT_FLOWER_STEM)
|
||||
{
|
||||
if (p.Y > -1 && myrand()%200 == 0) {
|
||||
MapNode n_top = m_map->getNodeNoEx(p+v3s16(0,1,0));
|
||||
MapNode n_btm = m_map->getNodeNoEx(p+v3s16(0,-1,0));
|
||||
if ((n_btm.getContent() == CONTENT_GRASS || n_btm.getContent() == CONTENT_FLOWER_POT) && n_top.getLightBlend(getDayNightRatio()) >= 13) {
|
||||
switch (myrand()%3) {
|
||||
case 0:
|
||||
n.setContent(CONTENT_FLOWER_ROSE);
|
||||
m_map->addNodeWithEvent(p, n);
|
||||
break;
|
||||
case 1:
|
||||
n.setContent(CONTENT_FLOWER_DAFFODIL);
|
||||
m_map->addNodeWithEvent(p, n);
|
||||
break;
|
||||
case 2:
|
||||
n.setContent(CONTENT_FLOWER_TULIP);
|
||||
m_map->addNodeWithEvent(p, n);
|
||||
break;
|
||||
MapNode n_btm = m_map->getNodeNoEx(p+v3s16(0,-1,0));
|
||||
if (n_btm.getContent() == CONTENT_GRASS || n_btm.getContent() == CONTENT_MUD) {
|
||||
if (p.Y > -1 && myrand()%200 == 0) {
|
||||
MapNode n_top = m_map->getNodeNoEx(p+v3s16(0,1,0));
|
||||
if ((n_btm.getContent() == CONTENT_GRASS || n_btm.getContent() == CONTENT_FLOWER_POT) && n_top.getLightBlend(getDayNightRatio()) >= 13) {
|
||||
switch (myrand()%3) {
|
||||
case 0:
|
||||
n.setContent(CONTENT_FLOWER_ROSE);
|
||||
m_map->addNodeWithEvent(p, n);
|
||||
break;
|
||||
case 1:
|
||||
n.setContent(CONTENT_FLOWER_DAFFODIL);
|
||||
m_map->addNodeWithEvent(p, n);
|
||||
break;
|
||||
case 2:
|
||||
n.setContent(CONTENT_FLOWER_TULIP);
|
||||
m_map->addNodeWithEvent(p, n);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
n.setContent(CONTENT_DEADGRASS);
|
||||
m_map->addNodeWithEvent(p, n);
|
||||
}
|
||||
}
|
||||
if (n.getContent() == CONTENT_DEADGRASS)
|
||||
|
@ -1184,6 +1198,103 @@ void ServerEnvironment::step(float dtime)
|
|||
m_map->addNodeWithEvent(p, n);
|
||||
}
|
||||
}
|
||||
/*
|
||||
fire that goes out
|
||||
*/
|
||||
if (n.getContent() == CONTENT_FIRE_SHORTTERM) {
|
||||
if (myrand()%10 == 0)
|
||||
m_map->removeNodeWithEvent(p);
|
||||
}
|
||||
/*
|
||||
fire that spreads just a little
|
||||
*/
|
||||
if (n.getContent() == CONTENT_FIRE) {
|
||||
if (myrand()%10) {
|
||||
bool can_spread = true;
|
||||
s16 bs_rad = g_settings->getS16("borderstone_radius");
|
||||
bs_rad += 2;
|
||||
// if any node is border stone protected, don't spread
|
||||
for(s16 x=-bs_rad; can_spread && x<=bs_rad; x++)
|
||||
for(s16 y=-bs_rad; can_spread && y<=bs_rad; y++)
|
||||
for(s16 z=-bs_rad; can_spread && z<=bs_rad; z++)
|
||||
{
|
||||
MapNode n_test = m_map->getNodeNoEx(p+v3s16(x,y,z));
|
||||
if (n_test.getContent() == CONTENT_BORDERSTONE)
|
||||
can_spread = false;
|
||||
}
|
||||
if (can_spread) {
|
||||
for(s16 x=-1; x<=1; x++)
|
||||
for(s16 y=0; y<=1; y++)
|
||||
for(s16 z=-1; z<=1; z++)
|
||||
{
|
||||
MapNode n_test = m_map->getNodeNoEx(p+v3s16(x,y,z));
|
||||
if (n_test.getContent() == CONTENT_FIRE || n_test.getContent() == CONTENT_FIRE_SHORTTERM)
|
||||
continue;
|
||||
if (content_features(n_test).flammable > 0) {
|
||||
n_test.setContent(CONTENT_FIRE_SHORTTERM);
|
||||
m_map->addNodeWithEvent(p+v3s16(x,y,z), n_test);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
boom
|
||||
*/
|
||||
if (n.getContent() == CONTENT_TNT) {
|
||||
TNTNodeMetadata *meta = (TNTNodeMetadata*)m_map->getNodeMetadata(p);
|
||||
if (meta && meta->getArmed() && meta->getTime() < 0.0) {
|
||||
bool can_spread = true;
|
||||
s16 bs_rad = g_settings->getS16("borderstone_radius");
|
||||
bs_rad += 3;
|
||||
// if any node is border stone protected, don't destroy anything
|
||||
for(s16 x=-bs_rad; can_spread && x<=bs_rad; x++)
|
||||
for(s16 y=-bs_rad; can_spread && y<=bs_rad; y++)
|
||||
for(s16 z=-bs_rad; can_spread && z<=bs_rad; z++)
|
||||
{
|
||||
MapNode n_test = m_map->getNodeNoEx(p+v3s16(x,y,z));
|
||||
if (n_test.getContent() == CONTENT_BORDERSTONE)
|
||||
can_spread = false;
|
||||
}
|
||||
if (can_spread) {
|
||||
for(s16 x=-2; x<=2; x++)
|
||||
for(s16 y=-2; y<=2; y++)
|
||||
for(s16 z=-2; z<=2; z++)
|
||||
{
|
||||
MapNode n_test = m_map->getNodeNoEx(p+v3s16(x,y,z));
|
||||
if (n_test.getContent() == CONTENT_AIR)
|
||||
continue;
|
||||
if (n_test.getContent() == CONTENT_TNT) {
|
||||
meta = (TNTNodeMetadata*)m_map->getNodeMetadata(p+v3s16(x,y,z));
|
||||
if (meta && !meta->getArmed())
|
||||
meta->setArmed(true);
|
||||
continue;
|
||||
}
|
||||
if (
|
||||
(x == -2 && y == -2)
|
||||
|| (x == 2 && y == -2)
|
||||
|| (x == -2 && y == 2)
|
||||
|| (x == 2 && y == 2)
|
||||
|| (z == -2 && y == -2)
|
||||
|| (z == 2 && y == -2)
|
||||
|| (z == -2 && y == 2)
|
||||
|| (z == 2 && y == 2)
|
||||
|| (x == -2 && z == -2)
|
||||
|| (x == 2 && z == -2)
|
||||
|| (x == -2 && z == 2)
|
||||
|| (x == 2 && z == 2)
|
||||
) {
|
||||
if (myrand()%3 == 0)
|
||||
continue;
|
||||
}
|
||||
m_map->removeNodeWithEvent(p+v3s16(x,y,z));
|
||||
}
|
||||
}
|
||||
// but still blow up
|
||||
m_map->removeNodeWithEvent(p);
|
||||
// TODO: damage nearby players
|
||||
}
|
||||
}
|
||||
/*
|
||||
Rats spawn around regular trees
|
||||
*/
|
||||
|
|
|
@ -28,6 +28,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
class IRespawnInitiator
|
||||
{
|
||||
public:
|
||||
virtual ~IRespawnInitiator() {}
|
||||
virtual void respawn() = 0;
|
||||
};
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
struct TextDest
|
||||
{
|
||||
virtual ~TextDest() {}
|
||||
virtual void gotText(std::wstring text) = 0;
|
||||
};
|
||||
|
||||
|
|
|
@ -346,14 +346,20 @@ public:
|
|||
return "tool_shears.png";
|
||||
}else if (m_toolname == "WBucket") {
|
||||
return "tool_woodbucket.png";
|
||||
}else if (m_toolname == "TinBucket") {
|
||||
return "tool_tinbucket.png";
|
||||
}else if (m_toolname == "WBucket_water") {
|
||||
return "tool_woodbucket_water.png";
|
||||
}else if (m_toolname == "TinBucket_water") {
|
||||
return "tool_tinbucket_water.png";
|
||||
}else if(m_toolname == "SteelBucket") {
|
||||
return "tool_steelbucket.png";
|
||||
}else if(m_toolname == "SteelBucket_water") {
|
||||
return "tool_steelbucket_water.png";
|
||||
}else if(m_toolname == "SteelBucket_lava") {
|
||||
return "tool_steelbucket_lava.png";
|
||||
}else if (m_toolname == "FireStarter") {
|
||||
return "tool_fire_starter.png";
|
||||
}else{
|
||||
return "cotton.png";
|
||||
}
|
||||
|
@ -427,6 +433,8 @@ public:
|
|||
return "Steel Bucket of Water";
|
||||
}else if(m_toolname == "SteelBucket_lava") {
|
||||
return "Steel Bucket of Lava";
|
||||
}else if (m_toolname == "FireStarter") {
|
||||
return "Fire Starter";
|
||||
}
|
||||
|
||||
return "";
|
||||
|
@ -620,6 +628,7 @@ public:
|
|||
|
||||
struct InventoryAction
|
||||
{
|
||||
virtual ~InventoryAction() {}
|
||||
static InventoryAction * deSerialize(std::istream &is);
|
||||
|
||||
virtual u16 getType() const = 0;
|
||||
|
|
|
@ -1821,22 +1821,21 @@ void make_block(BlockMakeData *data)
|
|||
MapNode new_content(CONTENT_IGNORE);
|
||||
u32 sparseness = 6;
|
||||
|
||||
if(noisebuf_ground_crumbleness.get(x,y+5,z) < -0.1)
|
||||
{
|
||||
if (noisebuf_ground_crumbleness.get(x,y+5,z) < -0.1) {
|
||||
new_content = MapNode(CONTENT_STONE, MINERAL_COAL);
|
||||
}else if (noisebuf_ground_wetness.get(x,y+5,z) > 0.1) {
|
||||
new_content = MapNode(CONTENT_STONE, MINERAL_IRON);
|
||||
}else if (noisebuf_ground_crumbleness.get(x,y,z) > 0.4) {
|
||||
new_content = MapNode(CONTENT_STONE, MINERAL_SILVER);
|
||||
}else if (noisebuf_ground_crumbleness.get(x,y,z) > 0.3) {
|
||||
new_content = MapNode(CONTENT_STONE, MINERAL_GOLD);
|
||||
}else if (noisebuf_ground_crumbleness.get(x,y,z) > 0.2) {
|
||||
new_content = MapNode(CONTENT_STONE, MINERAL_COPPER);
|
||||
}else if (noisebuf_ground_crumbleness.get(x,y,z) > 0.1) {
|
||||
new_content = MapNode(CONTENT_STONE, MINERAL_TIN);
|
||||
}else if (noisebuf_ground_wetness.get(x,y+5,z) > 0.0) {
|
||||
new_content = MapNode(CONTENT_STONE, MINERAL_QUARTZ);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(noisebuf_ground_wetness.get(x,y+5,z) > 0.0)
|
||||
new_content = MapNode(CONTENT_STONE, MINERAL_IRON);
|
||||
/*if(noisebuf_ground_wetness.get(x,y,z) > 0.0)
|
||||
vmanip.m_data[i] = MapNode(CONTENT_MUD);
|
||||
else
|
||||
vmanip.m_data[i] = MapNode(CONTENT_SAND);*/
|
||||
}
|
||||
/*else if(noisebuf_ground_crumbleness.get(x,y,z) > 0.1)
|
||||
{
|
||||
}*/
|
||||
|
||||
if(new_content.getContent() != CONTENT_IGNORE)
|
||||
{
|
||||
|
|
|
@ -177,6 +177,8 @@ struct ContentFeatures
|
|||
bool climbable;
|
||||
// Player can build on these
|
||||
bool buildable_to;
|
||||
// Whether fire can be started on top of it
|
||||
u8 flammable;
|
||||
// Whether the node has no liquid, source liquid or flowing liquid
|
||||
enum LiquidType liquid_type;
|
||||
// If true, param2 is set to direction when placed. Used for torches.
|
||||
|
@ -259,6 +261,7 @@ struct ContentFeatures
|
|||
diggable = true;
|
||||
climbable = false;
|
||||
buildable_to = false;
|
||||
flammable = 0;
|
||||
liquid_type = LIQUID_NONE;
|
||||
wall_mounted = false;
|
||||
air_equivalent = false;
|
||||
|
@ -314,6 +317,10 @@ struct ContentFeatures
|
|||
{}
|
||||
void setAllTextureFlags(u8 flags)
|
||||
{}
|
||||
void setTextureType(u16 i, u8 type)
|
||||
{}
|
||||
void setAllTextureTypes(u8 type)
|
||||
{}
|
||||
#else
|
||||
void setTexture(u16 i, std::string name, u8 alpha=255);
|
||||
|
||||
|
@ -335,6 +342,16 @@ struct ContentFeatures
|
|||
setTextureFlags(i, flags);
|
||||
}
|
||||
}
|
||||
void setTextureType(u16 i, u8 type)
|
||||
{
|
||||
tiles[i].material_type = type;
|
||||
}
|
||||
void setAllTextureTypes(u8 type)
|
||||
{
|
||||
for (u16 i=0; i<6; i++) {
|
||||
setTextureType(i, type);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef SERVER
|
||||
|
|
|
@ -24,7 +24,12 @@ const char *mineral_filenames[MINERAL_COUNT] =
|
|||
{
|
||||
NULL,
|
||||
"mineral_coal.png",
|
||||
"mineral_iron.png"
|
||||
"mineral_iron.png",
|
||||
"mineral_tin.png",
|
||||
"mineral_copper.png",
|
||||
"mineral_silver.png",
|
||||
"mineral_gold.png",
|
||||
"mineral_quartz.png"
|
||||
};
|
||||
|
||||
std::string mineral_textures[MINERAL_COUNT];
|
||||
|
|
|
@ -35,17 +35,33 @@ void init_mineral();
|
|||
#define MINERAL_NONE 0
|
||||
#define MINERAL_COAL 1
|
||||
#define MINERAL_IRON 2
|
||||
#define MINERAL_TIN 3
|
||||
#define MINERAL_COPPER 4
|
||||
#define MINERAL_SILVER 5
|
||||
#define MINERAL_GOLD 6
|
||||
#define MINERAL_QUARTZ 7
|
||||
|
||||
#define MINERAL_COUNT 3
|
||||
#define MINERAL_COUNT 8
|
||||
|
||||
std::string mineral_block_texture(u8 mineral);
|
||||
|
||||
inline CraftItem * getDiggedMineralItem(u8 mineral)
|
||||
{
|
||||
if(mineral == MINERAL_COAL)
|
||||
if (mineral == MINERAL_COAL) {
|
||||
return new CraftItem("lump_of_coal", 1);
|
||||
else if(mineral == MINERAL_IRON)
|
||||
}else if(mineral == MINERAL_IRON) {
|
||||
return new CraftItem("lump_of_iron", 1);
|
||||
}else if(mineral == MINERAL_TIN) {
|
||||
return new CraftItem("lump_of_tin", 1);
|
||||
}else if(mineral == MINERAL_COPPER) {
|
||||
return new CraftItem("lump_of_copper", 1);
|
||||
}else if(mineral == MINERAL_SILVER) {
|
||||
return new CraftItem("lump_of_silver", 1);
|
||||
}else if(mineral == MINERAL_GOLD) {
|
||||
return new CraftItem("lump_of_gold", 1);
|
||||
}else if(mineral == MINERAL_QUARTZ) {
|
||||
return new CraftItem("lump_of_quartz", 1);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -2456,6 +2456,49 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
|
|||
continue;
|
||||
client->SetBlocksNotSent(modified_blocks);
|
||||
}
|
||||
}else if (content_features(n).flammable > 1) {
|
||||
const InventoryItem *wield = player->getWieldItem();
|
||||
if (
|
||||
wield && wield->getName() == std::string("ToolItem")
|
||||
&& ((ToolItem*)wield)->getToolName() == "FireStarter"
|
||||
) {
|
||||
if (content_features(n).flammable == 2) {
|
||||
MapNode a = m_env.getMap().getNodeNoEx(p_under+v3s16(0,1,0));
|
||||
if (a.getContent() == CONTENT_AIR || content_features(a).flammable > 0) {
|
||||
a.setContent(CONTENT_FIRE);
|
||||
core::list<u16> far_players;
|
||||
sendAddNode(p_under+v3s16(0,1,0), a, 0, &far_players, 30);
|
||||
core::map<v3s16, MapBlock*> modified_blocks;
|
||||
{
|
||||
MapEditEventIgnorer ign(&m_ignore_map_edit_events);
|
||||
|
||||
std::string p_name = std::string(player->getName());
|
||||
m_env.getMap().addNodeAndUpdate(p_under+v3s16(0,1,0), a, modified_blocks, p_name);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
n.setContent(CONTENT_FIRE_SHORTTERM);
|
||||
core::list<u16> far_players;
|
||||
sendAddNode(p_under, n, 0, &far_players, 30);
|
||||
core::map<v3s16, MapBlock*> modified_blocks;
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}else if (n.getContent() == CONTENT_TNT) {
|
||||
const InventoryItem *wield = player->getWieldItem();
|
||||
if (
|
||||
wield && wield->getName() == std::string("ToolItem")
|
||||
&& ((ToolItem*)wield)->getToolName() == "FireStarter"
|
||||
) {
|
||||
TNTNodeMetadata *meta = (TNTNodeMetadata*)m_env.getMap().getNodeMetadata(p_under);
|
||||
if (meta && !meta->getArmed())
|
||||
meta->setArmed(true);
|
||||
}
|
||||
}
|
||||
/*
|
||||
NOTE: This can be used in the future to check if
|
||||
|
@ -2700,6 +2743,14 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
|
|||
}
|
||||
}
|
||||
}
|
||||
MapNode a = m_env.getMap().getNode(p_under+v3s16(0,1,0));
|
||||
if (a.getContent() == CONTENT_FIRE) {
|
||||
sendRemoveNode(p_under+v3s16(0,1,0), 0, &far_players, 30);
|
||||
{
|
||||
MapEditEventIgnorer ign(&m_ignore_map_edit_events);
|
||||
m_env.getMap().removeNodeAndUpdate(p_under+v3s16(0,1,0), modified_blocks);
|
||||
}
|
||||
}
|
||||
/*
|
||||
Send the removal to all close-by players.
|
||||
- If other player is close, send REMOVENODE
|
||||
|
@ -2776,6 +2827,7 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
|
|||
&& (
|
||||
wieldname == std::string("WBucket")
|
||||
|| wieldname == std::string("SteelBucket")
|
||||
|| wieldname == std::string("TinBucket")
|
||||
)
|
||||
) {
|
||||
std::string dug_s = std::string("ToolItem ") + wieldname + "_water 1";
|
||||
|
@ -2793,6 +2845,7 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
|
|||
&& (
|
||||
wieldname == std::string("WBucket")
|
||||
|| wieldname == std::string("SteelBucket")
|
||||
|| wieldname == std::string("TinBucket")
|
||||
)
|
||||
) {
|
||||
MapNode n = m_env.getMap().getNode(p_under);
|
||||
|
|