Line 140: |
Line 140: |
| | | |
| local function tooltip(text, title) | | local function tooltip(text, title) |
− | return F:tooltip2(text, title:gsub('<br>', ';;'), ';;') | + | return string.format('<span title="%s" style="cursor:help;border-bottom:1px dotted">%s</span>', title:gsub('<br>', " "), text) |
| end | | end |
| | | |
Line 185: |
Line 185: |
| end | | end |
| | | |
− | local function formatAmount(n, time) | + | local function formatAmount(n, time, reset) |
| n = tonumber(n) | | n = tonumber(n) |
− | return not n and '??' or tostring(time and U.round(60 * n / time) or n) | + | local r = not n and '??' or tostring(time and U.round(60 * n / time) or n) |
| + | return reset and string.format('<span style="color:grey">%s</span>', r) or r |
| end | | end |
| | | |
Line 226: |
Line 227: |
| name = e.damage_type == 1 and string.format('<span style="color:red">%s</span>', tooltip(e.name, e.details)) or tooltip(e.name, e.details), | | name = e.damage_type == 1 and string.format('<span style="color:red">%s</span>', tooltip(e.name, e.details)) or tooltip(e.name, e.details), |
| time = tooltip(formatTime(e.time), 'Time required for expedition'), | | time = tooltip(formatTime(e.time), 'Time required for expedition'), |
− | hq = tooltip(formatAmount(args.explicit[id .. ' hq'], hourly and e.time), 'Admiral experience gained upon completion from this expedition'), | + | hq = tooltip(formatAmount(args.explicit[id .. ' hq'], hourly and e.time, e.reset_type), 'Admiral experience gained upon completion from this expedition'), |
− | ship = tooltip(formatAmount(args.explicit[id .. ' ship'], hourly and e.time), 'Ship experience gained upon completion from this expedition'), | + | ship = tooltip(formatAmount(args.explicit[id .. ' ship'], hourly and e.time, e.reset_type), 'Ship experience gained upon completion from this expedition'), |
− | fuel = e.win_mat_level[1] == 0 and '' or tooltip(formatAmount(args.explicit[id .. ' fuel'], hourly and e.time), 'Base resources gain from expedition (at 100% ratio)'), | + | fuel = e.win_mat_level[1] == 0 and '' or tooltip(formatAmount(args.explicit[id .. ' fuel'], hourly and e.time, e.reset_type), 'Base resources gain from expedition (at 100% ratio)'), |
− | ammo = e.win_mat_level[2] == 0 and '' or tooltip(formatAmount(args.explicit[id .. ' ammo'], hourly and e.time), 'Base resources gain from expedition (at 100% ratio)'), | + | ammo = e.win_mat_level[2] == 0 and '' or tooltip(formatAmount(args.explicit[id .. ' ammo'], hourly and e.time, e.reset_type), 'Base resources gain from expedition (at 100% ratio)'), |
− | steel = e.win_mat_level[3] == 0 and '' or tooltip(formatAmount(args.explicit[id .. ' steel'], hourly and e.time), 'Base resources gain from expedition (at 100% ratio)'), | + | steel = e.win_mat_level[3] == 0 and '' or tooltip(formatAmount(args.explicit[id .. ' steel'], hourly and e.time, e.reset_type), 'Base resources gain from expedition (at 100% ratio)'), |
− | bauxite = e.win_mat_level[4] == 0 and '' or tooltip(formatAmount(args.explicit[id .. ' bauxite'], hourly and e.time), 'Base resources gain from expedition (at 100% ratio)'), | + | bauxite = e.win_mat_level[4] == 0 and '' or tooltip(formatAmount(args.explicit[id .. ' bauxite'], hourly and e.time, e.reset_type), 'Base resources gain from expedition (at 100% ratio)'), |
| item1 = e.win_item1[1] > 0 and formatItem(e.win_item1[1], e.win_item1[2]) or '', | | item1 = e.win_item1[1] > 0 and formatItem(e.win_item1[1], e.win_item1[2]) or '', |
| item2 = e.win_item2[1] > 0 and formatItem(e.win_item2[1], e.win_item2[2]) or '', | | item2 = e.win_item2[1] > 0 and formatItem(e.win_item2[1], e.win_item2[2]) or '', |