Template:Resloc: Difference between revisions

clean up the template mess by splitting AoC only logic into ReslocAoc
imported>Leoetlino
No edit summary
imported>Leoetlino
(clean up the template mess by splitting AoC only logic into ReslocAoc)
Line 1: Line 1:
{{#if:{{{aoc_locations|}}}
<div class="resloc-box resloc-box-normal">
|{{#if:{{{locations|}}}
This {{{type|resource}}}'s [[canonical resource path|canonical path]] is "'''{{{path}}}'''". It is found in {{{locations|the unpacked content files}}}.
|
</div>{{#if:{{{aoc_locations|}}}
|<div class="resloc-box resloc-box-aoc">
|<div class="resloc-box resloc-box-aoc">If [[DLC]] is available, {{#if: {{{aoc_replaces_base|}}}|it will be loaded from {{{aoc_locations|the add-on content files}}} instead|it can be found in {{{aoc_locations|the add-on content files}}}}}. Its canonical path is "'''{{#invoke:AocUtils|get_aoc_canonical_path|path={{{path}}}|aoc_only=false}}'''".</div>
If [[DLC]] is available, this {{{type|resource}}} can be found in {{#ifeq: {{{aoc_locations|_}}}|_|the add-on content files|{{{aoc_locations}}}}}. Its [[canonical resource path|canonical path]] is "'''{{#invoke:AocUtils|get_aoc_canonical_path|path={{{path}}}|aoc_only=true}}'''".
</div>
{{#vardefine:do_not_show_normal_box|1}}
}}
}}
{{#if:{{{locations|}}}
|{{#if:{{{do_not_show_normal_box|}}}|
|<div class="resloc-box resloc-box-normal">
This {{{type|resource}}}'s [[canonical resource path|canonical path]] is "'''{{{path}}}'''". It is found in {{#ifeq: {{{locations|_}}}|_|the unpacked content files|{{{locations}}}}}.
{{#if:{{{aoc_locations|}}}
|<br>If [[DLC]] is available, {{#if: {{{aoc_replaces_base|}}}|it will be loaded from {{{aoc_locations|the add-on content files}}} instead|it can be found in {{{aoc_locations|the add-on content files}}}}}. Its canonical path is "'''{{#invoke:AocUtils|get_aoc_canonical_path|path={{{path}}}|aoc_only=false}}'''".
}}
</div>
}}
}}
}}
<noinclude>
<noinclude>
Line 40: Line 26:
"label": "Locations",
"label": "Locations",
"example": "the base content files, [[Bootup.pack]], and various [[bactorpack]] archives",
"example": "the base content files, [[Bootup.pack]], and various [[bactorpack]] archives",
"description": "Where the resource can be found (in base content). Leave this empty for files that can ONLY be found in DLC"
"description": "Where the resource can be found (in base content)",
"required": true,
"suggested": true
},
},
"aoc_locations": {
"aoc_locations": {
Anonymous user