Skip to content

Commit

Permalink
Tailoring requirements update (CleverRaven#53578)
Browse files Browse the repository at this point in the history
* Updating the material requirements for tailoring to use fabric_cut

This updates the material requirements for tailoring to use FABRIC_CUT
This only actually affects a handful of recipes, because apparently tailoring recipes are a mess, so I'm working on them after i standardize fabric sizes.

* sorting string declarations

Didn't have the values sorted properly so build failed remotely.
  • Loading branch information
a-chancey authored and mkrutov committed Dec 23, 2021
1 parent b63b5f9 commit 6c600c6
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 20 deletions.
48 changes: 29 additions & 19 deletions data/json/requirements/tailoring.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"id": "armor_kevlar_layered",
"type": "requirement",
"//": "Joining kevlar panels together into something like a kevlar vest or other armor per 80 g of Kevlar. Time needed is 90 minutes per unit.",
"qualities": [ { "id": "CUT", "level": 2 } ],
"qualities": [ { "id": "FABRIC_CUT", "level": 2 } ],
"components": [ [ [ "sheet_kevlar_layered", 1 ] ], [ [ "filament", 4, "LIST" ] ] ]
},
{
Expand Down Expand Up @@ -213,7 +213,7 @@
"id": "tailoring_cotton",
"type": "requirement",
"//": "Crafting cotton items, per 101 g of cotton; 10 g + excessive weight of material is wasted, producing rags and cotton scraps as byproducts. Time needed is usually 90 minutes per unit if hand-stitching.",
"qualities": [ { "id": "SEW", "level": 1 }, { "id": "CUT", "level": 2 } ],
"qualities": [ { "id": "SEW", "level": 1 }, { "id": "FABRIC_CUT", "level": 1 } ],
"components": [ [ [ "sheet_cotton", 22 ] ], [ [ "filament", 1, "LIST" ] ] ]
},
{
Expand All @@ -227,21 +227,21 @@
"id": "tailoring_cotton_patchwork",
"type": "requirement",
"//": "Crafting possibly-patchwork cotton items, per 101 g of cotton; 10 g + excessive weight of material is wasted, producing rags and cotton scraps as byproducts. Time needed is usually 90 minutes per unit if hand-stitching (most of the time actually needed goes into making a patchwork sheet)",
"qualities": [ { "id": "SEW", "level": 1 }, { "id": "CUT", "level": 2 } ],
"qualities": [ { "id": "SEW", "level": 1 }, { "id": "FABRIC_CUT", "level": 1 } ],
"components": [ [ [ "sheet_cotton", 22 ], [ "sheet_cotton_patchwork", 1 ] ], [ [ "filament", 1, "LIST" ] ] ]
},
{
"id": "tailoring_faux_fur",
"type": "requirement",
"//": "Crafting faux fur items, per 201 g of faux fur; 20 g + excessive weight of material is wasted, producing faux fur patches and scraps. Time needed is usually 90 minutes per unit if hand-stitching.",
"qualities": [ { "id": "SEW", "level": 1 }, { "id": "CUT", "level": 2 } ],
"qualities": [ { "id": "SEW", "level": 1 }, { "id": "FABRIC_CUT", "level": 2 }, { "id": "CUT_FINE", "level": 1 } ],
"components": [ [ [ "sheet_faux_fur", 22 ] ], [ [ "filament", 1, "LIST" ] ] ]
},
{
"id": "tailoring_faux_fur_patchwork",
"type": "requirement",
"//": "Crafting possibly-patchwork faux fur items, per 201 g of faux fur; 20 g + excessive weight of material is wasted, producing faux fur patches and scraps. Time needed is usually 90 minutes per unit if hand-stitching (most of the time actually needed goes into making a patchwork sheet).",
"qualities": [ { "id": "SEW", "level": 1 }, { "id": "CUT", "level": 2 } ],
"qualities": [ { "id": "SEW", "level": 1 }, { "id": "FABRIC_CUT", "level": 2 }, { "id": "CUT_FINE", "level": 1 } ],
"components": [ [ [ "sheet_faux_fur", 22 ], [ "sheet_faux_fur_patchwork", 1 ] ], [ [ "filament", 1, "LIST" ] ] ]
},
{
Expand All @@ -255,98 +255,108 @@
"id": "tailoring_felt_patchwork",
"type": "requirement",
"//": "Crafting possibly-patchwork felt items (not via knitting), per 161 g of wool; 16 g + excessive weight of material is wasted, producing felt patches as byproducts. Time needed is usually 90 minutes per unit if hand-stitching. (most of the time actually needed goes into making a patchwork sheet)",
"qualities": [ { "id": "SEW", "level": 1 }, { "id": "CUT", "level": 2 } ],
"qualities": [ { "id": "SEW", "level": 1 }, { "id": "FABRIC_CUT", "level": 1 } ],
"components": [ [ [ "sheet_felt", 22 ], [ "sheet_felt_patchwork", 1 ] ], [ [ "filament", 1, "LIST" ] ] ]
},
{
"id": "tailoring_fur",
"type": "requirement",
"//": "Crafting fur items, per 415 g of fur; 273 g + excessive weight of material is wasted, producing fur patches as byproducts. Time needed is usually 360 minutes per unit if hand-stitching.",
"qualities": [ { "id": "SEW", "level": 1 }, { "id": "CUT", "level": 2 }, { "id": "LEATHER_AWL", "level": 1 } ],
"qualities": [
{ "id": "SEW", "level": 1 },
{ "id": "FABRIC_CUT", "level": 2 },
{ "id": "LEATHER_AWL", "level": 1 },
{ "id": "CUT_FINE", "level": 1 }
],
"components": [ [ [ "tanned_pelt", 1 ] ], [ [ "filament", 4, "LIST" ] ] ]
},
{
"id": "tailoring_fur_small",
"type": "requirement",
"//": "Crafting either small or patchwork fur items, per 92 g of fur; 23 g + excessive weight of material is wasted, producing fur patches as byproducts. Time needed is usually 180 minutes per unit if hand-stitching.",
"qualities": [ { "id": "SEW", "level": 1 }, { "id": "CUT", "level": 2 }, { "id": "LEATHER_AWL", "level": 1 } ],
"qualities": [
{ "id": "SEW", "level": 1 },
{ "id": "FABRIC_CUT", "level": 2 },
{ "id": "LEATHER_AWL", "level": 1 },
{ "id": "CUT_FINE", "level": 1 }
],
"components": [ [ [ "fur", 1 ] ], [ [ "filament", 1, "LIST" ] ] ]
},
{
"id": "tailoring_kevlar_fabric",
"type": "requirement",
"//": "Crafting Kevlar items, per 101 g of Kevlar; 10 g + excessive weight of material is wasted, producing Kevlar scraps as byproducts. Time needed is usually 90 minutes per unit if hand-stitching.",
"qualities": [ { "id": "SEW", "level": 2 }, { "id": "CUT", "level": 2 } ],
"qualities": [ { "id": "SEW", "level": 2 }, { "id": "FABRIC_CUT", "level": 2 } ],
"components": [ [ [ "sheet_kevlar", 22 ] ], [ [ "filament", 1, "LIST" ] ] ]
},
{
"id": "tailoring_leather",
"type": "requirement",
"//": "Crafting leather items, per 364 g of leather; 240 g + excessive weight of material is wasted, producing leather patches as byproducts. Time needed is usually 360 minutes per unit if hand-stitching.",
"qualities": [ { "id": "SEW", "level": 1 }, { "id": "CUT", "level": 2 }, { "id": "LEATHER_AWL", "level": 1 } ],
"qualities": [ { "id": "SEW", "level": 1 }, { "id": "FABRIC_CUT", "level": 1 }, { "id": "LEATHER_AWL", "level": 1 } ],
"components": [ [ [ "tanned_hide", 1 ] ], [ [ "filament", 4, "LIST" ] ] ]
},
{
"id": "tailoring_leather_small",
"type": "requirement",
"//": "Crafting either small or patchwork leather items, per 81 g of leather; 20 g + excessive weight of material is wasted, producing leather patches as byproducts. Time needed is usually 180 minutes per unit if hand-stitching.",
"qualities": [ { "id": "SEW", "level": 1 }, { "id": "CUT", "level": 2 }, { "id": "LEATHER_AWL", "level": 1 } ],
"qualities": [ { "id": "SEW", "level": 1 }, { "id": "FABRIC_CUT", "level": 1 }, { "id": "LEATHER_AWL", "level": 1 } ],
"components": [ [ [ "leather", 1 ] ], [ [ "filament", 1, "LIST" ] ] ]
},
{
"id": "tailoring_lycra",
"type": "requirement",
"//": "Crafting Lycra items, per 55 g of Lycra; 6 g + excessive weight of material is wasted, producing Lycra scraps as byproducts. Time needed is usually 90 minutes per unit if hand-stitching.",
"qualities": [ { "id": "SEW", "level": 1 }, { "id": "CUT", "level": 2 } ],
"qualities": [ { "id": "SEW", "level": 1 }, { "id": "FABRIC_CUT", "level": 1 } ],
"components": [ [ [ "sheet_lycra", 22 ] ], [ [ "thread_nomex", 1 ] ] ]
},
{
"id": "tailoring_lycra_patchwork",
"type": "requirement",
"//": "Crafting possibly-patchwork Lycra items, per 55 g of Lycra; 6 g + excessive weight of material is wasted, producing Lycra scraps as byproducts. Time needed is usually 90 minutes per unit if hand-stitching (most of the time actually needed goes into making a patchwork sheet).",
"qualities": [ { "id": "SEW", "level": 1 }, { "id": "CUT", "level": 2 } ],
"qualities": [ { "id": "SEW", "level": 1 }, { "id": "FABRIC_CUT", "level": 1 } ],
"components": [ [ [ "sheet_lycra", 22 ], [ "sheet_lycra_patchwork", 1 ] ], [ [ "thread_nomex", 1 ] ] ]
},
{
"id": "tailoring_neoprene",
"type": "requirement",
"//": "Crafting neoprene items, per 121 g of neoprene; 12 g + excessive weight of material is wasted, producing neoprene scraps as byproducts. Superglue and duct tape will usually be needed for extra waterproofing. Time needed is usually 100 minutes per unit if hand-stitching.",
"qualities": [ { "id": "SEW_CURVED", "level": 1 }, { "id": "CUT", "level": 2 } ],
"qualities": [ { "id": "SEW_CURVED", "level": 1 }, { "id": "FABRIC_CUT", "level": 1 } ],
"components": [ [ [ "sheet_neoprene", 22 ] ], [ [ "filament", 1, "LIST" ] ] ]
},
{
"id": "tailoring_neoprene_patchwork",
"type": "requirement",
"//": "Crafting possibly-patchwork neoprene items, per 121 g of neoprene; 12 g + excessive weight of material is wasted, producing neoprene scraps as byproducts. Superglue and duct tape will usually be needed for extra waterproofing. Time needed is usually 100 minutes per unit if hand-stitching (most of the time actually needed goes into making a patchwork sheet).",
"qualities": [ { "id": "SEW_CURVED", "level": 1 }, { "id": "CUT", "level": 2 } ],
"qualities": [ { "id": "SEW_CURVED", "level": 1 }, { "id": "FABRIC_CUT", "level": 1 } ],
"components": [ [ [ "sheet_neoprene", 22 ], [ "sheet_neoprene_patchwork", 1 ] ], [ [ "filament", 1, "LIST" ] ] ]
},
{
"id": "tailoring_nomex",
"type": "requirement",
"//": "Crafting Nomex items, per 101 g of Nomex; 10 g + excessive weight of material is wasted, producing Nomex scraps as byproducts. Time needed is usually 90 minutes per unit if hand-stitching.",
"qualities": [ { "id": "SEW", "level": 1 }, { "id": "CUT", "level": 2 } ],
"qualities": [ { "id": "SEW", "level": 1 }, { "id": "FABRIC_CUT", "level": 2 } ],
"components": [ [ [ "sheet_nomex", 22 ] ], [ [ "thread_nomex", 1 ] ] ]
},
{
"id": "tailoring_nomex_patchwork",
"type": "requirement",
"//": "Crafting possibly-patchwork Nomex items, per 101 g of Nomex; 10 g + excessive weight of material is wasted, producing Nomex scraps as byproducts. Time needed is usually 90 minutes per unit if hand-stitching.",
"qualities": [ { "id": "SEW", "level": 1 }, { "id": "CUT", "level": 2 } ],
"qualities": [ { "id": "SEW", "level": 1 }, { "id": "FABRIC_CUT", "level": 2 } ],
"components": [ [ [ "sheet_nomex", 22 ], [ "sheet_nomex_patchwork", 1 ] ], [ [ "thread_nomex", 1 ] ] ]
},
{
"id": "tailoring_nylon",
"type": "requirement",
"//": "Crafting synthetic fabric items, per 55 g of neoprene; 6 g + excessive weight of material is wasted, producing synthetic fabric scraps as byproducts. Time needed is usually 90 minutes per unit if hand-stitching.",
"qualities": [ { "id": "SEW", "level": 1 }, { "id": "CUT", "level": 2 } ],
"qualities": [ { "id": "SEW", "level": 1 }, { "id": "FABRIC_CUT", "level": 1 } ],
"components": [ [ [ "sheet_nylon", 22 ] ], [ [ "filament", 1, "LIST" ] ] ]
},
{
"id": "tailoring_nylon_patchwork",
"type": "requirement",
"//": "Crafting possibly-patchwork synthetic fabric items, per 55 g of neoprene; 6 g + excessive weight of material is wasted, producing synthetic fabric scraps as byproducts. Time needed is usually 90 minutes per unit if hand-stitching (most of the time actually needed goes into making a patchwork sheet).",
"qualities": [ { "id": "SEW", "level": 1 }, { "id": "CUT", "level": 2 } ],
"qualities": [ { "id": "SEW", "level": 1 }, { "id": "FABRIC_CUT", "level": 1 } ],
"components": [ [ [ "sheet_nylon", 22 ] ], [ [ "sheet_nylon_patchwork", 1 ] ], [ [ "filament", 1, "LIST" ] ] ]
},
{
Expand Down
4 changes: 3 additions & 1 deletion tests/crafting_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,15 @@ static const itype_id itype_hacksaw( "hacksaw" );
static const itype_id itype_hammer( "hammer" );
static const itype_id itype_needle_bone( "needle_bone" );
static const itype_id itype_pockknife( "pockknife" );
static const itype_id itype_scissors( "scissors" );
static const itype_id itype_water( "water" );

static const morale_type morale_food_good( "morale_food_good" );

static const quality_id qual_ANVIL( "ANVIL" );
static const quality_id qual_CHISEL( "CHISEL" );
static const quality_id qual_CUT( "CUT" );
static const quality_id qual_FABRIC_CUT( "FABRIC_CUT" );
static const quality_id qual_HAMMER( "HAMMER" );
static const quality_id qual_LEATHER_AWL( "LEATHER_AWL" );
static const quality_id qual_SAW_M( "SAW_M" );
Expand Down Expand Up @@ -764,7 +766,7 @@ TEST_CASE( "total crafting time with or without interruption", "[crafting][time]
}

static std::map<quality_id, itype_id> quality_to_tool = {{
{ qual_CUT, itype_pockknife }, { qual_SEW, itype_needle_bone }, { qual_LEATHER_AWL, itype_awl_bone }, { qual_ANVIL, itype_anvil }, { qual_HAMMER, itype_hammer }, { qual_SAW_M, itype_hacksaw }, { qual_CHISEL, itype_chisel }
{ qual_CUT, itype_pockknife }, { qual_SEW, itype_needle_bone }, { qual_LEATHER_AWL, itype_awl_bone }, { qual_ANVIL, itype_anvil }, { qual_HAMMER, itype_hammer }, { qual_SAW_M, itype_hacksaw }, { qual_CHISEL, itype_chisel }, { qual_FABRIC_CUT, itype_scissors }
}
};

Expand Down

0 comments on commit 6c600c6

Please sign in to comment.