Skip to content

Commit 6e96870

Browse files
committed
update carousel events per missionpinball/mpf#1907
1 parent 339a148 commit 6e96870

12 files changed

+71
-61
lines changed

docs/cookbook/carousel.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ start the mode that was selected by the player.
7474
#config_version=5
7575
mode:
7676
start_events: ball_starting
77-
stop_events: my_carousel_item_selected
77+
stop_events: carousel_item_selected{carousel=my_carousel}
7878
code: mpf.modes.carousel.code.carousel.Carousel
7979
use_wait_queue: true
8080
mode_settings:

docs/events/carousel/index.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ See: [Carousel Mode Selection](../../cookbook/carousel.md) for pre-0.80 carousel
1010

1111
See: [MPFCarousel](../../gmc/reference/mpf-carousel.md) for 0.80+ carousel configuration.
1212

13-
* [item_highlighted](../item_highlighted.md) *Note: 0.80+ only*
14-
* [(carousel_name)\_items_empty](../carousel_name_items_empty.md)
15-
* [(carousel_name)\_(item_name)\_selected](../carousel_name_item_name_selected.md)
16-
* [(carousel_name)\_item_selected](../carousel_name_item_selected.md)
13+
The following events are as of MPF `0.80.0.dev10`.
14+
Previously, the word "carousel" was replaced with the actual carousel name, along with other differences.
15+
16+
* [carousel_item_highlighted](../carousel_item_highlighted.md)
17+
* [carousel\_items_empty](../carousel_items_empty.md)
18+
* [carousel\_item_selected](../carousel_item_selected.md)

docs/events/item_highlighted.md renamed to docs/events/carousel_item_highlighted.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
title: item_highlighted
2+
title: carousel_item_highlighted
33
---
44

5-
# item_highlighted
5+
# carousel_item_highlighted
66

77

88
--8<-- "event.md"
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
title: carousel_item_selected
3+
---
4+
5+
# carousel_item_selected
6+
7+
8+
--8<-- "event.md"
9+
10+
A carousel has just had an item selected. Use the carousel and item
11+
keyword arguments to filter this event in your config players and handle
12+
the different item selection behaviors.
13+
14+
## Keyword arguments
15+
16+
(See the [Conditional Events](overview/conditional.md)
17+
guide for details for how to create entries in your config file that
18+
only respond to certain combinations of the arguments below.)
19+
20+
#### `carousel`:
21+
22+
The name of the carousel that had an item selected.
23+
24+
#### `item`:
25+
26+
The string name of the selected item.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
title: carousel_items_empty
3+
---
4+
5+
# carousel_items_empty
6+
7+
8+
--8<-- "event.md"
9+
10+
A carousel determined that it has
11+
no selectable_items that are valid for display. This can be because
12+
the `mode_settings` for the carousel mode still needs to be set,
13+
or because all of the `selectable_items` were dynamically evaluated
14+
and removed from the valid option set. Use the `carousel` keyword
15+
argument to filter on the correct carousel if have any config player
16+
behaviors that need to happen in response.
17+
18+
## Keyword arguments
19+
20+
(See the [Conditional Events](overview/conditional.md)
21+
guide for details for how to create entries in your config file that
22+
only respond to certain combinations of the arguments below.)
23+
24+
#### `carousel`:
25+
26+
The name of the carousel that had an item selected.

docs/events/carousel_name_item_name_selected.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

docs/events/carousel_name_item_selected.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

docs/events/carousel_name_items_empty.md

Lines changed: 0 additions & 16 deletions
This file was deleted.

docs/events/index.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,10 +289,9 @@ will posted an event called *switch_s_left_slingshot_active*.
289289
* [bonus_subtotal](bonus_subtotal.md)
290290

291291
* [Carousel Events](carousel/index.md)
292-
* [item_highlighted](item_highlighted.md)
293-
* [(carousel_name)\_items_empty](carousel_name_items_empty.md)
294-
* [(carousel_name)\_(item_name)\_selected](carousel_name_item_name_selected.md)
295-
* [(carousel_name)\_item_selected](carousel_name_item_selected.md)
292+
* [carousel_item_highlighted](carousel_item_highlighted.md)
293+
* [carousel\_items_empty](carousel_items_empty.md)
294+
* [carousel\_item_selected](carousel_item_selected.md)
296295

297296
* Config Player Events
298297
* [clear](clear.md)

docs/gmc/reference/mpf-gmc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ Emitted during the Bonus mode. See [bonus mode settings](bonus.md) for details.
115115

116116
Emitted when a mode ends.
117117

118-
#### `item_highlighted(payload)`
118+
#### `carousel_item_highlighted(payload)`
119119

120120
Emitted during a carousel event.
121121

0 commit comments

Comments
 (0)