question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

patch spawn/despawn vehicle using new harmony

See original GitHub issue

this 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:closed
  • Created 3 years ago
  • Comments:21 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
originalfoocommented, Apr 27, 2020

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 method
  • OnSpawnVehicle() is called only once, regardless of how many trailers

So 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.

0reactions
kianzarrincommented, Dec 20, 2021

TMPE is now harmony only.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found