Help finding code for rags/leather patches (never mind, done)

I’m trying to make wool items cuttable into wool patches. These can be disassembled into wool thread, which can be used as thread or with knitting needles to make other wool clothing. I want to find the code for leather patches or rags, so I can copy it and learn from it. However, I can’t find it. Where is it in the code, and what would I need to do to do all this?

https://github.com/CleverRaven/Cataclysm-DDA/blob/master/src/iuse.cpp#L6673-L6802

Should just be able to add an entry to material_id_white_list for ‘wool’. There may be more that needs to be done, but I havn’t looked further into it.

EDIT:: You will also have to create the ‘wool_patch’ item and add it as the “salvage_id” of wool in materials.json

I think it’s in items>melee .json

When I did a search for “flesh” it was the first thing that came up

I think I got it all, but you can check here. Now all I need to do is make recipes for wool items.

How does time in the code relate to time in game?

1 turn is 6 seconds, 10 turns is a minute. That’s what you’re looking for, right?

I think so. How long does it take to craft a rag?

Crafting times are generally in turns, IIRC, so a minute in crafting-duration would be 10. Hoping that helps.

Yeah, I figured that out on my own.

Crafting times are generally in turns, IIRC, so a minute in crafting-duration would be 10. Hoping that helps.[/quote]
Actually that’s false. Crafting recipe times are given in “ticks”, so a 1 minute crafting duration (for an average player) would be 1000. This is to ensure that faster players can craft things faster (since most things you would craft depend on how fast you can accurately move in the real world, whereas only a few things [like cooking] actually depend on a certain amount of time passing).

Actually that’s false. Crafting recipe times are given in “ticks”, so a 1 minute crafting duration (for an average player) would be 1000. This is to ensure that faster players can craft things faster (since most things you would craft depend on how fast you can accurately move in the real world, whereas only a few things [like cooking] actually depend on a certain amount of time passing).[/quote]
Yep, can confirm.

Hence the IIRC. :wink: