Template:Location: Difference between revisions

From Caves of Qud Wiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
 
(16 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude>{{#cargo_declare:_table=Locations|Faction=Page|Biome=Page|Leader=Page|Description=String|TotalFloors=Integer}}
<noinclude>{{#cargo_declare:_table=Locations
{{#cargo_attach:_table=GeneralData}}
|Faction=Page
</noinclude><includeonly>{{#cargo_store:_table=Locations|Faction={{{faction|}}}|Biome={{{biome|}}}|Leader={{{leader|}}}|Description={{{desc|}}}|TotalFloors={{{floors|}}}}}<!--
|Biome=Page
|Leader=Page
|Description=String
|TotalFloors=Integer
|IsTerrain=Boolean
|GotoID=Wikitext
|JoinKey=String}}<!--
-->{{#cargo_attach:_table=GeneralData}}
</noinclude><includeonly>{{#cargo_store:_table=Locations
|Faction={{{faction|}}}
|Biome={{{biome|}}}
|Leader={{{leader|}}}
|Description={{{desc|}}}
|TotalFloors={{{floors|}}}
|IsTerrain={{#ifeq:{{lc:{{{terrain|no}}}}}|yes|yes|no}}
|GotoID={{{gotoid|}}}
|JoinKey={{FULLPAGENAME}}
}}<!--


   GENERAL DATA CARGO STORE
   GENERAL DATA CARGO STORE


-->{{#cargo_store:_table=GeneralData|
-->{{#cargo_store:_table=GeneralData
DisplayName={{qud text|&amp;y{{#titleparts:{{BASEPAGENAME}}}}}}|
|DisplayName={{qud text|&amp;y{{{title|{{#titleparts:{{BASEPAGENAME}}}}}}}}}
Image={{#ifeq: {{{image|}}}| none ||{{{image}}}}}|
|Image={{#ifeq: {{{image|}}}| none ||{{{image}}}}}
PlainName={{StripFormatting|{{{title|{{#titleparts:{{PAGENAME}}}} }}} }}|
|PlainName={{StripFormatting|{{{title|{{#titleparts:{{PAGENAME}}}} }}} }}
DisplayChar= {{qud char|&amp;y|•}} }}[[Category:Locations]]<!--
|DisplayChar= {{qud char|&amp;y|•}}
|JoinKey={{FULLPAGENAME}}
|Description={{{desc|}}} }}[[Category:Locations]]<!--


   INFOBOX START
   INFOBOX START
Line 15: Line 34:
-->{{#invoke:infobox|infobox
-->{{#invoke:infobox|infobox
| class = qud-location-infobox
| class = qud-location-infobox
| imagearea =
{{#if: {{{overrideimages|}}} | {{{overrideimages}}} | {{#ifeq: {{{image|none}}} |none|| [[Image:{{{image}}}|160px]] }} }}
| rows =  
| rows =  
{{#if: {{{faction|}}} | {{infobox row|label=Faction|field=[[{{{faction}}}]] }} }}
{{#if: {{{faction|}}} | {{infobox row|label=Faction|field=[[{{{faction}}}]] }} }}
{{#if: {{{biome|}}}  | {{infobox row|label=Biome|field=[[{{{biome}}}]] }} }}
{{#if: {{{biome|}}}  | {{infobox row|label=Biome|field=[[{{{biome}}}]] }} }}
{{#ifeq: {{lc:{{{terrain|no}}}}} | yes | {{infobox row|field=<div style="text-align:center;"><i>[[World_map#Terrain|world map terrain]]</i></div> }} }}
{{#if: {{{leader|}}}  | {{infobox row|label=Leader|field={{Consecutive templates|{{{leader}}}|</br>|</br>|||favilink}} }} }}
{{#if: {{{leader|}}}  | {{infobox row|label=Leader|field={{Consecutive templates|{{{leader}}}|</br>|</br>|||favilink}} }} }}
{{#if: {{{floors|}}}  | {{infobox row|Total Floors|{{{floors}}} }} }}
{{#if: {{{floors|}}}  | {{infobox row|Total Floors|{{{floors}}} }} }}
{{#if: {{{gotoid|}}}  | {{infobox row|{{tooltip|This is the id you must wish for using the goto: wish.|Goto ID}}|{{{gotoid}}} }} }}
{{#if: {{{gotoid|}}}  | {{infobox row|{{tooltip
|1=<span style="font-weight:normal;">You can use this ID to [[Wishes|wish]] yourself to this<br>location (<code>goto:{{{gotoid}}}</code>)</span>
|2=Goto ID
|3=nosearch
}}|{{{gotoid}}} }} }}
}}
}}
{{#if: {{{desc|}}} | {{qud look|text={{{desc}}}}} }}
{{#if: {{{desc|}}} | {{qud look|text={{{desc}}}|title={{{title|{{PAGENAME}} }}} }} }}
</includeonly><noinclude>
</includeonly><noinclude>
[[Category:Cargo Store Templates]]
[[Category:Cargo Store Templates]]
{{doc}}</noinclude>
{{doc}}</noinclude>

Latest revision as of 22:14, 28 December 2021

This template defines the table "Locations". View table.This template adds rows to the table "GeneralData", which is declared by the template General data table. View table.

Template-info.png Documentation

Arguments

title title. defaults to page name string
faction faction the location is associated with. string (the template will autolink to the page)
terrain "yes" if this is a type of world map terrain. No by default. boolean
biome the type of parent terrain that the location is located in. string (the template will autolink to the page)
leader the leader of the place string (the template will autolink to the page)
floors how deep in strata the bottom is. reserved for the more vertically inclined locations. integer

Usage Example

{{Location
| title = Joppa
| image = ovw_joppa.png
| faction = Villagers of Joppa
| biome = Salt Marsh
| terrain = no
| leader = Elder Irudad
| desc = Ants in the viridian chaff, the farmers sap the last drops of pristine moisture out of the salt-spangled earth.
| gotoid = JoppaWorld.11.22.1.1.10
}}