Module:Item Navbox: Difference between revisions

Jump to navigation Jump to search
Kai changed the content model of the page Module:User:Kai/itemnavbox from "wikitext" to "Scribunto module"
No edit summary
Line 255: Line 255:
      
      
     for _, item in ipairs(active_items) do
     for _, item in ipairs(active_items) do
         local bg_color, item_type
         local item_class, item_type
         if item.slot == "Armor" then
         if item.slot == "Armor" then
             bg_color = "#86C921"
             item_class = "item-bg-armor"
             item_type = "Armor"
             item_type = "Armor"
         elseif item.slot == "Tech" then
         elseif item.slot == "Tech" then
             bg_color = "#DE9CFF"
             item_class = "item-bg-tech"
             item_type = "Tech"
             item_type = "Tech"
         else
         else
             bg_color = "#FCAC4D"
             item_class = "item-bg-weapon"
             item_type = "Weapon"
             item_type = "Weapon"
         end
         end
Line 269: Line 269:
         local row = string.format([=[
         local row = string.format([=[
|-
|-
! style="background-color:%s" | [[File:%s.png|64x64px]]
! class="%s" | [[File:%s.png|64x64px]]
! [[%s{{If_lang}}|{{#invoke:Lang|get_string|%s}}]]
! [[%s{{If_lang}}|{{#invoke:Lang|get_string|%s}}]]
| style="text-align:center;font-weight:bold" | {{ItemType|%s|{{#invoke:Lang|get_string|CitadelCategory%s}}}}
| style="text-align:center;font-weight:bold" | {{ItemType|%s|{{#invoke:Lang|get_string|CitadelCategory%s}}}}
Line 275: Line 275:
| {{#invoke:Utilities|process_variables|%s_active_desc|%s}}{{#invoke:Utilities|process_variables|%s_desc|%s}}{{#invoke:Utilities|process_variables|%s_active|%s}}
| {{#invoke:Utilities|process_variables|%s_active_desc|%s}}{{#invoke:Utilities|process_variables|%s_desc|%s}}{{#invoke:Utilities|process_variables|%s_active|%s}}
| style="text-align:center;font-size:16px" | {{#invoke:ItemData|get_prop|%s|AbilityCooldown}}s]=],
| style="text-align:center;font-size:16px" | {{#invoke:ItemData|get_prop|%s|AbilityCooldown}}s]=],
             bg_color,  
             item_class,  
             item.name,  
             item.name,  
             item.name, item.key,
             item.name, item.key,