JavidPack / BossChecklist

Mod for tModLoader to help with Boss Progression
https://forums.terraria.org/index.php?threads/boss-checklist-in-game-progression-checklist.50668/
60 stars 23 forks source link

Mod breaks world generation #52

Closed JavidPack closed 2 years ago

JavidPack commented 2 years ago

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

SheepishShepherd commented 2 years ago

I thought OnWorldLoad replaced Initialize.

JavidPack commented 2 years ago

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.

SheepishShepherd commented 2 years ago

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.

JavidPack commented 2 years ago

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