You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Draft PR for now - I haven't actually tested whether this evaluates the template live, or just at setup-time.
Unfortunately this is also a breaking change. The property in question was previously a bool, which allows lowercase specification in our yamls ("true"). But changing to template_bool changes the requirement to a python bool, which MUST be either "True" or "False" if specified simply. We could instead make template_bool support either case of boolean, or even more variants (0/1, T/F, t/f, yes/no, etc), but Jan specifically coded this exception in and I hesitate to change this. (Current line) (Original Commit) So if we take this change, anyone who happened to use lowercase in their config there (I did) will crash until they find their ball device setting and capitalize it. Awkward
My use case is that my right outlane has a diverter post to redirect a trough-bound ball directly to the plunger lane instead. I'd like the option, when activating the diverter, to either let the auto-launcher fire as normal (which currently works) OR disable the autolaunching until the eject is confirmed or I manually turn autolaunch back on.
I've tried a few different solutions already, and I think managing the auto-launch setting myself has the most future promise right now. Failed solutions were:
ball hold on the plunger
new ball device representing the redirection pathway when the diverter makes a save
^ but registered to a separate playfield
^ but with a ball hold
^ with plunger attempting to request a ball (seems like because the plunger can request from trough, and trough has ample extra balls to provide, I can't make the plunger's request come from the fake ball device nor from the playfield, so it always results in an extra ball in play.
Not related to the PR but to your underlying challenge, I feel like blocking the eject attempt with a queue relay player could get you what you need. I've done this in a number of places, and ball ejections include queue events for exactly this purpose.
You could put this logic in a mode that runs when you want the diversion to happen, or you could put a conditional an the eject_attempt to only conditionally block.
When you want the ball to fire, just post the wait_for event and the eject attempt will proceed. If the player can mechanically plunge the ball, there may be some finesse required to ensure that the ball device knows it doesn't have balls anymore (i.e. mechanical eject succeeded) so it doesn't try and fire on an empty plunger. I've never tried this so I don't know what will happen, maybe it'll need some special logic maybe not.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft PR for now - I haven't actually tested whether this evaluates the template live, or just at setup-time.
Unfortunately this is also a breaking change. The property in question was previously a bool, which allows lowercase specification in our yamls ("true"). But changing to template_bool changes the requirement to a python bool, which MUST be either "True" or "False" if specified simply. We could instead make template_bool support either case of boolean, or even more variants (0/1, T/F, t/f, yes/no, etc), but Jan specifically coded this exception in and I hesitate to change this. (Current line) (Original Commit) So if we take this change, anyone who happened to use lowercase in their config there (I did) will crash until they find their ball device setting and capitalize it. Awkward
My use case is that my right outlane has a diverter post to redirect a trough-bound ball directly to the plunger lane instead. I'd like the option, when activating the diverter, to either let the auto-launcher fire as normal (which currently works) OR disable the autolaunching until the eject is confirmed or I manually turn autolaunch back on.
I've tried a few different solutions already, and I think managing the auto-launch setting myself has the most future promise right now. Failed solutions were:
My other direction to try now is the fake ball save suggestion from https://missionpinball.org/latest/cookbook/fake_ball_save/ or see how mpf uses the ball_saves:auto_launch to manage this