Module:Inventory slot: Difference between revisions
Created page with "local p = {} function p.slot( f ) local args = f.args or f if f == mw.getCurrentFrame() and args[1] == nil then args = f:getParent().args end args[1] = mw.text.trim(..." |
m minetip only pays attention to top level titles or next level link titles, so we need to add the title on the top level for it to override the default of the link title. It also should null the title if "title=none" is set, as otherwise it displays blank |
||
| Line 138: | Line 138: | ||
end | end | ||
if img and ( title == '' or not link ) then | if img and ( title == '' or not link ) or not img then | ||
item:attr{ title = title } | item:attr{ title = title } | ||
end | end | ||
item:attr{ | if not tooltipTitle and title == '' then | ||
['data-minetip-title'] = tooltipTitle, | item:attr{ ['data-minetip-title'] = 0 } | ||
else | |||
item:attr{ | |||
['data-minetip-title'] = tooltipTitle, | |||
['data-minetip-text'] = tooltipDesc | |||
} | |||
end | |||
if img then | if img then | ||