Skip to content

Commit

Permalink
Rebase fix-mpf-numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurkehrwald committed Sep 9, 2024
1 parent a2e15f7 commit be6e228
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions VisualPinball.Engine.Mpf.Unity/Runtime/MpfGamelogicEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,18 @@ public string MachineFolder
public void OnInit(Player player, TableApi tableApi, BallManager ballManager)
{
_player = player;
_switchIds.Clear();
foreach (var sw in requiredSwitches) {
_switchNames[sw.Id] = sw.Id;
}
_coilNames.Clear();
foreach (var coil in requiredCoils) {
_coilNames[coil.Id] = coil.Id;
}
_lampNames.Clear();
foreach (var lamp in requiredLamps) {
_lampNames[lamp.Id] = lamp.Id;
}
_api = new MpfApi(MachineFolder);
_api.Launch(new MpfConsoleOptions {
ShowLogInsteadOfConsole = false,
Expand Down

0 comments on commit be6e228

Please sign in to comment.