Module:Sandbox/Monster Domosed: Difference between revisionsGive feedback
Jump to navigation
Jump to search
mhm |
yea |
||
| Line 121: | Line 121: | ||
end | end | ||
local function get_formatted_abilities() | local function get_formatted_abilities(frame) | ||
local abilities = get_all_abilities() | local abilities = get_all_abilities() | ||
local output = {} | local output = {} | ||
for _, ability in ipairs(abilities) do | for _, ability in ipairs(abilities) do | ||
table.insert(output, " | table.insert(output, frame:expandTemplate{ | ||
title = "AbilityIcon", | |||
args = { | |||
ability["Name"] | |||
} | |||
}) | |||
end | end | ||
| Line 136: | Line 141: | ||
-------------------------------------------------- | -------------------------------------------------- | ||
-- {{#invoke:Monster Domosed|get_list}} | -- {{#invoke:Sandbox/Monster Domosed|get_list}} | ||
function p.get_list(frame) | function p.get_list(frame) | ||
return table.concat(p._get_enabled_item_names_sorted(), "\n") | return table.concat(p._get_enabled_item_names_sorted(), "\n") | ||
end | end | ||
-- {{#invoke:Monster Domosed|get_csv}} | -- {{#invoke:Sandbox/Monster Domosed|get_csv}} | ||
function p.get_csv(frame) | function p.get_csv(frame) | ||
return table.concat(p._get_enabled_item_names_sorted(), ",") | return table.concat(p._get_enabled_item_names_sorted(), ",") | ||
end | end | ||
-- {{#invoke:Monster Domosed|get_count}} | -- {{#invoke:Sandbox/Monster Domosed|get_count}} | ||
function p.get_count(frame) | function p.get_count(frame) | ||
return tostring(#p._get_enabled_item_names_sorted()) | return tostring(#p._get_enabled_item_names_sorted()) | ||
end | end | ||
-- {{#invoke:Monster Domosed|get_abilities}} | -- {{#invoke:Sandbox/Monster Domosed|get_abilities}} | ||
function p.get_abilities(frame) | function p.get_abilities(frame) | ||
return table.concat(get_formatted_abilities(), "\n") | return table.concat(get_formatted_abilities(frame), "\n") | ||
end | end | ||
-- {{#invoke:Monster Domosed|get_abilities_csv}} | -- {{#invoke:Sandbox/Monster Domosed|get_abilities_csv}} | ||
function p.get_abilities_csv(frame) | function p.get_abilities_csv(frame) | ||
return table.concat(get_formatted_abilities(), ",") | return table.concat(get_formatted_abilities(frame), ",") | ||
end | end | ||
-- {{#invoke:Monster Domosed|get_ability_count}} | -- {{#invoke:Sandbox/Monster Domosed|get_ability_count}} | ||
function p.get_ability_count(frame) | function p.get_ability_count(frame) | ||
return tostring(#get_all_abilities()) | return tostring(#get_all_abilities()) | ||