Difference between revisions of "Template:Recipe draw/doc"

From Captain of Industry Wiki
Jump to: navigation, search
(update for dumping things that cause pollution)
(update examples for code re-factor)
Line 2: Line 2:
:This template provides a method to rapidly illustrate crafting recipes without in-depth knowledge of wiki syntax or manual repetition/copy-pasting.
:This template provides a method to rapidly illustrate crafting recipes without in-depth knowledge of wiki syntax or manual repetition/copy-pasting.


;Automations
:*On pages using [[:Template:Infobox machine]], the building is automatically detected.
:**<code>| HideBldg    = yes</code>
:*On pages using [[:Template:Infobox machine]], the building is automatically hidden.
:**If needed elsewhere, it can be manually called with <code>| HideBldg    = yes</code>


;Limitations
;Limitations
:This template can accept up to 6 inputs, 6 outputs, and 1 time value per recipe.
:This template can accept up to 6 inputs, 6 outputs, and 1 time value per recipe.


;Usage
:Example usage for mining:
{{markup|<nowiki>
  {{Recipe
    | Mining      = yes
    | Output1Name = Copper Ore
  }}</nowiki>|
  {{Recipe
    | Mining      = yes
    | Output1Name = Copper Ore
  }}
}}
:Example usage for dumping loose materials:
{{markup|<nowiki>
  {{Recipe
    | Dumping    = yes
    | Input1Name = Rock
  }}</nowiki>|
  {{Recipe
    | Dumping    = yes
    | Input1Name = Rock
  }}
}}


;Usage
:Example usage for a machine with both inputs and outputs:
:Example usage for a machine with both inputs and outputs:


Line 37: Line 65:
}}
}}


:Example usage for flaring liquids:
:Example usage for dumping/flaring/venting ''non-polluting'' liquids/gasses:
{{markup|<nowiki>
{{markup|<nowiki>
   {{Recipe
   {{Recipe
    | Building    = Flare
    | Input1Name  = Diesel
    | Input1Qty  = 10
    | Time        = 20
    | Output1Name = Air Pollution
    | Output1Qty  = 20
  }}</nowiki>|
  {{Recipe
    | Building    = Flare
    | Input1Name  = Diesel
    | Input1Qty  = 10
    | Time        = 20
    | Output1Name = Air Pollution
    | Output1Qty  = 20
  }}
}}
----
:Examples usages for venting gasses or dumping liquids:
{{markup|<nowiki>
  {{Recipe
    | Venting    = yes
     | Building    = Smoke Stack
     | Building    = Smoke Stack
     | Input1Name  = Oxygen
     | Input1Name  = Oxygen
Line 69: Line 74:
   }}</nowiki>|
   }}</nowiki>|
   {{Recipe
   {{Recipe
    | Venting    = yes
     | Building    = Smoke Stack
     | Building    = Smoke Stack
     | Input1Name  = Oxygen
     | Input1Name  = Oxygen
Line 77: Line 81:
}}
}}


:Example usage for dumping/flaring/venting ''polluting'' liquids/gasses:
{{markup|<nowiki>
{{markup|<nowiki>
   {{Recipe
   {{Recipe
    | DumpingLiq  = yes
     | Building    = Liquid Dump
     | Building    = Liquid Dump
     | Input1Name  = Waste Water
     | Input1Name  = Waste Water
Line 88: Line 92:
   }}</nowiki>|
   }}</nowiki>|
   {{Recipe
   {{Recipe
    | DumpingLiq  = yes
     | Building    = Liquid Dump
     | Building    = Liquid Dump
     | Input1Name  = Waste Water
     | Input1Name  = Waste Water
Line 97: Line 100:
   }}
   }}
}}
}}
:Example usage for mining:
{{markup|<nowiki>
  {{Recipe
    | Mining      = yes
    | Output1Name = Copper Ore
  }}</nowiki>|
  {{Recipe
    | Mining      = yes
    | Output1Name = Copper Ore
  }}
}}
----
:Example usage for dumping loose materials:
{{markup|<nowiki>
  {{Recipe
    | Dumping    = yes
    | Input1Name = Rock
  }}</nowiki>|
  {{Recipe
    | Dumping    = yes
    | Input1Name = Rock
  }}
}}
----


:Example usage for Mechanical Power and Electricity recipes with units:
:Example usage for Mechanical Power and Electricity recipes with units:
Line 151: Line 126:
   }}
   }}
}}
}}
----


:Example usage for instantaneous recipes:
:Example usage for instantaneous recipes:
Line 178: Line 151:
}}
}}


----
:Example usage for hiding the building (automatically happens on pages using [[:Template:Infobox machine]]):
 
