Module:AbilitySection: Difference between revisionsGive feedback
Jump to navigation
Jump to search
m support creating ability hints from interactions tab |
Detect interaction state (disabled/partial) and pass it to the hint rail (with help from vergir-bot LLM) |
||
| Line 38: | Line 38: | ||
idx = idx + 1 | idx = idx + 1 | ||
local box_id = 'ai-int-' .. ability_num .. '-' .. idx | local box_id = 'ai-int-' .. ability_num .. '-' .. idx | ||
local state = 'normal' | |||
if attrs:find('ai%-disabled') then | |||
state = 'disabled' | |||
elseif attrs:find('ai%-partial') then | |||
state = 'partial' | |||
end | |||
table.insert(manual, { | table.insert(manual, { | ||
file | file = file, | ||
title | title = attrs:match('data%-ai%-title="([^"]*)"') or '', | ||
state = state, | |||
anchor | anchor = box_id, | ||
}) | }) | ||
return pre .. attrs .. ' id="' .. box_id .. '"' .. post | return pre .. attrs .. ' id="' .. box_id .. '"' .. post | ||