Prototype/Fluid: Difference between revisions
(Set prototype parent) |
(Converted to SMW format) |
||
Line 1: | Line 1: | ||
{{Prototype parent|PrototypeBase}} | {{Prototype parent|PrototypeBase}} | ||
A fluid. | |||
{{Prototype TOC|fluid}} | |||
Prototype | |||
== Mandatory properties == | == Mandatory properties == | ||
Inherits all properties from [[PrototypeBase]]. | Inherits all properties from [[PrototypeBase]]. | ||
{{Prototype property|icons, icon, icon_size (IconSpecification)|[[Types/IconSpecification|IconSpecification]]}} | |||
{{Prototype property|default_temperature|[[Types/double|double]]}} | |||
Also the minimum temperature of the fluid. | Also the minimum temperature of the fluid. | ||
{{Prototype property|max_temperature|[[Types/double|double]]}} | |||
{{Prototype property|base_color|[[Types/Color|Color]]}} | |||
Used by bars that show the fluid color, like the flamethrower turret fill bar in the tooltip, or the fill bar for the fluidwagon tooltip; and for the pipe windows and storage tank fill gauges. | Used by bars that show the fluid color, like the flamethrower turret fill bar in the tooltip, or the fill bar for the fluidwagon tooltip; and for the pipe windows and storage tank fill gauges. | ||
{{Prototype property|flow_color|[[Types/Color|Color]]}} | |||
Used only for pipe windows or storage tank fill gauges. | Used only for pipe windows or storage tank fill gauges. | ||
== Optional properties == | == Optional properties == | ||
{{Prototype property|heat_capacity|[[Types/Energy|Energy]]|"1KJ"|optional=true}} | |||
Joule needed to heat 1 Unit by 1 °C. | Joule needed to heat 1 Unit by 1 °C. | ||
{{Prototype property|fuel_value|[[Types/Energy|Energy]]|"0J"|optional=true}} | |||
{{Prototype property|emissions_multiplier|[[Types/double|double]]|1.0|optional=true}} | |||
Scales pollution generated when the fluid is consumed. | Scales pollution generated when the fluid is consumed. | ||
{{Prototype property|subgroup|[[Types/string|string]]|"fluid"|optional=true}} | |||
The value of this property may not be an empty string. It either has to be nil, or a non-empty string. | The value of this property may not be an empty string. It either has to be nil, or a non-empty string. | ||
{{Prototype property|gas_temperature|[[Types/double|double]]|max value of double (1.7976931348623158e+308)|optional=true}} | |||
{{Prototype property|hidden|[[Types/bool|bool]]|false|optional=true}} | |||
Hides the fluid from the signal selection screen. | Hides the fluid from the signal selection screen. | ||
== | == Custom properties == | ||
The base mod reads the following property in data-updates.lua to determine if the fluid should be barreled. The property itself is not read by the C++ part of the game which means that it is discarded by the game when loading finishes. | |||
* auto_barrel - [[Types/bool|bool]] - Optional, defaults to true. Whether the fluid should be included in the barrel recipes automatically generated in data-updates.lua in the base mod. | |||
Whether the fluid should be included in the barrel recipes automatically generated in data-updates.lua in the base mod | |||
== Example == | == Example == |
Revision as of 18:21, 6 August 2019
Template:Prototype parent A fluid.
Mandatory properties
Inherits all properties from PrototypeBase.
Template:Prototype property Also the minimum temperature of the fluid.
Template:Prototype property Used by bars that show the fluid color, like the flamethrower turret fill bar in the tooltip, or the fill bar for the fluidwagon tooltip; and for the pipe windows and storage tank fill gauges.
Template:Prototype property Used only for pipe windows or storage tank fill gauges.
Optional properties
Template:Prototype property Joule needed to heat 1 Unit by 1 °C.
Template:Prototype property Scales pollution generated when the fluid is consumed.
Template:Prototype property The value of this property may not be an empty string. It either has to be nil, or a non-empty string.
Template:Prototype property Hides the fluid from the signal selection screen.
Custom properties
The base mod reads the following property in data-updates.lua to determine if the fluid should be barreled. The property itself is not read by the C++ part of the game which means that it is discarded by the game when loading finishes.
- auto_barrel - bool - Optional, defaults to true. Whether the fluid should be included in the barrel recipes automatically generated in data-updates.lua in the base mod.
Example
{
type = "fluid",
name = "water",
default_temperature = 15,
max_temperature = 100,
heat_capacity = "0.2KJ",
base_color = {r=0, g=0.34, b=0.6},
flow_color = {r=0.7, g=0.7, b=0.7},
icon = "__base__/graphics/icons/fluid/water.png",
icon_size = 32,
order = "a[fluid]-a[water]",
pressure_to_speed_ratio = 0.4,
flow_to_energy_ratio = 0.59
}