mirror of
https://github.com/rmroc451/TweaksAndThings.git
synced 2025-12-17 01:39:38 -06:00
updates
This commit is contained in:
@@ -85,12 +85,13 @@ internal class OpsController_AnnounceCoalescedPayments_Patch
|
||||
float rate2 = 24 * 2 * 8;// carLoadRate = 8 crew hours in 30 min loading; (24h * 2 to get half hour chunks * 8 hours to load in those chunks)
|
||||
float num2 = 99999999; //QuantityInStorage for crew-hours (infinite where crew can be shuffling about)
|
||||
float quantityToLoad = Mathf.Min(num2, IndustryComponent.RateToValue(rate2, deltaTime));
|
||||
|
||||
OpsCarAdapter? oca = car.IsCaboose() ? new OpsCarAdapter(car, OpsController.Shared) : null;
|
||||
bool isFull = !car.IsCaboose() ? true : (oca?.IsFull(CrewHoursLoad()) ?? true);
|
||||
if (car.IsCaboose() && !CrewCarStatus(car).spotted)
|
||||
{
|
||||
CrewCarDict[car.id] = (true, CrewCarDict[car.id].filling);
|
||||
CrewCarDict[car.id] = (true, !isFull);
|
||||
}
|
||||
if (car.IsCabooseAndStoppedForLoadRefresh())
|
||||
if (car.IsCabooseAndStoppedForLoadRefresh(isFull))
|
||||
{
|
||||
if (!CrewCarDict[car.id].filling) Multiplayer.Broadcast($"{Hyperlink.To(car)}: \"Topping off caboose crew.\"");
|
||||
CrewCarDict[car.id] = (CrewCarDict[car.id].spotted, true);
|
||||
@@ -100,7 +101,7 @@ internal class OpsController_AnnounceCoalescedPayments_Patch
|
||||
Multiplayer.Broadcast($"{Hyperlink.To(car)}: \"Caboose crew topped off.\"");
|
||||
CrewCarDict[car.id] = (CrewCarDict[car.id].spotted, false);
|
||||
}
|
||||
new OpsCarAdapter(car, OpsController.Shared).Load(CrewHoursLoad(), quantityToLoad);
|
||||
(oca ?? new OpsCarAdapter(car, OpsController.Shared)).Load(CrewHoursLoad(), quantityToLoad);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user