Editing Module:Infobox item

Jump to navigation Jump to search
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 28: Line 28:
local STATUS_FMT = "[[{{#invoke:Lang|get_string|Citadel_%s}}]]"
local STATUS_FMT = "[[{{#invoke:Lang|get_string|Citadel_%s}}]]"
     .. " [[{{#invoke:Lang|get_string|Citadel_StatusEffect}}]]"
     .. " [[{{#invoke:Lang|get_string|Citadel_StatusEffect}}]]"
-- Property keys to completely ignore during processing
local IGNORED_PROP_KEYS = {
    BuildUpPerShot = true,
}


-- Label key remapping table (replaces if/elseif chain)
-- Label key remapping table (replaces if/elseif chain)
local LABEL_KEY_REMAP = {
local LABEL_KEY_REMAP = {
    BuildUpPerShot = "BuildupPerShot",
     DotDuration    = "DOTDuration",
     DotDuration    = "DOTDuration",
}
}
Line 499: Line 495:
     for _, prop_obj in ipairs(prop_list or {}) do
     for _, prop_obj in ipairs(prop_list or {}) do
         local key = prop_obj.Key
         local key = prop_obj.Key
         if not seen[key] and not IGNORED_PROP_KEYS[key] and (
         if not seen[key] and (
             key:match("^StatusEffect")
             key:match("^StatusEffect")
             or is_property_in_lang_data(key, prop_obj.LocTokenOverride)
             or is_property_in_lang_data(key, prop_obj.LocTokenOverride)
Line 555: Line 551:
         if section.Type == "Innate" then
         if section.Type == "Innate" then
             for _, obj in ipairs(section.Main or {}) do
             for _, obj in ipairs(section.Main or {}) do
                 if not IGNORED_PROP_KEYS[obj.Key] and is_property_in_lang_data(obj.Key, obj.LocTokenOverride) then
                 if is_property_in_lang_data(obj.Key, obj.LocTokenOverride) then
                     local val
                     local val
                     if enhanced then
                     if enhanced then
Line 577: Line 573:
             end
             end
             for _, obj in ipairs(section.Alt or {}) do
             for _, obj in ipairs(section.Alt or {}) do
                 if not IGNORED_PROP_KEYS[obj.Key] and is_property_in_lang_data(obj.Key, obj.LocTokenOverride) then
                 if is_property_in_lang_data(obj.Key, obj.LocTokenOverride) then
                     local val
                     local val
                     if enhanced then
                     if enhanced then
Line 678: Line 674:
             for _, prop_obj in ipairs(section.Main or {}) do
             for _, prop_obj in ipairs(section.Main or {}) do
                 local key = prop_obj.Key
                 local key = prop_obj.Key
                 if not main_seen[key] and not IGNORED_PROP_KEYS[key] and (
                 if not main_seen[key] and (
                     key:match("^StatusEffect")
                     key:match("^StatusEffect")
                     or is_property_in_lang_data(key, prop_obj.LocTokenOverride)
                     or is_property_in_lang_data(key, prop_obj.LocTokenOverride)
Line 698: Line 694:
                 local key = prop_obj.Key
                 local key = prop_obj.Key
                 -- Skip keys already emitted as main stats
                 -- Skip keys already emitted as main stats
                 if not main_seen[key] and not alt_seen[key] and not IGNORED_PROP_KEYS[key] and (
                 if not main_seen[key] and not alt_seen[key] and (
                     key:match("^StatusEffect")
                     key:match("^StatusEffect")
                     or is_property_in_lang_data(key, prop_obj.LocTokenOverride)
                     or is_property_in_lang_data(key, prop_obj.LocTokenOverride)
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: