Template:Infobox building: Difference between revisions

From TeamSpec Wiki
Jump to navigation Jump to search
Fit narrow screens
TeamSpec theme: colours move from inline styles to MediaWiki:Common.css classes
 
Line 1: Line 1:
<includeonly>{| style="float:right;clear:right;width:300px;max-width:100%;box-sizing:border-box;margin:0 0 12px 16px;border:1px solid #a2a9b1;background:#f8f9fa;color:#202122;font-size:90%;border-collapse:collapse;"
<includeonly>{| class="ts-infobox" style="float:right;clear:right;width:300px;max-width:100%;box-sizing:border-box;margin:0 0 12px 16px;font-size:90%;border-collapse:collapse;"
|-
|-
! colspan="2" style="background:#f3e6d0;padding:6px;font-size:115%;text-align:center;" | {{{name|{{PAGENAME}}}}}
! class="ts-infobox-title" colspan="2" style="padding:6px;font-size:115%;text-align:center;" | {{{name|{{PAGENAME}}}}}
{{#if:{{{image|}}}|
{{#if:{{{image|}}}|
{{!}}-
{{!}}-
{{!}} colspan="2" style="padding:8px;text-align:center;background:#ffffff;" {{!}} [[File:{{{image}}}|250px|{{{name|{{PAGENAME}}}}}]]
{{!}} class="ts-infobox-image" colspan="2" style="padding:8px;text-align:center;" {{!}} [[File:{{{image}}}|250px|{{{name|{{PAGENAME}}}}}]]
}}
}}
{{#if:{{{built_with|}}}|
{{#if:{{{built_with|}}}|
Line 28: Line 28:
{{#if:{{{stats|}}}|
{{#if:{{{stats|}}}|
{{!}}-
{{!}}-
! colspan="2" style="background:#e8ecf3;padding:4px 6px;text-align:center;" {{!}} Stats
! class="ts-infobox-section" colspan="2" style="padding:4px 6px;text-align:center;" {{!}} Stats
{{{stats}}}
{{{stats}}}
}}
}}

Latest revision as of 08:01, 20 October 2026

The box at the top right of every building page.

Usage

{{Infobox building
| name = Dispenser
| built_with = [[Struction Console]]
| cost = 100 materials
| build_time = 2.5 s
| health = 150 / 180 / 216
| stats =
{{Stat row|Range|8 m}}
}}

Parameters

  • name: the title. Defaults to the page name.
  • built_with: the item that puts it up.
  • cost: materials to build it.
  • build_time: seconds from placing to working.
  • health: full health at each level.
  • stats: Stat row lines.

Every parameter is optional; empty ones are left out. Needs the ParserFunctions extension for #if.