Difference between revisions of "Template:Infobox material/sandbox"

From Captain of Industry Wiki
Jump to: navigation, search
(Automate "Created in" and "Used in")
Line 42: Line 42:
             --><td class="table-td-right">{{{State}}}{{#if:{{NAMESPACE}}||[[Category:{{{State}}} products]]}}</td><!--
             --><td class="table-td-right">{{{State}}}{{#if:{{NAMESPACE}}||[[Category:{{{State}}} products]]}}</td><!--
           --></tr>|[[Category:Missing state]]}}<!--
           --></tr>|[[Category:Missing state]]}}<!--
        ** Transported by **
        -->{{#if:{{{TransportedBy|}}}{{{State|}}}|<!--
          --><tr class="table-tr"><!--
            --><td class="table-td-left">Transported by</td><!--
            --><td class="table-td-right"><!--
              -->{{#if: {{{TransportedBy|}}} | {{{TransportedBy}}}[[Category:Cleanup1]] | <!--
                -->{{#switch: {{lc:{{{State|}}}}} |<!--
                  -->| loose    = {{variants|U-shape Conveyor}}<!--
                    -->{{#ifeq:{{{TrackTransport|yes}}} | no || <br/>[[Pickup]] &bull; [[Truck]] &bull; [[Haul Truck (Dump)]] }}<!--
                  -->| fluid    = {{variants|Pipe}}<!--
                    -->{{#ifeq:{{{TrackTransport|yes}}} | no || <br/>[[Pickup]] &bull; [[Truck]] &bull; [[Haul Truck (Tank)]] }}<!--
                  -->| unit    = {{variants|Flat Conveyor}}<!--
                    -->{{#ifeq:{{{TrackTransport|yes}}} | no || <br/>[[Pickup]] &bull; [[Truck]] }}<!--
                  -->| molten  = [[Molten Channel]]<!--
                  -->| virtual  = [[Virtual product|Magic]]<!--
                  -->| #default = <span style="color: red;">Unknown <nowiki>{{{State}}}</nowiki>[[Category:Material redtext]]</span><!--
                -->}}<!--
                -->{{#if: {{{OtherTransport|}}} | <br/>{{{OtherTransport}}}}}<!--
              -->}}<!--
            --></td><!--
          --></tr><!--       
        -->}}<!--
       
        ** Stored in **
        --><tr class="table-tr"><!--
          --><td class="table-td-left">Stored in</td><!--
          --><td class="table-td-right"><!--
            -->{{#ifeq:{{lc:{{{StoredIn|}}}}} | none | None [[Category:Unstorable items]] | {{#if:{{{StoredIn|}}}{{{State|}}}|<!--
              -->{{#if: {{{StoredIn|}}} | {{{StoredIn}}}[[Category:Cleanup1]] | <!--
                -->{{#switch: {{lc:{{{State|}}}}} |<!--
                  -->| loose    = {{variants|Loose Storage}}<!--
                    -->{{#ifeq: {{{StoredInShipyard|yes}}} | no ||<br/>[[Shipyard]]}}<!--
                    -->{{#ifeq: {{{StoredInCargoModule|no}}} | yes |<br/>{{variants|Loose Module}}}}<!--
                  -->| fluid    = {{variants|Fluid Storage}}<!--
                    -->{{#ifeq: {{{StoredInShipyard|yes}}} | no ||<br/>[[Shipyard]]}}<!--
                    -->{{#ifeq: {{{StoredInCargoModule|no}}} | yes |<br/>{{variants|Fluid Module}}}}<!--
                  -->| unit    = {{variants|Unit Storage}}<!--
                    -->{{#ifeq: {{{StoredInShipyard|yes}}} | no ||<br/>[[Shipyard]]}}<!--
                    -->{{#ifeq: {{{StoredInCargoModule|no}}} | yes |<br/>{{variants|Unit Module}}}}<!--
                  -->| molten  = None<!--
                  -->| virtual  = [[Virtual product|Ethereal plane]]<!--
                  -->| #default = <span style="color: red;">Unknown <nowiki>{{{State}}}</nowiki>[[Category:Material redtext]]</span><!--
                -->}}<!--
                -->{{#if: {{{OtherStorage|}}} | <br/>{{{OtherStorage}}}}}<!--
              --></td><!--
            --></tr><!--
          -->}}<!--
        -->}}}}<!--
          
          
         ** Created in **
         ** Created in **
Line 91: Line 140:
             -->{{{UsedIn|}}}<!--
             -->{{{UsedIn|}}}<!--
           --></td><!--
           --></td><!--
         --></tr><!--    
         --></tr><!--
 
 
        ** Transported by **
        -->{{#if:{{{TransportedBy|}}}{{{State|}}}|<!--
          --><tr class="table-tr"><!--
            --><td class="table-td-left">Transported by</td><!--
            --><td class="table-td-right"><!--
              -->{{#if: {{{TransportedBy|}}} | {{{TransportedBy}}}[[Category:Cleanup1]] | <!--
                -->{{#switch: {{lc:{{{State|}}}}} |<!--
                  -->| loose    = {{variants|U-shape Conveyor}}<!--
                    -->{{#ifeq:{{{TrackTransport|yes}}} | no || <br/>[[Pickup]] &bull; [[Truck]] &bull; [[Haul Truck (Dump)]] }}<!--
                  -->| fluid    = {{variants|Pipe}}<!--
                    -->{{#ifeq:{{{TrackTransport|yes}}} | no || <br/>[[Pickup]] &bull; [[Truck]] &bull; [[Haul Truck (Tank)]] }}<!--
                  -->| unit    = {{variants|Flat Conveyor}}<!--
                    -->{{#ifeq:{{{TrackTransport|yes}}} | no || <br/>[[Pickup]] &bull; [[Truck]] }}<!--
                  -->| molten  = [[Molten Channel]]<!--
                  -->| virtual  = [[Virtual product|Magic]]<!--
                  -->| #default = <span style="color: red;">Unknown <nowiki>{{{State}}}</nowiki>[[Category:Material redtext]]</span><!--
                -->}}<!--
                -->{{#if: {{{OtherTransport|}}} | <br/>{{{OtherTransport}}}}}<!--
              -->}}<!--
            --></td><!--
          --></tr><!--       
        -->}}<!--
       
        ** Stored in **
        -->{{#ifeq:{{lc:{{{StoredIn|}}}}} | none || {{#if:{{{StoredIn|}}}{{{State|}}}|<!--
          --><tr class="table-tr"><!--
            --><td class="table-td-left">Stored in</td><!--
            --><td class="table-td-right"><!--
              -->{{#if: {{{StoredIn|}}} | {{{StoredIn}}}[[Category:Cleanup1]] | <!--
                -->{{#switch: {{lc:{{{State|}}}}} |<!--
                  -->| loose    = {{variants|Loose Storage}}<!--
                    -->{{#ifeq: {{{StoredInShipyard|yes}}} | no ||<br/>[[Shipyard]]}}<!--
                    -->{{#ifeq: {{{StoredInCargoModule|no}}} | yes |<br/>{{variants|Loose Module}}}}<!--
                  -->| fluid    = {{variants|Fluid Storage}}<!--
                    -->{{#ifeq: {{{StoredInShipyard|yes}}} | no ||<br/>[[Shipyard]]}}<!--
                    -->{{#ifeq: {{{StoredInCargoModule|no}}} | yes |<br/>{{variants|Fluid Module}}}}<!--
                  -->| unit    = {{variants|Unit Storage}}<!--
                    -->{{#ifeq: {{{StoredInShipyard|yes}}} | no ||<br/>[[Shipyard]]}}<!--
                    -->{{#ifeq: {{{StoredInCargoModule|no}}} | yes |<br/>{{variants|Unit Module}}}}<!--
                  -->| molten  = None<!--
                  -->| virtual  = [[Virtual product|Ethereal plane]]<!--
                  -->| #default = <span style="color: red;">Unknown <nowiki>{{{State}}}</nowiki>[[Category:Material redtext]]</span><!--
                -->}}<!--
                -->{{#if: {{{OtherStorage|}}} | <br/>{{{OtherStorage}}}}}<!--
              -->}}<!--
            --></td><!--
          --></tr><!--
        -->}}}}<!--
       
         ** Starting amount**
         ** Starting amount**
         -->{{#if:{{{StartingQty|}}}|<!--
         -->{{#if:{{{StartingQty|}}}|<!--
Line 162: Line 162:
--></div><!--
--></div><!--
--></includeonly><noinclude>
--></includeonly><noinclude>
{{Infobox material/sandbox
{{Infobox material/sandbox
| Name         = Construction Parts
  <!-- Basic arguments -->
| Description   = AAAAAAAA
  | Name               = Construction Parts
| Type1         = Crafted material
  | Image              = <!-- only if image override is needed -->
| State        = Unit
  | Description         = Foo  <!-- not currently implemented in-game -->
| Variants     = [[Construction Parts II]]<br/>[[Construction Parts III]]<br/>[[Construction Parts IV]]
  | Type1               = Crafted material
  | Type2              =
  | State               = Unit  <!-- Loose, Fluid, Unit, Molten, or Virtual -->
  | StartingQty         = Sailor: 987<br/>Captain: 654<br/>Admiral: 321
  | Variants           = [[Construction Parts II]]<br/>[[Construction Parts III]]<br/>[[Construction Parts IV]]
  | TrackTransport      = yes  <!-- Set no if tracks cannot transport the item (Default: yes). -->
 
  <!-- Arguments for storage -->
  | StoredInShipyard    = yes  <!-- Set no if the shipyard cannot store the item (Default: yes). -->
  | StoredInCargoModule = no  <!-- Set yes if cargo modules can store the item (Default: no). -->
  | OtherStorage        = <!-- to add an extra storage to auto-generated list -->
  | StoredIn            = <!-- only if storage override is needed. Set to "None" to suppress the field -->
 
  <!-- Arguments for transporting -->
  | OtherTransport      = <!-- to add an extra transport to auto-generated list -->
  | TransportedBy      = <!-- only if transport override is needed. Set to "None" to suppress the field -->
 
  <!-- Arguments for buildings which create/use this item -->
  | CreatedIn          = <!-- to add an extra buildings to auto-generated list -->
  | UsedIn              = <!-- to add an extra buildings to auto-generated list -->
}}
}}
Example usage:<pre>
{{Infobox material/sandbox
{{Infobox material/sandbox
| Name         = Wood
  <!-- Basic arguments -->
| State         = Unit
  | Name               = Construction Parts
| StoredInCargoDock = yes
  | Image              = <!-- only if image override is needed -->
| Type1        = Natural resource
  | Description         = Foo  <!-- not currently implemented in-game -->
| CreatedIn    = [[Tree Harvesting]]<br>[[Sawmill]]
  | Type1              = Crafted material
| UsedIn        = [[Coal Maker]]<br/>[[Assembly (Manual)]]<br/>[[Assembly (Electric)]]<br/>[[Assembly (Electric) II]]
  | Type2              =
  | State              = Unit  <!-- Loose, Fluid, Unit, Molten, or Virtual -->
  | StartingQty        = Sailor: 987<br/>Captain: 654<br/>Admiral: 321
  | Variants            = [[Construction Parts II]]<br/>[[Construction Parts III]]<br/>[[Construction Parts IV]]
  | TrackTransport      = yes  <!-- Set no if tracks cannot transport the item (Default: yes). -->
 
  <!-- Arguments for storage -->
  | StoredInShipyard    = yes  <!-- Set no if the shipyard cannot store the item (Default: yes). -->
  | StoredInCargoModule = no
  | OtherStorage        = <!-- to add an extra storage to auto-generated list -->
  | StoredIn            = <!-- only if storage override is needed. Set to "None" to suppress the field -->
 
  <!-- Arguments for transporting -->
  | OtherTransport      = <!-- to add an extra transport to auto-generated list -->
  | TransportedBy      = <!-- only if transport override is needed. Set to "None" to suppress the field -->
 
  <!-- Arguments for buildings which create/use this item -->
  | CreatedIn          = <!-- to add an extra buildings to auto-generated list -->
  | UsedIn              = <!-- to add an extra buildings to auto-generated list -->
}}
}}
</pre>
{{Infobox material/sandbox
{{Infobox material/sandbox
| Name         = Air Pollution
  <!-- Basic arguments -->
| Type1        = Pollution
  | Name               = Not Water
| State         = Virtual
  | Image              = Water.png
  | State               = Fluid
  | TrackTransport      = yes
  | StoredIn            = none
 
  <!-- Arguments for storage -->
  | StoredInShipyard    = no
  | StoredInCargoModule = yes
  | OtherStorage        = SSS
 
  <!-- Arguments for transporting -->
  | OtherTransport      = TTT
  | CreatedIn          = CCC
  | UsedIn              = UUU
}}
}}
{{Infobox material/sandbox
{{Infobox material/sandbox
| Name         = Steam (High)
  <!-- Basic arguments -->
| Type1        = Crafted material
  | Name               = Steam (High)
| State         = Fluid
  | State               = Fluid
| CreatedIn    = Assembler (Manual)
  | TrackTransport     = no
| TrackTransport = no
  | StoredIn           = none
| StoredIn     = None
| Variants      = [[Steam (Super)]]<br>[[Steam Lo]]<br>[[Steam Depleted]]
}}
}}
{{Infobox material/sandbox
{{Infobox material/sandbox
| Name         = Wood
  <!-- Basic arguments -->
| Image        = Water.png
  | Name               = Steam (High)
| State        = Unit
  | State              = Fluid
  | TransportedBy      = TXX
  | StoredIn            = none
}}
}}
{{Infobox material/sandbox
{{Infobox material/sandbox
| Name         =
  <!-- Basic arguments -->
| State         = Unit
  | Name               = Iron Ore
  | State               = Loose
  | CreatedIn          = Excavator
}}
}}
aa
{{Infobox material/sandbox
{{#vardefine: ingred | Coal }}
   <!-- Basic arguments -->
{{#cargo_query: tables=recipes
   | Name                =  
   | fields = Building
   | State              = Loose
  | where = Building != "" AND Building IS NOT NULL AND
        (  Input1Name = "{{#var:ingred}}" OR Input2Name = "{{#var:ingred}}" OR Input3Name = "{{#var:ingred}}"
        OR Input4Name = "{{#var:ingred}}" OR Input5Name = "{{#var:ingred}}" OR Input6Name = "{{#var:ingred}}")
  | group by = Building
  | format = template
  | template = {{{template|Format link}}}
   | delimiter = </br>
   | default = None
}}
}}
bb
</noinclude>

Revision as of 09:06, 19 May 2023


Example usage:

{{Infobox material/sandbox
  <!-- Basic arguments -->
  | Name                = Construction Parts
  | Image               = <!-- only if image override is needed -->
  | Description         = Foo  <!-- not currently implemented in-game -->
  | Type1               = Crafted material
  | Type2               =
  | State               = Unit  <!-- Loose, Fluid, Unit, Molten, or Virtual -->
  | StartingQty         = Sailor: 987<br/>Captain: 654<br/>Admiral: 321
  | Variants            = [[Construction Parts II]]<br/>[[Construction Parts III]]<br/>[[Construction Parts IV]]
  | TrackTransport      = yes  <!-- Set no if tracks cannot transport the item (Default: yes). -->

  <!-- Arguments for storage -->
  | StoredInShipyard    = yes  <!-- Set no if the shipyard cannot store the item (Default: yes). -->
  | StoredInCargoModule = no
  | OtherStorage        = <!-- to add an extra storage to auto-generated list -->
  | StoredIn            = <!-- only if storage override is needed. Set to "None" to suppress the field -->

  <!-- Arguments for transporting -->
  | OtherTransport      = <!-- to add an extra transport to auto-generated list -->
  | TransportedBy       = <!-- only if transport override is needed. Set to "None" to suppress the field -->

  <!-- Arguments for buildings which create/use this item -->
  | CreatedIn           = <!-- to add an extra buildings to auto-generated list -->
  | UsedIn              = <!-- to add an extra buildings to auto-generated list -->
}}
Not Water
Water.png
StateFluid
Transported byPipe [IIIII]
PickupTruckHaul Truck (Tank)
TTT
Stored inNone
Created inCCC
Used inUUU
Iron Ore
Iron Ore.png
Unknown Material
StateLoose
Transported byU-shape Conveyor [IIIII]
PickupTruckHaul Truck (Dump)
Stored inLoose Storage [IIIIIIV]
Shipyard
Created inNone
Used inNone