Wynncraft Wiki
Tag: Source edit
(Fixed mobs in groups not showing)
Tag: Source edit
Line 1: Line 1:
<includeonly>{{#if: {{{mob_groups|}}}|{{#ifexpr: {{#count:{{{mob_groups}}}|,}} > 0 | {{#vardefine:moblist|<ul>{{#cargo_query: tables=MinorLocations_MobGroup|fields=MinorLocations_MobGroup.name,MinorLocations_MobGroup.mobs|where=MinorLocations_MobGroup.id IN ({{#arraymap:{{{mob_groups}}}|,|group|"group"|,}})|format=template|template=MinorLocation/MobGroup/display|named args=yes}}</ul>}}|{{#vardefine:moblist|{{#cargo_query: tables=MinorLocations_MobGroup|fields=MinorLocations_MobGroup.name,MinorLocations_MobGroup.mobs|where=MinorLocations_MobGroup.id="{{{mob_groups}}}"|format=template|template=MinorLocation/MobGroup/display|named args=yes}}}}}}|{{#vardefine:moblist| [[{{#explode: {{{mobs|}}}|,|0 }}]] }}{{#vardefine:x|1}}{{#while:
+
<includeonly>{{#if: {{{mob groups|}}}|{{#ifexpr: {{#count:{{{mob groups}}}|,}} > 0 | {{#vardefine:moblist|<ul>{{#cargo_query: tables=MinorLocations_MobGroup|fields=MinorLocations_MobGroup.name,MinorLocations_MobGroup.mobs|where=MinorLocations_MobGroup.id IN ({{#arraymap:{{{mob groups}}}|,|group|"group"|,}})|format=template|template=MinorLocation/MobGroup/display|named args=yes}}</ul>}}|{{#vardefine:moblist|{{#cargo_query: tables=MinorLocations_MobGroup|fields=MinorLocations_MobGroup.name,MinorLocations_MobGroup.mobs|where=MinorLocations_MobGroup.id="{{{mob groups}}}"|format=template|template=MinorLocation/MobGroup/display|named args=yes}}}}}}|{{#vardefine:moblist| [[{{#explode: {{{mobs|}}}|,|0 }}]] }}{{#vardefine:x|1}}{{#while:
 
|{{#explode: {{{mobs|}}} |,| {{#var:x}} }}
 
|{{#explode: {{{mobs|}}} |,| {{#var:x}} }}
 
|{{#vardefine:moblist| {{#var:moblist}}{{*}}[[{{#explode: {{{mobs|}}} |,| {{#var:x}} }}]]}}{{#vardefine: x | {{#expr:{{#var:x}} + 1}} }}
 
|{{#vardefine:moblist| {{#var:moblist}}{{*}}[[{{#explode: {{{mobs|}}} |,| {{#var:x}} }}]]}}{{#vardefine: x | {{#expr:{{#var:x}} + 1}} }}
Line 34: Line 34:
 
{{!}}There are no loot chests at this location.
 
{{!}}There are no loot chests at this location.
 
{{!-}}}}
 
{{!-}}}}
{{#if:{{{mobs|{{{mob_groups|}}}}}}|!style="width:15%"{{!}}Mobs
+
{{#if:{{{mobs|{{{mob groups|}}}}}}|!style="width:15%"{{!}}Mobs
 
{{!}} {{#var:moblist}}
 
{{!}} {{#var:moblist}}
 
{{!-}}}}
 
{{!-}}}}

Revision as of 09:29, 8 October 2021

Template-info.png Documentation

This template is to be used for the MinorLocations cargo table, which is declared by Template:MinorLocation.

Template:QueryMinorLocations displays its results using this template, which is nearly identical to the original MinorLocation template but does not store to cargo and provides a handy link to the base page the location was originally defined on.