Difference between revisions of "Template:Set standing"
From Space Engineers Wiki
(8 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | {{#ifeq: {{NAMESPACE}} | Faction | | + | {{#ifeq: {{NAMESPACE}} | Faction | |
<!-- only work in the faction namespace --> | <!-- only work in the faction namespace --> | ||
{{#ifeq: {{#titleparts: {{FULLPAGENAME}} | | -1 }} | Embassy | | {{#ifeq: {{#titleparts: {{FULLPAGENAME}} | | -1 }} | Embassy | | ||
<!-- only work in the Standings page--> | <!-- only work in the Standings page--> | ||
− | + | {{#if: {{{1|}}} | {{#vardefine:faction|{{{1}}}}} | |
− | {{#if: {{{1|}}} | | + | {{#if: {{#explode:{{#var:faction}}|:|1}} | | {{#vardefine:faction|Faction:{{#var:faction}}}}}} |
− | + | {{#vardefine:standing|0}} | |
{{#switch: {{lc:{{{2|}}}}} | {{#switch: {{lc:{{{2|}}}}} | ||
| war | | war | ||
− | | -2 = | + | | -2 = {{#vardefine:standing|-2}} |
| hostile | | hostile | ||
− | | -1 = | + | | -1 = {{#vardefine:standing|-1}} |
| neutral | | neutral | ||
− | | 0 = | + | | 0 = {{#vardefine:standing|0}} |
| friendly | | friendly | ||
− | | 1 = | + | | 1 = {{#vardefine:standing|1}} |
| allied | | allied | ||
− | | 2 = | + | | 2 = {{#vardefine:standing|2}} |
}} | }} | ||
− | {{#var:faction}} {{#var:standing}} | + | *{{#var:faction}} {{#switch: {{#var:standing}} |
− | |}}|}}|}} | + | | -2 = War{{#set:war={{#var:faction}}}} |
+ | | -1 = Hostile{{#set:hostile={{#var:faction}}}} | ||
+ | | 0 = Neutral {{#set:neutral={{#var:faction}}}} | ||
+ | | 1 = Friendly {{#set:friendly={{#var:faction}}}} | ||
+ | | 2 = Allied {{#set:allied={{#var:faction}}}} | ||
+ | }} | ||
+ | |}} | ||
+ | |}} | ||
+ | |}}<noinclude>Sets standing of faction to specified faction <pre> {{set standing|target faction|standing}} | ||
+ | target faction is the faction page name of the faction you want to change standings with | ||
+ | |||
+ | standing is one of the following: War, Hostile, Neutral, Friendly, Allied | ||
+ | |||
+ | This template only works on Faction Embassy pages.</pre>[[Category:Templates]]</noinclude> |
Latest revision as of 05:04, 3 April 2014
Sets standing of faction to specified faction{{set standing|target faction|standing}} target faction is the faction page name of the faction you want to change standings with standing is one of the following: War, Hostile, Neutral, Friendly, Allied This template only works on Faction Embassy pages.