Move gametime conversion factors to contrib and remove them from the settings file with the motivation that the gametime constats were always highly game specific and a remnant from another time. Reworked the gametime library and add server epoch building from vincent-lg's original PR. The gametime module now deals exclusively in seconds.

This commit is contained in:
Griatch 2017-02-12 18:51:56 +01:00
parent 2a48a4d645
commit 008566f358
7 changed files with 96 additions and 229 deletions

View file

@ -93,9 +93,9 @@ REGEXMAP = {"morning": (RE_MORNING, RE_AFTERNOON, RE_EVENING, RE_NIGHT),
# set up the seasons and time slots. This assumes gametime started at the
# beginning of the year (so month 1 is equivalent to January), and that
# one CAN divide the game's year into four seasons in the first place ...
MONTHS_PER_YEAR = settings.TIME_MONTH_PER_YEAR
MONTHS_PER_YEAR = 12
SEASONAL_BOUNDARIES = (3 / 12.0, 6 / 12.0, 9 / 12.0)
HOURS_PER_DAY = settings.TIME_HOUR_PER_DAY
HOURS_PER_DAY = 24
DAY_BOUNDARIES = (0, 6 / 24.0, 12 / 24.0, 18 / 24.0)