|
|
@ -38,15 +38,17 @@ module DFHack
|
|
|
|
@callback.call
|
|
|
|
@callback.call
|
|
|
|
else
|
|
|
|
else
|
|
|
|
if year > @minyear or (year == @minyear and yeartick >= @minyeartick)
|
|
|
|
if year > @minyear or (year == @minyear and yeartick >= @minyeartick)
|
|
|
|
@callback.call
|
|
|
|
|
|
|
|
@minyear = year
|
|
|
|
@minyear = year
|
|
|
|
@minyeartick = yeartick + @ticklimit
|
|
|
|
@minyeartick = yeartick + @ticklimit
|
|
|
|
if @minyeartick > yearlen
|
|
|
|
if @minyeartick > yearlen
|
|
|
|
@minyear += 1
|
|
|
|
@minyear += 1
|
|
|
|
@minyeartick -= yearlen
|
|
|
|
@minyeartick -= yearlen
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
@callback.call
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
rescue
|
|
|
|
|
|
|
|
puts_err "onupdate cb #$!", $!.backtrace
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def <=>(o)
|
|
|
|
def <=>(o)
|
|
|
|