Template
WorldSwitch
From Dogcraft Wiki
(Add s5 stuff) |
(Full survival 5 support (I really hope so, at least)) |
||
Line 1: | Line 1: | ||
<includeonly>{{#switch: {{{mode|}}} | <includeonly>{{#switch: {{{mode|}}} | ||
| Category = {{#if: {{{2|}}} | | Category = {{#if: {{{2|}}} | ||
|Survival 4 | |{{#switch: {{{2}}} | ||
| Survival = Survival | |||
| Survival 1 = Survival 1 | |||
| Survival 2 = Survival 2 | |||
| Survival 3 = Survival 3 | |||
| Survival 4 = Survival 4 | |||
| Survival 5 = Survival 5 | |||
| Survival 4 (Husky) = Survival 4 | |||
| Survival 4 (Beagle) = Survival 4 | |||
| [[Survival 4]] = Survival 4 | |||
| [[Survival 4]] (Husky) = Survival 4 | |||
| [[Survival 4]] (Beagle) = Survival 4 | |||
| Survival 5 = Survival 5 | |||
| Survival 5 (Akita) = Survival 5 | |||
| Survival 5 (Shepherd) = Survival 5 | |||
| Survival 5 (Corgi) = Survival 5 | |||
| Survival 5 (Labrador) = Survival 5 | |||
| [[Survival 5]] = Survival 5 | |||
| [[Survival 5]] (Akita) = Survival 5 | |||
| [[Survival 5]] (Shepherd) = Survival 5 | |||
| [[Survival 5]] (Corgi) = Survival 5 | |||
| [[Survival 5]] (Labrador) = Survival 5 | |||
| Husky = Survival 4 | |||
| Beagle = Survival 4 | |||
| Akita = Survival 5 | |||
| Shepherd = Survival 5 | |||
| Corgi = Survival 5 | |||
| Labrador = Survival 5 | |||
| Amplified = Amplified | |||
| Skyblock = Skyblock | |||
| Creative = Creative | |||
| MCMMO = MCMMO | |||
|}} | |||
|{{#switch: {{{1}}} | |{{#switch: {{{1}}} | ||
| Survival = Survival | | Survival = Survival | ||
Line 8: | Line 40: | ||
| Survival 3 = Survival 3 | | Survival 3 = Survival 3 | ||
| Survival 4 = Survival 4 | | Survival 4 = Survival 4 | ||
| Survival 5 = Survival 5 | |||
| Survival 4 (Husky) = Survival 4 | | Survival 4 (Husky) = Survival 4 | ||
| Survival 4 (Beagle) = Survival 4 | | Survival 4 (Beagle) = Survival 4 | ||
Line 35: | Line 68: | ||
|}} | |}} | ||
}} | }} | ||
| Subworld = {{# | | Subworld = {{#ifeq:{{#rpos:{{lc:{{{1|}}}{{{2|}}}}}|husky}}|-1 | ||
|{{#ifeq:{{lc:{{{1|}}}{{{2|}}}}}|beagle}}|-1 | |||
|{{#ifeq:{{#rpos:{{lc:{{{1|}}}{{{2|}}}}}|shepherd}}|-1 | |||
|{{#ifeq:{{#rpos:{{lc:{{{1|}}}{{{2|}}}}}|labrador}}|-1 | |||
|{{#ifeq:{{#rpos:{{lc:{{{1|}}}{{{2|}}}}}|corgi}}|-1 | |||
|{{#ifeq:{{#rpos:{{lc:{{{1|}}}{{{2|}}}}}|akita}}|-1 | |||
| | |||
|Akita}} | |||
|Corgi}} | |||
|Labrador}} | |||
|Shepherd}} | |||
|Beagle}} | |||
|Husky}} | |||
| World = {{#ifeq:{{#rpos:{{lc:{{{1|}}}{{{2|}}}}}|survival 5}}|-1 | |||
|{{#ifeq:{{#rpos:{{lc:{{{1|}}}{{{2|}}}}}|survival 4}}|-1 | |||
|{{#ifeq:{{#rpos:{{lc:{{{1|}}}{{{2|}}}}}|survival 3}}|-1 | |||
|{{#ifeq:{{#rpos:{{lc:{{{1|}}}{{{2|}}}}}|survival 2}}|-1 | |||
|{{#ifeq:{{#rpos:{{lc:{{{1|}}}{{{2|}}}}}|survival 1}}|-1 | |||
|{{#ifeq:{{#rpos:{{lc:{{{1|}}}{{{2|}}}}}|survival}}|-1 | |||
|{{#ifeq:{{#rpos:{{lc:{{{1|}}}{{{2|}}}}}|creative}}|-1 | |||
|{{#ifeq:{{#rpos:{{lc:{{{1|}}}{{{2|}}}}}|patreon}}|-1 | |||
|{{#ifeq:{{#rpos:{{lc:{{{1|}}}{{{2|}}}}}|skyblock}}|-1 | |||
|{{#ifeq:{{#rpos:{{lc:{{{1|}}}{{{2|}}}}}|mcmmo}}|-1 | |||
|{{#ifeq:{{#rpos:{{lc:{{{1|}}}{{{2|}}}}}|amplified}}|-1 | |||
| | |||
|Amplified}} | |||
|MCMMO}} | |||
|Skyblock}} | |||
|Patreon}} | |||
|Creative}} | |||
|Survival 1}} | |||
|Survival 1}} | |||
|Survival 2}} | |||
|Survival 3}} | |||
|Survival 4}} | |||
|Survival 5}} | |||
| Network = {{#switch: {{{1}}} | | Network = {{#switch: {{{1}}} | ||
| Survival 4 = [[Survival Railway Network (Survival 4)|Survival 4 {{{2|}}} Railway Network]] | | Survival 4 = [[Survival Railway Network (Survival 4)|Survival 4 {{{2|}}} Railway Network]] | ||
Line 83: | Line 127: | ||
| [[Survival 4]] | | [[Survival 4]] | ||
}} | }} | ||
|}} | |[[Survival 4]]}} | ||
| Survival 5 = {{#if: {{{2|}}} | |||
|{{#switch: {{{2|}}} | |||
| Shepherd = [[Survival 5]] (Shepherd) | |||
| Akita = [[Survival 5]] (Akita) | |||
| Labrador = [[Survival 5]] (Labrador) | |||
| Corgi = [[Survival 5]] (Corgi) | |||
| [[Survival 5]] | |||
}} | |||
|[[Survival 5]]}} | |||
| Survival 4 (Husky) = [[Survival 4]] (Husky) | | Survival 4 (Husky) = [[Survival 4]] (Husky) | ||
| Survival 4 (Beagle) = [[Survival 4]] (Beagle) | | Survival 4 (Beagle) = [[Survival 4]] (Beagle) | ||
| Survival 5 (Shepherd) = [[Survival 5]] (Shepherd) | |||
| Survival 5 (Akita) = [[Survival 5]] (Akita) | |||
| Survival 5 (Corgi) = [[Survival 5]] (Corgi) | |||
| Survival 5 (Labrador) = [[Survival 5]] (Labrador) | |||
| Husky = [[Survival 4]] (Husky) | | Husky = [[Survival 4]] (Husky) | ||
| Beagle = [[Survival 4]] (Beagle) | | Beagle = [[Survival 4]] (Beagle) | ||
| Akita = [[Survival 5]] (Akita) | |||
| Corgi = [[Survival 5]] (Corgi) | |||
| Labrador = [[Survival 5]] (Labrador) | |||
| Shepherd = [[Survival 5]] (Shepherd) | |||
| Amplified = [[Amplified]] | | Amplified = [[Amplified]] | ||
| Skyblock = [[Skyblock]] | | Skyblock = [[Skyblock]] | ||
Line 96: | Line 157: | ||
|{{#if: {{{2|}}} | |{{#if: {{{2|}}} | ||
|{{#switch: {{{2|}}} | |{{#switch: {{{2|}}} | ||
| Survival = [[Survival]] | |||
| Survival 1 = [[Survival 1]] | |||
| Survival 2 = [[Survival 2]] | |||
| Survival 3 = [[Survival 3]] | |||
| Survival 4 = [[Survival 4]] | |||
| Survival 5 = [[Survival 5]] | |||
| Survival 4 (Husky) = [[Survival 4]] (Husky) | |||
| Survival 4 (Beagle) = [[Survival 4]] (Beagle) | |||
| Survival 5 (Shepherd) = [[Survival 5]] (Shepherd) | |||
| Survival 5 (Akita) = [[Survival 5]] (Akita) | |||
| Survival 5 (Corgi) = [[Survival 5]] (Corgi) | |||
| Survival 5 (Labrador) = [[Survival 5]] (Labrador) | |||
| Husky = [[Survival 4]] (Husky) | | Husky = [[Survival 4]] (Husky) | ||
| Beagle = [[Survival 4]] (Beagle) | | Beagle = [[Survival 4]] (Beagle) | ||
| [[Survival | | Akita = [[Survival 5]] (Akita) | ||
| Corgi = [[Survival 5]] (Corgi) | |||
| Labrador = [[Survival 5]] (Labrador) | |||
| Shepherd = [[Survival 5]] (Shepherd) | |||
| Amplified = [[Amplified]] | |||
| Skyblock = [[Skyblock]] | |||
| Creative = [[Creative]] | |||
| MCMMO = [[MCMMO]] | |||
| {{{2}}} | |||
}} | }} | ||
|}} | |}} |
Revision as of 19:55, 22 May 2022
WorldSwitch template
This is a technical template meant to be used inside other template, mainly infoboxes. It converts server world names to include links. It handles most common ways of refering to past and present worlds.
Example
{{WorldSwitch|Survival}}
generates: Husky
| World = Survival 1
| Network = Survival Railway Network (Survival)
|Survival
}}
{{WorldSwitch|Survival 4}}
generates: Husky
| World = Survival 4
| Network = Survival 4 Railway Network
|Survival 4
}}
{{WorldSwitch|Survival 4|Husky}}
generates: Husky
| World = Survival 4
| Network = Survival 4 Husky Railway Network
|Survival 4 (Husky)
}}
{{WorldSwitch|Survival 4 (Husky)}}
generates: Husky
| World = Survival 4
| Network = Survival 4 Railway Network
|Survival 4 (Husky)
}}
{{WorldSwitch|Husky}}
generates: Husky
| World =
| Network = Survival 4 Railway Network
|Survival 4 (Husky)
}}
{{WorldSwitch||Husky}}
generates: Husky
| World =
| Network = Survival Railway Network ()
|Survival 4 (Husky)
}}
{{WorldSwitch|Husky|mode=Category}}
generates: Survival 4
| World =
| Network = Survival 4 Railway Network
|Survival 4 (Husky)
}}
{{WorldSwitch||Husky|mode=Category}}
generates: Survival 4
| World =
| Network = Survival Railway Network ()
|Survival 4 (Husky)
}}
{{WorldSwitch|Survival 4 (Husky)|mode=Category}}
generates: Survival 4
| World = Survival 4
| Network = Survival 4 Railway Network
|Survival 4 (Husky)
}}
{{WorldSwitch|Survival 4 (Husky)|mode=Subworld}}
generates: -1
| World = Survival 4
| Network = Survival 4 Railway Network
|Survival 4 (Husky)
}}
Template data
This is a technical template. If you see this text outside the Template:WorldSwitch page, you are doing something wrong. It is meant to convert most ways to input the 'world' property of infobox templates into what the template is expecting and/or the same thing but with a link to the actual world page referred to.
Parameter | Description | Type | Status | |
---|---|---|---|---|
World | 1 | Input for the worlds, this is what actually matters the most. Takes inputs in most ways you could think to input the world that is not actually what the template wants. Except typos. This is to deal with alternative ways to say the same things, not the lack of autocorrect. | String | required |
Subworld | 2 | Subworld for use in Survival 4 cases
| String | suggested |
Mode | mode | Options are "Category" for world categoires, "Network" for use in the Network line of the Station infobox, and a currently unused "Subworld" option. | String | optional |