Module:ItemData/nav/doc: Difference between revisions

From Deadlock Wiki
Jump to navigation Jump to search
Sur (talk | contribs)
m initial version
Sur (talk | contribs)
m examples now use Armor instead of Weapon to help showcase that its using unlocalized key, not english translation
Line 16: Line 16:
===Examples===
===Examples===
With debug_mode on (for illustration purposes)
With debug_mode on (for illustration purposes)
<code><nowiki>{{#invoke:ItemData/nav|get_item_nav_bulletpoints|Weapon|500|1250|debug_mode=true}}</nowiki></code>
<code><nowiki>{{#invoke:ItemData/nav|get_item_nav_bulletpoints|Armor|500|1250|debug_mode=true}}</nowiki></code>


{{#invoke:ItemData/nav|get_item_nav_bulletpoints|Weapon|500|1250|debug_mode=true}}
{{#invoke:ItemData/nav|get_item_nav_bulletpoints|Armor|500|1250|debug_mode=true}}




With debug_mode off
With debug_mode off
<code><nowiki>{{#invoke:ItemData/nav|get_item_nav_bulletpoints|Weapon|500|1250}}</nowiki></code>
<code><nowiki>{{#invoke:ItemData/nav|get_item_nav_bulletpoints|Armor|500|1250}}</nowiki></code>


{{#invoke:ItemData/nav|get_item_nav_bulletpoints|Weapon|500|1250}}
{{#invoke:ItemData/nav|get_item_nav_bulletpoints|Armor|500|1250}}


==get_item_nav_cards==
==get_item_nav_cards==
Line 36: Line 36:
===Examples===
===Examples===
With debug_mode on (for illustration purposes)
With debug_mode on (for illustration purposes)
<code><nowiki>{{#invoke:ItemData/nav|get_item_nav_bulletpoints|Weapon|500|1250|debug_mode=true}}</nowiki></code>
<code><nowiki>{{#invoke:ItemData/nav|get_item_nav_bulletpoints|Armor|500|1250|debug_mode=true}}</nowiki></code>


{{#invoke:ItemData/nav|get_item_nav_cards|Weapon|500|1250|debug_mode=true}}
{{#invoke:ItemData/nav|get_item_nav_cards|Armor|500|1250|debug_mode=true}}




With debug_mode off
With debug_mode off
<code><nowiki>{{#invoke:ItemData/nav|get_item_nav_bulletpoints|Weapon|500|1250}}</nowiki></code>
<code><nowiki>{{#invoke:ItemData/nav|get_item_nav_bulletpoints|Armor|500|1250}}</nowiki></code>


{{#invoke:ItemData/nav|get_item_nav_cards|Weapon|500|1250}}
{{#invoke:ItemData/nav|get_item_nav_cards|Armor|500|1250}}

Revision as of 01:47, 31 October 2024

Overview

Functions for creating navigation boxes/lists for items, grouped by a slot/category and souls

Functions

get_item_nav_bulletpoints

Gets a list of items that are each sent to the Template:ItemIcon template, separated by bullet points.

Filters down to a slot/specific category, and within a range of souls.

Parameters

  • slot - Slot/category that the items should be, should be Weapon, Armor, or Tech
  • min_souls - Minimum souls that the items should have
  • max_souls - Maximum souls that the items should have
  • debug_mode - (OPTIONAL) - if set to 'true', the wikitext is unprocessed, allowing for it to be read more clearly. Also used for showcasing the documentation examples more clearly.

Examples

With debug_mode on (for illustration purposes) {{#invoke:ItemData/nav|get_item_nav_bulletpoints|Armor|500|1250|debug_mode=true}}

{{ItemIcon|Enduring Spirit}} • {{ItemIcon|Extra Health}} • {{ItemIcon|Extra Regen}} • {{ItemIcon|Extra Stamina}} • {{ItemIcon|Healing Rite}} • {{ItemIcon|Melee Lifesteal}} • {{ItemIcon|Sprint Boots}}


With debug_mode off {{#invoke:ItemData/nav|get_item_nav_bulletpoints|Armor|500|1250}}

Enduring Spirit Extra Health Extra Regen Extra Stamina Healing Rite Melee Lifesteal Sprint Boots

get_item_nav_cards

Gets a list of items that are each sent to the Template:ItemBox template, separated by bullet points.

Filters down to a specific slot/category, and within a range of souls.

Parameters

Same as get_item_nav_bulletpoints

Examples

With debug_mode on (for illustration purposes) {{#invoke:ItemData/nav|get_item_nav_bulletpoints|Armor|500|1250|debug_mode=true}}

{{ItemBox|item_name=Enduring Spirit}} {{ItemBox|item_name=Extra Health}} {{ItemBox|item_name=Extra Regen}} {{ItemBox|item_name=Extra Stamina}} {{ItemBox|item_name=Healing Rite}} {{ItemBox|item_name=Melee Lifesteal}} {{ItemBox|item_name=Sprint Boots}}


With debug_mode off {{#invoke:ItemData/nav|get_item_nav_bulletpoints|Armor|500|1250}}


Souls500
Extra Health
Souls500
Extra Regen
Souls500
Extra Stamina
Souls500
ACTIVE
Healing Rite
Souls500
Sprint Boots