summaryrefslogtreecommitdiff
path: root/src/server.cpp
diff options
context:
space:
mode:
authorNils Dagsson Moskopp <nils@dieweltistgarnichtso.net>2011-06-01 04:57:46 +0200
committerNils Dagsson Moskopp <nils@dieweltistgarnichtso.net>2011-06-01 04:57:46 +0200
commitcffd40c5d6c1427d2cce7cbcfe57669da73459c6 (patch)
tree641ee4fdeb60818a08839e5555bcb0fe0daafd12 /src/server.cpp
parentfb78854e9b4f6ae648de27656ad40991a0c5ef57 (diff)
downloadminetest-cffd40c5d6c1427d2cce7cbcfe57669da73459c6.tar.gz
minetest-cffd40c5d6c1427d2cce7cbcfe57669da73459c6.tar.bz2
minetest-cffd40c5d6c1427d2cce7cbcfe57669da73459c6.zip
+ clay and associated items
Diffstat (limited to 'src/server.cpp')
-rw-r--r--src/server.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/server.cpp b/src/server.cpp
index dfc05f7d3..17850c5fa 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -3987,6 +3987,36 @@ void Server::UpdateCrafting(u16 peer_id)
found = true;
}
}
+
+ // Clay
+ if(!found)
+ {
+ 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))
+ {
+ rlist->addItem(new MaterialItem(CONTENT_CLAY, 1));
+ found = true;
+ }
+ }
+
+ // Brick
+ if(!found)
+ {
+ 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))
+ {
+ rlist->addItem(new MaterialItem(CONTENT_BRICK, 1));
+ found = true;
+ }
+ }
}
} // if creative_mode == false
@@ -4076,6 +4106,7 @@ void setCreativeInventory(Player *player)
CONTENT_STONE,
CONTENT_SAND,
CONTENT_SANDSTONE,
+ CONTENT_CLAY,
CONTENT_BRICK,
CONTENT_TREE,
CONTENT_LEAVES,