self.machine.multiball_locks.*

class mpf.devices.multiball_lock.MultiballLock(self_inner, *args, **kwargs)

Bases: mpf.core.mode_device.ModeDevice

Ball lock device which locks balls for a multiball.

Accessing multiball_locks in code

The device collection which contains the multiball_locks in your machine is available via self.machine.multiball_locks. For example, to access one called "foo", you would use self.machine.multiball_locks.foo. You can also access multiball_locks in dictionary form, e.g. self.machine.multiball_locks['foo'].

You can also get devices by tag or hardware number. See the DeviceCollection documentation for details.

Methods & Attributes

Multiball_locks have the following methods & attributes available. Note that methods & attributes inherited from base classes are not included here.

disable(**kwargs)

Disable the lock.

If the lock is not enabled, no balls will be locked.

Parameters:**kwargs -- unused
enable(**kwargs)

Enable the lock.

If the lock is not enabled, no balls will be locked.

Parameters:**kwargs -- unused
is_virtually_full

Return true if lock is full.

locked_balls

Return the number of locked balls for the current player.

remaining_virtual_space_in_lock

Return the remaining capacity of the lock.

reset_all_counts(**kwargs)

Reset the locked balls for all players.

reset_count_for_current_player(**kwargs)

Reset the locked balls for the current player.