hotfix for car inspector rebuild

This commit is contained in:
2024-08-03 00:55:43 -05:00
parent 9f210b0b8a
commit ca0e78b971
2 changed files with 3 additions and 3 deletions

View File

@@ -13,7 +13,7 @@
<PropertyGroup Condition="'$(AssemblyVersion)' == '' OR '$(MajorVersion)' != '' OR '$(MinorVersion)' != ''">
<MajorVersion Condition="'$(MajorVersion)' == ''">1</MajorVersion>
<MinorVersion Condition="'$(MinorVersion)' == ''">1</MinorVersion>
<PatchVersion Condition="'$(PatchVersion)' == ''">0</PatchVersion>
<PatchVersion Condition="'$(PatchVersion)' == ''">1</PatchVersion>
<AssemblyVersion>$(MajorVersion).$(MinorVersion).$(PatchVersion)</AssemblyVersion>
<FileVersion>$(AssemblyVersion)</FileVersion>
<ProductVersion>$(AssemblyVersion)</ProductVersion>

View File

@@ -44,10 +44,10 @@ internal class CarInspector_PopulateCarPanel_Patch
bool buttonsHaveCost = tweaksAndThings.EndGearHelpersRequirePayment();
var consist = __instance._car.EnumerateCoupled();
builder = AddCarConsistRebuildObservers(builder, consist);
builder.HStack(delegate (UIPanelBuilder hstack)
{
hstack = AddCarConsistRebuildObservers(hstack, consist);
var buttonName = $"{(consist.Any(c => c.HandbrakeApplied()) ? "Release " : "Set ")} {TextSprites.HandbrakeWheel}";
hstack.AddButtonCompact(buttonName, delegate
{
@@ -122,7 +122,7 @@ internal class CarInspector_PopulateCarPanel_Patch
{
try
{
builder.RebuildOnInterval(.01f);
builder.Rebuild();
if (car.TagCallout != null) tagController.UpdateTags(CameraSelector.shared._currentCamera.GroundPosition, true);
if (ContextMenu.IsShown && ContextMenu.Shared.centerLabel.text == car.DisplayName) CarPickable.HandleShowContextMenu(car);
}