Closed JavidPack closed 2 years ago
I thought OnWorldLoad replaced Initialize.
Well, it kinda does, but it's only called on world loading, not when the world is being created. I'm not sure if we missed something or if this is intended.
Would a null check suffice, at least for now, just so the mod is playable for new worlds? I'm under the assumption that this issue is happening in the latest published version.
Yeah, something simple should fix it. I'm just miffed that the duplicate code has to be written. For now we should just fix it a less elegant way
https://github.com/JavidPack/BossChecklist/blob/c9637f8649c0dcdea9a9b6d18d1881c45f8b1fa6/WorldAssist.cs#L188-L192
This code assumes worldRecords isn't null, but it can be, we'll need to initialize data structures outside of OnWorldLoad to ensure they aren't null. 1.3 used Initialize, which doesn't seem to be in 1.4, this is probably something we need to make sure is added back into the 1.4 alpha