Closed Marconius6 closed 2 years ago
I think so. I thought the Maintenance options one-time despawning checkboxes was also for the (!🚗) icon but found it isn't.
Just checked the despawn code (notably it all routes through VehicleBehaviorManager.MayDespawn(Vehicle)
) and there is currently no distinction of vehicle type in that method.
public bool MayDespawn(ref Vehicle vehicleData) {
return !Options.disableDespawning
|| ((vehicleData.m_flags2 & (Vehicle.Flags2.Blown | Vehicle.Flags2.Floating)) != 0)
|| (vehicleData.m_flags & Vehicle.Flags.Parking) != 0;
}
Call sites would either need updating to pass in ExtVehicleType
, or the method itself would need udpating to determine that (via vehicleData.Info
).
@aubergine10 we just need to pass vehicle id. It shouldn't be too hard. I'll try to create PR with changes later today.
Describe your idea
I like to play with despawning disabled, for a more realistic and challenging experience. However, I've been noticing more and more that trains are... kind of terrible; their AI seems limited at best, and unlike road traffic, you have relatively few options to do deal with them (no lights, and they ignore yield signs half the time).
So I would like to be able to play with despawning disabled for most things, but trains still despawning as in vanilla, if they get stuck. I think this would be a good compromise, and seems relatively easy to implement as well.
Specifically, I would put a list in the options menu under the "disable despawning" setting, that would allow you to choose exactly which vehicles you want to disable despawning for. A similar list already exists under the Maintenance options for one-time despawning.