Implement  climate update and (I think) most parts of the climate system.

This is a pretty large changeset so I'm not sure if everything fits well into how things are at the moment.
Please let me know if there are any stylistic/consistency issues and I'll fix it and make a new request.