Template:Infobox machine: Difference between revisions
From Captain of Industry Wiki
Thadius856 (talk | contribs) m missed a line |
Thadius856 (talk | contribs) Add capability for 2nd or 3rd research parameters (I've seen multiple unlock paths for some machines in the tech tree), add capability to specify Maintenance II requirements, move worker/electricity/maintenance images to before the values to match the in-game UI, link all three of the above to articles, add links to all three of the above images plus the clock to Time, auto-link research |
||
| Line 34: | Line 34: | ||
-->{{#if:{{{Workers|}}}|<!-- | -->{{#if:{{{Workers|}}}|<!-- | ||
--><tr class="table-tr"><!-- | --><tr class="table-tr"><!-- | ||
--><td class="table-td-left">Workers</td><!-- | --><td class="table-td-left">[[Workers]]</td><!-- | ||
--><td class="table-td-right"><!-- | --><td class="table-td-right"><!-- | ||
-->{{#ifeq: {{lc:{{{Workers}}}}} | none | <!-- | -->{{#ifeq: {{lc:{{{Workers}}}}} | none | <!-- | ||
-->None|<!-- | -->None|<!-- | ||
--> | -->[[File:Worker.png|link=Workers|16x16px]] {{{Workers}}}<!-- | ||
-->}}<!-- | -->}}<!-- | ||
--></td><!-- | --></td><!-- | ||
| Line 46: | Line 46: | ||
-->{{#if:{{{Electricity|}}}|<!-- | -->{{#if:{{{Electricity|}}}|<!-- | ||
--><tr class="table-tr"><!-- | --><tr class="table-tr"><!-- | ||
--><td class="table-td-left">Electricity</td><!-- | --><td class="table-td-left">[[Electricity]]</td><!-- | ||
--><td class="table-td-right"><!-- | --><td class="table-td-right"><!-- | ||
-->{{#ifeq: {{lc:{{{Electricity}}}}} | none | <!-- | -->{{#ifeq: {{lc:{{{Electricity}}}}} | none | <!-- | ||
-->None | <!-- | -->None | <!-- | ||
--> | -->[[File:Electricity.png|link=Electricity|16x16px]] {{{Electricity}}}<!-- | ||
-->}}<!-- | -->}}<!-- | ||
--></td><!-- | --></td><!-- | ||
| Line 58: | Line 58: | ||
-->{{#if:{{{Maintenance|}}}|<!-- | -->{{#if:{{{Maintenance|}}}|<!-- | ||
--><tr class="table-tr"><!-- | --><tr class="table-tr"><!-- | ||
--><td class="table-td-left">Maintenance</td><!-- | --><td class="table-td-left">[[Maintenance]]</td><!-- | ||
--><td class="table-td-right"><!-- | --><td class="table-td-right"><!-- | ||
-->{{#ifeq: {{lc:{{{Maintenance}}}}} | none | <!-- | -->{{#ifeq: {{lc:{{{Maintenance}}}}} | none | <!-- | ||
-->None | <!-- | -->None | <!-- | ||
-->{{{Maintenance}}} / 60 [[File:Clock.png|link=|16x16px]]<!-- | -->[[File:Maintenance I.png|link=Maintenance I|16x16px]] <!-- | ||
-->{{#expr:trunc({{{Maintenance}}})}}.{{#expr:(({{{Maintenance}}})*10) mod 10}}<!-- | |||
** 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]]<!-- | |||
-->}}<!-- | |||
--></td><!-- | |||
--></tr>|<!-- | |||
-->{{#if:{{{MaintenanceII|}}}|<!-- | |||
--><tr class="table-tr"><!-- | |||
--><td class="table-td-left">[[Maintenance]]</td><!-- | |||
--><td class="table-td-right"><!-- | |||
-->[[File:Maintenance II.png|link=Maintenance I|16x16px]] <!-- | |||
-->{{#expr:trunc({{{MaintenanceII}}})}}.{{#expr:(({{{MaintenanceII}}})*10) mod 10}}<!-- | |||
** 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]]<!-- | |||
-->}}<!-- | -->}}<!-- | ||
--></td><!-- | --></td><!-- | ||
| Line 88: | Line 102: | ||
--><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">{{{Research}}}</td><!-- | --><td class="table-td-right"><!-- | ||
-->[[{{{Research}}}]]<!-- | |||
-->{{#if:{{{Research2|}}} | <br/>''or'' [[{{{Research2}}}]] }}<!-- | |||
-->{{#if:{{{Research3|}}} | <br/>''or'' [[{{{Research3}}}]] }}<!-- | |||
--></td><!-- | |||
--></tr>}}<!-- | --></tr>}}<!-- | ||
-->{{#if:{{{Designation|}}}|<!-- | -->{{#if:{{{Designation|}}}|<!-- | ||
Revision as of 23:16, 18 January 2022
Template documentation (for the above template, sometimes hidden or invisible) [view] [edit] [history] [refresh]
| Construction | |
| Workers | |
| Electricity | |
| Maintenance | |
| Footprint | 6x4 |
| Cargo | Water |
| Storage | 5000 |
| Required Research | Cement Production or Basic Desalination |
| Designation | Category:Production |
| 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 = <!-- only used if needed to override the automatic 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.)
