Actions

Template

Difference between revisions of "ReleasesCD"

From NEC Retro

(added ReleasesYearCheck)
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly>{{releasesRow|CDROM2|JP|{{{cd_date_jp|}}}|¥{{{cd_rrp_jp|?}}}|{{{cd_code_jp|?}}}}}
+
<includeonly>{{#vardefine:syslist|cd,cdrom2,scd,scdrom2,acd,acdrom2}}{{#vardefine:rgnlist|{{Regions/Classic}}}}{{clearvar|cdrom2|scdrom2|acdrom2}}{{#vardefine:year|9999}}
{{releasesRow|CDROM2|US|{{{cd_date_us|}}}|${{{cd_rrp_us|?}}}|{{{cd_code_us|?}}}}}
+
{{#vardefine:i|0}}{{#while:
{{releasesRow|CDROM2|FR|{{{cd_date_fr|}}}|{{{cd_rrp_fr|?}}}FF|{{{cd_code_fr|?}}}}}
+
| {{#vardefine:sys|{{#explode:{{#var:syslist}}|,|{{#var:i}}}}}}{{#var:sys}}
{{releasesRow|SCDROM2|JP|{{{scd_date_jp|}}}|¥{{{scd_rrp_jp|?}}}|{{{scd_code_jp|?}}}}}
+
|  
{{releasesRow|SCDROM2|US|{{{scd_date_us|}}}|${{{scd_rrp_us|?}}}|{{{scd_code_us|?}}}}}
+
{{#vardefine:j|0}}{{#while:
{{releasesRow|SCDROM2|FR|{{{scd_date_fr|}}}|{{{scd_rrp_fr|?}}}FF|{{{scd_code_fr|?}}}}}
+
| {{#vardefine:rgn|{{#explode:{{#var:rgnlist}}|,|{{#var:j}}}}}}{{#var:rgn}}
{{releasesRow|ACDROM2|JP|{{{acd_date_jp|}}}|¥{{{acd_rrp_jp|?}}}|{{{acd_code_jp|?}}}}}
+
|  
|-
 
| style="display:none" |
 
<!-- Games -->
 
{{#ifeq: {{#var:type}} | 0 |  
 
  
{{#if: {{{cd_date_jp|}}}{{{cd_date_us|}}}{{{cd_date_fr|}}} | [[Category:CD-ROM² games]]
+
{{#forargs: {{#var:sys}}_date_{{#var:rgn}} | typ | dat |
{{#vardefine:year|{{lowest
+
{{#if:{{#var:dat}}|{{lowest|var=year|{{#var:year}}|{{year|{{#var:dat}}}}}}}}
|{{year|{{{cd_date_jp}}}}}
+
{{#switch:{{#var:sys}}|acdrom2|acd={{#vardefine:acdrom2|true}}|scdrom2|scd={{#vardefine:scdrom2|true}}|{{#vardefine:cdrom2|true}}}}
|{{year|{{{cd_date_us}}}}}
+
{{releasesRowPlus
|{{year|{{{cd_date_fr}}}}}
+
| console={{#switch:{{#var:sys}}|acdrom2|acd=ACDROM2|scdrom2|scd=SCDROM2|CDROM2}}
}}}}
+
| region={{uc:{{#var:rgn}}}}
{{#ifeq: {{#var:year}} | 9999 | | [[Category:{{#var:year}} CD-ROM² games]] }}
+
| date={{#var:dat}}
| }}
+
| packageprice={{{{{#var:sys}}_package_{{#var:rgn}}{{#var:typ}}|}}}
 +
| price={{{{{#var:sys}}_rrp_{{#var:rgn}}{{#var:typ}}|}}}
 +
| currency=
 +
| code={{{{{#var:sys}}_code_{{#var:rgn}}{{#var:typ}}|}}}
 +
| code2={{{{{#var:sys}}_code2_{{#var:rgn}}{{#var:typ}}|}}}
 +
| type={{#vardefine:typ2|{{#sub:{{#var:typ}}|1}}}}{{#switch:{{#var:typ2}}
 +
  |{{#if:{{{{{#var:sys}}_type_{{#var:rgn}}{{#var:typ}}|}}}|{{{{{#var:sys}}_type_{{#var:rgn}}{{#var:typ}}|}}}|{{#var:typ2}}}}
 +
  }}
 +
| download=
 +
| rating={{{{{#var:sys}}_rating_{{#var:rgn}}{{#var:typ}}|}}}
 +
}}
 +
}}
  
{{#if: {{{scd_date_jp|}}}{{{scd_date_us|}}}{{{scd_date_fr|}}} | [[Category:Super CD-ROM² games]]
+
{{incvar|j}}
{{#vardefine:year|{{lowest
+
}}
|{{year|{{{scd_date_jp}}}}}
+
{{incvar|i}}
|{{year|{{{scd_date_us}}}}}
+
}}
|{{year|{{{scd_date_fr}}}}}
+
{{#switch:{{#var:type}}
}}}}
+
| 0={{#if:{{#var:cdrom2}}|[[Category:CD-ROM² games]]{{ReleasesYearCheck|{{#var:year}}|CD-ROM²}}{{genre2cat|CD-ROM²}}}}{{
{{#ifeq: {{#var:year}} | 9999 | | [[Category:{{#var:year}} Super CD-ROM² games]] }}
+
#if:{{#var:scdrom2}}|[[Category:Super CD-ROM² games]]{{ReleasesYearCheck|{{#var:year}}|Super CD-ROM²}}{{genre2cat|Super CD-ROM²}}}}{{
| }}
+
#if:{{#var:acdrom2}}|[[Category:Arcade CD-ROM² games]]{{ReleasesYearCheck|{{#var:year}}|Arcade CD-ROM²}}{{genre2cat|Arcade CD-ROM²}}}}
 
+
| 1=[[Category:CD-ROM² systems accessories]]
{{#if: {{{acd_date_jp|}}}{{{acd_date_us|}}} | [[Category:Arcade CD-ROM² games]]
+
| 2=[[Category:CD-ROM² systems hardware]]
{{#vardefine:year|{{lowest
+
}}
|{{year|{{{acd_date_jp}}}}}
 
}}}}
 
{{#ifeq: {{#var:year}} | 9999 | | [[Category:{{#var:year}} Arcade CD-ROM² games]] }}
 
| }}
 
| }}
 
 
 
<!-- not sure how to do duo-only games yet -->
 
 
 
<!-- Accessories -->
 
{{#ifeq: {{#var:type}} | 1 | [[Category:CD-ROM² systems accessories]] | }}
 
 
 
<!-- Consoles -->
 
{{#ifeq: {{#var:type}} | 2 | [[Category:CD-ROM² systems hardware]] | }}
 
 
 
|-
 
| style="display:none" |
 
|-
 
 
</includeonly><noinclude>
 
</includeonly><noinclude>
 
See [[Template:Releases/Usage]] for how to use.
 
See [[Template:Releases/Usage]] for how to use.
  
 
[[Category:Releases templates]]</noinclude>
 
[[Category:Releases templates]]</noinclude>

Latest revision as of 14:13, 4 July 2024

See Template:Releases/Usage for how to use.