diff --git a/src/content_craft.cpp b/src/content_craft.cpp index b3dbe78..802757d 100644 --- a/src/content_craft.cpp +++ b/src/content_craft.cpp @@ -310,26 +310,6 @@ void setFilledRoundRecipe(u16 input1, u16 input2, u16 result) }; setRecipe(r,result,1); } -// six input in two vertical columns yields one result -void setDoorRecipe(u16 input, u16 result) -{ - u16 r[9] = { - input, input, CONTENT_IGNORE, - input, input, CONTENT_IGNORE, - input, input, CONTENT_IGNORE - }; - setRecipe(r,result,1); -} -// six input in two horizontal rows yields one result -void setHatchRecipe(u16 input, u16 result) -{ - u16 r[9] = { - input, input, input, - input, input, input, - CONTENT_IGNORE, CONTENT_IGNORE, CONTENT_IGNORE - }; - setRecipe(r,result,1); -} // six input in two horizontal rows yields six result void setWallRecipe(u16 input, u16 result) { diff --git a/src/content_craft.h b/src/content_craft.h index 2b22f8c..873981b 100644 --- a/src/content_craft.h +++ b/src/content_craft.h @@ -198,10 +198,6 @@ namespace crafting { void setRoundRecipe(u16 input, u16 result); // eight input1 surrounding one input2 yields one result void setFilledRoundRecipe(u16 input1, u16 input2, u16 result); - // six input in two vertical columns yields one result - void setDoorRecipe(u16 input, u16 result); - // six input in two horizontal rows yields one result - void setHatchRecipe(u16 input, u16 result); // six input in two horizontal rows yields six result void setWallRecipe(u16 input, u16 result); // shapeless shortcuts diff --git a/src/content_mapnode.cpp b/src/content_mapnode.cpp index 21f2f76..b7d9013 100644 --- a/src/content_mapnode.cpp +++ b/src/content_mapnode.cpp @@ -4107,8 +4107,7 @@ void content_mapnode_init() f->fuel_time = 30; content_mapnode_nodebox_door(f); setWoodLikeDiggingProperties(f->digging_properties, 0.75); - crafting::setDoorRecipe(CONTENT_CRAFTITEM_WOOD_PLANK,CONTENT_WOOD_DOOR_LT); - crafting::setDoorRecipe(CONTENT_CRAFTITEM_JUNGLE_PLANK,CONTENT_WOOD_DOOR_LT); + crafting::set1over1Recipe(CONTENT_WOOD_HATCH,CONTENT_WOOD_HATCH,CONTENT_WOOD_DOOR_LT); crafting::set1To1Recipe(CONTENT_WOOD_DOOR_RT,CONTENT_WOOD_DOOR_LT); i = CONTENT_STEEL_DOOR_LB; @@ -4151,7 +4150,7 @@ void content_mapnode_init() if(f->initial_metadata == NULL) f->initial_metadata = new LockedDoorNodeMetadata(); setStoneLikeDiggingProperties(f->digging_properties, 5.0); - crafting::setDoorRecipe(CONTENT_CRAFTITEM_STEEL_INGOT,CONTENT_STEEL_DOOR_LT); + crafting::set1over1Recipe(CONTENT_STEEL_HATCH,CONTENT_STEEL_HATCH,CONTENT_STEEL_DOOR_LT); crafting::set1To1Recipe(CONTENT_STEEL_DOOR_RT,CONTENT_STEEL_DOOR_LT); i = CONTENT_GLASS_DOOR_LB; @@ -4194,7 +4193,7 @@ void content_mapnode_init() 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.15); - crafting::setDoorRecipe(CONTENT_GLASS,CONTENT_GLASS_DOOR_LT); + crafting::set1over1Recipe(CONTENT_GLASS_PANE,CONTENT_GLASS_PANE,CONTENT_GLASS_DOOR_LT); crafting::set1To1Recipe(CONTENT_GLASS_DOOR_RT,CONTENT_GLASS_DOOR_LT); i = CONTENT_WOOD_W_DOOR_LB; @@ -4239,6 +4238,7 @@ void content_mapnode_init() f->fuel_time = 30; content_mapnode_nodebox_doorw(f); setWoodLikeDiggingProperties(f->digging_properties, 0.75); + crafting::set1over1Recipe(CONTENT_WOOD_W_HATCH,CONTENT_WOOD_HATCH,CONTENT_WOOD_W_DOOR_LT); crafting::set1over1Recipe(CONTENT_GLASS,CONTENT_WOOD_DOOR_LT,CONTENT_WOOD_W_DOOR_LT); crafting::set1To1Recipe(CONTENT_WOOD_W_DOOR_RT,CONTENT_WOOD_W_DOOR_LT); @@ -4284,6 +4284,7 @@ void content_mapnode_init() if(f->initial_metadata == NULL) f->initial_metadata = new LockedDoorNodeMetadata(); setStoneLikeDiggingProperties(f->digging_properties, 5.0); + crafting::set1over1Recipe(CONTENT_STEEL_W_HATCH,CONTENT_STEEL_HATCH,CONTENT_STEEL_W_DOOR_LT); crafting::set1over1Recipe(CONTENT_GLASS,CONTENT_STEEL_DOOR_LT,CONTENT_STEEL_W_DOOR_LT); crafting::set1To1Recipe(CONTENT_STEEL_W_DOOR_RT,CONTENT_STEEL_W_DOOR_LT); @@ -4935,8 +4936,8 @@ void content_mapnode_init() f->fuel_time = 30; content_mapnode_nodebox_hatch(f); setWoodLikeDiggingProperties(f->digging_properties, 0.75); - crafting::setHatchRecipe(CONTENT_CRAFTITEM_WOOD_PLANK,CONTENT_WOOD_HATCH); - crafting::setHatchRecipe(CONTENT_CRAFTITEM_JUNGLE_PLANK,CONTENT_WOOD_HATCH); + crafting::setSoftBlockRecipe(CONTENT_CRAFTITEM_WOOD_PLANK,CONTENT_WOOD_HATCH); + crafting::setSoftBlockRecipe(CONTENT_CRAFTITEM_JUNGLE_PLANK,CONTENT_WOOD_HATCH); i = CONTENT_STEEL_HATCH; f = &content_features(i); @@ -4954,7 +4955,7 @@ void content_mapnode_init() if(f->initial_metadata == NULL) f->initial_metadata = new LockedDoorNodeMetadata(); setStoneLikeDiggingProperties(f->digging_properties, 5.0); - crafting::setHatchRecipe(CONTENT_CRAFTITEM_STEEL_INGOT,CONTENT_STEEL_HATCH); + crafting::setSoftBlockRecipe(CONTENT_CRAFTITEM_STEEL_INGOT,CONTENT_STEEL_HATCH); i = CONTENT_WOOD_W_HATCH; f = &content_features(i);