Collision Whitelist

by Kubius

Library mod which allows easy addition of a collision mask to all buildables or objects except a provided 'whitelist' of names and/or types.

Internal
2 days ago
2.0
2
Owner:
Kubius
Source:
N/A
Homepage:
N/A
License:
MIT
Created:
2 days ago
Latest Version:
1.0.0 (2 days ago)
Factorio version:
2.0
Downloaded by:
2 users

To use this, define a collision layer, manually add it to an ore/tile/etc you want to limit the contents of, then provide setup_whitelist with appropriate parameters and it'll take care of the rest.

setup_whitelist is the only function provided by this mod.
Include it at a late data stage (typically final fixes) to iterate over prototypes.
Required parameters:
- mask_id: The string for the collision mask you'd like to introduce to objects NOT specified by whitelisting.
At least one of:
- prototype_types: A list of kinds of prototype you'd like to be whitelisted (for example, "transport-belt").
- object_names: A list of specific objects you'd like to be whitelisted (for example, "assembling-machine-1").
Optional:
- construction_only: By default, only player-constructed on-grid objects are blacklisted.
Set this to false, and everything with the is_object collision mask will be eligible for blacklisting.