Merge pull request #4414 from alex-gh/movement_halloss_fix

Fixed halloss not slowing you down.
Merge pull request #4410 from Ccomp5950/dna2-cherrypick

DNA2 Cherry-pick (Dev -> Master)
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)
Foam works properly again
Foam proc calls reduced by 70-80%
Minor tweaks and fixes for airlock equipment

- Fixed DP vent pumps not changing direction
- Made airlock_sensor more versatile (and backwards compatible with old airlock code)
- Added airlock_sensor and access_button airlock subtypes for easier mapping
Airlock controller rewrite

- /datum/computer/file/embedded_program moved from embedded_controller_base.dm to code/game/machinery/embedded_controller/airlock_program.dm
- embedded_controller_base.dm cleaned up and identical parts of the controller subtypes were moved here
- embedded_controller subtypes moved to code/game/machinery/embedded_controller/airlock_controllers.dm
- Added nanoUI templates for airlock controllers
- Added a couple of classes to nano/css/shared.css for colouring buttons
- Minor map update to maintain airlock compatibility and fix a broken airlock near virology
Airlock update

- Should now merge
Fixed cable colors

- Fixed a couple of lines of code in power.dmi so that cables correctly update their color
- Fixed the contrast of the cable icons
Code effeciency project: Sun datum

Because of the wrong direction of this sign, every single solar array was being checked for occlusion every tick.

This should fix that right up.

Trackers set to update their angle only when the sun does.

Solar panels set to calculate occlusion every minute (was every tick (though thought to be set to every 6 minutes (36 degrees)), now checks every 6 degrees of sun movement or so)
Merge pull request #4422 from Ccomp5950/sun_fix

Code effeciency project:  Sun datum
Merge pull request #4408 from Loganbacca/airlock-merge

Airlock controller rewrite
People in lobby won't see PDA messages.
Merge pull request #4424 from Ccomp5950/ghost-pda

People in lobby won't see PDA messages.
Merge pull request #4412 from Ccomp5950/pai-messenger

pAI messenger bugfix.
Merge pull request #4416 from Loganbacca/foam

Chem grenade fixes
Chem grenade fix

Missed this in my last commit:
- Added a result amount for chemsmoke so it calculates the created_volume correctly
Code effeciency project: handle_embedded_objects

Before:  EVERYTIME someone moved their character this proc would be called and loop through every organ looking for implanted items to see if it needs to apply damage.

After:  We create a flag that is set when an item embeddes, only when that flag is set do we do that loop through organs upon movement.  Also every 10 ticks while that flag
is set we will check to see if we need to unset it.
Code effeciency project:  Canister icon updates

Before:  If a canister is hooked up to a connector port it's icons were being deleted and recreated every tick.

After:  We store an update_flag that is a bitfield of the current icon and overlay states, and created a proc to check if it should change.  If not, we don't mess with icons.  Real simple.
Merge pull request #4427 from Ccomp5950/handle_imbedded_fix

Code effeciency project: handle_embedded_objects
Merge pull request #4426 from Loganbacca/dev

Chem grenade fix
Medbay Renovation

Major Medbay Renovation