mpf.core.shot_profile_manager

Contains the ShotProfileManager class.

class mpf.core.shot_profile_manager.ShotProfileManager(machine)

Controller for show profiles.

Initialise shot profile manager.

mode_start_for_shot_groups(config, priority, mode, **kwargs)

Apply profiles to member shots of a dict of shot groups.

Parameters:
  • config – Dict containing shot groups. Keys are shot group names. Values are settings for each shot group.
  • priority – Int of the priority these profiles will be applied at. unused.
  • mode – A Mode class object for the mode which is applying these profiles. Used as the key to remove the profiles a specific mode applied later.
  • kwargs – unused
mode_start_for_shots(config, mode, **kwargs)

Set the shots’ enable_tables.

Called on mode start.

mode_stop_for_shot_groups(mode)

Remove all the profiles that were applied to shots based on shot group settings in a mode.

Parameters:mode – A Mode class which represents the mode that applied the profiles originally which will be used to determine which shot profiles should be removed.
mode_stop_for_shots(mode)

Remove shot profile from mode.

process_profile_config(profile_name, config)

Process a shot profile config to convert everything to the format the shot controller needs.

Parameters:config – Dict of the profile settings to process.
register_profile(name, profile)

Register a new shot profile with the shot controller which will allow it to be applied to shots.

Parameters:
  • name – String name of the profile you’re registering.
  • profile – Dict of the profile settings.
register_profiles(config, **kwargs)

Register multiple shot profiles.

Parameters:
  • config – Dict containing the profiles you’re registering. Keys are profile names, values are dictionaries of profile settings.
  • kwargs – unused