Compare commits

..

1 Commits

3 changed files with 4 additions and 4 deletions

View File

@@ -2,6 +2,6 @@
<PropertyGroup> <PropertyGroup>
<MajorVersion>2</MajorVersion> <MajorVersion>2</MajorVersion>
<MinorVersion>1</MinorVersion> <MinorVersion>1</MinorVersion>
<PatchVersion>1</PatchVersion> <PatchVersion>2</PatchVersion>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@@ -108,7 +108,7 @@ public static class Car_Extensions
private static Car? FindMyCaboose(this Car car, float timeNeeded, bool decrement = false, bool requireLoad = true) => private static Car? FindMyCaboose(this Car car, float timeNeeded, bool decrement = false, bool requireLoad = true) =>
( (
car.CarCaboose() ?? car.CarsNearCurrentCar(timeNeeded, decrement).FindNearestCabooseFromNearbyCars() car.CarCaboose() ?? car.CarsNearCurrentCar(timeNeeded, decrement).FindNearestCabooseFromNearbyCars()
)?.CabooseWithSufficientCrewHours(timeNeeded, decrement); )?.CabooseWithSufficientCrewHours(timeNeeded: timeNeeded, requireLoad:requireLoad, decrement: decrement);
public static Car? CabooseWithSufficientCrewHours(this Car car, float timeNeeded, bool requireLoad, bool decrement = false) public static Car? CabooseWithSufficientCrewHours(this Car car, float timeNeeded, bool requireLoad, bool decrement = false)
{ {

View File

@@ -72,7 +72,7 @@ internal class AutoEngineerOrdersHelper_SendAutoEngineerCommand_Patch
Func<bool> noCaboose = () => Func<bool> noCaboose = () =>
{ {
bool output = (bool)TrainController.Shared.SelectedLocomotive.FindMyCabooseSansLoadRequirement(); bool output = TrainController.Shared.SelectedLocomotive.FindMyCabooseSansLoadRequirement() == null;
logMessage += $"\ncaboose? {!output}"; logMessage += $"\ncaboose? {!output}";
return output; return output;
}; };
@@ -87,7 +87,7 @@ internal class AutoEngineerOrdersHelper_SendAutoEngineerCommand_Patch
logMessage += $"\nGovern AE? {output}"; logMessage += $"\nGovern AE? {output}";
_log.Debug(logMessage); _log.Information(logMessage);
return output; return output;
} }