mpf
mpf copied to clipboard
remove show token validation
(This is Brian on Gabe's laptop)
If you pass an unexpected token to a show, it will raise an error. This is a problem with shots, for example, we have a shot like this:
shots:
left_kicking_target:
switch: s_bottomkickingtarget
show_tokens:
led: l_left_longhorn
color: ffcc00
shot_profiles:
advertise:
states:
- name: flashing
show: flash_color
speed: 10
- name: unlit
show: off
loop: yes
shows:
flash_color:
- time: 0
leds:
(led):
color: (color)
(leds):
color: (color)
- time: 1
leds:
(led):
color: black
(leds):
color: black
- time: 2
So the we have a generic show where we can flash a color that we pass which is nice. But we can't use the "off" show. And we can't make an off show which accepts our color token because where in the show do we put that?
Removing the following lines fixes it: https://github.com/missionpinball/mpf/blob/0.31/mpf/assets/show.py#L338-L341
Maybe just add a call path for shots which allow optional tokens? It makes sense at other locations to have this validation.
We should talk about play_kwargs in shows at Expo.
Sounds easy. I'm fine with this.
disable validation in the show, add validation in the shot