craft rewrite pt3

This commit is contained in:
darkrose 2013-11-24 02:53:41 +10:00
parent 9b3d9641de
commit 77a8ae969c
7 changed files with 340 additions and 54 deletions

View File

@ -184,6 +184,16 @@ void setBrickRecipe(u16 input, u16 result)
r[5] = input;
setRecipe(r,result,4);
}
// four input1 surround one input2 yields four result
void setSurroundRecipe(u16 input1, u16 input2, u16 result)
{
u16 r[9] = {
CONTENT_IGNORE, input1, CONTENT_IGNORE,
input1, input2, input1,
CONTENT_IGNORE, input1, CONTENT_IGNORE
};
setRecipe(r,result,4);
}
// 5 input in an X yields five result
void set5Recipe(u16 input, u16 result)
{
@ -331,7 +341,7 @@ void setWallRecipe(u16 input, u16 result)
setRecipe(r,result,1);
}
// one each of inputs shapeless yields 1 result
void set1Any2(u16 input1, u16 input2, u16 result)
void set1Any2Recipe(u16 input1, u16 input2, u16 result)
{
u16 r[9] = {
input1, input2, CONTENT_IGNORE,
@ -341,7 +351,7 @@ void set1Any2(u16 input1, u16 input2, u16 result)
setShapelessRecipe(r,result,1);
}
// one each of inputs shapeless yields 2 result
void set2Any2(u16 input1, u16 input2, u16 result)
void set2Any2Recipe(u16 input1, u16 input2, u16 result)
{
u16 r[9] = {
input1, input2, CONTENT_IGNORE,
@ -351,7 +361,7 @@ void set2Any2(u16 input1, u16 input2, u16 result)
setShapelessRecipe(r,result,2);
}
// one each of inputs shapeless yields 3 result
void set1Any3(u16 input1, u16 input2, u16 input3, u16 result)
void set1Any3Recipe(u16 input1, u16 input2, u16 input3, u16 result)
{
u16 r[9] = {
input1, input2, input3,
@ -361,7 +371,7 @@ void set1Any3(u16 input1, u16 input2, u16 input3, u16 result)
setShapelessRecipe(r,result,1);
}
// one each of inputs shapeless yields 2 result
void set2Any3(u16 input1, u16 input2, u16 input3, u16 result)
void set2Any3Recipe(u16 input1, u16 input2, u16 input3, u16 result)
{
u16 r[9] = {
input1, input2, input3,
@ -371,7 +381,7 @@ void set2Any3(u16 input1, u16 input2, u16 input3, u16 result)
setShapelessRecipe(r,result,2);
}
// one each of inputs shapeless yields 3 result
void set3Any3(u16 input1, u16 input2, u16 input3, u16 result)
void set3Any3Recipe(u16 input1, u16 input2, u16 input3, u16 result)
{
u16 r[9] = {
input1, input2, input3,
@ -464,7 +474,7 @@ void setSwordRecipe(u16 input, u16 result)
setRecipe(r,result,1);
}
// gate recipe 1 2 1 in two rows yields one result
void setGateRecipt(u16 input1, u16 input2, u16 result)
void setGateRecipe(u16 input1, u16 input2, u16 result)
{
u16 r[9] = {
input1, input2, input1,

View File

@ -169,6 +169,8 @@ namespace crafting {
void setUncraftHardBlockRecipe(u16 input, u16 result);
// four input in a Z yields four result
void setBrickRecipe(u16 input, u16 result);
// four input1 surround one input2 yields four result
void setSurroundRecipe(u16 input1, u16 input2, u16 result);
// five input in an X yields five result
void set5Recipe(u16 input, u16 result);
// three input in a v yields one result
@ -197,16 +199,17 @@ namespace crafting {
void setHatchRecipe(u16 input, u16 result);
// six input in two horizontal rows yields six result
void setWallRecipe(u16 input, u16 result);
// shapeless shortcuts
// one each of inputs shapeless yields 1 result
void set1Any2(u16 input1, u16 input2, u16 result);
void set1Any2Recipe(u16 input1, u16 input2, u16 result);
// one each of inputs shapeless yields 2 result
void set2Any2(u16 input1, u16 input2, u16 result);
void set2Any2Recipe(u16 input1, u16 input2, u16 result);
// one each of inputs shapeless yields 1 result
void set1Any3(u16 input1, u16 input2, u16 input3, u16 result);
void set1Any3Recipe(u16 input1, u16 input2, u16 input3, u16 result);
// one each of inputs shapeless yields 2 result
void set2Any3(u16 input1, u16 input2, u16 input3, u16 result);
void set2Any3Recipe(u16 input1, u16 input2, u16 input3, u16 result);
// one each of inputs shapeless yields 3 result
void set3Any3(u16 input1, u16 input2, u16 input3, u16 result);
void set3Any3Recipe(u16 input1, u16 input2, u16 input3, u16 result);
// special shortcuts
// bed recipe, input is bottom two cotton yields one result
void setBedRecipe(u16 input, u16 result);
@ -223,7 +226,7 @@ namespace crafting {
// sword recipe, input is blade yields one result
void setSwordRecipe(u16 input, u16 result);
// gate recipe 1 2 1 in two rows yields one result
void setGateRecipt(u16 input1, u16 input2, u16 result);
void setGateRecipe(u16 input1, u16 input2, u16 result);
InventoryItem *getResult(InventoryItem **items);
InventoryItem **getRecipe(InventoryItem *item);

View File

@ -67,73 +67,73 @@ void content_craftitem_init()
f->gui_name = "Book";
crafting::setCol1Recipe(CONTENT_CRAFTITEM_PAPER,CONTENT_CRAFTITEM_BOOK);
i = CONTENT_CRAFTITEM_LUMP_OF_CHARCOAL;
i = CONTENT_CRAFTITEM_CHARCOAL;
f = &g_content_craftitem_features[i];
f->content = CONTENT_CRAFTITEM_LUMP_OF_CHARCOAL;
f->content = CONTENT_CRAFTITEM_CHARCOAL;
f->texture = "lump_of_charcoal.png";
f->name = "lump_of_charcoal";
f->gui_name = "Charcoal Lump";
f->fuel_time = 40;
i = CONTENT_CRAFTITEM_LUMP_OF_COAL;
i = CONTENT_CRAFTITEM_COAL;
f = &g_content_craftitem_features[i];
f->content = CONTENT_CRAFTITEM_LUMP_OF_COAL;
f->content = CONTENT_CRAFTITEM_COAL;
f->texture = "lump_of_coal.png";
f->name = "lump_of_coal";
f->gui_name = "Coal Lump";
f->fuel_time = 40;
i = CONTENT_CRAFTITEM_LUMP_OF_IRON;
i = CONTENT_CRAFTITEM_IRON;
f = &g_content_craftitem_features[i];
f->content = CONTENT_CRAFTITEM_LUMP_OF_IRON;
f->content = CONTENT_CRAFTITEM_IRON;
f->texture = "lump_of_iron.png";
f->name = "lump_of_iron";
f->gui_name = "Iron Lump";
f->cook_result = "CraftItem steel_ingot 1";
i = CONTENT_CRAFTITEM_LUMP_OF_CLAY;
i = CONTENT_CRAFTITEM_CLAY;
f = &g_content_craftitem_features[i];
f->content = CONTENT_CRAFTITEM_LUMP_OF_CLAY;
f->content = CONTENT_CRAFTITEM_CLAY;
f->texture = "lump_of_clay.png";
f->name = "lump_of_clay";
f->gui_name = "Clay Lump";
f->cook_result = "CraftItem clay_brick 1";
i = CONTENT_CRAFTITEM_LUMP_OF_TIN;
i = CONTENT_CRAFTITEM_TIN;
f = &g_content_craftitem_features[i];
f->content = CONTENT_CRAFTITEM_LUMP_OF_TIN;
f->content = CONTENT_CRAFTITEM_TIN;
f->texture = "lump_of_tin.png";
f->name = "lump_of_tin";
f->gui_name = "Tin Lump";
f->cook_result = "CraftItem tin_ingot 1";
i = CONTENT_CRAFTITEM_LUMP_OF_COPPER;
i = CONTENT_CRAFTITEM_COPPER;
f = &g_content_craftitem_features[i];
f->content = CONTENT_CRAFTITEM_LUMP_OF_COPPER;
f->content = CONTENT_CRAFTITEM_COPPER;
f->texture = "lump_of_copper.png";
f->name = "lump_of_copper";
f->gui_name = "Copper Lump";
f->cook_result = "CraftItem copper_ingot 1";
i = CONTENT_CRAFTITEM_LUMP_OF_SILVER;
i = CONTENT_CRAFTITEM_SILVER;
f = &g_content_craftitem_features[i];
f->content = CONTENT_CRAFTITEM_LUMP_OF_SILVER;
f->content = CONTENT_CRAFTITEM_SILVER;
f->texture = "lump_of_silver.png";
f->name = "lump_of_silver";
f->gui_name = "Silver Lump";
f->cook_result = "CraftItem silver_ingot 1";
i = CONTENT_CRAFTITEM_LUMP_OF_GOLD;
i = CONTENT_CRAFTITEM_GOLD;
f = &g_content_craftitem_features[i];
f->content = CONTENT_CRAFTITEM_LUMP_OF_GOLD;
f->content = CONTENT_CRAFTITEM_GOLD;
f->texture = "lump_of_gold.png";
f->name = "lump_of_gold";
f->gui_name = "Gold Lump";
f->cook_result = "CraftItem gold_ingot 1";
i = CONTENT_CRAFTITEM_LUMP_OF_QUARTZ;
i = CONTENT_CRAFTITEM_QUARTZ;
f = &g_content_craftitem_features[i];
f->content = CONTENT_CRAFTITEM_LUMP_OF_QUARTZ;
f->content = CONTENT_CRAFTITEM_QUARTZ;
f->texture = "lump_of_quartz.png";
f->name = "lump_of_quartz";
f->gui_name = "Quartz Crystal";
@ -166,9 +166,9 @@ void content_craftitem_init()
f->name = "gold_ingot";
f->gui_name = "Gold Ingot";
i = CONTENT_CRAFTITEM_LUMP_OF_FLINT;
i = CONTENT_CRAFTITEM_FLINT;
f = &g_content_craftitem_features[i];
f->content = CONTENT_CRAFTITEM_LUMP_OF_FLINT;
f->content = CONTENT_CRAFTITEM_FLINT;
f->texture = "lump_of_flint.png";
f->name = "lump_of_flint";
f->gui_name = "Flint";
@ -258,7 +258,7 @@ void content_craftitem_init()
f->texture = "dye_green.png";
f->name = "dye_green";
f->gui_name = "Green Dye";
crafting::set2Any2(CONTENT_CRAFTITEM_DYE_BLUE,CONTENT_CRAFTITEM_DYE_YELLOW,CONTENT_CRAFTITEM_DYE_GREEN);
crafting::set2Any2Recipe(CONTENT_CRAFTITEM_DYE_BLUE,CONTENT_CRAFTITEM_DYE_YELLOW,CONTENT_CRAFTITEM_DYE_GREEN);
i = CONTENT_CRAFTITEM_DYE_ORANGE;
f = &g_content_craftitem_features[i];
@ -266,7 +266,7 @@ void content_craftitem_init()
f->texture = "dye_orange.png";
f->name = "dye_orange";
f->gui_name = "Orange Dye";
crafting::set2Any2(CONTENT_CRAFTITEM_DYE_RED,CONTENT_CRAFTITEM_DYE_YELLOW,CONTENT_CRAFTITEM_DYE_ORANGE);
crafting::set2Any2Recipe(CONTENT_CRAFTITEM_DYE_RED,CONTENT_CRAFTITEM_DYE_YELLOW,CONTENT_CRAFTITEM_DYE_ORANGE);
i = CONTENT_CRAFTITEM_DYE_PURPLE;
f = &g_content_craftitem_features[i];
@ -274,7 +274,7 @@ void content_craftitem_init()
f->texture = "dye_purple.png";
f->name = "dye_purple";
f->gui_name = "Purple Dye";
crafting::set2Any2(CONTENT_CRAFTITEM_DYE_BLUE,CONTENT_CRAFTITEM_DYE_RED,CONTENT_CRAFTITEM_DYE_PURPLE);
crafting::set2Any2Recipe(CONTENT_CRAFTITEM_DYE_BLUE,CONTENT_CRAFTITEM_DYE_RED,CONTENT_CRAFTITEM_DYE_PURPLE);
i = CONTENT_CRAFTITEM_DYE_RED;
f = &g_content_craftitem_features[i];
@ -298,7 +298,7 @@ void content_craftitem_init()
f->texture = "dye_white.png";
f->name = "dye_white";
f->gui_name = "White Dye";
crafting::set2Any3(CONTENT_CRAFTITEM_DYE_BLUE,CONTENT_CRAFTITEM_DYE_RED,CONTENT_CRAFTITEM_DYE_YELLOW,CONTENT_CRAFTITEM_DYE_WHITE);
crafting::set2Any3Recipe(CONTENT_CRAFTITEM_DYE_BLUE,CONTENT_CRAFTITEM_DYE_RED,CONTENT_CRAFTITEM_DYE_YELLOW,CONTENT_CRAFTITEM_DYE_WHITE);
i = CONTENT_CRAFTITEM_DYE_BLACK;
f = &g_content_craftitem_features[i];
@ -306,7 +306,7 @@ void content_craftitem_init()
f->texture = "dye_black.png";
f->name = "dye_black";
f->gui_name = "Black Dye";
crafting::set2Any2(CONTENT_CRAFTITEM_DYE_WHITE,CONTENT_CRAFTITEM_LUMP_OF_COAL,CONTENT_CRAFTITEM_DYE_BLACK);
crafting::set2Any2Recipe(CONTENT_CRAFTITEM_DYE_WHITE,CONTENT_CRAFTITEM_COAL,CONTENT_CRAFTITEM_DYE_BLACK);
i = CONTENT_CRAFTITEM_QUARTZ_DUST;
f = &g_content_craftitem_features[i];
@ -314,7 +314,7 @@ void content_craftitem_init()
f->texture = "quartz_dust.png";
f->name = "quartz_dust";
f->gui_name = "Quartz Dust";
crafting::set1To1Recipe(CONTENT_CRAFTITEM_LUMP_OF_QUARTZ,CONTENT_CRAFTITEM_QUARTZ_DUST);
crafting::set1To1Recipe(CONTENT_CRAFTITEM_QUARTZ,CONTENT_CRAFTITEM_QUARTZ_DUST);
i = CONTENT_CRAFTITEM_SALTPETER;
f = &g_content_craftitem_features[i];
@ -329,7 +329,7 @@ void content_craftitem_init()
f->texture = "gunpowder.png";
f->name = "gunpowder";
f->gui_name = "Gun Powder";
crafting::set1Any3(CONTENT_CRAFTITEM_LUMP_OF_CHARCOAL,CONTENT_CRAFTITEM_LUMP_OF_FLINT,CONTENT_CRAFTITEM_SALTPETER,CONTENT_CRAFTITEM_GUNPOWDER);
crafting::set1Any3Recipe(CONTENT_CRAFTITEM_CHARCOAL,CONTENT_CRAFTITEM_FLINT,CONTENT_CRAFTITEM_SALTPETER,CONTENT_CRAFTITEM_GUNPOWDER);
i = CONTENT_CRAFTITEM_SNOW_BALL;
f = &g_content_craftitem_features[i];

View File

@ -39,20 +39,20 @@ CraftItemFeatures & content_craftitem_features(std::string subname);
#define CONTENT_CRAFTITEM_PAPER (CONTENT_CRAFTITEM_MASK | 0x01)
#define CONTENT_CRAFTITEM_BOOK (CONTENT_CRAFTITEM_MASK | 0x02)
#define CONTENT_CRAFTITEM_LUMP_OF_CHARCOAL (CONTENT_CRAFTITEM_MASK | 0x03)
#define CONTENT_CRAFTITEM_LUMP_OF_COAL (CONTENT_CRAFTITEM_MASK | 0x04)
#define CONTENT_CRAFTITEM_LUMP_OF_IRON (CONTENT_CRAFTITEM_MASK | 0x05)
#define CONTENT_CRAFTITEM_LUMP_OF_CLAY (CONTENT_CRAFTITEM_MASK | 0x06)
#define CONTENT_CRAFTITEM_LUMP_OF_TIN (CONTENT_CRAFTITEM_MASK | 0x07)
#define CONTENT_CRAFTITEM_LUMP_OF_COPPER (CONTENT_CRAFTITEM_MASK | 0x08)
#define CONTENT_CRAFTITEM_LUMP_OF_SILVER (CONTENT_CRAFTITEM_MASK | 0x09)
#define CONTENT_CRAFTITEM_LUMP_OF_GOLD (CONTENT_CRAFTITEM_MASK | 0x0A)
#define CONTENT_CRAFTITEM_LUMP_OF_QUARTZ (CONTENT_CRAFTITEM_MASK | 0x0B)
#define CONTENT_CRAFTITEM_CHARCOAL (CONTENT_CRAFTITEM_MASK | 0x03)
#define CONTENT_CRAFTITEM_COAL (CONTENT_CRAFTITEM_MASK | 0x04)
#define CONTENT_CRAFTITEM_IRON (CONTENT_CRAFTITEM_MASK | 0x05)
#define CONTENT_CRAFTITEM_CLAY (CONTENT_CRAFTITEM_MASK | 0x06)
#define CONTENT_CRAFTITEM_TIN (CONTENT_CRAFTITEM_MASK | 0x07)
#define CONTENT_CRAFTITEM_COPPER (CONTENT_CRAFTITEM_MASK | 0x08)
#define CONTENT_CRAFTITEM_SILVER (CONTENT_CRAFTITEM_MASK | 0x09)
#define CONTENT_CRAFTITEM_GOLD (CONTENT_CRAFTITEM_MASK | 0x0A)
#define CONTENT_CRAFTITEM_QUARTZ (CONTENT_CRAFTITEM_MASK | 0x0B)
#define CONTENT_CRAFTITEM_TIN_INGOT (CONTENT_CRAFTITEM_MASK | 0x0C)
#define CONTENT_CRAFTITEM_COPPER_INGOT (CONTENT_CRAFTITEM_MASK | 0x0D)
#define CONTENT_CRAFTITEM_SILVER_INGOT (CONTENT_CRAFTITEM_MASK | 0x0E)
#define CONTENT_CRAFTITEM_GOLD_INGOT (CONTENT_CRAFTITEM_MASK | 0x0F)
#define CONTENT_CRAFTITEM_LUMP_OF_FLINT (CONTENT_CRAFTITEM_MASK | 0x10)
#define CONTENT_CRAFTITEM_FLINT (CONTENT_CRAFTITEM_MASK | 0x10)
#define CONTENT_CRAFTITEM_STEEL_INGOT (CONTENT_CRAFTITEM_MASK | 0x11)
#define CONTENT_CRAFTITEM_CLAY_BRICK (CONTENT_CRAFTITEM_MASK | 0x12)
#define CONTENT_CRAFTITEM_RAT (CONTENT_CRAFTITEM_MASK | 0x13)

File diff suppressed because it is too large Load Diff

View File

@ -18,6 +18,9 @@
************************************************************************/
#include "content_toolitem.h"
#include "content_craftitem.h"
#include "content_craft.h"
#include "content_mapnode.h"
#include <map>
std::map<content_t,struct ToolItemFeatures> g_content_toolitem_features;
@ -55,6 +58,8 @@ void content_toolitem_init()
f->texture = "tool_woodpick.png";
f->name = "WPick";
f->gui_name = "Wooden Pick";
crafting::setPickRecipe(CONTENT_WOOD,CONTENT_TOOLITEM_WPICK);
crafting::setPickRecipe(CONTENT_JUNGLEWOOD,CONTENT_TOOLITEM_WPICK);
i = CONTENT_TOOLITEM_STPICK;
f = &g_content_toolitem_features[i];
@ -62,6 +67,7 @@ void content_toolitem_init()
f->texture = "tool_stonepick.png";
f->name = "STPick";
f->gui_name = "Stone Pick";
crafting::setPickRecipe(CONTENT_ROUGHSTONE,CONTENT_TOOLITEM_STPICK);
i = CONTENT_TOOLITEM_STEELPICK;
f = &g_content_toolitem_features[i];
@ -69,6 +75,7 @@ void content_toolitem_init()
f->texture = "tool_steelpick.png";
f->name = "SteelPick";
f->gui_name = "Steel Pick";
crafting::setPickRecipe(CONTENT_CRAFTITEM_STEEL_INGOT,CONTENT_TOOLITEM_STEELPICK);
i = CONTENT_TOOLITEM_MESEPICK;
f = &g_content_toolitem_features[i];
@ -76,6 +83,7 @@ void content_toolitem_init()
f->texture = "tool_mesepick.png";
f->name = "MesePick";
f->gui_name = "Mese Pick";
crafting::setPickRecipe(CONTENT_MESE,CONTENT_TOOLITEM_MESEPICK);
i = CONTENT_TOOLITEM_WSHOVEL;
f = &g_content_toolitem_features[i];
@ -83,6 +91,8 @@ void content_toolitem_init()
f->texture = "tool_woodshovel.png";
f->name = "WShovel";
f->gui_name = "Wooden Shovel";
crafting::setShovelRecipe(CONTENT_WOOD,CONTENT_TOOLITEM_WSHOVEL);
crafting::setShovelRecipe(CONTENT_JUNGLEWOOD,CONTENT_TOOLITEM_WSHOVEL);
i = CONTENT_TOOLITEM_STSHOVEL;
f = &g_content_toolitem_features[i];
@ -90,6 +100,7 @@ void content_toolitem_init()
f->texture = "tool_stoneshovel.png";
f->name = "STShovel";
f->gui_name = "Stone Shovel";
crafting::setShovelRecipe(CONTENT_ROUGHSTONE,CONTENT_TOOLITEM_STSHOVEL);
i = CONTENT_TOOLITEM_STEELSHOVEL;
f = &g_content_toolitem_features[i];
@ -97,6 +108,7 @@ void content_toolitem_init()
f->texture = "tool_steelshovel.png";
f->name = "SteelShovel";
f->gui_name = "Steel Shovel";
crafting::setShovelRecipe(CONTENT_CRAFTITEM_STEEL_INGOT,CONTENT_TOOLITEM_STEELSHOVEL);
i = CONTENT_TOOLITEM_WAXE;
f = &g_content_toolitem_features[i];
@ -104,6 +116,8 @@ void content_toolitem_init()
f->texture = "tool_woodaxe.png";
f->name = "WAxe";
f->gui_name = "Wooden Axe";
crafting::setAxeRecipe(CONTENT_WOOD,CONTENT_TOOLITEM_WAXE);
crafting::setAxeRecipe(CONTENT_JUNGLEWOOD,CONTENT_TOOLITEM_WAXE);
i = CONTENT_TOOLITEM_STAXE;
f = &g_content_toolitem_features[i];
@ -111,6 +125,7 @@ void content_toolitem_init()
f->texture = "tool_stoneaxe.png";
f->name = "STAxe";
f->gui_name = "Stone Axe";
crafting::setAxeRecipe(CONTENT_ROUGHSTONE,CONTENT_TOOLITEM_STAXE);
i = CONTENT_TOOLITEM_STEELAXE;
f = &g_content_toolitem_features[i];
@ -118,6 +133,7 @@ void content_toolitem_init()
f->texture = "tool_steelaxe.png";
f->name = "SteelAxe";
f->gui_name = "Steel Axe";
crafting::setAxeRecipe(CONTENT_CRAFTITEM_STEEL_INGOT,CONTENT_TOOLITEM_STEELAXE);
i = CONTENT_TOOLITEM_WSWORD;
f = &g_content_toolitem_features[i];
@ -125,6 +141,8 @@ void content_toolitem_init()
f->texture = "tool_woodsword.png";
f->name = "WSword";
f->gui_name = "Wooden Sword";
crafting::setSwordRecipe(CONTENT_WOOD,CONTENT_TOOLITEM_WSWORD);
crafting::setSwordRecipe(CONTENT_JUNGLEWOOD,CONTENT_TOOLITEM_WSWORD);
i = CONTENT_TOOLITEM_STSWORD;
f = &g_content_toolitem_features[i];
@ -132,6 +150,7 @@ void content_toolitem_init()
f->texture = "tool_stonesword.png";
f->name = "STSword";
f->gui_name = "Stone Sword";
crafting::setSwordRecipe(CONTENT_ROUGHSTONE,CONTENT_TOOLITEM_STSWORD);
i = CONTENT_TOOLITEM_STEELSWORD;
f = &g_content_toolitem_features[i];
@ -139,13 +158,15 @@ void content_toolitem_init()
f->texture = "tool_steelsword.png";
f->name = "SteelSword";
f->gui_name = "Steel Sword";
crafting::setSwordRecipe(CONTENT_CRAFTITEM_STEEL_INGOT,CONTENT_TOOLITEM_STEELSWORD);
i = CONTENT_TOOLITEM_SHEARS;
i = CONTENT_TOOLITEM_STEELSHEARS;
f = &g_content_toolitem_features[i];
f->content = i;
f->texture = "tool_shears.png";
f->name = "Shears";
f->gui_name = "Steel Shears";
crafting::setShearsRecipe(CONTENT_CRAFTITEM_STEEL_INGOT,CONTENT_TOOLITEM_STEELSHEARS);
i = CONTENT_TOOLITEM_WBUCKET;
f = &g_content_toolitem_features[i];
@ -153,6 +174,7 @@ void content_toolitem_init()
f->texture = "tool_woodbucket.png";
f->name = "WBucket";
f->gui_name = "Wooden Bucket";
crafting::setURecipe(CONTENT_CRAFTITEM_STICK,CONTENT_TOOLITEM_WBUCKET);
i = CONTENT_TOOLITEM_TINBUCKET;
f = &g_content_toolitem_features[i];
@ -160,6 +182,7 @@ void content_toolitem_init()
f->texture = "tool_tinbucket.png";
f->name = "TinBucket";
f->gui_name = "Tin Bucket";
crafting::setURecipe(CONTENT_CRAFTITEM_TIN_INGOT,CONTENT_TOOLITEM_TINBUCKET);
i = CONTENT_TOOLITEM_WBUCKET_WATER;
f = &g_content_toolitem_features[i];
@ -181,6 +204,7 @@ void content_toolitem_init()
f->texture = "tool_steelbucket.png";
f->name = "SteelBucket";
f->gui_name = "Steel Bucket";
crafting::setURecipe(CONTENT_CRAFTITEM_STEEL_INGOT,CONTENT_TOOLITEM_STEELBUCKET);
i = CONTENT_TOOLITEM_STEELBUCKET_WATER;
f = &g_content_toolitem_features[i];
@ -203,6 +227,7 @@ void content_toolitem_init()
f->texture = "tool_fire_starter.png";
f->name = "FireStarter";
f->gui_name = "Fire Starter";
crafting::set1Any2Recipe(CONTENT_CRAFTITEM_FLINT,CONTENT_CRAFTITEM_STEEL_INGOT,CONTENT_TOOLITEM_FIRESTARTER);
i = CONTENT_TOOLITEM_CROWBAR;
f = &g_content_toolitem_features[i];
@ -210,4 +235,5 @@ void content_toolitem_init()
f->texture = "crowbar.png";
f->name = "crowbar";
f->gui_name = "Crowbar";
crafting::set1over1Recipe(CONTENT_CRAFTITEM_STEEL_INGOT,CONTENT_CRAFTITEM_STEEL_INGOT,CONTENT_TOOLITEM_CROWBAR);
}

View File

@ -50,7 +50,7 @@ ToolItemFeatures & content_toolitem_features(std::string subname);
#define CONTENT_TOOLITEM_WSWORD (CONTENT_TOOLITEM_MASK | 0x0B)
#define CONTENT_TOOLITEM_STSWORD (CONTENT_TOOLITEM_MASK | 0x0C)
#define CONTENT_TOOLITEM_STEELSWORD (CONTENT_TOOLITEM_MASK | 0x0D)
#define CONTENT_TOOLITEM_SHEARS (CONTENT_TOOLITEM_MASK | 0x0E)
#define CONTENT_TOOLITEM_STEELSHEARS (CONTENT_TOOLITEM_MASK | 0x0E)
#define CONTENT_TOOLITEM_WBUCKET (CONTENT_TOOLITEM_MASK | 0x0F)
#define CONTENT_TOOLITEM_TINBUCKET (CONTENT_TOOLITEM_MASK | 0x10)
#define CONTENT_TOOLITEM_WBUCKET_WATER (CONTENT_TOOLITEM_MASK | 0x11)