Template:CombatNav: Difference between revisions

From Melvor Idle
(Fix lack of table closure)
(Remove dependency on Variables extension)
Line 2: Line 2:


<onlyinclude><!--
<onlyinclude><!--
   Setting up things so that only the relevant section will be expanded
   Each section has conditional logic so that only the relevant section will be expanded
-->{{#vardefine:areaType|{{#invoke:CombatAreas|getAreaStat|{{PAGENAME}}}}}}<!--
-->{{#vardefine:CombatCollapse|{{#ifeq:{{{1|{{#var:areaType}}}}}|Combat Area||mw-collapsed}}}}<!--
-->{{#vardefine:SlayCollapse|{{#ifeq:{{{1|{{#var:areaType}}}}}|Slayer Area||mw-collapsed}}}}<!--
-->{{#vardefine:DungeonCollapse|{{#ifeq:{{{1|{{#var:areaType}}}}}|Dungeon||mw-collapsed}}}}<!--
-->{{#vardefine:GuideCollapse|{{#ifeq:{{{1|{{#var:areaType}}}}}|Guide||mw-collapsed}}}}<!--
-->{| class="wikitable mw-collapsible navigation-not-searchable" style="margin:auto; clear:both; width: 100%"
-->{| class="wikitable mw-collapsible navigation-not-searchable" style="margin:auto; clear:both; width: 100%"
|-
|-
Line 13: Line 8:
|-
|-
| style="padding:0px" |  
| style="padding:0px" |  
{| class="wikitable mw-collapsible {{#var:CombatCollapse}}" style="margin:auto; clear:both; width: 100%"
{| class="wikitable mw-collapsible {{#ifeq:{{{1|{{#invoke:CombatAreas|getAreaStat|{{PAGENAME}}}}}}}|Combat Area||mw-collapsed}}" style="margin:auto; clear:both; width: 100%"
|-
|-
! colspan=2 |[[Combat areas|Combat Areas]]
! colspan=2 |[[Combat areas|Combat Areas]]
Line 53: Line 48:
| class="center" style="vertical-align:middle;" | {{MonsterIcon|Elerine Archer}} {{*}} {{MonsterIcon|Elerine Warrior}} {{*}} {{MonsterIcon|Elerine Mage}}
| class="center" style="vertical-align:middle;" | {{MonsterIcon|Elerine Archer}} {{*}} {{MonsterIcon|Elerine Warrior}} {{*}} {{MonsterIcon|Elerine Mage}}
|}
|}
{|class="wikitable mw-collapsible {{#var:SlayCollapse}}" style="margin:auto; clear:both; width: 100%"
{|class="wikitable mw-collapsible {{#ifeq:{{{1|{{#invoke:CombatAreas|getAreaStat|{{PAGENAME}}}}}}}|Slayer Area||mw-collapsed}}" style="margin:auto; clear:both; width: 100%"
|-
|-
! colspan=2 | {{Skill|Slayer}} [[Slayer areas|Areas]]
! colspan=2 | {{Skill|Slayer}} [[Slayer areas|Areas]]
Line 96: Line 91:
| class="center" style="vertical-align:middle;" | {{MonsterIcon|Legaran Wurm}} {{*}} {{MonsterIcon|Cursed Lich}} {{*}} {{MonsterIcon|Spiked Red Claw}} {{*}} {{MonsterIcon|Greater Skeletal Dragon}}
| class="center" style="vertical-align:middle;" | {{MonsterIcon|Legaran Wurm}} {{*}} {{MonsterIcon|Cursed Lich}} {{*}} {{MonsterIcon|Spiked Red Claw}} {{*}} {{MonsterIcon|Greater Skeletal Dragon}}
|}
|}
{| class="wikitable mw-collapsible {{#var:DungeonCollapse}}" style="margin:auto; clear:both; width: 100%"
{| class="wikitable mw-collapsible {{#ifeq:{{{1|{{#invoke:CombatAreas|getAreaStat|{{PAGENAME}}}}}}}|Dungeon||mw-collapsed}}" style="margin:auto; clear:both; width: 100%"
|-
|-
! colspan=2 | [[Dungeons]]
! colspan=2 | [[Dungeons]]
Line 151: Line 146:
| class="center" style="vertical-align:middle;" | Slayer Areas {{*}} {{MonsterIcon|Bane}} {{*}} {{MonsterIcon|Bane, Instrument of Fear}}
| class="center" style="vertical-align:middle;" | Slayer Areas {{*}} {{MonsterIcon|Bane}} {{*}} {{MonsterIcon|Bane, Instrument of Fear}}
|}
|}
{| class="wikitable mw-collapsible {{#var:GuideCollapse}}" style="margin:auto; clear:both; width: 100%"
{| class="wikitable mw-collapsible {{#ifeq:{{{1|{{#invoke:CombatAreas|getAreaStat|{{PAGENAME}}}}}}}|Dungeon||mw-collapsed}}" style="margin:auto; clear:both; width: 100%"
|-
|-
! colspan=2 | [[Guides]]
! colspan=2 | [[Guides]]

Revision as of 23:15, 7 October 2022

A handy navbox that includes all Combat Areas, Slayer Areas, and Dungeons along with the associated monsters. If called with either Combat Area, Slayer Area, or Dungeon as an argument the appropriate section will not be automatically collapsed. (For example {{CombatNav|Combat Area}} will default to only have the 'Slayer Areas' and 'Dungeons' sections collapsed