Implement day/night system

The code for this has been written for a long time, just had to make
some slight modifications to it to work with the new engine.