Add Ryan's darktime code