/// <summary> /// Hook on <see cref="ObjectDB.CopyOtherDB"/> to add custom items to FejdStartup screen (aka main menu) /// </summary> /// <param name="orig"></param> /// <param name="self"></param> /// <param name="other"></param> private void RegisterCustomDataFejd(On.ObjectDB.orig_CopyOtherDB orig, ObjectDB self, ObjectDB other) { OnVanillaItemsAvailable?.SafeInvoke(); orig(self, other); if (SceneManager.GetActiveScene().name == "start") { var isValid = self.IsValid(); ItemDropMockFix.Switch(!isValid); if (isValid) { RegisterCustomItems(self); self.UpdateItemHashes(); } } }
private void InvokeOnVanillaItemsAvailable() { OnVanillaItemsAvailable?.SafeInvoke(); }