Craxy / ToggleTrafficLights

Mod for Cities:Skylines. Tool to remove or add traffic lights at intersections.
Other
33 stars 10 forks source link

TTL can't be activated via button (patch 1.3.0/Snowfall) #34

Open Craxy opened 8 years ago

Craxy commented 8 years ago

throws IndexOutOfRangeException:

IndexOutOfRangeException: Array index is out of range.
  at RoadsOptionPanel+c__AnonStorey10B.<>m__172 (ColossalFramework.UI.UIComponent sender, Int32 index) [0x00000] in :0 
  at (wrapper delegate-invoke) ColossalFramework.UI.PropertyChangedEventHandler`1:invoke_void__this___UIComponent_int (ColossalFramework.UI.UIComponent,int)
  at ColossalFramework.UI.UITabstrip.OnSelectedIndexChanged () [0x00000] in :0 
  at ColossalFramework.UI.UITabstrip.SelectTabByIndex (Int32 value) [0x00000] in :0 
  at ColossalFramework.UI.UITabstrip.set_selectedIndex (Int32 value) [0x00000] in :0 
  at Craxy.CitiesSkylines.ToggleTrafficLights.Game.Threading.OnUpdate (Single realTimeDelta, Single simulationTimeDelta) [0x00000] in :0 
  at ThreadingWrapper.OnUpdate (Single realTimeDelta, Single simulationTimeDelta) [0x00000] in :0 
  at SimulationManager.Update () [0x00000] in :0 

CS now throws Exception when UITabstrip.selectedIndex is set to -1

Craxy commented 8 years ago

Interim-fix in 2f079d00a2bd72da5fe711d710af7c079696d17d: The active button in the Roadsmenu doesn't get deselected when TTL is actived. That button cannot be clicked any more to deactivate TTL.