X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fcontent_craft.cpp;h=20ab5f06937b5aa2223d4df0c3d05961ca114209;hb=0931d4b7ff95dc9b51bee28851c3780b2648ffd0;hp=069e68300b9bdf412c082a84b7aaa2fdc250c19e;hpb=1c90f9fc2eba43be71f9d49dad75c5d0514d4e50;p=dragonfireclient.git diff --git a/src/content_craft.cpp b/src/content_craft.cpp index 069e68300..20ab5f069 100644 --- a/src/content_craft.cpp +++ b/src/content_craft.cpp @@ -21,6 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "inventory.h" #include "content_mapnode.h" #include "player.h" +#include "mapnode.h" // For content_t /* items: actually *items[9] @@ -412,6 +413,22 @@ InventoryItem *craft_get_result(InventoryItem **items) } } + // Ladder + { + ItemSpec specs[9]; + specs[0] = ItemSpec(ITEM_CRAFT, "Stick"); + specs[2] = ItemSpec(ITEM_CRAFT, "Stick"); + specs[3] = ItemSpec(ITEM_CRAFT, "Stick"); + specs[4] = ItemSpec(ITEM_CRAFT, "Stick"); + specs[5] = ItemSpec(ITEM_CRAFT, "Stick"); + specs[6] = ItemSpec(ITEM_CRAFT, "Stick"); + specs[8] = ItemSpec(ITEM_CRAFT, "Stick"); + if(checkItemCombination(items, specs)) + { + return new MaterialItem(CONTENT_LADDER, 1); + } + } + return NULL; } @@ -446,7 +463,7 @@ void craft_set_creative_inventory(Player *player) */ // CONTENT_IGNORE-terminated list - u8 material_items[] = { + content_t material_items[] = { CONTENT_TORCH, CONTENT_COBBLE, CONTENT_MUD, @@ -469,10 +486,11 @@ void craft_set_creative_inventory(Player *player) CONTENT_CHEST, CONTENT_FURNACE, CONTENT_SIGN_WALL, + CONTENT_LAVASOURCE, CONTENT_IGNORE }; - u8 *mip = material_items; + content_t *mip = material_items; for(u16 i=0; i