summaryrefslogtreecommitdiff
path: root/src/content_craft.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-07-23 19:04:37 +0300
committerPerttu Ahola <celeron55@gmail.com>2011-07-23 19:04:37 +0300
commit2587bb361cfc96b3a695d1476e39b9c0ecaa6553 (patch)
tree6e6a35e0ee35883201189df9c545cc44b7a06658 /src/content_craft.cpp
parent90d793f8f369bf1431d7a915198cd49b98bbe2d7 (diff)
parent976ec31c1faedc3a34935c3aafd6a868e222d1ad (diff)
downloadminetest-2587bb361cfc96b3a695d1476e39b9c0ecaa6553.tar.gz
minetest-2587bb361cfc96b3a695d1476e39b9c0ecaa6553.tar.bz2
minetest-2587bb361cfc96b3a695d1476e39b9c0ecaa6553.zip
merged the content type extension and delta
Diffstat (limited to 'src/content_craft.cpp')
-rw-r--r--src/content_craft.cpp106
1 files changed, 106 insertions, 0 deletions
diff --git a/src/content_craft.cpp b/src/content_craft.cpp
index e4573a211..b5a1dc776 100644
--- a/src/content_craft.cpp
+++ b/src/content_craft.cpp
@@ -262,6 +262,24 @@ InventoryItem *craft_get_result(InventoryItem **items)
}
}
+ // Rail
+ {
+ ItemSpec specs[9];
+ specs[0] = ItemSpec(ITEM_CRAFT, "steel_ingot");
+ specs[1] = ItemSpec(ITEM_CRAFT, "Stick");
+ specs[2] = ItemSpec(ITEM_CRAFT, "steel_ingot");
+ specs[3] = ItemSpec(ITEM_CRAFT, "steel_ingot");
+ specs[4] = ItemSpec(ITEM_CRAFT, "Stick");
+ specs[5] = ItemSpec(ITEM_CRAFT, "steel_ingot");
+ specs[6] = ItemSpec(ITEM_CRAFT, "steel_ingot");
+ specs[7] = ItemSpec(ITEM_CRAFT, "Stick");
+ specs[8] = ItemSpec(ITEM_CRAFT, "steel_ingot");
+ if(checkItemCombination(items, specs))
+ {
+ return new MaterialItem(CONTENT_RAIL, 15);
+ }
+ }
+
// Chest
{
ItemSpec specs[9];
@@ -314,6 +332,87 @@ InventoryItem *craft_get_result(InventoryItem **items)
}
}
+ // Sandstone
+ {
+ ItemSpec specs[9];
+ specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_SAND);
+ specs[4] = ItemSpec(ITEM_MATERIAL, CONTENT_SAND);
+ specs[6] = ItemSpec(ITEM_MATERIAL, CONTENT_SAND);
+ specs[7] = ItemSpec(ITEM_MATERIAL, CONTENT_SAND);
+ if(checkItemCombination(items, specs))
+ {
+ return new MaterialItem(CONTENT_SANDSTONE, 1);
+ }
+ }
+
+ // Clay
+ {
+ ItemSpec specs[9];
+ specs[3] = ItemSpec(ITEM_CRAFT, "lump_of_clay");
+ specs[4] = ItemSpec(ITEM_CRAFT, "lump_of_clay");
+ specs[6] = ItemSpec(ITEM_CRAFT, "lump_of_clay");
+ specs[7] = ItemSpec(ITEM_CRAFT, "lump_of_clay");
+ if(checkItemCombination(items, specs))
+ {
+ return new MaterialItem(CONTENT_CLAY, 1);
+ }
+ }
+
+ // Brick
+ {
+ ItemSpec specs[9];
+ specs[3] = ItemSpec(ITEM_CRAFT, "clay_brick");
+ specs[4] = ItemSpec(ITEM_CRAFT, "clay_brick");
+ specs[6] = ItemSpec(ITEM_CRAFT, "clay_brick");
+ specs[7] = ItemSpec(ITEM_CRAFT, "clay_brick");
+ if(checkItemCombination(items, specs))
+ {
+ return new MaterialItem(CONTENT_BRICK, 1);
+ }
+ }
+
+ // Paper
+ {
+ ItemSpec specs[9];
+ specs[3] = ItemSpec(ITEM_MATERIAL, CONTENT_PAPYRUS);
+ specs[4] = ItemSpec(ITEM_MATERIAL, CONTENT_PAPYRUS);
+ specs[5] = ItemSpec(ITEM_MATERIAL, CONTENT_PAPYRUS);
+ if(checkItemCombination(items, specs))
+ {
+ return new CraftItem("paper", 1);
+ }
+ }
+
+ // Book
+ {
+ ItemSpec specs[9];
+ specs[1] = ItemSpec(ITEM_CRAFT, "paper");
+ specs[4] = ItemSpec(ITEM_CRAFT, "paper");
+ specs[7] = ItemSpec(ITEM_CRAFT, "paper");
+ if(checkItemCombination(items, specs))
+ {
+ return new CraftItem("book", 1);
+ }
+ }
+
+ // Book shelf
+ {
+ ItemSpec specs[9];
+ specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
+ specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
+ specs[2] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
+ specs[3] = ItemSpec(ITEM_CRAFT, "book");
+ specs[4] = ItemSpec(ITEM_CRAFT, "book");
+ specs[5] = ItemSpec(ITEM_CRAFT, "book");
+ specs[6] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
+ specs[7] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
+ specs[8] = ItemSpec(ITEM_MATERIAL, CONTENT_WOOD);
+ if(checkItemCombination(items, specs))
+ {
+ return new MaterialItem(CONTENT_BOOKSHELF, 1);
+ }
+ }
+
return NULL;
}
@@ -354,10 +453,17 @@ void craft_set_creative_inventory(Player *player)
CONTENT_MUD,
CONTENT_STONE,
CONTENT_SAND,
+ CONTENT_SANDSTONE,
+ CONTENT_CLAY,
+ CONTENT_BRICK,
CONTENT_TREE,
CONTENT_LEAVES,
+ CONTENT_CACTUS,
+ CONTENT_PAPYRUS,
+ CONTENT_BOOKSHELF,
CONTENT_GLASS,
CONTENT_FENCE,
+ CONTENT_RAIL,
CONTENT_MESE,
CONTENT_WATERSOURCE,
CONTENT_CLOUD,