CleverRaven/Cataclysm-DDA — pull request #4187 by gbeck (2013-11-06 06:31:09+00:00)
Title: Stop fire extinguishers from starting fires.

When aimed in a direction in which there are no fires, fire extinguishers currently have an even chance of *starting* a fire. My research indicates that real-life fire extinguishers do not exhibit this behavior.

The original fire extinguisher code (by Wales) reduced the strength of fire in the target tile, but also either slightly increased or decreased the strength of any fire burning in the tile *behind* the target. There is no explanation for the possibility of increasing a fire's strength. It may have been a bug, or it may have been an effort to cause extinguishers to "sweep" fire back from an adjacent tile into the tile beyond it. The results, however, are very strange. For example, aiming a fire extinguisher at a small campfire from an adjacent tile will always put the fire out, but aiming the extinguisher from two tiles away could instead turn the campfire into a raging inferno.

The problem was exacerbated in DDA when a check for the existence of an existing fire was removed, allowing extinguishers to create new fires in addition to strengthening existing ones. Currently, a fire extinguisher can be used as an alternative to a lighter or as a low-budget flamethrower.

This commit fixes the problem in the simplest (and I think most realistic) way, by preventing extinguishers from ever increasing fire strength. The strength of a fire in the tile behind the target is reduced by a small random amount; it is never increased.

The alternative would be to revert to the original Cataclysm's approach of allowing extinguishers to increase fire strength in tiles where there is already a fire. But I see nothing to justify the unrealistic results of that approach.