mirror of
https://github.com/rmroc451/TweaksAndThings.git
synced 2025-12-16 09:19:37 -06:00
Fix issue with cars that are missing tagcallouts from throwing errors.
This commit is contained in:
@@ -70,7 +70,7 @@ internal class CarInspector_PopulateCarPanel_Patch
|
||||
private static UIPanelBuilder AddCarConsistRebuildObservers(UIPanelBuilder builder, IEnumerable<Model.Car> consist)
|
||||
{
|
||||
TagController tagController = UnityEngine.Object.FindFirstObjectByType<TagController>();
|
||||
foreach (Model.Car car in consist)
|
||||
foreach (Model.Car car in consist.Where(c => c.TagCallout != null))
|
||||
{
|
||||
builder = AddObserver(builder, car, PropertyChange.KeyForControl(PropertyChange.Control.Handbrake), tagController);
|
||||
foreach (LogicalEnd logicalEnd in ends)
|
||||
|
||||
Reference in New Issue
Block a user