comparison core.lua @ 85:4771ee8eaa81

Revert the change using seconds in the fallback timestamp. OF COURSE that won't work. Drink more coffee next time.
author Farmbuyer of US-Kilrogg <farmbuyer@gmail.com>
date Thu, 21 Jun 2012 19:38:54 +0000
parents c87bf3e756f3
children 703bbe61d12d
comparison
equal deleted inserted replaced
84:c87bf3e756f3 85:4771ee8eaa81
818 if e.kind == 'loot' then 818 if e.kind == 'loot' then
819 if e.history_unique then 819 if e.history_unique then
820 e.unique, e.history_unique = e.history_unique, nil 820 e.unique, e.history_unique = e.history_unique, nil
821 end 821 end
822 if e.unique == nil or #e.unique == 0 then 822 if e.unique == nil or #e.unique == 0 then
823 e.unique = e.id .. e.person .. date("%Y/%m/%d %H:%M:%S",e.stamp) 823 e.unique = e.id .. e.person .. date("%Y/%m/%d %H:%M",e.stamp)
824 end 824 end
825 end 825 end
826 end 826 end
827 end 827 end
828 828
3200 -- cache of stuff we've already deleted; if it's not there then just do 3200 -- cache of stuff we've already deleted; if it's not there then just do
3201 -- the same steps as _addHistoryEntry. 3201 -- the same steps as _addHistoryEntry.
3202 -- FIXME The deleted cache isn't nearly as useful now with the new data structures. 3202 -- FIXME The deleted cache isn't nearly as useful now with the new data structures.
3203 local when 3203 local when
3204 if (not e.unique) or (#e.unique==0) then 3204 if (not e.unique) or (#e.unique==0) then
3205 when = g_today and self:format_timestamp (g_today, e) or date("%Y/%m/%d %H:%M:%S",e.stamp) 3205 when = g_today and self:format_timestamp (g_today, e) or date("%Y/%m/%d %H:%M",e.stamp)
3206 e.unique = e.id .. name .. when 3206 e.unique = e.id .. name .. when
3207 end 3207 end
3208 local U = e.unique 3208 local U = e.unique
3209 local c = deleted_cache[U] 3209 local c = deleted_cache[U]
3210 deleted_cache[U] = nil 3210 deleted_cache[U] = nil
3211 name_h.unique[#name_h.unique+1] = U 3211 name_h.unique[#name_h.unique+1] = U
3212 name_h.when[U] = c and c.when or when or date("%Y/%m/%d %H:%M:%S",e.stamp) 3212 name_h.when[U] = c and c.when or when or date("%Y/%m/%d %H:%M",e.stamp)
3213 name_h.id[U] = e.id -- c.id 3213 name_h.id[U] = e.id -- c.id
3214 name_h.count[U] = c and c.count or e.count 3214 name_h.count[U] = c and c.count or e.count
3215 sort_player(name_h) 3215 sort_player(name_h)
3216 g_uniques[U] = { loot = index, history = name_i } 3216 g_uniques[U] = { loot = index, history = name_i }
3217 self.hist_clean = nil 3217 self.hist_clean = nil