Editing Module:Sandbox/Monster Domosed

Warning: You are not logged in. Once you make an edit, a temporary account will be created for you. Learn more. Log in or create an account to continue receiving notifications after this account expires, and to access other features.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision Your text
Line 121: Line 121:
end
end


local function get_formatted_abilities(frame)
local function get_formatted_abilities()
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, frame:expandTemplate{
table.insert(output, "{{AbilityIcon|" .. ability["Name"] .. "}}")
title = "AbilityIcon",
args = {
ability["Name"]
}
})
end
end


Line 141: Line 136:
--------------------------------------------------
--------------------------------------------------


-- {{#invoke:Sandbox/Monster Domosed|get_list}}
-- {{#invoke: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:Sandbox/Monster Domosed|get_csv}}
-- {{#invoke: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:Sandbox/Monster Domosed|get_count}}
-- {{#invoke: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:Sandbox/Monster Domosed|get_abilities}}
-- {{#invoke:Monster Domosed|get_abilities}}
function p.get_abilities(frame)
function p.get_abilities(frame)
return table.concat(get_formatted_abilities(frame), "\n")
return table.concat(get_formatted_abilities(), "\n")
end
end


-- {{#invoke:Sandbox/Monster Domosed|get_abilities_csv}}
-- {{#invoke:Monster Domosed|get_abilities_csv}}
function p.get_abilities_csv(frame)
function p.get_abilities_csv(frame)
return table.concat(get_formatted_abilities(frame), ",")
return table.concat(get_formatted_abilities(), ",")
end
end


-- {{#invoke:Sandbox/Monster Domosed|get_ability_count}}
-- {{#invoke: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())
Please note that all contributions to The Deadlock Wiki are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see Deadlock:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)
Preview page with this template

Page included on this page: