Difference between revisions of "Template:NHHouse"

From Nookipedia, the Animal Crossing wiki
(Using module to output furniture to reduce template complexity (also sorts furniture by string length, to reduce vertical whitespace))
(Self-undo for now, need to add furn notes)
Tag: Undo
Line 49: Line 49:
 
| style="padding: 3px; vertical-align:top;" | '''Items:'''
 
| style="padding: 3px; vertical-align:top;" | '''Items:'''
 
| style="background: #ffffff; padding: 0 3px 0 7px; {{roundytop|8px}}; text-align:{{#if:{{{furniture|}}}|left|center}};" | {{#if:{{{furniture|}}}|{{{furniture|}}}<includeonly>[[Category:Pages with an outdated house template]]</includeonly>|
 
| style="background: #ffffff; padding: 0 3px 0 7px; {{roundytop|8px}}; text-align:{{#if:{{{furniture|}}}|left|center}};" | {{#if:{{{furniture|}}}|{{{furniture|}}}<includeonly>[[Category:Pages with an outdated house template]]</includeonly>|
<div style="display:inline-block;">
+
<div style="display:inline-block;">{{(!}} style{{=}}"text-align:left;"
<div class="grid-container-2-col no-margin" style="text-align: left;">
+
{{#forargs: furn
{{#invoke: Items | outputSortedFurniture | [{{#forargs: furn | key | value | {{#ifexpr: {{#var: key}} > 1 | , }} {"name": "{{{furn{{#var: key}}|}}}", "count": {{{f{{#var: key}}-count|1}}}, "img": "{{{f{{#var: key}}-img|}}}"}
+
| key
}} ] | NH}}
+
| value
</div>
+
| <nowiki />
</div>
+
{{!}} [[File:{{{f{{#var: key }}-img|{{{furn{{#var: key }}|}}}{{#if: {{{f{{#var: key }}-variation|}}} | {{#if: {{{f{{#var: key }}-pattern|}}} | _({{{f{{#var: key }}-variation|}}}_-_{{{f{{#var: key }}-pattern|}}}) | _({{{f{{#var: key }}-variation|}}}) }} | {{#if: {{{f{{#var: key }}-pattern|}}} | _({{{f{{#var: key }}-pattern|}}}) | }} }}_NH_Icon.png}}}|24px|alt=|link={{{f{{#var: key }}-link|Item:{{{furn{{#var: key }}|}}} (New Horizons)}}}]]&nbsp;<span style="font-size:.85em">[[{{{f{{#var: key }}-link|Item:{{{furn{{#var: key }}|}}} (New Horizons)}}}|{{{furn{{#var: key }}|}}}]]{{#if: {{{f{{#var: key }}-count|}}} | <nowiki /> (x{{{f{{#var: key }}-count|}}}) | }}{{#if: {{{f{{#var: key }}-note|}}} | {{Note|{{{f{{#var: key }}-note|}}}}} }}</span>
 +
{{#ifexpr: {{#var: key }} mod 2 | | {{!-}} }}
 +
}}
 +
{{!)}}</div>
 
}}
 
}}
 
|-
 
|-

Revision as of 18:36, June 12, 2021

This template defines the table "nh_house". View table.

Nia blue upload.png
Items:
Wall: 24px [[Item: (New Horizons)|]]
Floor: 24px [[Item: (New Horizons)|]]
Music: No music


Template documentation (view)


More Cargo templates