patch spawn/despawn vehicle using new harmony
See original GitHub issuethis code is commented out: https://github.com/CitiesSkylinesMods/TMPE/blob/37b71da7e6f6793db1f2b579f14d96df02c7debf/TLM/TLM/Patch/_Vehicle/SpawnPatch.cs#L12 https://github.com/CitiesSkylinesMods/TMPE/blob/37b71da7e6f6793db1f2b579f14d96df02c7debf/TLM/TLM/Patch/_Vehicle/UnspawnPatch.cs#L12
Once I moved to harmony 2 should we uncomment this?
VehicleStateManager
no longer exists but we can call OnSpawnVehicle();
instead. that method is already being called from CustomVehicle.CustomSpawn()
so maybe I should delete Vehicle.Spawn/DespawnPatch
Issue Analytics
- State:
- Created 3 years ago
- Comments:21 (10 by maintainers)
Top Results From Across the Web
Service vehicles are not spawning :: Cities: Skylines ...
Service vehicles in my cities are not spawning anymore. The service buildings are sending only 2 vehicles outside.
Read more >Truck Tries to Spawn, but Instantly Despawns
It is attempting to spawn a truck to export, but the truck instantly despawns and the goods go back into the building. Every...
Read more >Delete/upgrade a road and vehicles despawn rather than ...
With regards to removing segment, vehicles are despawned only if there is no path to their destination e.g. if you delete segment before...
Read more >Vehicles - Plugins
Spawn any type of vehicle prefab with custom commands, permissions, cooldown, starting fuel, fuel consumption, extra seats and extra mounts.
Read more >Vehicles (and wheels) – spawn, despawn, persistence
Wheels seem to be persistent, yes. I find it makes sense to remove them, so other items can (re)spawn in the vacant slot....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Re:
StockPathFind.cs
: We keep it so we can do diffs when new game version is released.BTW, I looking at the code in screenshots above, note that there are two different call contexts:
CustomSpawn()
is called for vehicle and each trailer (if applicable) - ie. it can be called more than once per invocation of parent methodOnSpawnVehicle()
is called only once, regardless of how many trailersSo I think we need two postfixes? One for the vanilla
.Spawn()
and one for whatever the parent method is of the code in the screenshots above.TMPE is now harmony only.