Jump to content

Editing Module:Icon

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 33: Line 33:
label='File Prefix',
label='File Prefix',
description='The file prefix to prepend to {labelPrefix}Name.',
description='The file prefix to prepend to {labelPrefix}Name.',
example={'Item', 'Nexus Strand', 'Relic', 'Icon'}
example={'Item', 'Light Cone', 'Character', 'Icon'}
},
},
{name='suffix', displayDefault='determined based on {labelPrefix}Name/{labelPrefix}Type',
{name='suffix', displayDefault='determined based on {labelPrefix}Name/{labelPrefix}Type',
Line 157: Line 157:
--local characters = mw.loadData('Module:Card/items')
--local characters = mw.loadData('Module:Card/items')
local ALL_DATA = {-- list of {type, data} in the order that untyped items should get checked
local ALL_DATA = {-- list of {type, data} in the order that untyped items should get checked
-- {'Character', mw.loadData('Module:Card/characters')},
{'Character', mw.loadData('Module:Card/characters')},
-- {'Anima', mw.loadData('Module:Card/animas')},
-- {'Relic', mw.loadData('Module:Card/relics')},
-- {'Nexus Strand', mw.loadData('Module:Card/nexusstrands')},
{'Item', mw.loadData('Module:Card/items')} -- Always leave this one as the last in this list
{'Item', mw.loadData('Module:Card/items')} -- Always leave this one as the last in this list
}
}
Line 305: Line 302:
     The main entry point for other modules.
     The main entry point for other modules.
     Creates and returns an Image object with the given arguments.
     Creates and returns an Image object with the given arguments.
     Infers `args.type` if `args.name` matches a known item/character/relic.
     Infers `args.type` if `args.name` matches a known item/character/Light Cone.
     @param {table} args Table containing the arguments:
     @param {table} args Table containing the arguments:
     @param[opt] {string} args.name The name of the image.
     @param[opt] {string} args.name The name of the image.
Line 355: Line 352:
      
      
     -- set defaults and load data based on type
     -- set defaults and load data based on type
     if image_type == 'Character' then
     if image_type == 'Character' or image_type == 'Currency Wars Character' then
image.defaults.suffix = 'Character Icon'
image.prefix = 'Character'
     elseif image_type == 'Anima' then
image.defaults.suffix = 'Icon'
image.defaults.suffix = 'Anima Icon'
     elseif image_type == 'Element' then
elseif image_type == 'Item' then
image.prefix = 'Type'
elseif image_type == 'Consumable' then
image.prefix = 'Item'
image.prefix = 'Item'
elseif image_type == 'Relic' then
elseif image_type == 'Relic' then
image.prefix = 'Relic'
image.prefix = 'Item'
elseif image_type == 'Nexus Strand' then
elseif image_type == 'Profile Picture' then
image.prefix = 'Nexus Strand'
image.prefix = 'Profile Picture'
image.link = image.name
image.name = image.name:gsub(' %(Profile Picture%)', '')
elseif image_type == 'Enemy' or image_type == 'Aether Enemy' then
image.prefix = 'Icon Enemy'
image.link = (data and data.link) or image.name
image.defaults.suffix = ''
end
end
return image, image_type, data
return image, image_type, data
Please note that all contributions to Honkai: Nexus Anima Wiki are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see Honkai Nexus Anima Wiki: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
Below are commonly used wikitext from MediaWiki:Edittools. Click on any to insert them in the edit box.

Parser Functions:{{#if:||}}
{{#ifeq:|||}}
{{#expr:}}
{{#switch:||#default=}}
{{#replace:||}}
{{#titleparts:}}
{{#tag:|}}





Pages included on this page: