Closed originalfoo closed 5 years ago
Yup is is possible, look (easy stuff, I think ) 😉 https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/blob/f574f0dc24ece8a5abe08769561008aacbbdba2b/TLM/TLM/Manager/Impl/UtilityManager.cs#L22-L33
It simply releases(despawn) every spawned vehicle (car, bus, tram, train etc.) and resets traffic data from all road segment(traffic flow, relative speed per lane etc.)
Does vehicle manager include pedestrians, dogs, seagulls, etc?
My assumption is that cims and animals are handled by CitizenManager and other things?
Yes they are.
Vehicle manager is managing following types of vehicles:
Rocket | Balloon | Blimp | CableCar | Monorail | Ferry | Vortex | Meteor | Helicopter | Tram | Bicycle | Plane | Ship | Train | Metro | Car
Animals have separate AI based on AnimalAI which is managed by CitizenManager, I think:
BirdAI(Seagull) | LivestockAI(Cow, Pig) | PerAI(Dog) | RescueAnimalAI | WildlifeAI
Are vans, trucks, emergency services, etc, grouped as CAR
?
Yup, 'Car' is general type, I will check that 😉
[Edit]
Yes, that's what I thought, TMPE just splits Car
to more specific types of RoadVehicle
see:
https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/blob/f574f0dc24ece8a5abe08769561008aacbbdba2b/TLM/TLM/Traffic/ExtVehicleType.cs#L7-L37
That's missing cargo planes?
Also, what about things like postal vans/trucks?
I notice Pedestrian is in there too... So shouldn't their `PerAI
animals also be despawned?
Ooops, wrong branch 😅 https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/blob/559b624c4ddb720ded7488ef7baba189e398e1d5/TLM/TLM/Traffic/ExtVehicleType.cs#L7-L38
In addition I have no idea why there is Pedestrian. Interesting that my code editor points that it is never used and I think that dogs can't spawn without cim (IIRC)
Added a list of affected traffic to the FAQ in docs: https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/wiki/Clear-Traffic
Doing new docs for "clear traffic" tool and it's not clear from old docs what traffic is cleared.
I assume all road traffic, but does that include cims, busses, trams, bicycles? What about other forms of traffic, such as cargo ships, ferries, trains, balloons, etc?
Is it possible to determine from the code what it clears?