ASharpPen / Valheim.DropThat

The Unlicense
9 stars 3 forks source link

Mod breaks with the new update #172

Closed mms112 closed 5 days ago

mms112 commented 5 days ago

Fixing a bug, where the new update will cause the mod to break, when the Bogwitch update is released. This update introduces a new method "InstantiateAsync" for "UnityEngine.Object", which is returned by InstantiateGameObjectMethod instead of the original function "Instantiate". This ultimately causes some Harmony transpiler patches to fail. By replacing the "StartsWith" condition inside InstantiateGameObjectMethod with "Equals", this new function is not considered anymore, as an exact match of the name is required. This should have no effect for people, running an older Valheim version.

The breaking change happened with 0.219.13 (currently on PTB).

ASharpPen commented 5 days ago

Nicely spotted. Thanks!