@@ -138,7 +138,7 @@ local function clamp_coverage(timeskip)
138
138
end
139
139
140
140
local function record_coverage ()
141
- local coverage_slot = ( df .global .cur_year_tick + 1 ) % 50
141
+ local coverage_slot = df .global .cur_year_tick % 50
142
142
if DEBUG >= 3 and not tick_coverage [coverage_slot ] then
143
143
print (' recording coverage for slot:' , coverage_slot )
144
144
end
@@ -171,8 +171,7 @@ local function clamp_timeskip(timeskip)
171
171
local next_tick = df .global .cur_year_tick + 1
172
172
timeskip = math.min (timeskip , get_next_trigger_year_tick (next_tick )- next_tick )
173
173
timeskip = math.min (timeskip , get_next_birthday (next_tick )- next_tick )
174
- timeskip = math.min (timeskip , clamp_coverage (timeskip ))
175
- return timeskip
174
+ return clamp_coverage (timeskip )
176
175
end
177
176
178
177
local function increment_counter (obj , counter_name , timeskip )
@@ -334,7 +333,9 @@ local function adjust_activities(timeskip)
334
333
end
335
334
end
336
335
337
- local function on_tick_impl ()
336
+ local function on_tick ()
337
+ record_coverage ()
338
+
338
339
if df .global .cur_year_tick % 10 == 0 then
339
340
season_tick_throttled = false
340
341
if df .global .cur_year_tick % 1000 == 0 then
@@ -368,8 +369,8 @@ local function on_tick_impl()
368
369
timeskip_deficit = math.min (desired_timeskip - timeskip , 100.0 )
369
370
370
371
if DEBUG >= 2 then
371
- print ((' cur_year_tick: %d, timeskip: (%d, +%.2f)' ):format (
372
- df .global .cur_year_tick , timeskip , timeskip_deficit ))
372
+ print ((' cur_year_tick: %d, real_fps: %d, timeskip: (%d, +%.2f)' ):format (
373
+ df .global .cur_year_tick , real_fps , timeskip , timeskip_deficit ))
373
374
end
374
375
if timeskip <= 0 then return end
375
376
@@ -380,11 +381,6 @@ local function on_tick_impl()
380
381
adjust_activities (timeskip )
381
382
end
382
383
383
- local function on_tick ()
384
- on_tick_impl ()
385
- record_coverage ()
386
- end
387
-
388
384
---- --------------------------------
389
385
-- hook management
390
386
0 commit comments