From 041b3104257d7c453cde127b303ee0bd4e1e38a9 Mon Sep 17 00:00:00 2001 From: Joey Parrish Date: Wed, 15 Jun 2022 10:15:38 -0700 Subject: [PATCH] Fix missing mods to locations We need to modify locations every time they are loaded, not just once! --- Pokeheim/Utils.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Pokeheim/Utils.cs b/Pokeheim/Utils.cs index 5bf9d77..b57146b 100644 --- a/Pokeheim/Utils.cs +++ b/Pokeheim/Utils.cs @@ -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 {