:Example usage for hiding the building with ACCEPTS / PROVIDES text still present:
{{markup|<nowiki>
{{markup|<nowiki>
   {{Recipe
   {{Recipe
     | Building    = Air Separator
     | Building    = Mixer
     | HideBldg    = yes
     | HideBldg    = yes
    | Input1Name  = Sand
    | Input1Qty  = 18
    | Input2Name  = Limestone
    | Input2Qty  = 4
    | Input3Name  = Salt
    | Input3Qty  = 4
     | Time        = 20
     | Time        = 20
     | Output1Name = Oxygen
     | Output1Name = Glass Mix
     | Output1Qty  = 8
     | Output1Qty  = 14
    | Output2Name = Nitrogen
    | Output2Qty  = 8
   }}</nowiki>|
   }}</nowiki>|
   {{Recipe
   {{Recipe
     | Building    = Air Separator
     | Building    = Mixer
     | HideBldg    = yes
     | HideBldg    = yes
    | Input1Name  = Sand
    | Input1Qty  = 18
    | Input2Name  = Limestone
    | Input2Qty  = 4
    | Input3Name  = Salt
    | Input3Qty  = 4
     | Time        = 20
     | Time        = 20
     | Output1Name = Oxygen
     | Output1Name = Glass Mix
     | Output1Qty  = 8
     | Output1Qty  = 14
    | Output2Name = Nitrogen
    | Output2Qty  = 8
   }}
   }}
}}
}}

Revision as of 13:35, 17 January 2022

Purpose
This template provides a method to rapidly illustrate crafting recipes without in-depth knowledge of wiki syntax or manual repetition/copy-pasting.
Automations
  • On pages using Template:Infobox machine, the building is automatically detected.
    • | HideBldg = yes
  • On pages using Template:Infobox machine, the building is automatically hidden.
    • If needed elsewhere, it can be manually called with | HideBldg = yes
Limitations
This template can accept up to 6 inputs, 6 outputs, and 1 time value per recipe.
Usage
Example usage for mining:
Markup Renders as
  {{Recipe
    | Mining      = yes
    | Output1Name = Copper Ore
  }}
Building not defined
Example usage for dumping loose materials:
Markup Renders as
  {{Recipe
    | Dumping    = yes
    | Input1Name = Rock
  }}
Building not defined
Example usage for a machine with both inputs and outputs:
Markup Renders as
  {{Recipe
    | Building    = Rotary Kiln
    | Input1Name  = Limestone
    | Input1Qty   = 12
    | Input2Name  = Coal
    | Input2Qty   = 2
    | Time        = 10
    | Output1Name = Cement
    | Output1Qty  = 4
    | Output2Name = Exhaust
    | Output2Qty  = 8
  }}
Rotary Kiln.pngCoal
:
12
Limestone.png
72
Plus.png
2
Coal.png
12
10 Clock.png
Transform.png
60 Clock 60s.png
4
Cement.png
24
Plus.png
8
Exhaust.png
48
Example usage for dumping/flaring/venting non-polluting liquids/gasses:
Markup Renders as
  {{Recipe
    | Building    = Smoke Stack
    | Input1Name  = Oxygen
    | Input1Qty   = 200
    | Time        = 20
  }}
Smoke Stack.pngSmall
:
ACCEPTS
200
Oxygen.png
600
/ 20 Clock.png

/ 60 Clock 60s.png
Example usage for dumping/flaring/venting polluting liquids/gasses:
Markup Renders as
  {{Recipe
    | Building    = Liquid Dump
    | Input1Name  = Waste Water
    | Input1Qty   = 2
    | Time        = 2
    | Output1Name = Air Pollution
    | Output1Qty  = 2
  }}
Liquid Dump.png
:
ACCEPTS
2
Waste Water.png
60
/ 2 Clock.png

/ 60 Clock 60s.png
2
Air Pollution.png
60
Example usage for Mechanical Power and Electricity recipes with units:
Markup Renders as
  {{Recipe
    | Building    = Low-pressure Turbine
    | Input1Name  = Steam Lo
    | Input1Qty   = 4
    | Time        = 5
    | Output1Name = Mechanical Power
    | Output1Qty  = 1
    | Output1Unit = MW
    | Output2Name = Steam Depleted
    | Output2Qty  = 4
  }}
Low-pressure Turbine.pngTier I
:
4
Steam Lo.png
48
Clock.png
Transform.png
60 Clock 60s.png
 
Mechanical Power.png
1 MW
Plus.png
4
Steam Depleted.png
48
Example usage for instantaneous recipes:
Markup Renders as
  {{Recipe
    | Building    = Power Generator
    | Input1Name  = Mechanical Power
    | Input1Qty   = 500
    | Input1Unit  = KW
    | Time        = instant
    | Output1Name = Electricity
    | Output1Qty  = 250
    | Output1Unit = KW
  }}
Power Generator.png
:
 
Mechanical Power.png
500 KW
instant Clock.png
Transform.png
60 Clock 60s.png
 
Electricity.png
250 KW
Example usage for hiding the building (automatically happens on pages using Template:Infobox machine):
Markup Renders as
  {{Recipe
    | Building    = Mixer
    | HideBldg    = yes
    | Input1Name  = Sand
    | Input1Qty   = 18
    | Input2Name  = Limestone
    | Input2Qty   = 4
    | Input3Name  = Salt
    | Input3Qty   = 4
    | Time        = 20
    | Output1Name = Glass Mix
    | Output1Qty  = 14
  }}
18
Sand.png
54
Plus.png
4
Limestone.png
12
Plus.png
4
Salt.png
12
20 Clock.png
Transform.png
60 Clock 60s.png
14
Glass Mix.png
42