Esempio n. 1
0
        public static void Init()
        {
            On.ObjectDB.Awake  += AddCustomData;
            On.ZNetScene.Awake += AddCustomPrefabsToZNetSceneDictionary;

            SaveCustomData.Init();

            ItemDropMockFix.Switch(true);
        }
Esempio n. 2
0
        internal static void Init()
        {
            On.ObjectDB.Awake += AddCustomData;
            On.Player.Load    += ReloadKnownRecipes;

            SaveCustomData.Init();

            ItemDropMockFix.Switch(true);
        }
Esempio n. 3
0
        public static void Init()
        {
            On.ObjectDB.Awake  += AddCustomData;
            On.ZNetScene.Awake += AddCustomPrefabsToZNetSceneDictionary;
            On.Player.Load     += ReloadKnownRecipes;

            SaveCustomData.Init();

            ItemDropMockFix.Switch(true);
        }
Esempio n. 4
0
        private static void AddCustomData(On.ObjectDB.orig_Awake orig, ObjectDB self)
        {
            var isValid = self.IsValid();

            ItemDropMockFix.Switch(!isValid);

            orig(self);

            if (isValid)
            {
                self.AddCustomItems();
                self.AddCustomRecipes();
                self.AddCustomStatusEffects();

                self.UpdateItemHashes();

                OnAfterInit?.Invoke();
                OnAfterInit = null;
            }
        }