I'm not sure I understand what's going on here. If it has 1 charges_used, it uses up ALL it's charges or charges_per use.
But if it has more than one charges_used, it uses up ALL of it's charges OR the actual value of charges used.

This... doesn't make any sense to me. Why would it be done this way? So if a recipe called for 2 charges used, and the item was 3 charges per use, it would only use 2 charges?

Should this be a single line saying (charges_used * (int)tool->charges_per_use) or something?