29 MAXTIMES = [Crossfire.Time.MONTHS_PER_YEAR, Crossfire.Time.WEEKS_PER_MONTH*Crossfire.Time.DAYS_PER_WEEK,
30 Crossfire.Time.HOURS_PER_DAY, 60]
35 oldtime = self.getStatus(markername).
split(
"-")
36 oldtime =
list(
map(int, oldtime))
42 currenttime = (Crossfire.GetTime())[:5]
46 actualdiff.append(currenttime[i]-oldtime[i])
48 for i
in range(4,0,-1):
50 if desireddiff[i] > MAXTIMES[i-1]:
51 desireddiff[i-1] += desireddiff[i] // MAXTIMES[i-1]
52 desireddiff[i] %= MAXTIMES[i-1]
55 actualdiff[i] += MAXTIMES[i-1]
57 Crossfire.Log(Crossfire.LogDebug,
"CFDialog: tidied up desired difference: %s actual difference %s" %(desireddiff, actualdiff))
59 if actualdiff[i] < desireddiff[i]: