Difference between revisions of "Template:Embassy"
From Space Engineers Wiki
(18 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | {{#ifeq: {{NAMESPACE}} | Faction | {{ | + | {{#ifeq: {{NAMESPACE}} | Faction | {{factionheader}} |
<!-- 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 Embassy page--> | <!-- only work in the Embassy page--> | ||
− | {{# | + | {{#vardefine:factionname|{{#explode:{{#titleparts: {{FULLPAGENAME}} | 1 }}|:|1}}}} |
− | {{#set:faction={{#var:factionname}} }} | + | {{#set:faction={{#var:factionname}} }}{{#vardefine:sstance|Neutral}} |
− | + | {{#switch: {{lc:{{{stance}}}}} | |
− | |}} |}} | + | | war = {{#vardefine:stance|-2}}{{#vardefine:sstance|War}} |
+ | | hostile = {{#vardefine:stance|-1}}{{#vardefine:sstance|Hostile}} | ||
+ | | neutral = {{#vardefine:stance|0}}{{#vardefine:sstance|Neutral}} | ||
+ | | friendly = {{#vardefine:stance|1}}{{#vardefine:sstance|Friendly}} | ||
+ | | allied = {{#vardefine:stance|2}}{{#vardefine:sstance|Allied}} | ||
+ | }}{{#set:stance={{#var:stance}}}} | ||
+ | {{#switch: {{lc:{{{status}}}}} | ||
+ | | open = {{#vardefine:status|Open}} | ||
+ | | closed= {{#vardefine:status|Closed}} | ||
+ | }}{{#set:status={{#var:status}}}} | ||
+ | <div style="position:relative;"><div style="background:#486d82;postion:relative;"><div style="padding:5px;position:relative;width:100%;text-align:center;"><span style="color:white;font-size:2em;text-shadow:0px 0px 0.40em rgba(0,0,0,1);font-family:Gotham;position:relative;">{{#var:factionname}} Embassy</span></div></div> | ||
+ | <div style="background:#b2d5e8;postion:relative;"><div style="height:1.5em;text-align:center;">Status: {{#var:status}} {{!}} Stance: {{#var:sstance}}</div></div> | ||
+ | [[Category:Faction Embassy]] | ||
+ | |}} |}}<noinclude>[[Category:Templates]] | ||
+ | Usage: | ||
+ | <pre> | ||
+ | {{Embassy | ||
+ | | stance = War/Hostile/Neutral/Friendly/Allied Your factions default stance with unknown factions | ||
+ | | status = Open/Closed Your embassy status | ||
+ | }} | ||
+ | </pre> |
Latest revision as of 05:06, 3 April 2014
Usage:
{{Embassy | stance = War/Hostile/Neutral/Friendly/Allied Your factions default stance with unknown factions | status = Open/Closed Your embassy status }}