Difference between revisions of "Template:History"

From TFC:TNG
Jump to navigation Jump to search
m (1 revision imported)
(Remake of old History stuff. This is close enough for now....)
 
Line 1: Line 1:
<includeonly>{{ #ifeq: {{ #var:historysearch}}|1|1|{{ #ifeq: {{ #varexists:historyhead}} |1|{{ #ifeq: {{ #var:historydetailhead|0}} |1||{{ #ifeq: {{ #var:history|0}}|1|<table class="wikitable collapsible collapsed" style="margin:0"><tr><th colspan="3">Details</th></tr> {{ #vardefine:historydetailhead|1}} }}}}| <table class="wikitable"> {{ #vardefine:historyhead|1}} }}{{ #vardefine:history|{{ #expr: {{ #var:history|0}} + 1 }} }}{{#vardefine:nomode|}}{{
+
<includeonly><table class="wikitable" cellpadding="0" cellspacing="0">{{
 
+
#vardefine:rows|{{
#vardefine:rows|{{#len: 1{{
+
#len: 1{{#if: {{{2|}}} | 1 }}
#if: {{{4|}}} | 1 }}{{
+
  {{#if: {{{3|}}} | 1 }}
#if: {{{5|}}} | 1 }}{{
+
  {{#if: {{{4|}}} | 1 }}
#if: {{{6|}}} | 1 }}{{
+
  {{#if: {{{5|}}} | 1 }}
#if: {{{7|}}} | 1 }}{{
+
  {{#if: {{{6|}}} | 1 }}
#if: {{{8|}}} | 1 }}{{
+
  {{#if: {{{7|}}} | 1 }}
#if: {{{9|}}} | 1 }}{{
+
  {{#if: {{{8|}}} | 1 }}
#if: {{{10|}}} | 1 }}{{
+
  {{#if: {{{9|}}} | 1 }}
#if: {{{11|}}} | 1 }}{{
+
  {{#if: {{{10|}}} | 1 }}
#if: {{{12|}}} | 1 }} }} }}{{
+
  {{#if: {{{11|}}} | 1 }} }} }}{{
#switch: {{lc: {{{1}}} }}
+
#ifeq: {{{1|}}} | closetable |</tr></tr></table>|<th rowspan="{{#var:rows}}">{{{1}}}</th>}}<!-- If the first entry is close table we need to end the table here. Otherwise it's a new line.-->{{
| head
+
#if: {{{2|}}} |<tr><td>{{{2}}}</td></tr>}}{{
| header = {{#vardefine:mode|head}}
+
#if: {{{3|}}} |<tr><td>{{{3}}}</td></tr>}}{{
| foot
+
#if: {{{4|}}} |<tr><td>{{{4}}}</td></tr>}}{{
| footer = {{#vardefine:prevmode|{{#var:mode|}}}}{{#vardefine:mode|foot}}
+
#if: {{{5|}}} |<tr><td>{{{5}}}</td></tr>}}{{
| b
+
#if: {{{6|}}} |<tr><td>{{{6}}}</td></tr>}}{{
| beta = {{#vardefine:mode|Beta}}
+
#if: {{{7|}}} |<tr><td>{{{7}}}</td></tr>}}{{
| r
+
#if: {{{8|}}} |<tr><td>{{{8}}}</td></tr>}}{{
| f
+
#if: {{{9|}}} |<tr><td>{{{9}}}</td></tr>}}{{
| full
+
#if: {{{10|}}} |<tr><td>{{{10}}}</td></tr>}}{{
| rel
+
#if: {{{11|}}} |<tr><td>{{{11}}}</td></tr>}}</includeonly><noinclude>
| release
 
| official
 
| official release = {{#vardefine:mode|release}}
 
| unknown = {{#vardefine:mode|unknown}}
 
| o
 
| overview = {{#vardefine:mode|overview}}
 
| d
 
| details = {{#vardefine:mode|details}} {{#vardefine:nomode|1}}
 
| {{#vardefine:nomode|1}}
 
}}{{
 
 
 
#switch: {{#var:mode}}
 
| head =
 
| foot = </table>{{ #ifeq: {{ #var:historydetailhead|0}} |1|{{ #vardefine:historydetailhead|0}}|{{ #vardefine:historyhead|0}} }}{{#vardefine:mode|{{#var:prevmode|}}}}
 
| {{ #switch: {{#var:mode}}
 
      | overview = <tr class="overview">
 
      | details = <tr class="details">
 
      |<tr>}}{{
 
  #if: {{#var:nomode}} | {{ #ifexpr: ({{ #var:rowspan|0}} > 0) and ({{ #var:history|1}} < 2) |{{ #vardefine:rowspan|{{ #expr: {{ #var:rowspan}} - {{ #var:rows}} }} }}|<th rowspan="{{ #ifeq: {{{rowspan|1}}}|1|{{#var:rows}}|{{{rowspan| {{#var:rows}} }}}{{ #vardefine:rowspan|{{ #expr: {{{rowspan|1}}} - {{#var:rows}} }} }} }}" {{ #if: {{{snap|}}}||colspan="2"}}>{{#switch: {{{link|ver}}}
 
                                    | none = {{ #ifeq: {{{2|}}} | unknown || {{{2}}}}}
 
                                    | ver = {{ #ifeq: {{{2|}}} | unknown ||{{Version link|{{#switch: {{#var:mode}} | release | weekly = {{{2}}} | {{#var:mode}} {{{2}}} }}|{{
 
                                      #ifeq: {{#sub: {{{2}}} | 0 | 1 }} | (
 
                                      | {{#sub: {{{2}}} | 1 | -1 }}
 
                                      | {{{2}}}
 
                                      }}
 
                                    }} }}
 
                                    | {{ #ifeq: {{{ilink|0}}}|1|[[{{{link}}}|{{{2|link}}}]]|[{{{link}}} {{{2|link}}}]}} }}</th>}}{{ #if: {{{snap|}}}|<th rowspan="{{#var:rows}}">{{#switch: {{{slink|ver}}}
 
                                    | none = {{ #ifeq: {{{snap|}}} | unknown || {{{snap}}}}}
 
                                    | ver = {{ #ifeq: {{{snap|}}} | unknown ||{{Version link|{{#switch: {{#var:mode}} | release | weekly = {{{snap}}} | {{#var:mode}} {{{snap}}} }}|{{
 
                                      #ifeq: {{#sub: {{{snap}}} | 0 | 1 }} | (
 
                                      | {{#sub: {{{snap}}} | 1 | -1 }}
 
                                      | {{{snap}}}
 
                                      }}
 
                                    }} }}
 
                                    | {{ #ifeq: {{{islink|0}}}|1|[[{{{slink}}}|{{{snap|slink}}}]]|[{{{slink}}} {{{snap|slink}}}]}} }}</th>}}
 
    | <th colspan="3" {{ #ifeq: {{ #varexists:detailsbutton}} |1|| {{ #vardefine:detailsbutton|1}} class="history"}}>{{
 
      #switch: {{#var:mode}}
 
      | release = Official Release
 
      | Beta = Beta
 
      | unknown = Unknown
 
      | [[{{#var:mode}}]]
 
      }}</th></tr>
 
    }}
 
}}{{
 
#if: {{{3|}}} | {{ #ifeq: {{ #vardefine:historysearch|1}}{{{3|}}}{{ #vardefine:historysearch|0}}|1|{{{3}}}|<td>{{{3}}}</td>}}</tr> }}{{
 
#if: {{{4|}}} | <tr>{{ #ifeq: {{ #vardefine:historysearch|1}}{{{4|}}}{{ #vardefine:historysearch|0}}|1|{{{4}}}|<td>{{{4}}}</td>}}</tr> }}{{
 
#if: {{{5|}}} | <tr>{{ #ifeq: {{ #vardefine:historysearch|1}}{{{5|}}}{{ #vardefine:historysearch|0}}|1|{{{5}}}|<td>{{{5}}}</td>}}</tr> }}{{
 
#if: {{{6|}}} | <tr>{{ #ifeq: {{ #vardefine:historysearch|1}}{{{6|}}}{{ #vardefine:historysearch|0}}|1|{{{6}}}|<td>{{{6}}}</td>}}</tr> }}{{
 
#if: {{{7|}}} | <tr>{{ #ifeq: {{ #vardefine:historysearch|1}}{{{7|}}}{{ #vardefine:historysearch|0}}|1|{{{7}}}|<td>{{{7}}}</td>}}</tr> }}{{
 
#if: {{{8|}}} | <tr>{{ #ifeq: {{ #vardefine:historysearch|1}}{{{8|}}}{{ #vardefine:historysearch|0}}|1|{{{8}}}|<td>{{{8}}}</td>}}</tr> }}{{
 
#if: {{{9|}}} | <tr>{{ #ifeq: {{ #vardefine:historysearch|1}}{{{9|}}}{{ #vardefine:historysearch|0}}|1|{{{9}}}|<td>{{{9}}}</td>}}</tr> }}{{
 
#if: {{{10|}}} | <tr>{{ #ifeq: {{ #vardefine:historysearch|1}}{{{10|}}}{{ #vardefine:historysearch|0}}|1|{{{10}}}|<td>{{{10}}}</td>}}</tr> }}{{
 
#if: {{{11|}}} | <tr>{{ #ifeq: {{ #vardefine:historysearch|1}}{{{11|}}}{{ #vardefine:historysearch|0}}|1|{{{11}}}|<td>{{{11}}}</td>}}</tr> }}{{
 
#if: {{{12|}}} | <tr>{{ #ifeq: {{ #vardefine:historysearch|1}}{{{12|}}}{{ #vardefine:historysearch|0}}|1|{{{12}}}|<td>{{{12}}}</td>}}</tr> }}{{ #vardefine:history|{{ #expr: {{ #var:history}} - 1 }} }} }}</includeonly><noinclude>
 
 
{{History/doc}}
 
{{History/doc}}
 
[[Category:Templates]]
 
 
</noinclude>
 
</noinclude>

Latest revision as of 22:20, 13 October 2019

This template is used for creating the new history sections.

To create a History section, you need to use this template multiple times:

  • A single version can be represented like so: {{History||1.12.2-0.24.2.79|Removed pickaxe harvestability from ProPick.}}.
  • Do not specify the development stage! Only use FULL version numbers or BUILD numbers!
  • If multiple changes have been made in a single version update, simply list them like so: {{History||Build #79|This isn't a real change log but it shows you how it works|Now you have two things that changed this version!.}}. The template currently supports up to 10 changes per version.
  • Make sure that all Github interlinks are removed. Things like this: Fix knapping with only one rock (close #369) should be Fix knapping with only one rock.
  • End the history section with {{History|closetable}}.

Sample usage:

{{History|Build #36|Added custom charcoal pile sounds.|Added charcoal place sounds to the block placement.}}
{{History|Build #73|Nerfed charcoal creation calculation so that a full log pile doesn't always produce max charcoal - the calculation is now the same as 1.7.10.|Fixed charcoal piles causing logs to drop their contents, effectively duplicating the logs}}
{{History|closetable}}

Produces:

Build #36
Added custom charcoal pile sounds.
Added charcoal place sounds to the block placement.
Build #73
Nerfed charcoal creation calculation so that a full log pile doesn't always produce max charcoal - the calculation is now the same as 1.7.10.
Fixed charcoal piles causing logs to drop their contents, effectively duplicating the logs