Difference between revisions of "Template:Infobox machine"
From Captain of Industry Wiki
m |
m (Rename some categories) |
||
(12 intermediate revisions by 3 users not shown) | |||
Line 2: | Line 2: | ||
--><div class="infobox-wrapper"><!-- | --><div class="infobox-wrapper"><!-- | ||
--><div class="outer-box"><!-- | --><div class="outer-box"><!-- | ||
** Header: designation image, name of machine, tier ** | |||
--><div class="inner-header"><!-- | --><div class="inner-header"><!-- | ||
--><div class="designation"><!-- | --><div class="designation"><!-- | ||
Line 13: | Line 14: | ||
--></div><!-- | --></div><!-- | ||
--><div class="title"><!-- | --><div class="title"><!-- | ||
-->{{#if: {{{Name|}}} | {{#vardefineecho:info_bldg|{{{Name}}}}}{{#vardefine:hidebldg|yes}} | Unknown Machine }}<!-- | -->{{#if: {{{Name|}}}<!-- | ||
-->| {{#vardefineecho:info_bldg|{{{Name}}}}}<!-- | |||
-->{{#vardefine:hidebldg|yes}}<!-- | |||
** This variable is used in footer template ** | |||
-->{{#vardefine:game_object_type|building}}<!-- | |||
-->| Unknown Machine }}<!-- | |||
--></div><!-- | --></div><!-- | ||
--><div class="tier"><!-- | --><div class="tier"><!-- | ||
Line 19: | Line 25: | ||
--></div><!-- | --></div><!-- | ||
--></div><!-- | --></div><!-- | ||
** Image of machine ** | |||
--><div class="inner-main"><!-- | --><div class="inner-main"><!-- | ||
-->[[File:{{#if: {{{Image|}}} | {{{Image}}} | {{#if: {{{Name|}}} | {{{Name}}} | Placeholder machine}}.png}}]]<br/><!-- | -->[[File:{{#if: {{{Image|}}} | {{{Image}}} | {{#if: {{{Name|}}} | {{{Name}}} | Placeholder machine}}.png}}]]<br/><!-- | ||
-->{{#if: {{{Description|}}} | <!-- | -->{{#if: {{{Description|}}} | {{#ifeq: {{lc:{{{Description}}}}} | none | |<!-- | ||
--><div class="description">{{{Description}}}</div> |<!-- | --><div class="description">{{{Description}}}</div> |<!-- | ||
-->{{#if: {{NAMESPACE}} || {{#ifeq: {{lc:{{{Designation|}}}}} | transports || [[Category:Machine articles missing descriptions]] }} }}<!-- | -->{{#if: {{NAMESPACE}} || {{#ifeq: {{lc:{{{Designation|}}}}} | transports || [[Category:Machine articles missing descriptions]] }} }}<!-- | ||
-->}}<!-- | -->}}}}<!-- | ||
--></div><!-- | --></div><!-- | ||
--><div class="inner-table"><!-- | --><div class="inner-table"><!-- | ||
--><div class="inner-inner-table"><!-- | --><div class="inner-inner-table"><!-- | ||
--><table class="table"><!-- | --><table class="table"><!-- | ||
** Recipe for constructing building ** | |||
-->{{#if:{{{Recipe|}}}|<!-- | -->{{#if:{{{Recipe|}}}|<!-- | ||
--><tr class="table-tr"><!-- | --><tr class="table-tr"><!-- | ||
Line 34: | Line 46: | ||
--><td class="table-td-right">{{{Recipe}}}</td><!-- | --><td class="table-td-right">{{{Recipe}}}</td><!-- | ||
--></tr>}}<!-- | --></tr>}}<!-- | ||
** Worker, Electricity, Computing, Unity ** | |||
-->{{#if:{{{Workers|}}}|<!-- | -->{{#if:{{{Workers|}}}|<!-- | ||
--><tr class="table-tr"><!-- | --><tr class="table-tr"><!-- | ||
Line 75: | Line 90: | ||
--></tr><!-- | --></tr><!-- | ||
-->}}<!-- | -->}}<!-- | ||
** Research speed for Lab | |||
-->{{#if:{{{ResearchSpeed|}}}|<!-- | |||
--><tr class="table-tr"><!-- | |||
--><td class="table-td-left">Research Speed</td><!-- | |||
--><td class="table-td-right">{{#expr:trunc({{{ResearchSpeed}}})}}.{{#expr:(({{{ResearchSpeed}}})*10) mod 10}} {{Time}}</td><!-- | |||
--></tr><!-- | |||
-->}}<!-- | |||
** Maintenance ** | |||
-->{{#if:{{{Maintenance|}}}|<!-- | -->{{#if:{{{Maintenance|}}}|<!-- | ||
--><tr class="table-tr"><!-- | --><tr class="table-tr"><!-- | ||
Line 85: | Line 110: | ||
** Note, this is a hacky way to get around the Mediawiki ParserFunctions's limitation of being unable to format numbers as fixed-length floats ** | ** Note, this is a hacky way to get around the Mediawiki ParserFunctions's limitation of being unable to format numbers as fixed-length floats ** | ||
--> / 60 [[File:Clock.png|link=Time|16x16px]]<!-- | --> / 60 [[File:Clock.png|link=Time|16x16px]]<!-- | ||
-->{{#if: {{NAMESPACE}} || [[Category: Buildings requesting Maintenance I]]}}<!-- | |||
-->}}<!-- | -->}}<!-- | ||
--></td><!-- | --></td><!-- | ||
Line 99: | Line 125: | ||
** Note, this is a hacky way to get around the Mediawiki ParserFunctions's limitation of being unable to format numbers as fixed-length floats ** | ** Note, this is a hacky way to get around the Mediawiki ParserFunctions's limitation of being unable to format numbers as fixed-length floats ** | ||
--> / 60 [[File:Clock.png|link=Time|16x16px]]<!-- | --> / 60 [[File:Clock.png|link=Time|16x16px]]<!-- | ||
-->{{#if: {{NAMESPACE}} || [[Category: Buildings requesting Maintenance II]]}}<!-- | |||
-->}}<!-- | -->}}<!-- | ||
--></td><!-- | --></td><!-- | ||
Line 113: | Line 140: | ||
** Note, this is a hacky way to get around the Mediawiki ParserFunctions's limitation of being unable to format numbers as fixed-length floats ** | ** Note, this is a hacky way to get around the Mediawiki ParserFunctions's limitation of being unable to format numbers as fixed-length floats ** | ||
--> / 60 [[File:Clock.png|link=Time|16x16px]]<!-- | --> / 60 [[File:Clock.png|link=Time|16x16px]]<!-- | ||
-->{{#if: {{NAMESPACE}} || [[Category: Buildings requesting Maintenance III]]}}<!-- | |||
-->}}<!-- | -->}}<!-- | ||
--></td><!-- | --></td><!-- | ||
Line 118: | Line 146: | ||
-->}}<!-- | -->}}<!-- | ||
-->{{#if: {{{Maintenance}}}{{{MaintenanceII}}}{{{MaintenanceIII}}} || {{#if: {{NAMESPACE}} || {{#ifeq: {{lc:{{{Designation|}}}}} | transports || [[Category:Machine articles missing maintenance]] }} }} }}<!-- | -->{{#if: {{{Maintenance}}}{{{MaintenanceII}}}{{{MaintenanceIII}}} || {{#if: {{NAMESPACE}} || {{#ifeq: {{lc:{{{Designation|}}}}} | transports || [[Category:Machine articles missing maintenance]] }} }} }}<!-- | ||
** Footprint ** | |||
-->{{#if:{{{Footprint|}}}|<!-- | -->{{#if:{{{Footprint|}}}|<!-- | ||
--><tr class="table-tr"><!-- | --><tr class="table-tr"><!-- | ||
--><td class="table-td-left">Footprint</td><!-- | --><td class="table-td-left">Footprint</td><!-- | ||
--><td class="table-td-right">{{{Footprint}}}</td><!-- | --><td class="table-td-right">{{{Footprint}}}</td><!-- | ||
-->{{#if: {{NAMESPACE}} || {{#ifeq: {{{Footprint}}} | ? | [[Category:Machine articles missing footprint]] }} }}<!-- | |||
--></tr>|<!-- | --></tr>|<!-- | ||
-->{{#if: {{NAMESPACE}} || {{#ifeq: {{lc:{{{Designation|}}}}} | transports || [[Category:Machine articles missing footprint]] }} }}<!-- | -->{{#if: {{NAMESPACE}} || {{#ifeq: {{lc:{{{Designation|}}}}} | transports || [[Category:Machine articles missing footprint]] }} }}<!-- | ||
-->}}<!-- | -->}}<!-- | ||
** Parameters for storage ** | |||
-->{{#if:{{{Cargo|}}}|<!-- | -->{{#if:{{{Cargo|}}}|<!-- | ||
--><tr class="table-tr"><!-- | --><tr class="table-tr"><!-- | ||
Line 139: | Line 172: | ||
--><td class="table-td-left">Throughput</td><!-- | --><td class="table-td-left">Throughput</td><!-- | ||
--><td class="table-td-right">{{{Throughput}}} / 60 [[File:Clock.png|link=Time|16x16px]]</td><!-- | --><td class="table-td-right">{{{Throughput}}} / 60 [[File:Clock.png|link=Time|16x16px]]</td><!-- | ||
--></tr>}}<!-- | --></tr>}}<!-- | ||
** Required technology ** | |||
-->{{#if:{{{Research|}}}|<!-- | -->{{#if:{{{Research|}}}|<!-- | ||
--><tr class="table-tr"><!-- | --><tr class="table-tr"><!-- | ||
--><td class="table-td-left">Required Research</td><!-- | --><td class="table-td-left">Required Research</td><!-- | ||
--><td class="table-td-right"><!-- | --><td class="table-td-right"><!-- | ||
-->{{#ifeq: {{lc:{{{Research}}}}} | none | None | | -->{{#ifeq: {{lc:{{{Research}}}}} | none | None | {{ResearchLink|{{{Research}}}}} }}<!-- | ||
-->{{#if:{{{Research2|}}} | <br/>''or'' | -->{{#if:{{{Research2|}}} | <br/>''or'' {{ResearchLink|{{{Research2}}}}} }}<!-- | ||
-->{{#if:{{{Research3|}}} | <br/>''or'' | -->{{#if:{{{Research3|}}} | <br/>''or'' {{ResearchLink|{{{Research3}}}}} }}<!-- | ||
--></td><!-- | --></td><!-- | ||
--></tr> | [[Category:Machine articles missing research]] }}<!-- | --></tr> | [[Category:Machine articles missing research]] }}<!-- | ||
-->{{#if:{{{BoostByUnity|}}}|<!-- | |||
--><tr class="table-tr"><!-- | |||
--><td class="table-td-left">Boost by Unity</td><!-- | |||
--><td class="table-td-right"><!-- | |||
-->{{ #ifeq: {{{BoostByUnity}}} | yes <!-- | |||
--> | Available {{#if: {{NAMESPACE}} || [[Category:Boostable Buildings]]}} | <!-- | |||
--> {{ #ifeq: {{{BoostByUnity}}} | no <!-- | |||
--> | Not Available {{#if: {{NAMESPACE}} || [[Category:Unboostable Buildings]]}} <!-- | |||
--> | <font color="red">'''ERROR: Input "yes" or "no"'''</font> <!-- | |||
-->}}<!-- | |||
-->}}<!-- | |||
--></td><!-- | |||
--></tr>}}<!-- | |||
** Designation and variants ** | |||
-->{{#if:{{{Designation|}}}|<!-- | -->{{#if:{{{Designation|}}}|<!-- | ||
--><tr class="table-tr"><!-- | --><tr class="table-tr"><!-- |
Latest revision as of 01:23, 31 May 2023
Template documentation (for the above template, sometimes hidden or invisible) [view] [edit] [history] [refresh]
Construction | |
Workers | 10 |
Electricity | 20 KW |
Unity | +1.00 /month |
Maintenance | 5.0 / 60 |
Footprint | 6x4 |
Cargo | Water |
Storage | 5000 |
Required Research | Cement Production or Basic Desalination |
Boost by Unity | Available |
Designation | General Machines |
Variants | Blast Furnace II |
{{Infobox machine | Name = Groundwater Pump | Tier = 1 | Image = | Description = In-game building description goes here. The template will handle even very long text gracefully. | Recipe = {{Machine Recipe | Input1Name = Construction Parts | Input1Qty = 12 | Input2Name = Iron | Input2Qty = 12 }} | Workers = 10 | Electricity = 20 KW | Maintenance = 5 | Footprint = 6x4 | Research = Cement Production <!-- What tech is required for this building to be unlocked --> | Research2 = Basic Desalination <!-- Accepts at most 3 researches --> | Cargo = [[Water]] | Storage = 5000 | BoostByUnity = yes | Designation = General Machines | DesigImgOverride = Fuel Gas.png <!-- only used if needed to override the automatic image --> | Variants = [[Blast Furnace II]] }}
Blank template:
{{Infobox machine | Name = | Tier = | Image = | Description = | Recipe = {{Machine Recipe | Input1Name = | Input1Qty = | Input2Name = | Input2Qty = }} | Workers = | Electricity = | Maintenance = | ResearchSpeed = | Footprint = | Research = | Research2 = | Research3 = | Cargo = | Storage = | BoostByUnity = | Designation = | DesigImgOverride = <!-- only used if needed to override the automatic image --> | Variants = }}
The above text is transcluded from Template:Infobox machine/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 machine/doc. (View all subpages of this page.)
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 machine/doc. (View all subpages of this page.)