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 1: |
Line 1: |
| local p = {} | | local p = {} |
|
| |
|
| -- referred pages that should not use the icon file
| | -- Generates appropriate filename from name and type |
| -- only add to list if it should be true
| | p.getFilename = function(frame) |
| local no_file_list = {
| | local name = frame.args[1] |
| ["Newscaster"] = true,
| | local type = frame.args[2] |
| ["Parry"] = true,
| |
| ["Objective"] = true,
| |
| ["Other"] = true,
| |
| ["Zipline"] = true,
| |
| ["Sandbox"] = true,
| |
| ["Flex Slot"] = true,
| |
| ["Creep"] = true,
| |
| ["Item"] = true,
| |
| }
| |
| | |
| -- Generates appropriate filename from resource_name_localized | |
| p.get_file_name = function(frame) | |
| local resource_name_localized = frame.args[1] | |
| local alt_file_name = frame.args[2] | |
| | | |
| --alt_file_name is optional; if not provided, assume resource_name_localized is correct | | -- Prefix with File namespace |
| if alt_file_name ~= nil and alt_file_name ~= '' then | | name = "File:" .. name |
| file_name = alt_file_name | | |
| | -- Do some name fiddling where appropriate (can be expanded if new file naming conventions arise) |
| | if (string.lower(type)=="hero") then name = name .. " MM" end -- Hero files are suffixed with MM (minimap) |
| | |
| | -- Try to grab SVG if possible |
| | if mw.title.new(name..".svg") ~= nil then |
| | name = name .. ".svg" |
| else | | else |
| file_name = resource_name_localized | | name = name .. ".png" |
| end | | end |
| | | |
| local should_use_file = no_file_list[file_name] | | return name |
| if should_use_file then
| |
| return ""
| |
| end
| |
|
| |
| -- Prefix with File namespace
| |
| file_name = "File:" .. file_name .. ".png"
| |
|
| |
| return file_name
| |
| end | | end |
|
| |
|
| return p | | return p |