This was discovered while working on #344.
We are seeing that the switch manager is not showing the correct status for multi-matched switch devices.
Using Rock as our example, switch 41 is currently used in 8 places:
A (Behind upper drop target bank)
B (Behind lower drop target bank)
C (Upper left side rubber)
D (Upper right side rubber)
E (Middle left side rubber)
F (Middle right side rubber)
G (Left slingshot - FUTURE)
H (Right slingshot - FUTURE)
If the user hits A, all 41 entries in the Switch Manager close. Totally fine.

However, if the user hits B, C , D, E, F, G, H, the entries in the switch manager will not close.
The Game Logic Engine will work fine and PinMame registers the switch for A - H.
The SwitchPlayer statuses are a dictionary by ID 41
|
if (deviceSwitch != null) { |
|
var switchStatus = deviceSwitch.AddSwitchDest(new SwitchConfig(switchMapping)); |
|
SwitchStatuses[switchMapping.Id] = switchStatus; |
|
|
So when the player is populating the dictionary, each ID 41 switch device overwrites the last one.
So that's why the manager looks like its only monitoring one device.
This was discovered while working on #344.
We are seeing that the switch manager is not showing the correct status for multi-matched switch devices.
Using Rock as our example, switch
41is currently used in 8 places:A(Behind upper drop target bank)B(Behind lower drop target bank)C(Upper left side rubber)D(Upper right side rubber)E(Middle left side rubber)F(Middle right side rubber)G(Left slingshot - FUTURE)H(Right slingshot - FUTURE)If the user hits
A, all41entries in the Switch Manager close. Totally fine.However, if the user hits
B,C,D,E,F,G,H, the entries in the switch manager will not close.The Game Logic Engine will work fine and PinMame registers the switch for
A-H.The
SwitchPlayerstatuses are a dictionary by ID41VisualPinball.Engine/VisualPinball.Unity/VisualPinball.Unity/Game/SwitchPlayer.cs
Lines 87 to 90 in 67aca1d
So when the player is populating the dictionary, each ID
41switch device overwrites the last one.So that's why the manager looks like its only monitoring one device.