Difference between revisions of "Template:Infobox material/sandbox"
From Captain of Industry Wiki
(Automate "Created in" and "Used in") |
|||
(6 intermediate revisions by the same user not shown) | |||
Line 17: | Line 17: | ||
** Image and Description ** | ** Image and Description ** | ||
--><div class="inner-main"><!-- | --><div class="inner-main"><!-- | ||
-->[[File:{{#if: {{{Image|}}} | {{{Image}}} | {{#if: {{{Name|}}} | {{{Name}}} | Placeholder material}}.png}}]]<br | -->[[File:{{#if: {{{Image|}}} | {{{Image}}} | {{#if: {{{Name|}}} | {{{Name}}} | Placeholder material}}.png}}]]<br><!-- | ||
-->{{#if: {{{Description|}}} | <!-- | -->{{#if: {{{Description|}}} | <!-- | ||
--><div class="description">{{{Description}}}</div><!-- | --><div class="description">{{{Description}}}</div><!-- | ||
Line 32: | Line 32: | ||
--><tr class="table-tr"><!-- | --><tr class="table-tr"><!-- | ||
--><td class="table-td-left">Type</td><!-- | --><td class="table-td-left">Type</td><!-- | ||
--><td class="table-td-right">{{{Type1}}}{{#if:{{NAMESPACE}}||[[Category:{{{Type1}}}{{#switch:{{lc:{{{Type1}}}}}|food|pollution=|s}}]]}}<!-- | --><td class="table-td-right"><!-- | ||
-->{{{Type1}}}{{#if:{{NAMESPACE}}||[[Category:{{{Type1}}}{{#switch:{{lc:{{{Type1}}}}}|food|pollution=|s}}]]}}<!-- | |||
--></tr>}}<!-- | -->{{#if: {{{Type2|}}} | <br>{{{Type2|}}}{{#if:{{NAMESPACE}}||[[Category:{{{Type2}}}{{#switch:{{lc:{{{Type2}}}}}|food|pollution=|s}}]]}}}}<!-- | ||
--></td><!-- | |||
--></tr><!-- | |||
-->}}<!-- | |||
** State ** | ** State ** | ||
-->{{#if:{{{State|}}}|<!-- | -->{{#if: {{{State|}}} |<!-- | ||
--><tr class="table-tr"><!-- | --><tr class="table-tr"><!-- | ||
--><td class="table-td-left">State</td><!-- | --><td class="table-td-left">State</td><!-- | ||
--><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]]<!-- | |||
-->}}<!-- | |||
** Radiation Level** | |||
-->{{#ifeq: {{{Radiation|0}}} | 0 ||<!-- | |||
--><tr class="table-tr"><!-- | |||
--><td class="table-td-left">Radiation Level</td><!-- | |||
--><td class="table-td-right">{{{Radiation}}}</td><!-- | |||
--></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}}}{{#if: {{NAMESPACE}} || [[Category:Cleanup1]] }} |<!-- | |||
-->{{#switch: {{lc:{{{State|}}}}} |<!-- | |||
-->| loose = {{variants|U-shape Conveyor}}<!-- | |||
-->{{#ifeq:{{{TrackTransport|yes}}} | no || <br>[[Pickup]]•[[Truck]]<br>[[Haul Truck (Dump)]] }}<!-- | |||
-->| fluid = {{variants|Pipe}}<!-- | |||
-->{{#ifeq:{{{TrackTransport|yes}}} | no || <br>[[Pickup]]•[[Truck]]<br>[[Haul Truck (Tank)]] }}<!-- | |||
-->| unit = {{variants|Flat Conveyor}}<!-- | |||
-->{{#ifeq:{{{TrackTransport|yes}}} | no || <br>[[Pickup]]•[[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 {{#if: {{NAMESPACE}} || [[Category:Unstorable items]] }} |<!-- | |||
-->{{#if:{{{StoredIn|}}}{{{State|}}}|<!-- | |||
-->{{#if: {{{StoredIn|}}} |<!-- | |||
-->{{{StoredIn}}}{{#if: {{NAMESPACE}} || [[Category:Cleanup1]] }} |<!-- | |||
-->{{#switch: {{lc:{{{State|}}}}} |<!-- | |||
-->| loose = {{variants|Loose Storage}}<!-- | |||
-->{{#ifeq: {{{StoredInShipyard|yes}}} | no ||<br>[[Shipyard]]}}<!-- | |||
-->{{#ifeq: {{{StoredInCargoModules|no}}} | yes |<br>{{variants|Loose Module}}}}<!-- | |||
-->| fluid = {{variants|Fluid Storage}}<!-- | |||
-->{{#ifeq: {{{StoredInShipyard|yes}}} | no ||<br>[[Shipyard]]}}<!-- | |||
-->{{#ifeq: {{{StoredInCargoModules|no}}} | yes |<br>{{variants|Fluid Module}}}}<!-- | |||
-->| unit = {{variants|Unit Storage}}<!-- | |||
-->{{#ifeq: {{{StoredInShipyard|yes}}} | no ||<br>[[Shipyard]]}}<!-- | |||
-->{{#ifeq: {{{StoredInCargoModules|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 54: | Line 120: | ||
| format = template | | format = template | ||
| template = {{{template|Format link}}} | | template = {{{template|Format link}}} | ||
| delimiter = <br> | | delimiter = <br> | ||
| default = {{#if:{{{CreatedIn|}}} || None }} | | default = {{#if:{{{CreatedIn|}}} || None }} | ||
Line 79: | Line 144: | ||
| format = template | | format = template | ||
| template = {{{template|Format link}}} | | template = {{{template|Format link}}} | ||
| delimiter = <br> | | delimiter = <br> | ||
| default = {{#if:{{{UsedIn|}}} || None }} | | default = {{#if:{{{UsedIn|}}} || None }} | ||
Line 91: | Line 155: | ||
-->{{{UsedIn|}}}<!-- | -->{{{UsedIn|}}}<!-- | ||
--></td><!-- | --></td><!-- | ||
--></tr><!-- | --></tr><!-- | ||
** Starting amount** | ** Starting amount** | ||
-->{{#if:{{{StartingQty|}}}|<!-- | -->{{#if:{{{StartingQty|}}}|<!-- | ||
Line 163: | Line 178: | ||
--></includeonly><noinclude> | --></includeonly><noinclude> | ||
{{Infobox material/sandbox | {{Infobox material/sandbox | ||
| Name | | Name = Construction Parts | ||
| Type1 = Crafted material | |||
| Type1 | | State = Unit | ||
| State | | StartingQty = Sailor: 987<br>Captain: 654<br>Admiral: 321 | ||
| Variants | | Variants = [[Construction Parts II]]<br>[[Construction Parts III]]<br>[[Construction Parts IV]] | ||
}} | }} | ||
{{Infobox material/sandbox | |||
| Name = | The template accepts the following parameters: | ||
| State | ;Basic parameters | ||
| | :*<code>Name</code>: Name of items. | ||
:*<code>Type1</code>, <code>Type2</code>: Types of items. It is used to categorize item in this wiki. | |||
| | :*<code>State</code>: Loose, Fluid, Unit, Molten, or Virtual. | ||
| | :*<code>Variants</code>: 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. | |||
:*<code>TrackTransport</code>: Set no if tracks cannot transport the item (Default: yes). | |||
:*<code>TransportedBy</code>(rare): Only if transport override is needed. | |||
:*<code>OtherTransport</code>(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. | |||
:*<code>StoredInShipyard</code>: Set no if the shipyard cannot store the items (Default: yes). | |||
:*<code>StoredInCargoModules</code>: Set yes if cargo modules can store the items (Default: no). | |||
:*<code>StoredIn</code>: Only if storage override is needed. Set to "None" to suppress the field. | |||
:*<code>OtherStorage</code>(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. | |||
:*<code>CreatedIn</code>: To add an extra buildings to auto-generated list. | |||
:*<code>UsedIn</code>: To add an extra buildings to auto-generated list. | |||
;Miscellaneous parameters | |||
:*<code>Radiation</code>: Radiation Level of the items. | |||
:*<code>StartingQty</code>: The number of the items stored in the [[Shipyard]] on game start. | |||
:*<code>Image</code> (rare): Only if image override is needed. | |||
:*<code>Description</code> (rare): To add an in-game description, though not currently implemented in-game. | |||
== Examples == | |||
;Example usage for standard item | |||
{{markup|<nowiki> | |||
{{Infobox material/sandbox | |||
| Name = Electronics III | |||
| Type1 = Crafted material | |||
| State = Unit | |||
| StartingQty = Sailor: 987<br>Captain: 654<br>Admiral: 321 | |||
| Variants = [[Electronics]]<br>[[Electronics II]] | |||
}} </nowiki> | | |||
{{Infobox material/sandbox | |||
| Name = Electronics III | |||
| Type1 = Crafted material | |||
| State = Unit | |||
| StartingQty = Sailor: 987<br>Captain: 654<br>Admiral: 321 | |||
| Variants = [[Electronics]]<br>[[Electronics II]] | |||
}} | |||
}} | |||
;Example usage for items that tracks cannot transport or storage cannot store | |||
{{markup|<nowiki> | |||
{{Infobox material/sandbox | |||
| Name = Chilled Water | |||
| State = Fluid | |||
| TrackTransport = no | |||
| StoredIn = none | |||
}} </nowiki> | | |||
{{Infobox material/sandbox | |||
| Name = Chilled Water | |||
| State = Fluid | |||
| TrackTransport = no | |||
| StoredIn = none | |||
}} | |||
}} | }} | ||
{{Infobox material/sandbox | ;Example usage for items that the shipyard cannot store | ||
| Name | {{markup|<nowiki> | ||
| Type1 | {{Infobox material/sandbox | ||
| State | | Name = Seawater | ||
| Type1 = Natural resource | |||
| State = Fluid | |||
| StoredInShipyard = no | |||
}} </nowiki> | | |||
{{Infobox material/sandbox | |||
| Name = Seawater | |||
| Type1 = Natural resource | |||
| State = Fluid | |||
| StoredInShipyard = no | |||
}} | |||
}} | }} | ||
{{Infobox material/sandbox | ;Example usage for items having Radiation Level | ||
| Name | {{markup|<nowiki> | ||
| Type1 | {{Infobox material/sandbox | ||
| State | | Name = Spent Fuel | ||
| | | Type1 = Radioactive waste | ||
| | | Radiation = 2 | ||
| | | State = Unit | ||
| | }} </nowiki> | | ||
{{Infobox material/sandbox | |||
| Name = Spent Fuel | |||
| Type1 = Radioactive waste | |||
| Radiation = 2 | |||
| State = Unit | |||
}} | |||
}} | }} | ||
{{Infobox material/sandbox | ;Example usage for items stored in special storage | ||
| Name | {{markup|<nowiki> | ||
| | {{Infobox material/sandbox | ||
| State = | | Name = Spent Fuel | ||
| Type1 = Radioactive waste | |||
| State = Unit | |||
| StoredIn = [[Radioactive Waste Storage]] | |||
}} </nowiki> | | |||
{{Infobox material/sandbox | |||
| Name = Spent Fuel | |||
| Type1 = Radioactive waste | |||
| State = Unit | |||
| StoredIn = [[Radioactive Waste Storage]] | |||
}} | |||
}} | }} | ||
{{Infobox material/sandbox | ;Example usage for items stored in cargo modules | ||
| Name | {{markup|<nowiki> | ||
| State | {{Infobox material/sandbox | ||
| Name = Uranium Ore | |||
| Type1 = Natural resources | |||
| State = Loose | |||
| StoredInCargoModules = yes | |||
}} </nowiki> | | |||
{{Infobox material/sandbox | |||
| Name = Uranium Ore | |||
| Type1 = Natural resources | |||
| State = Loose | |||
| StoredInCargoModules = yes | |||
}} | |||
}} | }} | ||
;Example usage for items created/used in non-production-machines | |||
{{ | {{markup|<nowiki> | ||
{{ | {{Infobox material/sandbox | ||
| Name = Coal | |||
| Type1 = Natural resources | |||
| State = Loose | |||
| CreatedIn = [[Coal Mine]] | |||
| UsedIn = Foo | |||
}} </nowiki> | | |||
{{Infobox material/sandbox | |||
| Name = Coal | |||
| Type1 = Natural resources | |||
| State = Loose | |||
| CreatedIn = [[Coal Mine]] | |||
| UsedIn = Foo | |||
}} | |||
}} | }} | ||
Latest revision as of 08:10, 20 May 2023
Construction Parts
Type | Crafted material |
State | Unit |
Transported by | Flat Conveyor [II•III] Pickup•Truck |
Stored in | Unit Storage [II•III•IV] Shipyard |
Created in | Assembly (Electric) Assembly (Electric) II Assembly (Manual) Assembly (Robotic) |
Used in | Assembly (Electric) Assembly (Electric) II Assembly (Manual) Assembly (Robotic) |
Starting amount | Sailor: 987 Captain: 654 Admiral: 321 |
Variants | Construction Parts II Construction Parts III Construction Parts IV |
The template accepts the following parameters:
- Basic parameters
-
Name
: Name of items.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.
Examples
- Example usage for standard item
Markup | Renders as | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{Infobox material/sandbox | Name = Electronics III | Type1 = Crafted material | State = Unit | StartingQty = Sailor: 987<br>Captain: 654<br>Admiral: 321 | Variants = [[Electronics]]<br>[[Electronics II]] }} |
Electronics III
| ||||||||||||||||
- Example usage for items that tracks cannot transport or storage cannot store
Markup | Renders as |
---|---|
{{Infobox material/sandbox | Name = Chilled Water | State = Fluid | TrackTransport = no | StoredIn = none }} |
|
- Example usage for items that the shipyard cannot store
Markup | Renders as | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{Infobox material/sandbox | Name = Seawater | Type1 = Natural resource | State = Fluid | StoredInShipyard = no }} |
Seawater
| ||||||||||||
- Example usage for items having Radiation Level
Markup | Renders as | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{Infobox material/sandbox | Name = Spent Fuel | Type1 = Radioactive waste | Radiation = 2 | State = Unit }} |
Spent Fuel
| ||||||||||||||
- Example usage for items stored in special storage
Markup | Renders as | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{Infobox material/sandbox | Name = Spent Fuel | Type1 = Radioactive waste | State = Unit | StoredIn = [[Radioactive Waste Storage]] }} |
Spent Fuel
| ||||||||||||
- Example usage for items stored in cargo modules
Markup | Renders as | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{Infobox material/sandbox | Name = Uranium Ore | Type1 = Natural resources | State = Loose | StoredInCargoModules = yes }} |
Uranium Ore
| ||||||||||||
- Example usage for items created/used in non-production-machines
Markup | Renders as | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{Infobox material/sandbox | Name = Coal | Type1 = Natural resources | State = Loose | CreatedIn = [[Coal Mine]] | UsedIn = Foo }} |
Coal
| ||||||||||||