Skip to content

Commit

Permalink
Fix missing mods to locations
Browse files Browse the repository at this point in the history
We need to modify locations every time they are loaded, not just once!
  • Loading branch information
joeyparrish committed Jun 15, 2022
1 parent 1aaeeae commit 041b310
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Pokeheim/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,13 @@ private static void NotifyVanillaPrefabsAvailable() {
}

private static void NotifyVanillaLocationsAvailable() {
ZoneManager.OnVanillaLocationsAvailable -= NotifyVanillaLocationsAvailable;
// NOTE: We _do not_ remove the listener from ZoneManager. If we do,
// modifications to vanilla locations fail. See this note from the
// Jotunn docs:
//
// > Adding custom and cloned locations & vegetation must only be done
// > once. Modifications to vanilla locations & vegetation must be
// > repeated every time!

foreach (Action callback in OnVanillaLocationsAvailable.GetInvocationList()) {
try {
Expand Down

0 comments on commit 041b310

Please sign in to comment.