Skip to content

Commit 25e66a4

Browse files
authored
Merge pull request #606 from bosh/api_nav
API Reference section rework
2 parents c3918dc + b3eafb6 commit 25e66a4

File tree

168 files changed

+999
-1618
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

168 files changed

+999
-1618
lines changed

docs/code/api_reference/api_reference_config_players.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
21
# Config Players
32

4-
Config players are available as machine attributes in the form of their player name plus _player, for example, self.machine.light_player or self.machine.score_player.
3+
Config players are available as machine attributes in the form of their player name plus \_player, for example, `self.machine.light_player` or `self.machine.score_player`.
54

65
* [blocking_player](config_players/blocking_player.md)
76
* [coil_player](config_players/coil_player.md)
@@ -16,5 +15,3 @@ Config players are available as machine attributes in the form of their player n
1615
* [segment_display_player](config_players/segment_display_player.md)
1716
* [show_player](config_players/show_player.md)
1817
* [variable_player](config_players/variable_player.md)
19-
20-

docs/code/api_reference/api_reference_core.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Core Components
22

3-
Core MPF machine components, accessible to programmers at self.machine.*name*. For example, the ball controller is at self.machine.ball_controller, the event manager is self.machine.events, etc.
3+
Core MPF machine components, accessible to programmers at `self.machine.*name*`. For example, the ball controller is at `self.machine.ball_controller`, the event manager is `self.machine.events`, etc.
44

55
* [auditor](core/auditor.md)
66
* [ball_controller](core/ball_controller.md)
@@ -20,4 +20,3 @@ Core MPF machine components, accessible to programmers at self.machine.*name*. F
2020
* [switch_player](core/switch_player.md)
2121
* [text_ui](core/text_ui.md)
2222
* [twitch_bot](core/twitch_bot.md)
23-

docs/code/api_reference/api_reference_device.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
21
# Devices
32

4-
Instances of MPF devices, available at self.machine.*device_collection*.*device_name*. For example, a flipper device called “right_flipper” is at self.machine.flippers.right_flipper, and a multiball called “awesome” is accessible at self.machine.multiballs.awesome.
3+
Instances of MPF devices, available at `self.machine.*device_collection*.*device_name*`. For example, a flipper device called “right_flipper” is at `self.machine.flippers.right_flipper`, and a multiball called “awesome” is accessible at `self.machine.multiballs.awesome`.
54

6-
Note that device collections are accessible as attributes and items, so the right flipper mentioned above is also available to programmers at self.machine.flippers['right_flipper'].
5+
Note that device collections are accessible as attributes and items, so the right flipper mentioned above is also available to programmers at `self.machine.flippers['right_flipper']`.
76

87
Note
98

@@ -61,5 +60,3 @@ Here’s a list of all the device types in MPF, linked to their API references.
6160
* [switches](devices/switches.md)
6261
* [timed_switches](devices/timed_switches.md)
6362
* [timers](devices/timers.md)
64-
65-

docs/code/api_reference/api_reference_hardware_platforms.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
21
# Hardware Platforms
32

4-
Hardware platforms are stored in a machine hardware_platforms dictionary, for example, self.machine.hardware_platforms['fast'] or self.machine.hardware_platforms['p_roc'].
3+
Hardware platforms are stored in a machine hardware_platforms dictionary, for example, `self.machine.hardware_platforms['fast']` or `self.machine.hardware_platforms['p_roc']`.
54

65
* [drivers](hardware_platforms/drivers.md)
76
* [fadecandy](hardware_platforms/fadecandy.md)
@@ -33,5 +32,3 @@ Hardware platforms are stored in a machine hardware_platforms dictionary, for ex
3332
* [virtual](hardware_platforms/virtual.md)
3433
* [virtual_pinball](hardware_platforms/virtual_pinball.md)
3534
* [visual_pinball_evolution](hardware_platforms/visual_pinball_evolution.md)
36-
37-

docs/code/api_reference/api_reference_misc_components.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# Miscellaneous Components
32

43
There are several other components and systems of MPF that don’t fit into any of the other categories. Those are covered here.

docs/code/api_reference/api_reference_modes.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
21
# Modes
32

4-
Covers all the “built-in” modes. They’re accessible via self.machine.modes.*name*, for example, self.machine.modes.game or self.machine.modes.base.
3+
Covers all the “built-in” modes. They’re accessible via `self.machine.modes.*name*`, for example, `self.machine.modes.game` or `self.machine.modes.base`.
54

65
* [attract](modes/attract.md)
76
* [bonus](modes/bonus.md)

docs/code/api_reference/api_reference_testing_class_api.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# Testing Class API
32

43
MPF includes several unit test classes which you can use to write tests which test MPF or to write tests for your own game.

docs/code/api_reference/config_players/blocking_player.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1+
# blocking_player API Reference
12

2-
# self.machine.blocking_player
3+
`self.machine.blocking_player`
34

4-
`class mpf.config_players.block_event_player.BlockEventPlayer(machine)`
5+
``` python
6+
class mpf.config_players.block_event_player.BlockEventPlayer(machine)
7+
```
58

6-
Bases: mpf.core.config_player.ConfigPlayer
9+
Bases: `mpf.core.config_player.ConfigPlayer`
710

811
Posts events based on config.
912

@@ -26,4 +29,3 @@ Block event.
2629
`validate_config_entry(settings: dict, name: str) → dict`
2730

2831
Validate one entry of this player.
29-

docs/code/api_reference/config_players/coil_player.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1+
# coil_player API Reference
12

2-
# self.machine.coil_player
3+
`self.machine.coil_player`
34

4-
`class mpf.config_players.coil_player.CoilPlayer(machine)`
5+
``` python
6+
class mpf.config_players.coil_player.CoilPlayer(machine)
7+
```
58

6-
Bases: mpf.config_players.device_config_player.DeviceConfigPlayer
9+
Bases: `mpf.config_players.device_config_player.DeviceConfigPlayer`
710

811
Triggers coils based on config.
912

@@ -26,4 +29,3 @@ Parse short config version.
2629
` play(settings, context: str, calling_context: str, priority: int = 0, **kwargs)`
2730

2831
Enable, Pulse or disable coils.
29-

docs/code/api_reference/config_players/event_player.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1+
# event_player API Reference
12

2-
# self.machine.event_player
3+
`self.machine.event_player`
34

4-
`class mpf.config_players.event_player.EventPlayer(machine)`
5+
``` python
6+
class mpf.config_players.event_player.EventPlayer(machine)
7+
```
58

6-
Bases: mpf.config_players.flat_config_player.FlatConfigPlayer
9+
Bases: `mpf.config_players.flat_config_player.FlatConfigPlayer`
710

811
Posts events based on config.
912

@@ -26,4 +29,3 @@ Parse list.
2629
`play(settings, context, calling_context, priority=0, **kwargs)`
2730

2831
Post (delayed) events.
29-

0 commit comments

Comments
 (0)