-
Notifications
You must be signed in to change notification settings - Fork 158
Open
Description
I recently ran into a situation where I wanted to add a ball to a multiball lock without automatically replacing the ball. It's not dynamically configurable though. The config value could be turned into a template to allow this functionality.
config_spec.yaml:1039 multiball_locks::balls_to_replace
balls_to_replace: single|int|-1
change to
balls_to_replace: single|template|-1
This would require updating multiball_lock.py _lock_ball function use of balls_to_replace, which is the only use of balls to replace.
# schedule eject of new balls for all physically locked balls
if self.config['balls_to_replace'] == -1 or new_locked_balls <= self.config['balls_to_replace']:
self.info_log("%s locked balls and %s to replace, requesting %s new balls",
new_locked_balls, self.config['balls_to_replace'], balls_to_lock_physically)
self._request_new_balls(balls_to_lock_physically)
else:
self.info_log("%s locked balls exceeds %s to replace, not requesting any balls",
new_locked_balls, self.config['balls_to_replace'])
update to replace self.config['balls_to_replace'] with self.config['balls_to_replace'].evaluate([])
reference template implementation: https://github.com/missionpinball/mpf/pull/1901/files
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels