Module:ItemData/nav/doc: Difference between revisions

From The Deadlock Wiki
Jump to navigation Jump to search
Sur (talk | contribs)
m get_item_nav_cards pre-initial
Sur (talk | contribs)
m initial version
Line 1: Line 1:
=Overview=
=Overview=
overview
Functions for creating navigation boxes/lists for items, grouped by a slot/category and souls


=Functions=
=Functions=
==get_item_nav_bulletpoints==
==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===
===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===
===Examples===
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|Weapon|500|1250|debug_mode=true}}</nowiki></code>


Line 13: Line 21:




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|Weapon|500|1250}}</nowiki></code>


Line 18: Line 27:


==get_item_nav_cards==
==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)
<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|Weapon|500|1250|debug_mode=true}}</nowiki></code>


Line 23: Line 41:




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|Weapon|500|1250}}</nowiki></code>


{{#invoke:ItemData/nav|get_item_nav_cards|Weapon|500|1250}}
{{#invoke:ItemData/nav|get_item_nav_cards|Weapon|500|1250}}
===Parameters===
===Examples===

Revision as of 01:04, 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|Weapon|500|1250|debug_mode=true}}

{{ItemIcon|Close Quarters|size=26px}}{{ItemIcon|Extended Magazine|size=26px}}{{ItemIcon|Headshot Booster|size=26px}}{{ItemIcon|High-Velocity Rounds|size=26px}}{{ItemIcon|Monster Rounds|size=26px}}{{ItemIcon|Rapid Rounds|size=26px}}{{ItemIcon|Restorative Shot|size=26px}}


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

Close Quarters Extended Magazine Headshot Booster High-Velocity Rounds Monster Rounds Rapid Rounds Restorative Shot

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|Weapon|500|1250|debug_mode=true}}

{{ItemBox|itemName=Close Quarters|overrideLinkClick=Close Quarters|lowGraphics=true}} {{ItemBox|itemName=Extended Magazine|overrideLinkClick=Extended Magazine|lowGraphics=true}} {{ItemBox|itemName=Headshot Booster|overrideLinkClick=Headshot Booster|lowGraphics=true}} {{ItemBox|itemName=High-Velocity Rounds|overrideLinkClick=High-Velocity Rounds|lowGraphics=true}} {{ItemBox|itemName=Monster Rounds|overrideLinkClick=Monster Rounds|lowGraphics=true}} {{ItemBox|itemName=Rapid Rounds|overrideLinkClick=Rapid Rounds|lowGraphics=true}} {{ItemBox|itemName=Restorative Shot|overrideLinkClick=Restorative Shot|lowGraphics=true}}


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

Imbue

Close Quarters

Active
Imbue

Extended Magazine

Active
Imbue

Headshot Booster

Active
Imbue

High-Velocity Rounds

Active
Imbue

Monster Rounds

Active
Imbue

Rapid Rounds

Active
Imbue

Restorative Shot

Active