Baystation12/Baystation12 — pull request #4416 by Loganbacca (2014-02-12 11:20:14+00:00)
Title: Chem grenade fixes

Fixes #3986

- Foam reagent inheritance fixed:
The trans_to() proc in Chemistry-Holder.dm was calling handle_reactions() every time it would add and remove reagents with add_reagent() and remove_reagent(). I've added a safety flag to both of these procs (and copy_to()) so that trans_to will not call handle_reactions() until it has added all the reagents to the target container. This allows foam to reliably take on the properties of other leftover reagents.

- Fixed a bug in effect_system.dm that wasn't applying reagents from foam to the environment.

- Tweaked smoke to apply reagent effects after it has stopped moving:
This was causing huge reagent spam at the center of the smoke cloud as it was spawning, since they were being applied every time the cloud of smoke moved. Also changed it to apply the effects 2-3 times at longer intervals (2 seconds).

- Smoke also only effects tiles in a 3x3 grid now, rather than 5x5.

- Summary:
Chem smoke does slightly less damage (if it contains damaging reagents)
Chem smoke proc calls reduced by 60-70% (significant lag reduction)
Number of smoke clouds produced by smoke grenades scales according to total reagents (25/25/25 smoke reagents creates 10 smoke clouds)
Foam works properly again
Foam proc calls reduced by 70-80%