LinkShipLogFacts before SetMindSlideCollection to prevent NRE

This commit is contained in:
JohnCorby 2022-10-10 17:26:14 -07:00
parent bec7560a9f
commit 308a83e6f3

View File

@ -321,14 +321,10 @@ namespace NewHorizons.Builder.Props
var mindSlideCollection = standingTorch.AddComponent<MindSlideCollection>(); var mindSlideCollection = standingTorch.AddComponent<MindSlideCollection>();
mindSlideCollection._slideCollectionContainer = slideCollectionContainer; mindSlideCollection._slideCollectionContainer = slideCollectionContainer;
// Make sure that these slides play when the player wanders into the beam
slideCollectionContainer._initialized = true; // Hack to avoid initialization in the following call (it would throw NRE)
mindSlideProjector.SetMindSlideCollection(mindSlideCollection);
slideCollectionContainer._initialized = false;
LinkShipLogFacts(info, slideCollectionContainer); LinkShipLogFacts(info, slideCollectionContainer);
mindSlideProjector.SetMindSlideCollection(mindSlideCollection);
return standingTorch; return standingTorch;
} }