Add on_player_preview_blueprint event
Posted: Sun Dec 31, 2017 9:24 pm
Currently, factorio provides on_player_setup_blueprint and on_player_configured_blueprint.
on_player_setup_blueprint - fires befores the blueprint is created, and includes metadata about the selected area
on_player_configured_blueprint - fires after the blueprint preview gui was shown to the player, and they created the blueprint
There's no event to intercept the blueprint contents at the preview window, before the player accepts (or rejects) the blueprint creation.
This would be useful for mods that modify blueprints on-the-fly. For example, a blueprint mod that automatically changes all small power poles into medium power poles in blueprints, or upgrades transport belts to faster variants, etc. Using on_player_configured_blueprint can achieve the same sort of effect, but players can't preview the changes and it makes the results non-intuitive.
on_player_setup_blueprint - fires befores the blueprint is created, and includes metadata about the selected area
on_player_configured_blueprint - fires after the blueprint preview gui was shown to the player, and they created the blueprint
There's no event to intercept the blueprint contents at the preview window, before the player accepts (or rejects) the blueprint creation.
This would be useful for mods that modify blueprints on-the-fly. For example, a blueprint mod that automatically changes all small power poles into medium power poles in blueprints, or upgrades transport belts to faster variants, etc. Using on_player_configured_blueprint can achieve the same sort of effect, but players can't preview the changes and it makes the results non-intuitive.