private void playerSystemStartHook(On.PlayerSystem.orig_Start orig, PlayerSystem self) { orig(self); qsm.LoadConfig(); defaultSlotItems = new Item[8]; secondarySlotItems = new Item[8]; qsm.SetCurrentCharacter(self.CharUID, self.Name); }
private void PlayerSystem_StartHook(On.PlayerSystem.orig_Start orig, PlayerSystem self) { // Run default PlayerSystem.Start() code first orig(self); // call LoadConfig() method from betterQuickSlotsMod class betterQuickSlots.LoadConfig(); betterQuickSlots.SetCurrentCharacter(self.CharUID, self.Name); //Set local class variable charUID to the appropriate UID from PlayerSystem charUID = self.CharUID; Debug.Log("TEST LOG: " + self.CharUID + " | " + self.Name + " ran for PlayerSystem.Start()"); LoadQuickSlotArraysFromJSON(self.CharUID, self.Name); charCurrentBarMode[self.CharUID] = BarMode.FIRST; PopulateSkillBar(self.ControlledCharacter); }