Call a Plumber


Pipes can only transport compatible fluids. You weren't going to put molten iron in an iron pipe, were you? Can be customized by other mods.

Content
4 days ago
2.0
271
Fluids
Owner:
half_a_cat
Source:
N/A
Homepage:
N/A
License:
MIT
Created:
a month ago
Latest Version:
0.3.2 (4 days ago)
Factorio version:
2.0
Downloaded by:
271 users

Pipes and tanks are destroyed by incompatible fluids. Of course you can't put molten iron in an iron pipe.

With this mod, you will have acid-resistant plastic pipes and (if space age is enabled) heat-resistant refractory pipes, which must be used for some particularly dangerous fluids. Other mods can define their own pipe and fluid types via the API.

If this mod is added to an existing save, it will not change the behavior of existing pipes. It only affects pipes that are built while the mod is running.

To play with unsupported mods, you can put the names of new fluids in the "Inert fluids" mod setting. It expects the game engine's name for fluids as a comma-separated list like aether,caloric,phlogiston. Fluids in this list will be compatible with normal pipes.

Modding API

The mod associates each fluid type with a fluid category (such as "inert" or "acid"), which represents the fluid's properties. Each pipe, underground pipe, tank, or pump type has a set of fluid categories that it can handle without damage. Call the API to register information in on_init and on_configuration_changed.

To define a fluid category: remote.call["call-plumber"].register_fluid_category{category=category_name}
To associate a fluid with a category: remote.call["call-plumber"].register_fluid{fluid=fluid_name, category=category_name} where fluid_name is the name of the fluid prototype.
To associate an entity with a category: remote.call["call-plumber"].register_entity_compatibility(entity_name, list_of_category_names) where entity_name is the name of the entity (e.g., pipe) prototype.

If an entity is not registered then the mod does not change its behavior.

The predefined rules can be disabled with the setting call-plumber-scripting-only.

Contributions

Graphics for refractory pipe were contributed by Keysivi.