Difference between revisions of "Template:Recipe item/doc"
From Captain of Industry Wiki
(Added a case of "Quantity = ?") |
|||
Line 54: | Line 54: | ||
| Quantity = 2 | | Quantity = 2 | ||
| Unit = MW | | Unit = MW | ||
}} | |||
}} | |||
</div> | |||
:For variable quantity: | |||
<div class="recipe-wrapper> | |||
{{markup|<nowiki> | |||
{{Recipe item | |||
| Name = Steam hi | |||
| Quantity = ? | |||
| Time = 10 | |||
}}</nowiki>| | |||
{{Recipe item | |||
| Name = Steam hi | |||
| Quantity = ? | |||
| Time = 10 | |||
}} | }} | ||
}} | }} |
Revision as of 22:14, 2 October 2022
- Purpose
- This is a template for improving the maintainability of Template: Recipe draw, where the code for drawing the plus sign and item icon is used nearly 20 times. This template is intended to be used only in Template: Recipe draw and does not work alone.
- Usage
- For Input1 and Output1
Markup | Renders as |
---|---|
{{Recipe item | Name = Steam hi | Quantity = 2 | Time = 10 }} |
|
- For Input2-6 and Output2-6:
Markup | Renders as |
---|---|
{{Recipe item | Name = Steam hi | Quantity = 2 | Time = 10 | Plus = yes }} |
|
- For Mechanical power and Electricity:
- For variable quantity:
Markup | Renders as |
---|---|
{{Recipe item | Name = Steam hi | Quantity = ? | Time = 10 }} |
|
- For overwriting plus icon and/or icon size:
Markup | Renders as |
---|---|
{{Recipe item | Name = Steam hi | Quantity = 2 | Time = 10 | Plus = [[File:Unity.png|32x32px]] | ImageSize = 24x24px }} |
|
- When Name is empty:
Markup | Renders as |
---|---|
{{Recipe item | Name = | Quantity = 2 | Time = 10 }} |
|
- The reason this template cannot be used alone
- Template: Recipe draw has the following 4 codes to define its style and icons. But, these codes are omitted from here.
- {{#vardefine: img_plus | [[File:Plus.png|24x24px]] }}
- {{#vardefine: imgsz_reg | 48x48px }}
- <templatestyles src="Template:Recipe draw/styles.css" />
- <div class="recipe-wrapper>