Refactorio / RedMew

The RedMew scenario code for Factorio.
https://redmew.com
GNU General Public License v3.0
176 stars 80 forks source link

Entity Placement Restrictions by type #1398

Open RedRafe opened 6 months ago

RedRafe commented 6 months ago

Looking at DangerOres & similar scenarios, entities are whitelisted/blacklisted by name lists from static files.

This results in a lot similar files & setups that are not very mod-friendly.

I suggest to switch to ban/allow by type instead (where possible).

This could be done by reviewing the scenarios & change the code to generate the list of entities by reverse-engeneering the names from the available prototypes in game at runtime, given a listed of allowed/banned entity types, so to be more compatible.

Also, 2 more APIs to whitelist/blacklist directly by a type list could be added to the module's logic. Not necessary, but still useful for future projects.