Difference between revisions of "Template:Infobox material"

From Captain of Industry Wiki
Jump to: navigation, search
(Test passed. Replacing test criteria with a real one.)
(Fully migrate to external css with TemplateStyles)
Line 1: Line 1:
<includeonly><templatestyles src="Template:Infobox material/styles.css" /><!--
<includeonly><templatestyles src="Template:Infobox material/styles.css" /><!--
--><div style="float:right; clear: right;"><!--
--><div class="infobox-wrapper"><!--
--><div style="display:inline-block; min-width: 250px; max-width: 350px; border: 3px solid rgba(252,162,58,1); border-radius: 15px; margin:10px; font-size:14px; background-color: rgba(46,46,46,1);"><!--
--><div class="outer-box"><!--
   --><div style="width: 100%; vertical-align: middle; text-align: center; background-color: rgba(0,0,0,1); font-size: 20px; color: rgba(252,162,58,1); text-shadow: 0 0 10px rgba(255,162,58,.7); font-family: Georgia, Liberation Serif, Times, serif; border-radius: 15px 15px 0 0; border-bottom: 3px solid rgba(252,162,58,1); padding: 10px 0;"><!--
   --><div class="inner-title"><!--
         -->{{#if: {{{Name|}}} | {{{Name}}} | Unknown Item }}<!--
         -->{{#if: {{{Name|}}} | {{{Name}}} | Unknown Item }}<!--
   --></div><!--
   --></div><!--
   --><div style="text-align: center; padding: 10px 10px 0;"><!--
   --><div class="inner-main"><!--
     -->{{#if: {{{Description|}}} | <!--
     -->{{#if: {{{Description|}}} | <!--
       --><div style="font-size:16px; color: rgba(255,255,255,1); padding: 0px 0px 10px 0px;">''“{{{Description}}}”''</div><!--
       --><div class="description">''“{{{Description}}}”''</div><!--
     -->}}<!--
     -->}}<!--
     -->[[File:{{#if: {{{Image|}}} | {{{Image}}} | {{#if: {{{Name|}}} | {{{Name}}} | Placeholder material}}.png}}]]<br/><!--
     -->[[File:{{#if: {{{Image|}}} | {{{Image}}} | {{#if: {{{Name|}}} | {{{Name}}} | Placeholder material}}.png}}]]<br/><!--
   --></div><!--
   --></div><!--
   --><div style="padding: 10px;"><!--
   --><div class="inner-table"><!--
     --><div style="vertical-align:top; width: 100%;"><!--   
     --><div class="inner-inner-table"><!--   
       --><table style="border-collapse: collapse; border-spacing: 0 8px; flex-grow:1; line-height:16px; white-space:nowrap; width: 100%"><!--
       --><table class="table"><!--
         -->{{#if:{{{Type|}}}|<!--
         -->{{#if:{{{Type|}}}|<!--
           --><tr style="border-top: 1px solid white; vertical-align: top;"><!--
           --><tr class="table-tr"><!--
             --><td style="text-align: right; font-weight: bold; padding: 5px 5px 5px 0;">Type</td><!--
             --><td class="table-td-left">Type</td><!--
             --><td style="padding: 5px 0 5px 5px;">{{{Type}}}</td><!--
             --><td class="table-td-right">{{{Type}}}</td><!--
           --></tr>}}<!--
           --></tr>}}<!--
         -->{{#if:{{{CreatedIn|}}}|<!--
         -->{{#if:{{{CreatedIn|}}}|<!--
           --><tr style="border-top: 1px solid white; vertical-align: top;"><!--
           --><tr class="table-tr"><!--
             --><td style="text-align: right; font-weight: bold; padding: 5px 5px 5px 0;">Created in</td><!--
             --><td class="table-td-left">Created in</td><!--
             --><td class="table-td-right">{{{CreatedIn}}}</td><!--
             --><td class="table-td-right">{{{CreatedIn}}}</td><!--
           --></tr>}}<!--
           --></tr>}}<!--
         -->{{#if:{{{UsedIn|}}}|<!--
         -->{{#if:{{{UsedIn|}}}|<!--
           --><tr style="border-top: 1px solid white; vertical-align: top;"><!--
           --><tr class="table-tr"><!--
             --><td style="text-align: right; font-weight: bold; padding: 5px 5px 5px 0;">Used in</td><!--
             --><td class="table-td-left">Used in</td><!--
             --><td style="padding: 5px 0 5px 5px;">{{{UsedIn}}}</td><!--
             --><td class="table-td-right">{{{UsedIn}}}</td><!--
           --></tr>}}<!--
           --></tr>}}<!--
         -->{{#if:{{{TransportedBy|}}}|<!--
         -->{{#if:{{{TransportedBy|}}}|<!--
           --><tr style="border-top: 1px solid white; vertical-align: top;"><!--
           --><tr class="table-tr"><!--
             --><td style="text-align: right; font-weight: bold; padding: 5px 5px 5px 0;">Transported by</td><!--
             --><td class="table-td-left">Transported by</td><!--
             --><td style="padding: 5px 0 5px 5px;">{{{TransportedBy}}}</td><!--
             --><td class="table-td-right">{{{TransportedBy}}}</td><!--
           --></tr>}}<!--         
           --></tr>}}<!--         
         -->{{#if:{{{StoredIn|}}}|<!--
         -->{{#if:{{{StoredIn|}}}|<!--
           --><tr style="border-top: 1px solid white; vertical-align: top;"><!--
           --><tr class="table-tr"><!--
             --><td style="text-align: right; font-weight: bold; padding: 5px 5px 5px 0;">Stored in</td><!--
             --><td class="table-td-left">Stored in</td><!--
             --><td style="padding: 5px 0 5px 5px;">{{{StoredIn}}}</td><!--
             --><td class="table-td-right">{{{StoredIn}}}</td><!--
           --></tr>}}<!--         
           --></tr>}}<!--         
         -->{{#if:{{{StartingQty|}}}|<!--
         -->{{#if:{{{StartingQty|}}}|<!--
           --><tr style="border-top: 1px solid white; vertical-align: top;"><!--
           --><tr class="table-tr"><!--
             --><td style="text-align: right; font-weight: bold; padding: 5px 5px 5px 0;">Starting amount</td><!--
             --><td class="table-td-left">Starting amount</td><!--
             --><td style="padding: 5px 0 5px 5px;">{{{StartingQty}}}</td><!--
             --><td class="table-td-right">{{{StartingQty}}}</td><!--
           --></tr>}}<!--
           --></tr>}}<!--
       --></table><!--
       --></table><!--

Revision as of 08:30, 13 January 2022

Template documentation (for the above template, sometimes hidden or invisible) [view] [edit] [history] [refresh]
Construction Parts
Construction Parts.png
Starting amountSailor: 987
Captain: 654
Admiral: 321

Usage and Parameters

This is a template to show basic information of items. The template accepts the following parameters:

Basic parameters
  • Name: Name of items. (Default: The name of the page.)
  • Type1, Type2: Types of items. It is used to categorize item in this wiki.
  • State: Loose, Fluid, Unit, Molten, or Virtual.
  • Variants: Variant of the items.
Parameters for transportation
Buildings and vehicles for transporting are automatically listed depending on State. But, it should be modified with the following parameters in some cases.
  • TrackTransport: Set no if tracks cannot transport the item (Default: yes).
  • TransportedBy(rare): Only if transport override is needed.
  • OtherTransport(rare): To add an extra transport to auto-generated list.
Parameters for storage
Buildings for storing are automatically listed depending on State. But, it should be modified with the following parameters in some cases.
  • StoredInShipyard: Set no if the shipyard cannot store the items (Default: yes).
  • StoredInCargoModules: Set yes if cargo modules can store the items (Default: no).
  • StoredIn: Only if storage override is needed. Set to "None" to suppress the field.
  • OtherStorage(rare): To add an extra storage to auto-generated list.
Parameters for buildings that creates/uses this item
Buildings that create/use the item are automatically listed from the table made by Template:Recipe define. But, it should be added with the following parameters in some cases.
  • CreatedIn: To add an extra buildings to auto-generated list.
  • UsedIn: To add an extra buildings to auto-generated list.
Miscellaneous parameters
  • Radiation: Radiation Level of the items.
  • StartingQty: The number of the items stored in the Shipyard on game start.
  • Image (rare): Only if image override is needed.
  • Description (rare): To add an in-game description, though not currently implemented in-game.

Categories set by this template

Examples

Example usage for standard item
Markup Renders as
  {{Infobox material
    | Name           = Electronics III
    | Type1          = Crafted material
    | State          = Unit
    | StartingQty    = Sailor: 987<br>Captain: 654<br>Admiral: 321
    | Variants       = [[Electronics]]<br>[[Electronics II]]
  }} 
Electronics III
Electronics III.png
Starting amountSailor: 987
Captain: 654
Admiral: 321
Example usage for items that tracks cannot transport or storage cannot store
Markup Renders as
  {{Infobox material
    | Name           = Chilled Water
    | State          = Fluid
    | TrackTransport = no
    | StoredIn       = none
  }} 
Chilled Water
Chilled Water.png
Stored innone
Example usage for items that the shipyard cannot store
Markup Renders as
  {{Infobox material
    | Name             = Seawater
    | Type1            = Natural resource
    | State            = Fluid
    | StoredInShipyard = no
  }} 
Seawater
Seawater.png
Example usage for items having Radiation Level
Markup Renders as
  {{Infobox material
    | Name             = Spent Fuel
    | Type1            = Radioactive waste
    | Radiation        = 2
    | State            = Unit
  }} 
Spent Fuel
Spent Fuel.png
Example usage for items stored in special storage
Markup Renders as
  {{Infobox material
    | Name             = Spent Fuel
    | Type1            = Radioactive waste
    | State            = Unit
    | StoredIn         = [[Radioactive Waste Storage]]
  }} 
Spent Fuel
Spent Fuel.png
Example usage for items stored in cargo modules
Markup Renders as
  {{Infobox material
    | Name                 = Uranium Ore
    | Type1                = Natural resources
    | State                = Loose
    | StoredInCargoModules = yes
  }} 
Uranium Ore
Uranium Ore.png
Example usage for items created/used in non-production-machines
Markup Renders as
  {{Infobox material
    | Name             = Coal
    | Type1            = Natural resources
    | State            = Loose
    | CreatedIn        = [[Coal Mine]]
    | UsedIn           = Foo
  }} 
Coal
Coal.png
Created inCoal Mine
Used inFoo
The above text is transcluded from Template:Infobox material/doc; you can change it or view its history. (How does this work?)
If you're done making changes, please refresh the text. (Why?)
You can experiment in this template's sandbox (edit | diff) and testcases (create) pages.
Please add categories and interwikis to Template:Infobox material/doc. (View all subpages of this page.)