fluids¶
- raw : dict[str, dict]¶
A dictionary where each key is the name of a known fluid and its value is it’s
data.rawprototype entry.- Example:
import json from draftsman.data import fluids print(fluids.raw["petroleum-gas"]){ "subgroup": "fluid", "type": "fluid", "name": "petroleum-gas", "icon": "__base__/graphics/icons/fluid/petroleum-gas.png", "base_color": [ 0.3, 0.1, 0.3 ], "default_temperature": 25, "order": "a[fluid]-b[oil]-b[petroleum-gas]", "flow_color": [ 0.8, 0.8, 0.8 ] }
-
add_fluid(name: str, order: str | None =
None, **kwargs)¶ Add a new fluid, or modify the properties of an existing fluid. Useful for simulating a modded environment without having to fully supply an entire mod configuration for simple scripts.
- get_temperature_range(fluid_name: str) tuple[float, float]¶
Gets a tuple representing the [minimum, maximum] temperature range for the fluid with name
fluid_name.- Parameters:
- fluid_name: str¶
The name of the fluid.
- Raises:
InvalidFluidError – if
fluid_nameis not a recognized fluid.- Returns:
A tuple of two floats, representing the minimum and maximum temperature this fluid can have, inclusive.