Module:AbilityHints/doc: Difference between revisionsGive feedback
add doc |
Docs: update CONFIG contract — item replaced by file + link; note the absolute-URL requirement for suppressing Page Previews (with help from vergir-bot LLM) |
||
| Line 1: | Line 1: | ||
== Overview == | == Overview == | ||
Renders the interaction-hint rail on ability cards (via [[Module:AbilitySection]]): a small strip of item icons showing how an ability interacts with items — dispellable, duration-reduced, blocked, etc. Each icon links to | Renders the interaction-hint rail on ability cards (via [[Module:AbilitySection]]): a small strip of item icons showing how an ability interacts with items — dispellable, duration-reduced, blocked, etc. Each icon displays a configured image, links to a configured URL, and has a hover tooltip. | ||
Membership is decided by <code>is_member</code> in [[Module:AbilityTable]]. To change ability-icon matching, edit [[Module:AbilityTable/Lists]] (this will also update relevant ability tables). | Membership is decided by <code>is_member</code> in [[Module:AbilityTable]]. To change ability-icon matching, edit [[Module:AbilityTable/Lists]] (this will also update relevant ability tables). | ||
| Line 20: | Line 20: | ||
| <code>list</code> || List name in [[Module:AbilityTable/Lists]] whose membership triggers the icon. | | <code>list</code> || List name in [[Module:AbilityTable/Lists]] whose membership triggers the icon. | ||
|- | |- | ||
| <code> | | <code>file</code> || Image file to display, e.g. <code>Reactive Barrier.png</code>. | ||
|- | |||
| <code>link</code> || URL opened when the icon is clicked. Use a full/absolute URL (e.g. <code>https://deadlock.wiki/Reactive_Barrier</code>): an absolute URL keeps the anchor title-less, so [[mw:Extension:Popups|Page Previews]] ignores it. A bare page name would re-introduce the preview popup. | |||
|- | |- | ||
| <code>tip</code> || Hover tooltip text. May contain simple HTML (<code><nowiki><br></nowiki></code>, <code><nowiki><b></nowiki></code>). | | <code>tip</code> || Hover tooltip text. May contain simple HTML (<code><nowiki><br></nowiki></code>, <code><nowiki><b></nowiki></code>). | ||
|} | |} | ||
To add an icon, add a <code>CONFIG</code> row | To add an icon, add a <code>CONFIG</code> row: pick the triggering <code>list</code>, the display <code>file</code>, the click <code>link</code>, and the <code>tip</code>. The <code>file</code> and <code>link</code> are arbitrary — they need not correspond to a single item. To re-scope which abilities an icon covers, edit the list in [[Module:AbilityTable/Lists]]. | ||
== See also == | == See also == | ||