| Line 28: |
Line 28: |
| | local function formatTime(time) | | local function formatTime(time) |
| | return math.floor(time / 60) .. ':' .. time % 60 | | return math.floor(time / 60) .. ':' .. time % 60 |
| | + | end |
| | + | |
| | + | local function tooltip(text, title) |
| | + | return F:tooltip2(text, title, '<br>') |
| | end | | end |
| | | | |
| Line 36: |
Line 40: |
| | template, | | template, |
| | style = string.format('text-align: center; height: 35px; background: #%s; color:#000', backgrounds[e.maparea_id] or backgrounds[0]), | | style = string.format('text-align: center; height: 35px; background: #%s; color:#000', backgrounds[e.maparea_id] or backgrounds[0]), |
| − | id = F:tooltip(id, 'ID number as displayed in game'), | + | id = tooltip(id, 'ID number as displayed in game'), |
| − | name = F:tooltip(e.name, e.details), | + | name = tooltip(e.name, e.details), |
| − | time = F:tooltip(formatTime(e.time), 'Time required for expedition'), | + | time = tooltip(formatTime(e.time), 'Time required for expedition'), |
| − | hq = F:tooltip(args.explicit.hq or '??', 'Admiral experience gained upon completion from this expedition'), | + | hq = tooltip(args.explicit.hq or '??', 'Admiral experience gained upon completion from this expedition'), |
| − | ship = F:tooltip(args.explicit.ship or '??', 'Ship experience gained upon completion from this expedition'), | + | ship = tooltip(args.explicit.ship or '??', 'Ship experience gained upon completion from this expedition'), |
| − | fuel = F:tooltip(args.explicit.fuel or '??', 'Base resources gain from expedition (at 100% ratio)'), | + | fuel = tooltip(args.explicit.fuel or '??', 'Base resources gain from expedition (at 100% ratio)'), |
| − | ammo = F:tooltip(args.explicit.ammo or '??', 'Base resources gain from expedition (at 100% ratio)'), | + | ammo = tooltip(args.explicit.ammo or '??', 'Base resources gain from expedition (at 100% ratio)'), |
| − | steel = F:tooltip(args.explicit.steel or '??', 'Base resources gain from expedition (at 100% ratio)'), | + | steel = tooltip(args.explicit.steel or '??', 'Base resources gain from expedition (at 100% ratio)'), |
| − | bauxite = F:tooltip(args.explicit.bauxite or '??', 'Base resources gain from expedition (at 100% ratio)'), | + | bauxite = tooltip(args.explicit.bauxite or '??', 'Base resources gain from expedition (at 100% ratio)'), |
| | item1 = args.explicit.item1 or '??', | | item1 = args.explicit.item1 or '??', |
| | item2 = args.explicit.item2 or '??', | | item2 = args.explicit.item2 or '??', |
| Line 51: |
Line 55: |
| | | | |
| | local test = { explicit = { id = '01' } } | | local test = { explicit = { id = '01' } } |
| | + | -- print(p.test()) |
| | | | |
| | return view(render, test) | | return view(render, test) |