CleverRaven/Cataclysm-DDA — pull request #7226 by BevapDin (2014-04-14 13:08:22+00:00)
Title: Set charges_per_use to 1 for some tools so they consume a charge when activated...

Fixes #7213

I might have missed that when moving the iuse action to json.

> flashlights are listed as lasting 15 turns per charge. they actually use up a charge on the 11th, not the 16th turn.

Tools use charges when `(g->turn % turns_per_charges) == 0`. This happens every `turns_per_charges` turns. This approach avoids storing the time when the player activated the item. To prevent the exploit you mentioned, every activation should cost at least a single charge, which is now fixed.

> flashlights do not track fractional charges

No item does, charges are stored as integer. That's why activation is supposed to cost a charge.